/* ===================================
   VSVSV - Main Stylesheet
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    /* Brand palette — VSVSV (see docs/brand-guidelines.md) */
    --brand-navy: #002D62;        /* primary */
    --brand-navy-dark: #001B3D;   /* deeper navy for gradients/footer */
    --brand-crimson: #A6192E;     /* energy / accent */
    --brand-crimson-dark: #7d1322;
    --brand-sky: #6AAAD7;         /* light accent on light backgrounds */
    --brand-sky-light: #A9CFE8;   /* accent on dark backgrounds (better contrast) */

    /* Semantic aliases (kept so existing rules don't need renaming) */
    --ncc-green: var(--brand-navy);       /* legacy name → now navy */
    --military-olive: var(--brand-crimson); /* legacy name → now crimson */
    --gold-accent: var(--brand-sky-light);  /* legacy name → now light sky */

    /* Secondary Colors */
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #1f2937;
    --text-gray: #4a5a6e;   /* was #5b6b7f: 3.15:1 on white, below the 4.5:1 AA floor */

    /* Status Colors */
    --success: #1e8e5a;
    --warning: #c98a00;
    --danger: var(--brand-crimson);
    --info: var(--brand-sky);

    /* Typography */
    --font-heading: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Montserrat', system-ui, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Brand-navy on <html> so the brief blank-screen phase between page
       navigations matches the navy navbar instead of flashing pure white.
       The body sits on top of html and carries the white content background,
       so this is only visible during the cross-page paint gap. */
    background-color: var(--brand-navy);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────────────────────
   Soft cross-page navigation (View Transitions API).
   Modern Chromium (126+) and Safari (18+) animate a cross-fade between
   pages when this is opted in. Browsers without support silently ignore
   the rule — no JS shim required. The navbar gets a transition-name so it
   appears to persist (rather than re-paint) between pages in supporting
   browsers. Paired with the html navy background above, the visual jump
   from page to page becomes a soft fade instead of a white "burst".
   ───────────────────────────────────────────────────────────────────────── */
@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
    .navbar {
        view-transition-name: site-navbar;
    }
    .footer {
        view-transition-name: site-footer;
    }
}

/* CSS-only fade-in for content cards. Previously this was scripted in
   main.js by setting `opacity: 0` after page paint and animating to 1 —
   that caused a visible blink (paint → JS-snap-invisible → fade). Doing
   it in CSS via @starting-style + @keyframes keeps the cards visible from
   first paint and animates the entry without a snap. Browsers without
   @starting-style support just see the cards appear without animation —
   never invisible. */
@keyframes nccFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .course-card,
    .update-card,
    .stat-card {
        animation: nccFadeUp 0.5s ease-out both;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--ncc-green);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Accessibility Utilities ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

ul {
    list-style: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--ncc-green);
    color: var(--white);
    border-color: var(--ncc-green);
}

.btn-primary:hover {
    background-color: var(--military-olive);
    border-color: var(--military-olive);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--military-olive);
    color: var(--white);
    border-color: var(--military-olive);
}

.btn-secondary:hover {
    background-color: var(--ncc-green);
    border-color: var(--ncc-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--ncc-green);
}

/* .btn-outline-on-light — same outline shape as .btn-outline but with navy
   ink + navy border so it stays visible when placed on a white/light card.
   Use this instead of .btn-outline inside .course-card / .spec-card. */
.btn-outline-on-light,
.course-card .btn-outline,
.spec-card .btn-outline {
    background-color: transparent;
    color: var(--brand-navy);
    border-color: var(--brand-navy);
}

/* One-time course price shown on catalog cards (courses.html + index live grid). */
.course-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 6px 0 12px;
}
.course-price .course-price-note {
    font-size: 0.8rem;
    font-weight: 500;
    color: #5b6b7f;
}
.course-price-free {
    color: #1a7f4b;
}

.btn-outline-on-light:hover,
.course-card .btn-outline:hover,
.spec-card .btn-outline:hover {
    background-color: var(--brand-navy);
    color: var(--white);
}

/* "Coming soon" course-card: visually clear it is not purchasable. */
.course-card-comingsoon {
    opacity: 0.78;
    border: 1px dashed rgba(0, 45, 98, 0.35);
}
.course-card-comingsoon .course-badge {
    background: #6b7280;
    color: #fff;
}
.course-card-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

.btn-light {
    background-color: var(--white);
    color: var(--ncc-green);
    border-color: var(--white);
}

