/* ==========================================================================
   Jamaatul-Ash-Ariy — Public Site
   Design system: "Bahari" — Swahili-coast editorial, not generic SaaS.
   Deep teal-navy ink, warm paper backgrounds, brass accent, a wave motif
   standing in for the sea the school is named after.
   ========================================================================== */

:root {
    /* ---- color ---- */
    --ink: #10222c;
    --ink-soft: #4a5f68;
    --bahari: #1c6e8c;
    --bahari-deep: #0b3b4d;
    --bahari-light: #4a93ac;
    --brass: #b8863b;
    --brass-light: #d4af6a;
    --coral: #c1614a;
    --paper: #faf6ee;
    --paper-deep: #f1e9d8;
    --line: #e4dbc8;
    --white: #ffffff;

    /* ---- type ---- */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --text-xs: 0.8125rem;   /* 13px */
    --text-sm: 0.9375rem;   /* 15px */
    --text-base: 1rem;      /* 16px */
    --text-md: 1.125rem;    /* 18px */
    --text-lg: 1.375rem;    /* 22px */
    --text-xl: 1.75rem;     /* 28px */
    --text-2xl: 2.25rem;    /* 36px */
    --text-3xl: 2.75rem;    /* 44px */
    --text-hero: clamp(2.25rem, 4.4vw, 3.5rem);

    /* ---- spacing (4px grid) ---- */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 34, 44, 0.06), 0 1px 1px rgba(16, 34, 44, 0.04);
    --shadow-md: 0 8px 24px rgba(16, 34, 44, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: var(--text-base);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    width: 100%;
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

/* Faint mashrabiya-lattice texture, reused as a quiet background motif */
:root {
    --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'%3E%3Cpath d='M28 0 L56 28 L28 56 L0 28 Z'/%3E%3Ccircle cx='28' cy='28' r='11'/%3E%3C/g%3E%3C/svg%3E");
}

.mobile-menu-checkbox {
    display: none;
}

/* ---- Header ---- */
header {
    background: var(--bahari-deep);
    color: var(--white);
    padding: var(--sp-3) var(--sp-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section img {
    height: 42px;
    margin-right: var(--sp-3);
    border-radius: var(--radius-sm);
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    margin-left: var(--sp-6);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: var(--sp-2) 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
    color: var(--white);
    border-bottom-color: var(--brass-light);
}

nav a.btn-login {
    background: var(--brass);
    color: var(--bahari-deep);
    padding: var(--sp-2) var(--sp-5);
    border-radius: var(--radius-sm);
    border-bottom: none;
    font-weight: 600;
}

nav a.btn-login:hover {
    background: var(--brass-light);
    border-bottom: none;
}

@media (max-width: 768px) {
    header {
        padding: var(--sp-3) var(--sp-4);
        position: relative;
    }

    .logo-text {
        font-size: var(--text-base);
    }

    .logo-section img {
        height: 36px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bahari-deep);
        flex-direction: column;
        align-items: stretch;
        padding: var(--sp-3) 0;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #mobile-menu:checked ~ nav {
        display: flex !important;
    }

    nav a {
        margin: 0;
        padding: var(--sp-4) var(--sp-8);
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: var(--text-base);
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a.btn-login {
        margin: var(--sp-2) var(--sp-8) 0;
    }

    #mobile-menu:checked ~ .mobile-menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #mobile-menu:checked ~ .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu:checked ~ .mobile-menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ---- Hero ---- */
.hero {
    position: relative;
    text-align: left;
    padding: var(--sp-20) var(--sp-8) var(--sp-16);
    background-color: var(--bahari-deep);
    background-size: cover;
    background-position: center;
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(11, 59, 77, 0.94) 0%, rgba(11, 59, 77, 0.72) 48%, rgba(11, 59, 77, 0.5) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 64px;
    background-color: var(--paper);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C150,60 350,0 600,30 C850,60 1050,0 1200,30 L1200,60 L0,60 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C150,60 350,0 600,30 C850,60 1050,0 1200,30 L1200,60 L0,60 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-content::before {
    content: "Jamaatul-Ash-Ariy \2022 Zanzibar";
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brass-light);
    margin-bottom: var(--sp-4);
}

.hero h1 {
    font-size: var(--text-hero);
    color: var(--white);
    font-weight: 600;
    line-height: 1.1;
    min-height: 0;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    display: block;
}

.hero h1.typing::after {
    content: "|";
    animation: blink 0.7s infinite;
    margin-left: 2px;
    font-weight: 400;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero p {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-style: italic;
    margin: var(--sp-4) 0 var(--sp-8);
    max-width: 560px;
    color: var(--paper-deep);
    line-height: 1.5;
    min-height: 0;
    opacity: 0;
    display: block;
}

.hero p.visible {
    animation: fadeIn 0.5s ease-out forwards;
}

.hero p.typing::after {
    content: "|";
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

.hero-buttons {
    display: flex;
    gap: var(--sp-5);
    align-items: center;
    flex-wrap: wrap;
    opacity: 0;
}

.hero-buttons.visible {
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--brass);
    color: var(--bahari-deep);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--brass-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: var(--sp-3) var(--sp-5);
}

.btn-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Features ---- */
.features-section {
    padding: var(--sp-16) var(--sp-8);
    background: var(--paper);
}

.section-header {
    max-width: 640px;
    margin: 0 auto var(--sp-12);
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.6s ease;
}

.section-header.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-header h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-3);
}

.section-header p {
    font-size: var(--text-md);
    color: var(--ink-soft);
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--sp-6);
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--sp-8) var(--sp-6);
    text-align: left;
    box-shadow: none !important;
    border: 1px solid var(--line);
    border-top: 3px solid var(--bahari);
    transition: border-color 0.25s ease, transform 0.25s ease;
    opacity: 0;
    transform: translateY(24px);
}

.feature.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature:hover {
    border-color: var(--bahari);
    transform: translateY(-3px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--sp-5);
    background: var(--bahari-deep);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature:hover .feature-icon {
    background: var(--bahari);
}

.feature i {
    font-size: var(--text-md);
    color: var(--white);
}

.feature h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--sp-2);
    font-weight: 600;
}

