/* ==========================================================================
   منصتك — landing page

   Design tokens, base reset and shared primitives live in css/site.css, which
   MUST be linked before this file. Here: landing-page layout top-to-bottom in
   the order sections appear in index.html, then motion, then responsive.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll progress bar
   -------------------------------------------------------------------------- */
.scroll-progress {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--lime));
    z-index: 1000;
    transition: width .1s linear;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: sticky;
    inset-block-start: 0;
    z-index: 900;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}

.header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* flex-shrink:0 on both: otherwise the nav menu squeezes the logo to nothing. */
.logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.logo-icon { height: 44px; width: 44px; flex-shrink: 0; object-fit: contain; }

/* Both logo files are now transparent PNGs of the same artwork, so this swap is
   currently a no-op — kept as the hook for a dark-specific variant. */
[data-theme="dark"] .logo-icon { content: url('../images/logo-dark.png'); }
.logo-text { font-weight: 900; color: var(--brand); font-size: 1.25rem; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
}

.nav-link {
    display: inline-block;
    padding: .5rem .8rem;
    border-radius: 10px;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    inset-block-end: 4px;
    inset-inline-start: .8rem;
    width: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transition: width .3s var(--ease);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: calc(100% - 1.6rem); }

.auth-button {
    display: inline-block;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    transition: var(--transition);
    white-space: nowrap;
    /* startNowBtn is a <button>, not an <a> like the rest of this class used
       to be exclusively -- a <button> carries a UA-default border/background
       that showed up as a stray black outline around the pill. */
    border: none;
    background: none;
    cursor: pointer;
}

.auth-button.login {
    color: var(--brand);
    border: 1.5px solid var(--brand);
}

.auth-button.login:hover {
    background: var(--brand);
    color: #fff;
}

.auth-button.register {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px rgba(19, 121, 128, .28);
}

.auth-button.register:hover {
    background: var(--brand-600);
    transform: translateY(-2px);
}

/* .theme-toggle is defined in site.css */

/* Hamburger — hidden until the mobile breakpoint */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .2s var(--ease);
}

.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
    overflow: hidden;
    isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

/* Fade the hero out into the page background instead of ending on a hard edge
   where the blobs and grid stop. */
.hero-bg::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    height: 220px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to left, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    /* Fade the grid out toward the edges so it never hits a hard line. */
    mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 78%);
    opacity: .5;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: drift 18s ease-in-out infinite;
}

.blob-1 { width: 46vw; height: 46vw; max-width: 560px; max-height: 560px; background: var(--brand); inset-block-start: -12%; inset-inline-end: -8%; }
.blob-2 { width: 34vw; height: 34vw; max-width: 420px; max-height: 420px; background: var(--lime); inset-block-end: -14%; inset-inline-start: -6%; animation-delay: -6s; }
.blob-3 { width: 26vw; height: 26vw; max-width: 320px; max-height: 320px; background: var(--brand-600); inset-block-start: 45%; inset-inline-start: 42%; animation-delay: -11s; opacity: .3; }

[data-theme="dark"] .blob { opacity: .28; }

.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    background: var(--brand-100);
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero-badge i { color: var(--lime-600); }

.hero-title {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
    background: linear-gradient(120deg, var(--text) 30%, var(--brand) 75%, var(--lime-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-muted);
    max-width: 56ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 2rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-600));
    box-shadow: 0 10px 26px rgba(19, 121, 128, .32);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    /* startNowHeroBtn / startNowCtaBtn are <button>s now, not <a>s -- see the
       matching note on .auth-button. */
    border: none;
    cursor: pointer;
}

/* Sheen that sweeps across on hover */
.cta-button::after {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transition: inset-inline-start .6s var(--ease);
}

.cta-button:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(19, 121, 128, .42); }
.cta-button:hover::after { inset-inline-start: 120%; }

.cta-button.light {
    background: #fff;
    color: var(--brand-700);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--text);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: var(--transition);
}

.ghost-button:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-3px);
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    list-style: none;
    color: var(--text-muted);
    font-size: .95rem;
}