.btn-light:hover {
    background-color: var(--brand-crimson);
    color: var(--white);
    border-color: var(--brand-crimson);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== Header & Navigation ===== */
.header {
    background-color: var(--ncc-green);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
    /* Make every navbar variant lay out as a single horizontal row at
       desktop widths. Without this, pages using the
       <nav class="navbar"><div class="nav-brand">…</div><ul class="nav-menu">…</ul></nav>
       pattern (about/login/register/courses/forgot-pw/course-detail/404)
       stack the brand and the menu on separate lines because <nav> is
       block by default and there was no flex rule on .navbar itself —
       which is the "menu jumps below the logo when I navigate to About"
       bug. The nav-wrapper / nav-container pattern overrides this with
       its own flex rules; this just gives every page a sane baseline. */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

/* The V2 navbar wraps its contents in .nav-container, so the
   <nav class="navbar"> itself shouldn't be flex (it would double up).
   Undo the baseline only for that case. (The legacy .nav-wrapper /
   .nav-brand / .brand-text V1 markup was retired on 2026-05-14 when
   all 13 public pages were unified — see commit history.) */
.navbar:has(.nav-container) {
    display: block;
}

/* ─────────────────────────────────────────────────────────────────────────
   V2 navbar branding (the only navbar variant in use as of 2026-05-14).
   The navbar uses the icon mark (ncc-icon.png — just the tri-colour
   swoosh) in a small SQUARE white badge so the navy stroke stays
   readable on the navbar's navy background; the "VSVSV" wordmark
   sits as a SEPARATE text element to the right of the icon.
   Pattern:  .nav-logo > .nav-logo-img + .logo-text > .logo-main
   ───────────────────────────────────────────────────────────────────────── */
.nav-logo .nav-logo-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
    display: block;
    background: #ffffff;
    border-radius: 8px;           /* SQUARE-ish, not circular */
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Brand name shown to the RIGHT of the icon in white text. */
.nav-logo .logo-main {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
}

/* Hide the decorative subtitle on narrow viewports. */
.nav-logo .logo-sub {
    display: none;
}

/* Dashboard / admin vertical sidebar — square icon at the top */
.sidebar-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

/* ===== Canonical V2 navbar (used by every public page) =====
   Top-level <nav class="navbar">, .nav-container as the flex row,
   .nav-logo with .nav-logo-img + .logo-main + .logo-sub, and
   .nav-buttons for Login/Register. Unified across all 13 public
   pages on 2026-05-14. */
.navbar:has(.nav-container) {
    background-color: var(--brand-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 0 0 auto;
}

/* (Per-class .nav-logo-img / .logo-main / .logo-sub rules live in the
   "V2 navbar branding" block earlier in this file.) */

.nav-container > .nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    justify-content: center;
}

.nav-container .nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 0.4rem 0;
    position: relative;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-container .nav-link:hover,
.nav-container .nav-link.active {
    color: var(--brand-sky-light);
}

.nav-container .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--brand-crimson);
}

.nav-container .nav-link.active {
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex: 0 0 auto;
}

.nav-buttons .btn {
    padding: 0.55rem 1.15rem;
    font-size: 0.95rem;
}

/* ===== Nav dropdowns (Courses ▾ and the account menu) =====
   CSS-first: opens on hover and on keyboard focus (:focus-within); the
   .is-open class is toggled by JS for touch. Used by the slim navbar that
   main.js renders. */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-caret,
.nav-account-caret { font-size: 0.7rem; margin-left: 0.3rem; opacity: 0.85; }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0.4rem 0 0;
    padding: 0.4rem 0;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 1200;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu,
.nav-dropdown.is-open > .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li { margin: 0; }
/* .nav-container prefix raises specificity to (0,2,1) so these navy links beat
   the generic white `.nav-menu a` rule (0,1,1) that sits later in the file —
   without it the Courses dropdown rendered white-on-white (invisible). */
.nav-container .nav-dropdown-menu a,
.nav-container .nav-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    padding: 0.6rem 1.15rem;
    color: var(--brand-navy);
    background: none;
    border: none;
    font: inherit;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.nav-container .nav-dropdown-menu a:hover,
.nav-container .nav-dropdown-menu button:hover { background: var(--light-gray); color: var(--brand-navy); }
.nav-container .nav-dropdown-menu a::after { display: none; }   /* kill the .nav-menu a underline pseudo */
.nav-dropdown-menu i { width: 1.15em; text-align: center; color: var(--brand-crimson); }

/* Account menu hangs off the right edge (it sits in .nav-buttons, far right) */
.nav-account { position: relative; }
.nav-account .nav-dropdown-menu { left: auto; right: 0; }