.feature p {
    color: var(--ink-soft);
    line-height: 1.6;
    font-size: var(--text-sm);
}

/* Programs as a slider (matches teachers carousel) */
.programs-section {
    background: linear-gradient(180deg, #f8fafb 0%, #f4f6f7 100%);
    padding-top: var(--section-gap, 88px);
    padding-bottom: var(--section-gap, 88px);
}

.programs-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 56px;
}

.programs-track-wrap {
    overflow: hidden;
    border-radius: 16px;
}

.programs-track {
    display: flex;
    gap: 22px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.program-card {
    flex: 0 0 calc((100% - 44px) / 3);  /* 3 per view */
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--gray-200, #e9ecee);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(16, 34, 44, 0.12);
}

.program-icon {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--bahari-deep, #0b3b4d), var(--bahari, #1c6e8c));
    color: var(--brass-light, #d4af6a);
    position: relative;
    overflow: hidden;
}

.program-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.09), transparent 60%);
}

.program-content {
    padding: 24px 22px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-content h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--ink, #10222c);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.program-age {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brass, #b8863b);
    background: rgba(184, 134, 59, 0.09);
    padding: 4px 9px;
    border-radius: 6px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.program-description {
    font-size: 0.9375rem;
    line-height: 1.62;
    color: var(--ink-soft, #55677a);
    margin-bottom: 18px;
    flex: 1;
}

.program-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bahari, #1c6e8c);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease, color 0.25s ease, gap 0.25s ease;
    align-self: flex-start;
}

.program-btn::after { content: '→'; transition: transform 0.25s ease; }
.program-btn:hover {
    color: var(--bahari-deep, #0b3b4d);
    border-bottom-color: var(--brass, #b8863b);
    gap: 10px;
}

/* Arrows */
.programs-slider .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gray-300, #d7dce0);
    background: #fff;
    color: var(--bahari, #1c6e8c);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(16, 34, 44, 0.08);
    transition: all 0.25s ease;
}

.programs-slider .carousel-btn:hover {
    background: var(--bahari, #1c6e8c);
    color: #fff;
    border-color: var(--bahari, #1c6e8c);
}

.programs-slider .carousel-btn.prev-btn { left: 0; }
.programs-slider .carousel-btn.next-btn { right: 0; }

.programs-slider .carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Dots */
.programs-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
}

.programs-dots button {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: var(--gray-300, #d7dce0);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.programs-dots button.active {
    width: 22px;
    background: var(--brass, #b8863b);
}

/* Responsive */
@media (max-width: 992px) {
    .program-card { flex: 0 0 calc((100% - 22px) / 2); }  /* 2 per view */
}

@media (max-width: 640px) {
    .programs-slider { padding: 0 16px; }
    .program-card { flex: 0 0 100%; }                       /* 1 per view */
    .programs-slider .carousel-btn { width: 36px; height: 36px; }
    .programs-slider .carousel-btn.prev-btn { left: -4px; }
    .programs-slider .carousel-btn.next-btn { right: -4px; }
}

/* ---- Teachers ---- */
.teachers-section {
    padding: var(--sp-16) var(--sp-8);
    background: var(--paper);
}

.teachers-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-10);
}

.teachers-carousel-wrapper {
    overflow: hidden;
    margin: 0 calc(var(--sp-3) * -1);
    padding: 0 var(--sp-3);
}

.teachers-carousel {
    display: flex;
    gap: var(--sp-6);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--sp-2) 0;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-6);
    max-width: 1200px;
    margin: 0 auto;
}

.teacher-card {
    flex: 0 0 calc(25% - 18px);
    min-width: 240px;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none !important;
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.teacher-card:nth-child(1) { animation-delay: 0.05s; }
.teacher-card:nth-child(2) { animation-delay: 0.1s; }
.teacher-card:nth-child(3) { animation-delay: 0.15s; }
.teacher-card:nth-child(4) { animation-delay: 0.2s; }
.teacher-card:nth-child(5) { animation-delay: 0.25s; }
.teacher-card:nth-child(6) { animation-delay: 0.3s; }

.teacher-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

.teacher-image {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: var(--bahari-deep);
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    opacity: 0;
    animation: fadeInImage 0.6s ease forwards;
}

.teacher-card:hover .teacher-image img {
    transform: scale(1.04);
}

.teacher-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 59, 77, 0) 40%, rgba(11, 59, 77, 0.85) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: var(--sp-4);
    transition: opacity 0.3s ease;
}

.teacher-card:hover .teacher-overlay {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: var(--sp-3);
}

.social-links a {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bahari-deep);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.social-links a:hover {
    background: var(--brass-light);
    color: var(--bahari-deep);
}

.teacher-info {
    padding: var(--sp-5) var(--sp-4);
    text-align: left;
}

.teacher-info h3 {
    font-size: var(--text-md);
    margin-bottom: var(--sp-1);
    font-weight: 600;
}

.teacher-role {
    color: var(--bahari);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: var(--sp-3);
    background: none;
    padding: 0;
}

.teacher-description {
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: var(--sp-3);
    font-size: var(--text-xs);
}

.teacher-qualifications {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.teacher-qualifications span {
    background: var(--paper-deep);
    color: var(--ink-soft);
    padding: 3px var(--sp-2);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--line);
}

.teacher-qualifications .status-badge {
    background: rgba(28, 110, 140, 0.1);
    color: var(--bahari);
    border-color: var(--bahari);
}

.teacher-qualifications .status-badge.status-inactive {
    background: rgba(193, 97, 74, 0.12);
    color: var(--coral);
    border-color: var(--coral);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--bahari-deep);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--bahari);
    border-color: var(--bahari);
    color: var(--white);
}