.hero-points i { color: var(--lime-600); margin-inline-end: .35rem; }

/* --- Hero visual (decorative product mock) --- */
.hero-visual { position: relative; }

.mock-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: float 7s ease-in-out infinite;
}

.mock-bar {
    display: flex;
    gap: .4rem;
    padding: .8rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mock-bar span:first-child { background: #ff5f57; }
.mock-bar span:nth-child(2) { background: #febc2e; }
.mock-bar span:nth-child(3) { background: #28c840; }

.mock-body { padding: 1.4rem; display: grid; gap: .9rem; }

.mock-row { height: 12px; border-radius: 6px; background: var(--surface-2); }
.mock-row.short { width: 55%; }
.mock-title { height: 20px; width: 45%; background: linear-gradient(90deg, var(--brand), var(--lime)); opacity: .75; }

.mock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }

.mock-card {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-100);
    color: var(--brand);
    font-size: 1.2rem;
    animation: pulseCard 4s ease-in-out infinite;
}

.mock-card:nth-child(2) { animation-delay: .4s; }
.mock-card:nth-child(3) { animation-delay: .8s; }
.mock-card:nth-child(4) { animation-delay: 1.2s; }

.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: .88rem;
    font-weight: 700;
    animation: float 6s ease-in-out infinite;
}

.float-chip i { color: var(--brand); }
.chip-1 { inset-block-start: 8%; inset-inline-start: -6%; animation-delay: -2s; }
.chip-2 { inset-block-end: 10%; inset-inline-end: -4%; animation-delay: -4s; }

/* Centred with a flex row rather than a transform so it stays put in both
   directions; the label makes the affordance obvious. */
.scroll-hint {
    position: absolute;
    inset-block-end: 1.25rem;
    inset-inline: 0;
    margin-inline: auto;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 700;
    transition: color .3s var(--ease);
}

.scroll-hint:hover { color: var(--brand); }

.scroll-hint i {
    font-size: .95rem;
    color: var(--brand);
    animation: nudgeDown 1.8s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */
section { padding: clamp(3.5rem, 7vw, 6rem) 0; }

.section-eyebrow {
    display: block;
    text-align: center;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .08em;
    font-size: .85rem;
    margin-bottom: .6rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -.015em;
    margin-bottom: .75rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 62ch;
    margin: 0 auto clamp(2rem, 4vw, 3.25rem);
    font-size: 1.05rem;
}

.section-subtitle:empty { display: none; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
/* Tinted bands ease in and out of the page background rather than butting
   against it, so no visible seam between sections. */
.stats,
.courses,
.our-teachers,
.faq-preview {
    background: linear-gradient(
        to bottom,
        var(--bg) 0%,
        var(--bg-alt) 12%,
        var(--bg-alt) 88%,
        var(--bg) 100%
    );
}

/* Flex rather than grid: with only one or two active stats, auto-fit columns
   would stretch a lone card across the full width. */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.stats-grid .stat-card {
    flex: 1 1 210px;
    max-width: 320px;
}

/* Scoped to .stats-grid: `.stat-label` is also used by the teacher cards. */
.stats-grid .stat-card {
    text-align: center;
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stats-grid .stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.stats-grid .stat-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-100);
    color: var(--brand);
    font-size: 1.3rem;
}

.stats-grid .stat-value {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.stats-grid .stat-label { color: var(--text-muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */
/* 320px min caps this at 3 columns on a 1200px container, so the common
   6-feature case lands as two even rows instead of 4 + an orphan pair. */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    position: relative;
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}

/* Accent bar grows along the top edge on hover */
.feature-card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--lime));
    transition: width .4s var(--ease);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

.feature-card:hover::before { width: 100%; }

.feature-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-100), color-mix(in srgb, var(--lime) 22%, transparent));
    color: var(--brand);
    font-size: 1.45rem;
    margin-bottom: 1.25rem;
    transition: transform .35s var(--ease);
}

.feature-card:hover .feature-icon { transform: scale(1.08) rotate(-6deg); }