@media (max-width: 820px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.7rem 1rem;
    }
    .nav-container > .nav-menu {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
        padding-top: 0.4rem;
        border-top: 1px solid rgba(255,255,255,0.12);
    }
    .nav-logo .logo-sub {
        display: none;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;             /* don't bump the menu onto a second row */
    white-space: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-accent);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────
   Canonical Login / Register buttons used in every public-page navbar.
   The audit on 2026-05-14 found five different colour pairs across 13
   pages (.btn-login/.btn-register on index, .btn-secondary/.btn-primary
   on contact/resources/privacy/terms, .btn-primary + inline-crimson on
   the rest). User-chosen unification: Login = outline-on-navy, Register
   = solid crimson. Used as <a class="btn btn-login"> / <a class="btn
   btn-register"> inside .nav-buttons.
   ───────────────────────────────────────────────────────────────────────── */
.btn-login {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.btn-login:hover {
    background-color: var(--white);
    color: var(--brand-navy);
    border-color: var(--white);
}

.btn-register {
    background-color: var(--brand-crimson);
    color: var(--white);
    border: 2px solid var(--brand-crimson);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.btn-register:hover {
    /* darker crimson on hover so the button stays clearly a CTA — the
       previous rule flipped to white-bg + navy ink, which read as if the
       Register button had been "swapped" with Login. */
    background-color: #a8002e;
    border-color: #a8002e;
    color: var(--white);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    color: var(--white);
    overflow: hidden;
}

/* Make sure the slider wrappers fill .hero so the inner .container is
   actually centered on the viewport (without these, .hero-slider is a
   shrink-to-fit flex child and the content sits flush-left). */
.hero > .hero-slider,
.hero .hero-slide {
    width: 100%;
    flex: 1 1 auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 0;
    max-width: 1160px;
    margin: 0 auto;
}

/* ===== Split hero (copy left, photo right) =====
   The UX review: a text-only hero reads "software demo"; a split hero with a
   real photo reads "institution" and shortens the scroll to the course cards. */
.hero-split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.75rem;
    align-items: center;
    text-align: left;
}
.hero-split .hero-buttons { justify-content: flex-start; }
.hero-media { display: flex; justify-content: center; }
.hero-photo {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s ease 0.3s backwards;
}

@media (max-width: 860px) {
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.75rem;
    }
    .hero-split .hero-buttons { justify-content: center; }
    .hero-media { order: -1; }              /* photo above the copy on narrow screens */
    .hero-photo { max-width: 460px; }
}

.hero-title {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--light-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s backwards;
}

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

/* ===== Identity router =====
   Four tiles under the hero CTAs that route each audience (junior cadet,
   senior cadet, ANO/teacher, school) straight to the right destination —
   the single highest-leverage conversion device (exam-picker pattern). */
.identity-router {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
    max-width: 880px;
    margin: 2.25rem auto 0;
    animation: fadeInUp 1s ease 0.55s backwards;
}

.identity-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.1rem 0.9rem;
    text-align: center;
    color: var(--white);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.identity-tile i {
    font-size: 1.5rem;
    color: var(--brand-sky-light);
}

.identity-tile-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

.identity-tile:hover,
.identity-tile:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--white);
    transform: translateY(-3px);
    outline: none;
}

@media (max-width: 720px) {
    .identity-router {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
}

/* ===== Coming-soon strip =====
   One slim row for tracks that aren't buyable yet — honest, but without
   giving unpurchasable items the same shelf space as live courses. */
.coming-soon-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin: 2rem auto 0;
    max-width: 820px;
    padding: 0.85rem 1.25rem;
    background: var(--light-gray);
    border: 1px dashed rgba(0, 45, 98, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.coming-soon-label {
    font-weight: 700;
    color: var(--brand-navy);
    white-space: nowrap;
}

.coming-soon-label i { margin-right: 0.35rem; color: #6b7280; }

.coming-soon-items { color: var(--text-gray); }

.coming-soon-link {
    margin-left: auto;
    color: var(--brand-crimson);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.coming-soon-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .coming-soon-link { margin-left: 0; }
}

/* ===== Section Styles ===== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* ===== Features Section ===== */
.features {
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 720px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--ncc-green), var(--military-olive));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    margin-bottom: 1.5rem;
}

.feature-list {
    text-align: left;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-gray);
}

.feature-list i {
    color: var(--brand-crimson);
    margin-right: 0.5rem;
}

/* ===== Statistics Section ===== */
.statistics {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gold-accent);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.statistics .stat-card h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--light-gray);
    font-size: 1.05rem;
}