.carousel-btn.prev-btn { left: 0; }
.carousel-btn.next-btn { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    margin-top: var(--sp-6);
}

.carousel-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dots .dot:hover {
    background: var(--bahari-light);
}

.carousel-dots .dot.active {
    background: var(--bahari);
    width: 18px;
    border-radius: 4px;
}

@media (max-width: 1200px) {
    .teacher-card { flex: 0 0 calc(33.33% - 16px); }
}

@media (max-width: 992px) {
    .teacher-card { flex: 0 0 calc(50% - 12px); }
}

@media (max-width: 768px) {
    .teachers-section { padding: var(--sp-10) var(--sp-4); }
    .teachers-carousel-container { padding: 0 var(--sp-8); }
    .teacher-card { flex: 0 0 calc(100% - 12px); min-width: unset; }
    .carousel-btn { width: 32px; height: 32px; font-size: var(--text-xs); }
    .teacher-image { height: 170px; }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInImage {
    to { opacity: 1; }
}

/* ---- CTA ---- */
.cta-section {
    background: var(--bahari-deep);
    background-image: var(--lattice);
    color: var(--white);
    text-align: center;
    padding: var(--sp-16) var(--sp-8);
    position: relative;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.6s ease;
}

.cta-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-3);
    color: var(--white);
}