.feature-title { font-size: 1.2rem; font-weight: 800; margin-bottom: .6rem; }
.feature-description { color: var(--text-muted); font-size: .98rem; }

/* --------------------------------------------------------------------------
   Stages
   -------------------------------------------------------------------------- */
/* background: see the tinted-band gradient rule above */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.course-image {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.course-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 77, 83, .25), rgba(11, 77, 83, .78));
    transition: background .4s var(--ease);
}

.course-card:hover .course-image::after {
    background: linear-gradient(180deg, rgba(11, 77, 83, .35), rgba(11, 77, 83, .88));
}

.course-image h2 {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 900;
    text-align: center;
    padding: 0 1rem;
    transform: translateY(0);
    transition: transform .4s var(--ease);
}

.course-card:hover .course-image h2 { transform: translateY(-4px); }

.course-content {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.5rem;
    flex: 1;
}

.course-title { font-size: 1.1rem; font-weight: 800; }
.course-description { color: var(--text-muted); font-size: .96rem; flex: 1; }

.course-button {
    align-self: flex-start;
    padding: .7rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    transition: var(--transition);
}

.course-button:hover { background: var(--brand-600); transform: translateX(-4px); }

/* --------------------------------------------------------------------------
   Steps timeline
   -------------------------------------------------------------------------- */
.steps-timeline {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
    position: relative;
}

.step-item {
    counter-increment: step;
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* Big ghosted step number in the corner */
.step-item::before {
    content: counter(step);
    position: absolute;
    inset-block-start: .5rem;
    inset-inline-end: 1rem;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--brand);
    opacity: .1;
}

.step-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-100);
    color: var(--brand);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.step-title { font-size: 1.1rem; font-weight: 800; margin-bottom: .5rem; }
.step-description { color: var(--text-muted); font-size: .96rem; }

/* --------------------------------------------------------------------------
   Teachers carousel
   -------------------------------------------------------------------------- */
/* background: see the tinted-band gradient rule above */

.teachers-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.teachers-container { position: relative; width: 100%; min-height: 220px; }

/* Card layout (.teachers-page / .teacher-card) is owned by teacher-carts.css,
   which loads before this file. The overrides below re-skin the parts of it
   that predate the current design language. */

.teacher-card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow-sm) !important;
}

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

/* The stock avatar uses a thick lime ring + matching glow, which reads as neon
   against the current palette. Softer brand-tinted ring instead. */
.teachers-page .teacher-avatar {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    margin-bottom: 14px;
    border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
    box-shadow: var(--shadow-sm);
}

.teachers-page .teacher-card:hover .teacher-avatar {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}