/* ===== Courses Preview Section ===== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.course-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card-wing {
    border-top: 5px solid var(--brand-navy);
}

.course-card-army {
    border-top-color: #355e3b;
}

.course-card-navy {
    border-top-color: #005f73;
}

.course-card-air {
    border-top-color: #2f80ed;
}

.course-image-army {
    background:
        linear-gradient(135deg, rgba(53,94,59,.96), rgba(0,45,98,.96)),
        radial-gradient(circle at 18% 20%, rgba(255,255,255,.12), transparent 28%);
}

.course-image-navy {
    background:
        linear-gradient(135deg, rgba(0,45,98,.96), rgba(0,95,115,.96)),
        radial-gradient(circle at 82% 20%, rgba(106,170,215,.2), transparent 30%);
}

.course-image-air {
    background:
        linear-gradient(135deg, rgba(0,45,98,.96), rgba(47,128,237,.88)),
        radial-gradient(circle at 74% 22%, rgba(255,255,255,.2), transparent 32%);
}

/* Homepage three-track teaser.
   The army/navy/air gradients above encode the NCC WINGS. The homepage teaser is
   three PRODUCT TRACKS (NCC / SSB / Agniveer), so borrowing one wing colour per
   track rendered three unrelated gradients side by side — a visual mismatch with
   no meaning behind it. All three tiles share this one treatment instead. */
.course-image-track {
    background:
        linear-gradient(135deg, rgba(0,45,98,.96), rgba(0,95,115,.96)),
        radial-gradient(circle at 82% 20%, rgba(106,170,215,.2), transparent 30%);
}

/* Equal-height teaser cards with the CTA on a shared baseline. Without this the
   Agniveer tile (no price line, because nothing is purchasable yet) was shorter,
   so its button floated above the other two. Scoped to #liveCoursesGrid so the
   catalogue cards on courses.html are untouched. */
#liveCoursesGrid .course-card { display: flex; flex-direction: column; }
#liveCoursesGrid .course-content { display: flex; flex-direction: column; flex: 1 1 auto; }
#liveCoursesGrid .course-actions { margin-top: auto; }

/* Count/status badge sits ON the dark thumbnail, but .course-badge sets no colour
   at all — so it inherited near-black body text over a navy gradient (~1.5:1
   contrast, effectively unreadable). Light pill, identical for the count badges
   and the "In development" one, so the three tiles read as one system. */
#liveCoursesGrid .course-badge {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .30);
    color: #fff;
    font-size: .72rem;
    letter-spacing: .04em;
}

.wing-chip {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--brand-navy);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-image .course-thumb-icon {
    position: relative;
    z-index: 1;
    font-size: 4rem;
    color: var(--brand-sky-light);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.course-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(166,25,46,.18) 0%, transparent 60%);
    pointer-events: none;
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-badge.free {
    background-color: var(--success);
    color: var(--white);
}

.course-badge.popular {
    background-color: var(--brand-crimson);
    color: var(--white);
}