.cta-content p {
    font-size: var(--text-md);
    margin-bottom: var(--sp-8);
    line-height: 1.6;
    color: var(--paper-deep);
}

.cta-buttons {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    border-color: var(--brass-light);
    color: var(--brass-light);
    background: rgba(255, 255, 255, 0.05);
}

/* ---- Footer ---- */
footer {
    background: var(--ink);
    color: rgba(250, 246, 238, 0.72);
    padding: var(--sp-12) var(--sp-8) var(--sp-6);
    text-align: left;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-8);
    margin-bottom: var(--sp-8);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section h3 {
    color: var(--brass-light);
    margin-bottom: var(--sp-4);
    font-size: var(--text-md);
    font-weight: 600;
}

.footer-section a {
    color: rgba(250, 246, 238, 0.68);
    text-decoration: none;
    display: block;
    margin-bottom: var(--sp-2);
    transition: color 0.2s ease;
    font-size: var(--text-sm);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(250, 246, 238, 0.12);
    padding-top: var(--sp-5);
    text-align: center;
    color: rgba(250, 246, 238, 0.5);
    font-size: var(--text-xs);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom a {
    color: var(--brass-light) !important;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .programs-grid,
    .features {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: var(--sp-16) var(--sp-4) var(--sp-12);
        min-height: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-3);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-buttons .btn {
        max-width: 320px;
    }

    .features-section,
    .programs-section,
    .teachers-section,
    .cta-section {
        padding: var(--sp-10) var(--sp-4);
    }

    .section-header h2 { font-size: var(--text-xl); }
    .section-header p { font-size: var(--text-sm); }

    .features,
    .programs-grid,
    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .programs-cta { padding: var(--sp-8) var(--sp-5); }
    .cta-buttons { flex-direction: column; align-items: center; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    header { padding: var(--sp-3); }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: var(--text-base); }
    .cta-content h2 { font-size: var(--text-xl); }
}

/* ---- Utility & polish ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--bahari); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--bahari-deep); }

.btn:focus,
nav a:focus,
.program-btn:focus,
.social-links a:focus {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
    .hero, .cta-section, .programs-section {
        background: #fff !important;
        color: var(--ink) !important;
    }
    .btn, .program-btn {
        border: 1px solid var(--bahari) !important;
        background: #fff !important;
        color: var(--bahari) !important;
    }
}