.teachers-page .teacher-stats {
    gap: .75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Each stat becomes a compact tile instead of a bare floating glyph. */
.teachers-page .teacher-stats .stat {
    gap: .35rem;
    padding: .6rem .4rem;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.teachers-page .teacher-stats .stat:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    transform: translateY(-2px);
}

.teachers-page .teacher-stats .stat i {
    height: auto;
    font-size: .95rem;
    color: var(--brand);
}

.teachers-page .teacher-stats .stat span:not(.stat-label) {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.teachers-page .teacher-stats .stat-label {
    font-size: .75rem;
    color: var(--text-muted);
}

/* Flex (not grid) centring on purpose: index.js toggles these buttons with an
   inline `style.display = 'flex'`, which would override `display: grid` and
   leave the chevron stuck against the start edge. */
.carousel-arrow {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--brand);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.carousel-arrow:hover { background: var(--brand); color: #fff; transform: scale(1.08); }
.carousel-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active { width: 28px; background: var(--brand); }

/* Matched on the ID because teacher-carts.css styles #showAllTeachers, which
   outranks any class selector. The button is a child of the carousel flex row,
   so it gets its own full-width line instead of competing with the cards. */
#showAllTeachers.show-all-btn {
    flex: 0 0 100%;
    order: 3;
    width: fit-content;
    margin: 1.5rem auto 0;
    padding: .7rem 1.6rem;
    border-radius: 999px;
    border: 1.5px solid var(--brand);
    background: transparent;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: var(--transition);
}

#showAllTeachers.show-all-btn:hover {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* The row must wrap for the button's own line to work. */
.teachers-carousel { flex-wrap: wrap; }

/* Carousel loading / error / empty states */
.teachers-loading,
.teachers-error,
.no-teachers {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 220px;
    text-align: center;
    color: var(--text-muted);
}

.teachers-error i { font-size: 2.5rem; color: #e74c3c; }
.no-teachers i { font-size: 2.5rem; color: var(--text-muted); }

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.retry-btn {
    padding: .65rem 1.6rem;
    border: none;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.retry-btn:hover { background: var(--brand-600); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   News / announcement cards — image, then title, then body
   -------------------------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

.news-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
}

/* Absolutely positioned rather than height:100% -- a percentage height does not
   resolve against a box sized purely by aspect-ratio, which left the image at
   its natural height with dead space beneath it. */
.news-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.news-card:hover .news-image img { transform: scale(1.05); }

.news-badge {
    position: absolute;
    inset-block-start: .75rem;
    inset-inline-start: .75rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 92%, transparent);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.news-body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.5rem;
    flex: 1;
}

.news-title { font-size: 1.15rem; font-weight: 800; line-height: 1.4; }

/* Clamp the body so cards in a row stay the same height regardless of length. */
.news-content {
    color: var(--text-muted);
    font-size: .97rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .85rem;
}

.news-date i { color: var(--brand); margin-inline-end: .35rem; }

.news-card.is-link:hover .news-title { color: var(--brand); }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Column layout + flexible quote pins the author row to the bottom, so names
   line up across cards no matter how long each quote is. */
.testimonial-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem 1.75rem 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.testimonial-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.testimonial-card::before {
    content: '\201D';
    position: absolute;
    inset-block-start: -.25rem;
    inset-inline-end: 1.25rem;
    font-size: 4.5rem;
    line-height: 1;
    color: var(--brand);
    opacity: .14;
    font-family: Georgia, serif;
}

.testimonial-rating { color: #f5b731; margin-bottom: .75rem; font-size: .95rem; }
.testimonial-quote { color: var(--text-muted); margin-bottom: 1.25rem; flex: 1; }

.testimonial-author {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.testimonial-author img,
.testimonial-avatar-fallback {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-avatar-fallback {
    display: grid;
    place-items: center;
    background: var(--brand-100);
    color: var(--brand);
    font-weight: 800;
}

.testimonial-name { font-weight: 800; font-size: .98rem; }
.testimonial-role { color: var(--text-muted); font-size: .86rem; }

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
/* background: see the tinted-band gradient rule above */

.accordion { max-width: 820px; margin-inline: auto; display: grid; gap: .75rem; }

.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.accordion-item.open { border-color: var(--brand); box-shadow: var(--shadow-sm); }

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    background: none;
    border: none;
    font: inherit;
    font-weight: 700;
    color: var(--text);
    text-align: start;
    cursor: pointer;
}

.accordion-trigger i { color: var(--brand); transition: transform .3s var(--ease); flex-shrink: 0; }
.accordion-item.open .accordion-trigger i { transform: rotate(180deg); }

/* Animated open/close via max-height (grid-rows would be nicer but is less portable) */
.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease);
}

.accordion-panel p { padding: 0 1.35rem 1.25rem; color: var(--text-muted); }

.faq-more { text-align: center; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Closing CTA band
   -------------------------------------------------------------------------- */
.cta-band {
    background: linear-gradient(135deg, var(--brand-700), var(--brand), var(--brand-600));
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
    color: #fff;
    text-align: center;
}

.cta-inner { display: grid; gap: 1rem; justify-items: center; }
.cta-inner h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 900; }
.cta-inner p { font-size: 1.1rem; opacity: .92; max-width: 55ch; }
.cta-inner .cta-button { margin-top: .75rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-column h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
    position: relative;
    padding-bottom: .6rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 34px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), var(--lime));
}

.footer-links { list-style: none; display: grid; gap: .6rem; }

.footer-links a,
.footer-links span { color: var(--text-muted); font-size: .96rem; transition: var(--transition); }

.footer-links a:hover { color: var(--brand); padding-inline-start: 4px; }

/* The anchor must be flex too -- these rows are <li><a><i><span></a></li>, and
   a lone inline child would ignore the row's alignment. */
.contact-info li,
.contact-info li a {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text-muted);
    font-size: .96rem;
}

