/* ═══════════════════════════════════════════════════════════
   Qism al Tahfeez - Landing Page Styles
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary-color: #8B6F47;
    --secondary-color: #D4A373;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --text-color: #333;
    --text-muted: #7f8c8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══ Navigation ═══ */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar-nav a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-nav a:hover {
    color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* ═══ Hero Section ═══ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Hero CTA Buttons */
.hero-cta {
    margin-top: 35px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ═══ Section Styles ═══ */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--light-bg);
}

.section-title {
    font-size: 2.2rem;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.section-divider {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.5rem;
    padding: 20px 0;
}

/* ═══ Features Grid ═══ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
}

/* ═══ Stats Section ═══ */
.stats-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5078 50%, #1e3a5f 100%);
    color: white;
    padding: 80px 0;
}

.stats-section .section-title {
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stats-section .section-subtitle {
    color: rgba(255,255,255,0.9);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    align-items: start;
}

.stat-item {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 140px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.6;
    white-space: nowrap;
}

/* ═══ Testimonials Section ═══ */
.testimonials-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonials-track {
    position: relative;
    min-height: 280px;
}

.testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.testimonial-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.testimonial-quote {
    font-size: 1.15rem;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    line-height: 0;
    display: block;
    margin-bottom: 15px;
}

.testimonial-author {
    font-weight: 600;
    color: var(--dark-color);
}

.testimonial-role {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.testimonials-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-prev,
.testimonial-next {
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.testimonials-dots {
    display: flex;
    gap: 10px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.testimonial-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* ═══ Alumni Section ═══ */
.alumni-section {
    padding: 80px 0;
}

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.alumni-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.alumni-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.alumni-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.alumni-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alumni-image .alumni-placeholder {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
}

.alumni-info {
    padding: 25px;
    text-align: center;
}

.alumni-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.alumni-year {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.alumni-achievement {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ═══ Blog Cards ═══ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card-image {
    height: 200px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 25px;
}

.blog-card-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.blog-card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ═══ Contact Section ═══ */
.contact-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 25px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-text {
    width: 100%;
    overflow: hidden;
}

.contact-text strong {
    display: block;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.contact-text a,
.contact-text span {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-word;
    display: block;
}

/* ═══ Footer ═══ */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.footer p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ═══ About Content ═══ */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.05rem;
}

/* ═══ Back to Top Button ═══ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ═══ Scroll Reveal Animations ═══ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation delays for grid items */
.features-grid .feature-card:nth-child(1) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.5s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.6s; }

.stats-grid .stat-item:nth-child(1) { transition-delay: 0.1s; }
.stats-grid .stat-item:nth-child(2) { transition-delay: 0.2s; }
.stats-grid .stat-item:nth-child(3) { transition-delay: 0.3s; }
.stats-grid .stat-item:nth-child(4) { transition-delay: 0.4s; }

/* ═══ Responsive ═══ */
@media (max-width: 992px) {
    .contact-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-item {
        min-height: 120px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        white-space: normal;
        font-size: 0.85rem;
    }
    
    .testimonial-content {
        padding: 25px;
    }
    
    .testimonial-quote {
        font-size: 1rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-item {
        padding: 20px 10px;
        min-height: 100px;
    }
    
    .alumni-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══ Floating WhatsApp Button ═══ */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: white;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: whatsapp-pulse 2s infinite;
    z-index: -1;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ═══ FAQ Section ═══ */
.faq-section {
    background: var(--light-bg);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: background 0.3s, color 0.3s;
}

.faq-question:hover {
    background: var(--light-bg);
}

.faq-question.active {
    color: var(--primary-color);
    background: var(--light-bg);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
    color: var(--primary-color);
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer.open {
    max-height: 500px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: var(--text-color);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .faq-answer.open {
        padding: 0 20px 15px;
    }
}
