/* ============================================
   Dark Mode Overrides
   ============================================ */
body.dark-theme {
    background-color: var(--bg-dark-body);
    color: var(--text-dark-primary);
}

body.dark-theme .header {
    background: rgba(18, 18, 18, 0.95);
}

body.dark-theme .nav-link {
    color: var(--text-dark-primary);
}

body.dark-theme .stat-card,
body.dark-theme .program-card,
body.dark-theme .leader-card {
    background: var(--bg-dark-card);
    color: var(--text-dark-primary);
}

body.dark-theme .section-subtitle,
body.dark-theme .program-desc,
body.dark-theme .leader-quote {
    color: var(--text-dark-muted);
}

/* ============================================
   Leadership Section
   ============================================ */
.leadership {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

body.dark-theme .leadership {
    background: var(--bg-dark-body);
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    max-width: 1000px;
    margin: 0 auto;
}

.leader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl);
    border-radius: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 82, 165, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.leader-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 82, 165, 0.15);
}

.leader-card:hover::before {
    transform: scaleX(1);
}

.leader-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--space-lg);
    border: 6px solid white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.leader-card:hover .leader-img {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 82, 165, 0.2);
}

body.dark-theme .leader-img {
    border-color: var(--bg-dark-card);
}

body.dark-theme .leader-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.leader-name {
    color: var(--primary-blue);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.leader-title {
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    margin-bottom: var(--space-md);
    padding: 0.5rem 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    display: inline-block;
}

.leader-quote {
    font-style: italic;
    color: var(--neutral-gray);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 400px;
    position: relative;
    padding: 0 1rem;
}

.leader-quote::before {
    content: '"';
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 3rem;
    color: var(--primary-light);
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* ============================================
   Media Gallery
   ============================================ */
.gallery {
    padding: var(--space-3xl) 0;
    background: var(--neutral-light);
}

body.dark-theme .gallery {
    background: #0f0f0f;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    grid-auto-rows: 280px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    box-shadow: 0 12px 40px rgba(0, 82, 165, 0.2);
    transform: translateY(-6px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.12);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 82, 165, 0.9) 0%, rgba(0, 56, 117, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-weight: 600;
    padding: var(--space-lg);
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ============================================
   Zakat Calculator
   ============================================ */
.zakat-calculator {
    padding: var(--space-3xl) 0;
    background: var(--gradient-primary);
    color: white;
}

.calc-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--space-2xl);
    border-radius: 20px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calc-input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.95;
}

.calc-input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--neutral-dark);
    transition: all 0.3s ease;
}

.calc-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.calc-result {
    text-align: center;
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.calc-result h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    opacity: 0.9;
}

.calc-result-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin: var(--space-md) 0;
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

/* Header Extras */
.nav-extra {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 1rem;
}

.lang-selector {
    background: transparent;
    border: 2px solid var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-selector:hover {
    background: var(--primary-light);
    color: white;
}

body.dark-theme .lang-selector {
    color: white;
    border-color: #555;
}

body.dark-theme .lang-selector:hover {
    background: #555;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem;
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
}

/* ============================================
   Responsive - Mobile Optimizations
   ============================================ */
@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .calc-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 2000;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    }

    body.dark-theme .nav-links {
        background: rgba(18, 18, 18, 0.98);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.75rem;
        font-weight: 600;
    }

    .nav-extra {
        flex-direction: row;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .leader-img {
        width: 150px;
        height: 150px;
    }

    .leader-name {
        font-size: 1.5rem;
    }

    .calc-result-value {
        font-size: 2.25rem;
    }
}