.contact-info i { color: var(--brand); width: 18px; text-align: center; flex-shrink: 0; }

.social-links { display: flex; justify-content: center; gap: .75rem; margin-bottom: 2rem; }

.social-link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    transition: var(--transition);
}

.social-link:hover { transform: translateY(-4px); color: #fff; }
.social-link.facebook:hover { background: #1877f2; border-color: #1877f2; }
.social-link.youtube:hover { background: #ff0000; border-color: #ff0000; }
.social-link.twitter:hover { background: #000; border-color: #000; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); border-color: #dc2743; }
.social-link:not([class*="facebook"]):not([class*="youtube"]):not([class*="twitter"]):not([class*="instagram"]):hover {
    background: var(--brand);
    border-color: var(--brand);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .9rem;
}

/* Credit line reads as a quiet chip, not a second call to action. */
.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .9rem .4rem .5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
    transition: var(--transition);
}

.linkedin-link i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0a66c2;
    color: #fff;
    font-size: .8rem;
}

.linkedin-link:hover {
    color: var(--text);
    border-color: #0a66c2;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

/* Scroll reveal — .reveal starts hidden, JS adds .in-view via IntersectionObserver */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal.in-view { opacity: 1; transform: none; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(3%, -4%) scale(1.06); }
    66%      { transform: translate(-3%, 3%) scale(.96); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

@keyframes pulseCard {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.06); opacity: .85; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes nudgeDown {
    0%, 100% { transform: translateY(0); opacity: .7; }
    50%      { transform: translateY(6px); opacity: 1; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Respect the OS "reduce motion" setting: keep content visible, drop the movement. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 520px; margin-inline: auto; }
    .float-chip { display: none; }
    .scroll-hint { display: none; }
}

@media (max-width: 860px) {
    .mobile-menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        inset-block-start: var(--header-h);
        inset-inline: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .35rem;
        padding: 1rem;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        /* Slide-down drawer; kept out of the a11y tree while closed. */
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    .nav-menu.active { transform: none; opacity: 1; visibility: visible; }

    .nav-link,
    .auth-button {
        display: block;
        text-align: center;
        padding: .8rem;
    }

    /* A <button> doesn't stretch to fill a block container the way an <a>
       does -- Chromium keeps it shrink-to-fit regardless of display:block, so
       startNowBtn needs an explicit width or it floats as a small chip instead
       of a full-width row like the links above it. */
    .auth-button {
        width: 100%;
        box-sizing: border-box;
    }

    .nav-menu li:last-child { display: flex; justify-content: center; }
}

@media (max-width: 768px) {
    /* Keep the arrows flanking the card. Stacking them into a column left big
       dead gaps above and below the single visible teacher. */
    .teachers-carousel { flex-direction: row; gap: .5rem; }

    .carousel-arrow { width: 38px; height: 38px; flex-shrink: 0; }

    /* One card per page on mobile means one dot per teacher -- dozens of them,
       squashed into an unreadable strip. Arrows and swipe still navigate. */
    .carousel-dots { display: none; }

    .hero-points { gap: .75rem 1rem; font-size: .9rem; }
    .footer-bottom { justify-content: center; text-align: center; }
    .footer-column { text-align: center; }
    .footer-column h3::after { inset-inline-start: 50%; transform: translateX(50%); }

    /* Centre the icon+text rows; text-align can't do it for flex children. */
    .contact-info li,
    .contact-info li a { justify-content: center; }

    .course-button { align-self: stretch; text-align: center; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .cta-button, .ghost-button { justify-content: center; }
    .mock-grid { grid-template-columns: repeat(2, 1fr); }
}