.course-badge.advanced {
    background-color: var(--danger);
    color: var(--white);
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    margin-bottom: 0.75rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.course-meta i {
    margin-right: 0.25rem;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.course-stats i {
    margin-right: 0.25rem;
    color: var(--ncc-green);
}

.course-actions {
    display: flex;
    gap: 0.75rem;
}

.course-actions .btn {
    flex: 1;
}

/* ===== Updates Section ===== */
.updates {
    background-color: var(--light-gray);
}

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

.update-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.update-icon {
    width: 60px;
    height: 60px;
    background-color: var(--ncc-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.update-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.update-link {
    color: var(--ncc-green);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.update-link:hover {
    color: var(--military-olive);
}

.update-link i {
    transition: var(--transition);
}

.update-link:hover i {
    transform: translateX(5px);
}

/* ===== CTA Section ===== */
.cta {
    background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-navy-dark) 55%, var(--brand-crimson) 135%);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--light-gray);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta .cta-content h2 {
    color: #fff !important;
}

.cta .cta-content p {
    color: rgba(255,255,255,.9) !important;
}

/* Compliance/disclaimer line inside a CTA. Must stay legible — it is the
   non-affiliation notice, not fine print to be hidden — but should not compete
   with the offer above it. */
.cta .cta-content p.cta-note {
    font-size: .95rem;
    line-height: 1.55;
    max-width: 46rem;
    margin: 0 auto 1.75rem;
    color: rgba(255,255,255,.82) !important;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--brand-navy-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

/* Every footer h3 must contrast against the dark-navy footer. Without
   this baseline rule, the global h1-h6 selector colours h3 as navy
   (--ncc-green → --brand-navy) and on pages using `.footer-section`
   instead of `.footer-column` (about.html / courses.html / login.html /
   register.html etc), the h3 came out navy-on-navy and invisible. */
.footer h3,
.footer-col h3,
.footer-row h3,
.footer-content h3,
.footer-section h3 {
    color: var(--brand-sky-light);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-column h3 {
    color: var(--gold-accent);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-column p {
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--light-gray);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--gold-accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--brand-crimson);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--light-gray);
    margin-bottom: 0.75rem;
}

.contact-info i {
    color: var(--gold-accent);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-disclaimer {
    color: var(--light-gray);
    font-size: 0.8rem;
    line-height: 1.55;
    margin: 0 0 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.85;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-content p {
    color: var(--light-gray);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: var(--gold-accent);
}

/* ===== Compliance / disclaimer blocks ===== */
.compliance-note {
    background: #eef3f9;
    border-left: 4px solid var(--brand-navy);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-gray);
    margin: 0 auto 2rem;
    max-width: 920px;
}

.disclaimer-block {
    background: #eef3f9;
    border: 1px solid #d6e0ec;
    border-left: 4px solid var(--brand-navy);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--dark-gray);
    margin: 1.25rem auto;
    max-width: 920px;
    line-height: 1.6;
}

.disclaimer-block strong {
    color: var(--brand-navy);
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }

.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }

/* ===== i18n language switcher (injected into the navbar by js/i18n.js) =====
 * The switcher lives inside .nav-container, which renders on a navy navbar
 * (--brand-navy #002D62) across the public site. The chrome therefore reads
 * white-on-navy; option text inside the native dropdown stays dark so it
 * remains readable on the OS-rendered white menu. */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-right: .75rem;
    color: #ffffff;
}
.lang-switcher .fa-language { font-size: 1.05rem; opacity: .9; }
.lang-switcher select {
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    padding: .35rem 1.6rem .35rem .55rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .5rem center;
}
.lang-switcher select option { color: var(--brand-navy); background: #ffffff; }
.lang-switcher select:hover { border-color: #ffffff; }
.lang-switcher select:focus-visible { outline: 2px solid var(--brand-sky); outline-offset: 1px; }
@media (max-width: 768px) {
    .lang-switcher { margin: 0 .5rem 0 auto; }
    .lang-switcher .fa-language { display: none; }
}
/* Footer variant — scalable home for the picker in the footer bottom bar. */
.lang-switcher-footer { margin: 0; }
.lang-switcher-footer .fa-language { display: inline-block; }
@media (max-width: 768px) {
    .lang-switcher-footer { margin: .75rem auto 0; }
}

/* ===== First-visit language picker (onboarding) ===== */
.lang-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 27, 61, .55);
    backdrop-filter: blur(3px);
    padding: 1.5rem;
}
.lang-picker {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 2.25rem 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 27, 61, .35);
}
.lang-picker-close {
    position: absolute;
    top: .6rem;
    right: .8rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-gray);
    cursor: pointer;
    padding: .2rem .4rem;
}
.lang-picker-close:hover { color: var(--brand-navy); }
.lang-picker-close:focus-visible { outline: 2px solid var(--brand-sky); outline-offset: 2px; }
.lang-picker-icon {
    font-size: 2.4rem;
    color: var(--brand-navy);
    margin-bottom: .75rem;
}
.lang-picker h2 {
    margin: 0 0 .4rem;
    color: var(--brand-navy);
    font-size: 1.4rem;
}
.lang-picker p {
    margin: 0 0 1.5rem;
    color: var(--text-gray);
    font-size: .92rem;
}
.lang-picker-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.lang-picker-options button {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-navy);
    background: var(--white);
    border: 1.5px solid #d8dee9;
    border-radius: 10px;
    padding: .8rem 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.lang-picker-options button:hover {
    border-color: var(--brand-navy);
    background: var(--brand-navy);
    color: var(--white);
}


/* Nav overflow guard.
   Adding bn/mr/te/ta to the switcher made the <select> size to its widest native
   option name; with the authenticated nav (account menu + "Signed in as …") the
   row exceeded the viewport and the whole page scrolled sideways by 69px. Let the
   nav wrap rather than overflow, and stop the select growing without bound. */
.navbar .nav-container { flex-wrap: wrap; row-gap: 8px; }
.lang-switcher select { max-width: 7.5rem; }

/* Footer ink.
   .footer sits on --brand-navy-dark, but `a { color: inherit }` means any footer
   link inheriting a MUTED DARK token (--text-gray) renders dark-on-dark — the
   Privacy/Terms links measured 2.43:1. Darkening --text-gray for AA on white made
   this instance worse, which is the lesson: a colour token is only "accessible"
   relative to the background it lands on. Pin footer links to light ink. */
.footer a { color: #e8edf3; }
.footer a:hover { color: var(--brand-sky-light); }
