/* ============================================================
   Happi Learning — shared site stylesheet
   Single source of truth for the public marketing site: design
   tokens, layout primitives, and the card/footer/accordion
   components. Pages should consume `var(--token)` rather than
   literal hex, so a palette change lands here and nowhere else.
   ============================================================ */

/* ---------- Design tokens ----------
   Brand palette:
     Primary Navy  #22285C  header, hero, dark sections, primary buttons
     Primary Gold  #f48c06  CTA buttons, numbers, highlights
     Background    #FFF9EF  warm cream page background
     Surface       #FFFFFF  cards, forms, accordion items
     Accent Teal   #2CBFC1  icons, small highlights, gallery categories
     Accent Coral  #FA7161  labels, badges, secondary accents
     Dark Footer   #22252C  charcoal
     Headings      #20264F  navy-black
     Body text     #22285c  warm grey
     Border        #E9E4DB  soft beige/grey
   The -hover/-deep variants are darker shades of the same gold, not new
   hues: -hover for pressed/hover fills, -deep where gold has to sit as
   text on a white or cream surface and needs the extra contrast.

   --primary-deep is a TEXT colour for LIGHT surfaces (5.62:1 on white).
   It was briefly set to #fff so that white would read on the solid-orange
   chips introduced with the #f48c06 rebrand. That inverted its purpose and
   turned all thirteen of its other uses into white-on-white — the homepage
   level labels, .cta-btn (which sets background:#fff itself), .founder-role,
   .blog-back-link, .testimonial-position and the default link colour.
   Text sitting ON an orange fill uses --on-primary instead; white there is
   only 2.44:1 and fails AA regardless. */
:root {
    --primary-color: #f48c06;
    --primary-hover: #DE9310;
    --primary-strong: #C1820F;
    --primary-deep: #8F5D02;
    /* Foreground for anything painted on --primary-color or --gradient-warm.
       Navy is 5.64:1 on #f48c06; white is 2.44:1. Matches the palette rule
       that gold and coral are fills, never text. */
    --on-primary: #22285C;
    --secondary-color: #22285C;
    --accent-color: #f48c06;
    --navy-color: #22285C;
    --navy-light: #2E3573;
    --heading-color: #20264F;
    --coral-color: #FA7161;
    --coral-deep: #BB4B39;
    --teal-color: #2CBFC1;
    --teal-deep: #17696B;
    --cyan-color: #2CBFC1; /* legacy alias — .text-cyan and friends still resolve */
    --light-color: #FFFFFF;
    --surface-color: #FFF9EF;
    --card-color: #ffffff;
    --card-border: #E9E4DB;
    --dark-color: #22252C;
    --text-on-dark: rgba(255, 255, 255, 0.95);
    --text-body: #22285c;
    --text-muted: #6E6F77;
    --text-light: #A3A4AC;
    --gloss-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.05) 100%);
    --gradient-hero: linear-gradient(135deg, #22285C 0%, #171B3F 100%);
    /* Stays inside the gold family: CTAs are gold per the palette, and coral
       is reserved for labels/badges. Text on this gradient must be navy —
       white drops to ~2:1 against gold. */
    --gradient-warm: linear-gradient(to right, #f48c06, #FFC24D);
    --shadow-sm: 0 4px 6px -1px rgba(34, 40, 92, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(34, 40, 92, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(34, 40, 92, 0.08);
    --shadow-card: 0 4px 20px -2px rgba(34, 40, 92, 0.03);
    --shadow-glow: 0 0 30px rgba(248, 170, 28, 0.18);
    --radius-sm: 10px;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-color);
    color: var(--text-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 84px; /* fixed nav offset */
}
h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-wrap: pretty;
    color: var(--heading-color);
}
/* Body copy is warm grey, so headings need their own colour — but that rule
   would then also repaint headings sitting on the dark sections, which
   previously just inherited white from their container. Hand them back. */
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4, .bg-navy h5, .bg-navy h6,
.bg-navy-dark h1, .bg-navy-dark h2, .bg-navy-dark h3, .bg-navy-dark h4, .bg-navy-dark h5, .bg-navy-dark h6,
.bg-gradient-hero h1, .bg-gradient-hero h2, .bg-gradient-hero h3, .bg-gradient-hero h4, .bg-gradient-hero h5, .bg-gradient-hero h6,
.programs-dark-section h1, .programs-dark-section h2, .programs-dark-section h3, .programs-dark-section h4, .programs-dark-section h5, .programs-dark-section h6,
.card-surface--navy h1, .card-surface--navy h2, .card-surface--navy h3, .card-surface--navy h4, .card-surface--navy h5, .card-surface--navy h6,
.contact-card h1, .contact-card h2, .contact-card h3, .contact-card h4, .contact-card h5, .contact-card h6,
.cta h1, .cta h2, .cta h3, .cta h4, .cta h5, .cta h6,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.founder-card-navy h1, .founder-card-navy h2, .founder-card-navy h3, .founder-card-navy h4, .founder-card-navy h5, .founder-card-navy h6,
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
    color: inherit;
}

/* The deep gold/coral shades exist for light surfaces. On the dark sections the
   bright brand hues are the legible ones, so hand those back too. */
.bg-navy .text-gold,
.bg-navy-dark .text-gold,
.bg-gradient-hero .text-gold,
.programs-dark-section .text-gold,
.card-surface--navy .text-gold,
.contact-card .text-gold,
.founder-card-navy .text-gold,
footer .text-gold {
    color: var(--primary-color) !important;
}
.bg-navy .text-coral,
.bg-navy-dark .text-coral,
.bg-gradient-hero .text-coral,
.programs-dark-section .text-coral,
.card-surface--navy .text-coral,
.contact-card .text-coral,
.founder-card-navy .text-coral,
footer .text-coral {
    color: var(--coral-color) !important;
}

p { text-wrap: pretty; }
a { color: var(--primary-deep); text-decoration: none; }
a:hover { color: #7A5002; }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, .nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}
@media (max-width: 991.98px) { body { padding-top: 76px; } }

/* ---------- Layout helpers (replace ad-hoc `container` + inline max-width) ---------- */
/* One shared gutter for every page section. The clamp keeps content off the
   viewport edge on laptops (where 80rem ≈ the whole screen) without eating
   space on phones. Every content container must use these so section edges
   line up vertically down the page. */
.wrap { max-width: 90rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.wrap--narrow { max-width: 64rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.wrap--article { max-width: 90rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

.eyebrow { display: block; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--coral-deep); margin-bottom: 12px; }
.eyebrow--gold { color: var(--primary-deep); }

/* Section title underline (home/legacy) */
.section-title { text-align: center; margin-bottom: 60px; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background: var(--primary-color); }

/* ---------- Grid system (replaces Bootstrap row/col for content grids) ---------- */
.grid { display: grid; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3-tight { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 991.98px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.stack { display: flex; flex-direction: column; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }

.split { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 992px) {
    .split--hero { grid-template-columns: 1.05fr 0.95fr; }
    .split--about { grid-template-columns: 5fr 7fr; }
    /* stretch, not the .split default of center: a form paired with a sidebar
       card should share a top and bottom edge, and both children are height:100% */
    .split--form { grid-template-columns: 7fr 5fr; align-items: stretch; }
    .split--article { grid-template-columns: 2fr 1fr; align-items: start; }
    .split--even { grid-template-columns: 1fr 1fr; }
}

.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Buttons ---------- */
.btn-warm, .hero-btn-primary, .btn-hero-primary {
    background-color: var(--primary-color) !important;
    color: var(--navy-color) !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    text-decoration: none !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(248, 170, 28, 0.35) !important;
    transition: all 0.2s ease !important;
}
.btn-warm:hover, .hero-btn-primary:hover, .btn-hero-primary:hover {
    background-color: var(--primary-hover) !important;
    color: var(--navy-color) !important;
    transform: translateY(-2px) !important;
}
.btn-outline-navy, .hero-btn-secondary, .btn-hero-secondary {
    background-color: transparent !important;
    color: var(--navy-color) !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    text-decoration: none !important;
    display: inline-block !important;
    border: 2px solid var(--navy-color) !important;
    transition: all 0.2s ease !important;
}
.btn-outline-navy:hover, .hero-btn-secondary:hover, .btn-hero-secondary:hover {
    background-color: var(--navy-color) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
}
.btn-group-inline { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Primary CTA button — used bare (program cards, checkout modal) as well as
   inside .cta-banner, which overrides the colors below for its gold backdrop. */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--gradient-warm);
    color: var(--navy-color);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(248, 170, 28, 0.3);
    transition: all 0.2s ease;
}
.btn-cta:hover, .btn-cta:focus-visible { color: var(--navy-color); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(248, 170, 28, 0.38); }
.btn-cta:disabled, .btn-cta[disabled] { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }

/* CTA banner (reused on every page's closing section) */
.cta-banner { background-color: var(--primary-color); border-radius: var(--radius-lg); padding: 3.5rem 2.5rem; text-align: center; color: var(--navy-color); box-shadow: 0 10px 25px rgba(34, 40, 92, 0.08); }
.cta-banner h3 { color: var(--navy-color); font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.cta-banner p { color: var(--navy-color); font-size: 1.1rem; max-width: 600px; margin: 0 auto 1.75rem; opacity: 0.9; }
.cta-banner .btn-cta { background-color: var(--navy-color); color: #FFFFFF; font-weight: 700; border-radius: 50px; padding: 12px 32px; text-decoration: none; display: inline-block; border: none; box-shadow: 0 4px 12px rgba(34, 40, 92, 0.25); transition: all 0.2s ease; }
.cta-banner .btn-cta:hover { background-color: #1A1E47; color: #FFFFFF; transform: translateY(-2px); }

/* ---------- Utility color/bg classes ---------- */
.bg-surface-light { background-color: var(--card-color) !important; }
.bg-navy-dark, .bg-navy { background-color: var(--navy-color) !important; color: #FFFFFF !important; }
.text-coral { color: var(--coral-color) !important; }
.text-gold { color: var(--primary-deep) !important; }
.text-navy { color: var(--navy-color) !important; }
.text-cyan { color: var(--cyan-color) !important; }
.text-gradient-hero { background: var(--gradient-hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bg-gradient-hero { background: var(--gradient-hero); }
.shadow-glow { box-shadow: 0 10px 30px -10px rgba(248, 170, 28, 0.4); }
.section-py { padding: 3rem 0; }
.section-py-sm { padding: 1.75rem 0; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-float { animation: float 4s ease-in-out infinite; }
.floating { animation: float 3s ease-in-out infinite; }

/* ---------- Generic surface card ---------- */
.card-surface {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-surface:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-surface--navy { background-color: var(--navy-color); color: #fff; box-shadow: var(--shadow-lg); }
.card-icon-badge {
    width: 52px; height: 52px; border-radius: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--navy-color); margin-bottom: 1.1rem;
    background: var(--gradient-warm, var(--primary-color));
}
.card-number-badge {
    width: 44px; height: 44px; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem; color: var(--navy-color);
    margin-bottom: 1rem; background: var(--gradient-warm, var(--primary-color));
}
.stat-number { font-family: 'Inter', sans-serif; font-size: 2.75rem; font-weight: 800; color: var(--primary-strong); line-height: 1; margin-bottom: 0.75rem; }

/* ---------- Page hero banner (Common/page_header.php) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--surface-color);
    background-image: 
        radial-gradient(rgba(248, 170, 28, 0.08) 1.5px, transparent 1.5px),
        linear-gradient(to bottom, #FFF9EF 0%, #ffffff 100%);
    background-size: 24px 24px, 100% 100%;
    padding: 4rem 0 2.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(34, 40, 92, 0.04);
}
@media (min-width: 992px) {
    .page-hero {
        padding: 5rem 0 3rem;
    }
}
.page-hero::before {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 191, 193, 0.12) 0%, rgba(44, 191, 193, 0) 75%);
    pointer-events: none;
    z-index: 0;
    filter: blur(25px);
}
.page-hero::after {
    content: '';
    position: absolute;
    top: -150px;
    right: -100px;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(248, 170, 28, 0.20) 0%, rgba(248, 170, 28, 0) 75%);
    pointer-events: none;
    z-index: 0;
    filter: blur(25px);
}
.page-hero > .wrap {
    position: relative;
    z-index: 1;
}
.page-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    background: #f48c06;
    color: var(--on-primary) !important;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border: 1px solid rgba(248, 170, 28, 0.15);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}
.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--heading-color);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
    max-width: 850px;
}
.page-hero p {
    font-family: 'Inter', sans-serif;
    color: var(--text-body);
    font-size: 1.15rem;
    max-width: 700px;
    line-height: 1.65;
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .page-hero {
        padding: 5rem 0 3.5rem;
    }
    .page-hero h1 {
        font-size: 2.3rem;
    }
    .page-hero p {
        font-size: 1.05rem;
    }
}

/* ---------- Navigation ---------- */
.happi-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1050; width: 100%; padding: 12px 0; background: #f48c06; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05); border-bottom: 1px solid rgba(0, 0, 0, 0.05); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.happi-header.scrolled { padding: 10px 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 6px 30px rgba(0, 0, 0, 0.07);  background: #f48c06 !important;}
.happi-logo-badge { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-warm); color: var(--navy-color); font-weight: 700; font-size: 1.05rem; box-shadow: var(--shadow-sm); }
.navbar-brand img { height: 44px; width: auto; object-fit: contain; }
.navbar-brand-name { background: var(--gradient-hero); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.25rem; font-weight: 800; }
.nav-link { color: var(--text-body) !important; margin: 0 12px; font-weight: 600; font-size: 0.95rem; white-space: nowrap; position: relative; transition: all 0.2s ease; }
/* The header is a solid --primary-color fill, so nav text is on orange: navy
   reads at 5.64:1, white at 2.44:1. Base and hover are therefore the same
   navy, and the ::after underline carries the hover/active feedback — it is
   navy too, because an orange underline on an orange header is invisible. */
.nav-link:hover { color: var(--on-primary) !important; transform: translateY(-1px); }
/* Active page is white on the orange bar (requested). Hover stays navy so the
   two states stay tellable apart. */
.nav-link.active-page { color: #fff !important; }
.nav-link::after { background-color: var(--on-primary) !important; }
.nav-link.active-page::after { background-color: #fff !important; }
.happi-enroll-btn { background: var(--primary-color); transition: all 0.2s ease; }
.happi-enroll-btn:hover { background: var(--primary-hover); color: white; transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(248, 170, 28, 0.6); }
.btn-demo { background: var(--gradient-warm); color: var(--navy-color); border-radius: 50px; font-size: 0.95rem; box-shadow: var(--shadow-glow); border: none; }
.btn-demo:hover { color: var(--navy-color); transform: translateY(-1px); }

/* Header "Book Demo" CTA. White on the orange header bar at desktop. */
.happi-demo-cta { background: #fff; color: var(--navy-color); border-radius: 50px; font-size: 0.95rem; box-shadow: var(--shadow-glow); border: none; }
.happi-demo-cta:hover { background: #fff; color: var(--navy-color); transform: translateY(-1px); }
@media (max-width: 991.98px) {
    /* Below lg the button is inside the collapsed menu, which is a white
       panel -- a white borderless button there has no edge at all and reads
       as plain text. Navy fill gives the primary CTA an actual boundary
       (13.76:1 for the white label) without changing the desktop look. */
    .happi-demo-cta, .happi-demo-cta:hover {
        background: var(--navy-color);
        color: #fff;
        box-shadow: 0 6px 18px -6px rgba(34, 40, 92, 0.5);
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .nav-link { margin: 0 5px; font-size: 0.82rem; }
    .happi-header button[data-bs-target="#demoWizardModal"] { padding: 0.5rem 0.85rem !important; font-size: 0.8rem !important; white-space: nowrap; }
    .navbar-brand { font-size: 1rem !important; white-space: nowrap; gap: 8px !important; }
    .navbar-brand span { font-size: 1rem !important; white-space: nowrap; }
}
@media (max-width: 991.98px) {
    /* The dropdown panel continues the header bar rather than sitting on it as
       a white card, so it takes the header's own background and its navy link
       colour. The active row is a white pill -- navy on white is 13.76:1, and
       it reads as "highlighted" against the orange far better than a tint. */
    .navbar-collapse { background: var(--primary-color); margin: 16px -12px -16px; padding: 12px 12px 20px; border-radius: 0 0 16px 16px; box-shadow: var(--shadow-md); }
    .nav-link { padding: 14px 16px !important; min-height: 44px; display: flex; align-items: center; margin: 0; border-radius: 8px; }
    .nav-link.active-page { background: #fff; color: var(--on-primary) !important; }
}

/* ---------- Footer ---------- */
footer { background: var(--dark-color); color: var(--text-on-dark); padding: 70px 0 30px; border-top: none; }
.footer-logo { font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; color: var(--primary-color); }
.footer-tagline { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; line-height: 1.6; max-width: 90%; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; margin-bottom: 2rem; }
.footer-col--brand { grid-column: span 2; }
@media (max-width: 767.98px) { .footer-col--brand { grid-column: 1 / -1; } }
.footer-links h4 { font-size: 1.1rem; margin-bottom: 20px; font-weight: 700; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
/* inline-block + vertical padding gives the links a real tap target on touch
   screens; the negative gap above keeps the visual spacing unchanged. */
.footer-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.3s, padding-left 0.3s; display: inline-block; padding: 6px 0; min-height: 24px; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; }
.footer-contact-row { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.35rem; }
.footer-contact-row i { color: rgba(255, 255, 255, 0.7); width: 16px; text-align: center; margin-top: 4px; }
.footer-contact-row a, .footer-contact-row span { color: rgba(255, 255, 255, 0.7); text-decoration: none; line-height: 1.5; flex: 1; }
.social-links { display: flex; gap: 0.75rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 1rem 0 0; }
.social-links a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: white; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.social-links a:hover { transform: translateY(-3px); }
.footer-newsletter-input { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; border-radius: 50px 0 0 50px; padding: 10px 18px; font-size: 0.9rem; }
.footer-newsletter-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.footer-newsletter-input:focus { background: rgba(255, 255, 255, 0.12); border-color: var(--primary-color); color: #fff; box-shadow: none; }
.footer-newsletter-btn { border-radius: 0 50px 50px 0; background: var(--primary-color); color: var(--navy-color); font-weight: 700; border: none; padding: 10px 22px; white-space: nowrap; }
.footer-newsletter-btn:hover { background: var(--primary-hover); }
.copyright { border-top: 1px solid rgba(248, 170, 28, 0.1); padding-top: 24px; margin-top: 50px; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }

/* Floating contact buttons */
.floating-btn-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 1100; }
.floating-btn { width: 55px; height: 55px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 24px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); text-decoration: none; cursor: pointer; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); position: relative; animation: float 3s ease-in-out infinite; border: 2px solid rgba(255,255,255,0.2); }
.floating-btn:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }
.floating-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.floating-inquiry { background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: var(--navy-color); }
.floating-btn .tooltip-text { visibility: hidden; opacity: 0; width: max-content; background-color: rgba(0, 0, 0, 0.75); color: #fff; text-align: center; padding: 5px 10px; border-radius: 6px; position: absolute; right: 60px; font-size: 13px; top: 50%; transform: translateY(-50%); transition: opacity 0.3s ease, visibility 0.3s ease; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); z-index: 1200; }
.floating-btn:hover .tooltip-text { visibility: visible; opacity: 1; }
/* 767.98px, NOT 768px, and it has to stay in step with the toggle's own
   `d-md-none`. Bootstrap's md breakpoint hides that element from 768px up, so
   with the collapse rule at `max-width: 768px` the two overlapped at exactly
   768px -- iPad portrait -- where the WhatsApp and call buttons were still
   scale(0)/opacity:0 while the toggle that reveals them was display:none.
   Every contact button vanished at that one width with no way to get them
   back. Do not widen this back to 768px. */
@media (max-width: 767.98px) {
    .floating-btn-container { right: 15px; gap: 10px; }
    .floating-btn { width: 44px; height: 44px; font-size: 20px; }
    .floating-btn .tooltip-text { right: 50px; font-size: 12px; padding: 4px 8px; }
    .floating-btn-container > .floating-btn:not(.floating-fab-toggle) { transform: scale(0); opacity: 0; pointer-events: none; animation: none; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease; }
    .floating-btn-container.expanded > .floating-btn:not(.floating-fab-toggle) { transform: scale(1); opacity: 1; pointer-events: auto; }
    .floating-fab-toggle i { transition: transform 0.3s ease; }
    .floating-btn-container.expanded .floating-fab-toggle i { transform: rotate(135deg); }
}
@media (min-width: 768px) { .floating-fab-toggle { display: none; } }

/* ---------- Home page ---------- */
.hero-section { position: relative; background-color: var(--surface-color); padding: 5rem 0 4rem; overflow: hidden; }
@media (min-width: 992px) { .hero-section { padding: 7rem 0 5rem; } }
.hero-section::before { content: ''; position: absolute; top: -140px; right: -140px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(248, 170, 28,0.16) 0%, rgba(248, 170, 28,0) 70%); pointer-events: none; z-index: 0; }
.hero-section::after { content: ''; position: absolute; bottom: -160px; left: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(44, 191, 193,0.10) 0%, rgba(44, 191, 193,0) 70%); pointer-events: none; z-index: 0; }
.hero-section > .wrap { position: relative; z-index: 1; }
.hero-visual-wrap { position: relative; }
.hero-stat-badge { position: absolute; display: flex; align-items: center; gap: 0.65rem; background: #FFFFFF; border-radius: 1rem; padding: 0.85rem 1.15rem; box-shadow: var(--shadow-lg); z-index: 2; white-space: nowrap; }
.hero-stat-badge .hero-stat-number { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--navy-color); line-height: 1; }
.hero-stat-badge .hero-stat-label { font-size: 0.72rem; color: var(--text-body); font-weight: 600; line-height: 1.15; }
.hero-stat-badge--top { top: 20px; left: 20px; }
.hero-stat-badge--bottom { bottom: 20px; right: 20px; }
@media (max-width: 991.98px) {
    .hero-stat-badge { padding: 0.6rem 0.9rem; }
    .hero-stat-badge .hero-stat-number { font-size: 1.05rem; }
    .hero-stat-badge--top { top: 12px; left: 12px; }
    .hero-stat-badge--bottom { bottom: 12px; right: 12px; }
}

.programs-dark-section { background-color: var(--navy-color); color: white; padding: 6rem 1rem; }
.dark-program-card { background: var(--navy-light); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-md); padding: 2rem; height: 100%; display: flex; flex-direction: column; transition: all 0.3s ease; }
.dark-program-card:hover { transform: translateY(-4px); border-color: var(--primary-color); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.dark-program-card .eyebrow { font-size: 0.75rem; color: var(--cyan-color); }
.dark-program-card .learn-more { color: var(--primary-color); font-weight: 700; font-size: 0.95rem; margin-top: auto; }
/* The "Learn more" anchor is bare inline text, so its hit area was only its
   23px line box -- under the 24x24 CSS px floor in WCAG 2.5.8. Give it the
   same 44px target the mobile .nav-link already uses. align-self keeps it
   from stretching the full card width inside the flex column. */
.dark-program-card a[class*="fw-bold"] {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 44px;
    margin-top: auto;
}

.abacus-hero-container { width: 100%; min-height: 360px; background: var(--navy-color); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: var(--shadow-lg); border: 4px solid var(--navy-light); }
.abacus-frame { width: 90%; height: 240px; border: 6px solid #3A4180; border-radius: 12px; position: relative; display: flex; justify-content: space-around; background: #1A1E47; box-shadow: inset 0 5px 15px rgba(0,0,0,0.4); }
.abacus-beam { position: absolute; width: 100%; height: 6px; background: #3A4180; top: 30%; left: 0; z-index: 1; }
.abacus-rod { width: 4px; height: 100%; background: rgba(255, 255, 255, 0.2); position: relative; display: flex; flex-direction: column; align-items: center; }
.abacus-bead { width: 32px; height: 20px; border-radius: 50px; position: absolute; left: 50%; transform: translateX(-50%); cursor: pointer; transition: top 0.25s ease; z-index: 2; }
.abacus-bead.bead-yellow { background: var(--primary-color); box-shadow: 0 2px 8px rgba(248, 170, 28, 0.5); }
.abacus-bead.bead-cyan { background: var(--cyan-color); box-shadow: 0 2px 8px rgba(44, 191, 193, 0.5); }
.abacus-bead.bead-coral { background: var(--coral-color); box-shadow: 0 2px 8px rgba(250, 113, 97, 0.5); }

/* Testimonials */
.testimonial-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.5rem; height: 100%; display: flex; flex-direction: column; }
.testimonial-card blockquote { font-style: italic; color: var(--navy-color); font-family: 'Playfair Display', Georgia, serif; line-height: 1.6; margin: 0 0 1.5rem; font-size: 1.05rem; }
.testimonial-footer { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testimonial-avatar-fallback { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy-color); background: #F3EDE1; font-size: 0.9rem; flex-shrink: 0; }
.testimonial-name { font-weight: 700; color: var(--navy-color); font-size: 1rem; }
.testimonial-meta { color: var(--text-muted); font-size: 0.85rem; }
.narrow-block { max-width: 42rem; margin-inline: auto; text-align: center; }

/* ---------- About page ---------- */
.founder-card { border-radius: var(--radius-lg); padding: 2.5rem 2rem; text-align: center; }
/* Fluid rather than a fixed 180x220 box. At 180px the portrait sat marooned in
   the middle of the navy card on anything above a phone, and 180x220 is 0.82
   against a 3:4 source, so object-fit: cover was also cropping the photo to
   make up the difference. clamp() lets it grow with the card between a phone
   floor and a desktop ceiling, and aspect-ratio matches the source exactly so
   nothing is cropped at any width. */
.founder-img-frame { position: relative; width: clamp(240px, 86%, 400px); aspect-ratio: 3 / 4; height: auto; border-radius: 1.25rem; background: var(--primary-color); border: 4px solid var(--primary-color); padding: 6px; margin: 0 auto 1.5rem; }
.founder-img-frame::before { content: ''; position: absolute; inset: -10px; border-radius: var(--radius-lg); border: 2px dashed rgba(248, 170, 28, 0.5); z-index: -1; }
.founder-img-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem; }
.founder-role { color: var(--primary-deep); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; }

.quote-box { background: #FFFFFF; border-left: 5px solid var(--primary-color); border-radius: var(--radius-md); padding: 1.75rem 2rem; box-shadow: var(--shadow-sm); margin: 2rem 0; }
.quote-box p { font-size: 1.25rem; font-style: italic; color: var(--navy-color); font-family: 'Playfair Display', Georgia, serif; line-height: 1.5; margin: 0; }

.team-card { background: #FFFFFF; border-radius: var(--radius-md); border: 1px solid var(--card-border); box-shadow: var(--shadow-sm); overflow: hidden; text-align: center; transition: transform 0.3s ease; }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #F3EDE1; display: block; }
.team-photo-fallback { width: 100%; aspect-ratio: 1 / 1; background: #F3EDE1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.team-card-body { padding: 1rem; }
.team-name { font-weight: 700; font-size: 1rem; color: var(--navy-color); margin-bottom: 0.2rem; }
.team-role { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Courses page ---------- */
.program-card { background: #FFFFFF; border-radius: var(--radius-lg); border: 1px solid var(--card-border); box-shadow: var(--shadow-sm); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); height: 100%; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.program-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(34, 40, 92, 0.08); border-color: rgba(248, 170, 28, 0.3); }

.program-card-header { position: relative; width: 100%; height: 220px; overflow: hidden; background: #F3EDE1; }
.program-card img, .program-card .program-card-img-fallback { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.program-card:hover img { transform: scale(1.05); }
.program-card-img-fallback { display: flex; align-items: center; justify-content: center; color: #C8C1B2; font-size: 1.5rem; }

.program-card-body { padding: 2.25rem 2rem 2rem; display: flex; flex-direction: column; flex: 1; position: relative; }

.program-card .card-icon-badge { position: absolute; top: -26px; right: 2rem; width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 8px 20px rgba(248, 170, 28, 0.3); border: 3px solid #fff; z-index: 2; margin-bottom: 0; display: flex; align-items: center; justify-content: center; background: var(--gradient-warm); color: var(--navy-color); font-size: 1.3rem; }

.program-card .pill-row { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.04); }
.feature-pill { background:#f48c06; color: var(--on-primary); font-size: 0.8rem; font-weight: 700; padding: 6px 14px; border-radius: 50px; display: inline-flex; align-items: center; gap: 4px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }

/* ---------- Contact page ----------
   Two columns: the form on a white panel, the details on the navy card. Both
   are full-height so their top and bottom edges line up on desktop. */
.contact-form-panel {
    background: var(--card-color);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    height: 100%;
}
.contact-card {
    background-color: var(--navy-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: var(--text-on-dark);
    box-shadow: var(--shadow-lg);
    height: 100%;
    position: relative;
    overflow: hidden;
}
/* Soft gold bloom in the corner so the navy block isn't a flat rectangle. */
.contact-card::after {
    content: '';
    position: absolute;
    top: -90px; right: -90px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(248, 170, 28, 0.18) 0%, rgba(248, 170, 28, 0) 70%);
    pointer-events: none;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card h2, .contact-card h3 { color: #fff; }
@media (max-width: 575.98px) {
    .contact-form-panel, .contact-card { padding: 1.5rem 1.25rem; }
}

.contact-sub-title { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--primary-color); margin-bottom: 2px; display: block; }

/* Detail rows double as links (tel:/mailto:/directions), so they get a hit area
   and a hover state rather than being inert text. */
.contact-detail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.contact-detail-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.7rem 0.6rem; margin-inline: -0.6rem; border-radius: var(--radius-sm); text-decoration: none; color: inherit; transition: background 0.25s ease; }
a.contact-detail-row:hover, a.contact-detail-row:focus-visible { background: rgba(255, 255, 255, 0.06); color: inherit; }
a.contact-detail-row:hover .contact-detail-icon { background: var(--primary-color); color: var(--navy-color); transform: scale(1.06); }
.contact-detail-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 0.7rem; display: flex; align-items: center; justify-content: center; background: rgba(248, 170, 28, 0.15); color: var(--primary-color); font-size: 0.95rem; transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease; }
.contact-detail-value { color: rgba(255, 255, 255, 0.86); font-size: 0.98rem; line-height: 1.55; }

/* Form */
.contact-field { margin-bottom: 1.35rem; }
.contact-field label { font-weight: 700; color: var(--heading-color); display: block; margin-bottom: 0.4rem; font-size: 0.92rem; }
.contact-field .req { color: var(--coral-deep); margin-left: 2px; }
.contact-input-field { width: 100%; border-radius: var(--radius-sm); padding: 12px 16px; border: 1px solid var(--card-border); background-color: #FFFFFF; color: var(--text-body); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.contact-input-field::placeholder { color: var(--text-light); }
.contact-input-field:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(248, 170, 28, 0.2); outline: none; }
.contact-input-field.is-invalid { border-color: var(--coral-deep); box-shadow: 0 0 0 3px rgba(250, 113, 97, 0.18); }
.contact-form-note { font-size: 0.82rem; color: var(--text-muted); }
.btn-send-enquiry { background-color: var(--primary-color); color: var(--navy-color); font-weight: 700; border-radius: 50px; padding: 12px 36px; border: none; box-shadow: 0 6px 16px rgba(248, 170, 28, 0.3); transition: all 0.2s ease; }
.btn-send-enquiry:hover:not(:disabled) { background-color: var(--primary-hover); color: var(--navy-color); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(248, 170, 28, 0.38); }
.btn-send-enquiry:disabled { opacity: 0.65; cursor: not-allowed; }

/* Map — only rendered when the CMS holds a valid embed URL. */
.contact-map-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--card-border); box-shadow: var(--shadow-md); background: var(--card-color); line-height: 0; }
.contact-map-frame iframe { display: block; width: 100%; height: 420px; border: 0; }
@media (max-width: 767.98px) { .contact-map-frame iframe { height: 300px; } }
.contact-map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }

.field { margin-bottom: 1.25rem; }
.field label { font-weight: 700; color: var(--navy-color); display: block; margin-bottom: 0.4rem; }
.field input, .field textarea { width: 100%; }
.honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .contact-detail-row, .contact-detail-icon, .btn-send-enquiry, .contact-input-field { transition: none; }
    a.contact-detail-row:hover .contact-detail-icon { transform: none; }
    .btn-send-enquiry:hover:not(:disabled) { transform: none; }
}

/* ---------- Event gallery ----------
   Media-on-top card, same silhouette as .blog-card / .program-card / .team-card
   so the gallery reads as part of the same set. Most CMS gallery rows carry no
   image at all (video entries often only have a URL), so the placeholder is a
   designed, warm surface rather than an empty dark box. */

/* Year group: gives the grid the vertical structure it otherwise lacks. */
.gallery-group + .gallery-group { margin-top: 3.5rem; }
.gallery-year-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.5rem; }
.gallery-year { font-family: 'Playfair Display', Georgia, serif; font-size: 1.75rem; font-weight: 800; color: var(--navy-color); line-height: 1; margin: 0; letter-spacing: -0.01em; }
.gallery-year-count { font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-primary); background: #f48c06; border: 1px solid rgba(248, 170, 28, 0.18); padding: 0.25rem 0.7rem; border-radius: 50px; white-space: nowrap; }
.gallery-year-rule { flex: 1; height: 1px; min-width: 1rem; background: linear-gradient(to right, var(--card-border), rgba(233, 228, 219, 0)); }
@media (max-width: 575.98px) {
    .gallery-group + .gallery-group { margin-top: 2.5rem; }
    .gallery-year { font-size: 1.4rem; }
}

/* Card */
.gallery-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
a.gallery-card:hover, a.gallery-card:focus-visible { color: inherit; }
.gallery-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(16, 20, 53, 0.08); border-color: rgba(226, 138, 0, 0.3); }
/* Applied when the upload 404s and the card stops being a link — it should no
   longer advertise itself as interactive. */
.gallery-card.is-static { cursor: default; }
.gallery-card.is-static:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--card-border); }
.gallery-card.is-static:hover .gallery-card-title { color: var(--navy-color); }

/* Media */
.gallery-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #F3EDE1; }
.gallery-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.gallery-card:hover .gallery-card-media img { transform: scale(1.06); }
/* Sits under the <img>; becomes the visible surface when there is no image or
   the upload 404s (the img removes itself on error). */
.gallery-card-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: rgba(248, 170, 28, 0.5);
    background-color: #FFFBF3;
    background-image:
        radial-gradient(rgba(248, 170, 28, 0.13) 1.5px, transparent 1.5px),
        linear-gradient(135deg, #FFFCF5 0%, #F2ECE0 100%);
    background-size: 18px 18px, 100% 100%;
}
/* Video entries with no still get the navy placeholder instead of the cream one
   — the gold play badge needs a dark ground to read against. */
.gallery-card-media--video .gallery-card-placeholder {
    color: rgba(248, 170, 28, 0.55);
    background-color: var(--navy-color);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
        linear-gradient(135deg, var(--navy-light) 0%, var(--navy-color) 100%);
}
/* Video stills need a floor of contrast so the play badge and tag stay legible. */
.gallery-card-media--video.gallery-card-media--has-img::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(to top, rgba(34, 40, 92, 0.38) 0%, rgba(34, 40, 92, 0.06) 55%, rgba(34, 40, 92, 0) 100%);
}

.gallery-card-tag {
    position: absolute; top: 1rem; left: 1rem; z-index: 3;
    max-width: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--teal-deep);
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border: 1px solid rgba(44, 191, 193, 0.28);
    padding: 0.28rem 0.65rem; border-radius: 50px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gallery-card-play {
    position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-card-play i {
    width: 60px; height: 60px; background: rgba(226, 138, 0, 0.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    padding-left: 5px; /* visually center play triangle */
    box-shadow: 0 8px 25px rgba(226, 138, 0, 0.4);
    transition: all 0.3s ease;
}
.gallery-card:hover .gallery-card-play i { transform: scale(1.15); background: var(--primary-color); }

.gallery-card-body { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.gallery-card-title { font-size: 1.15rem; font-weight: 800; color: var(--navy-color); margin: 0 0 0.85rem; line-height: 1.4; transition: color 0.3s; text-wrap: pretty; }
a.gallery-card:hover .gallery-card-title { color: var(--primary-color); }

.gallery-card-meta {
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
    margin-top: auto; padding-top: 0.7rem;
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
}
.gallery-card-meta .gallery-card-action { color: var(--primary-deep); display: inline-flex; align-items: center; gap: 0.3rem; }
.gallery-card-meta .sep { color: var(--text-light); }

/* Lightbox (progressive enhancement — without JS the card link opens the
   image file directly, which is why the card is an <a> and not a <button>). */
.gallery-lightbox {
    position: fixed; inset: 0; z-index: 1200;
    display: none; align-items: center; justify-content: center; flex-direction: column;
    padding: clamp(1.5rem, 5vw, 3rem);
    background: rgba(34, 40, 92, 0.9);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gallery-lightbox.is-open { display: flex; animation: fadeUp 0.25s ease-out; }
.gallery-lightbox img { max-width: min(100%, 1100px); max-height: 78vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-md); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); background: var(--navy-color); }
.gallery-lightbox-caption { color: #FFFFFF; text-align: center; margin-top: 1.1rem; max-width: 40rem; }
.gallery-lightbox-caption .title { font-weight: 700; font-size: 1.05rem; }
.gallery-lightbox-caption .meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); margin-top: 0.2rem; }
.gallery-lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF; font-size: 1.05rem; cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
    .gallery-card, .gallery-card-media img, .gallery-card-play, .gallery-card-title { transition: none; }
    .gallery-card:hover { transform: none; }
    .gallery-card:hover .gallery-card-media img { transform: none; }
    .gallery-card:hover .gallery-card-play { transform: none; }
    .gallery-lightbox.is-open { animation: none; }
}

/* ---------- FAQs / accordion ---------- */
.happi-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 992px) {
    .happi-accordion {
        display: block;
        column-count: 2;
        column-gap: 1.5rem;
    }
}
.happi-accordion .accordion-item {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-left: 5px solid transparent;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 1.5rem; /* for column layout gap */
    break-inside: avoid; /* prevent breaking across columns */
    display: inline-block; /* helps with break-inside in some browsers */
    width: 100%;
}
.happi-accordion .accordion-item:hover {
    transform: translateY(-3px);
    border-color: rgba(226, 138, 0, 0.3);
    border-left-color: rgba(226, 138, 0, 0.3);
    box-shadow: var(--shadow-md);
}
.happi-accordion .accordion-item:has(.accordion-button:not(.collapsed)) {
    border-color: rgba(226, 138, 0, 0.5);
    border-left-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(226, 138, 0, 0.08);
    background: linear-gradient(to bottom, #ffffff, rgba(226, 138, 0, 0.03));
}
.happi-accordion .accordion-button {
    background: transparent !important;
    color: var(--navy-color) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 1.75rem 2rem;
    box-shadow: none !important;
    border: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    text-align: left;
}
.happi-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-color) !important;
    padding-bottom: 0.75rem;
}
.happi-accordion .accordion-button::after {
    content: '' !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101435' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 14px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(16, 20, 53, 0.04) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transform: none !important;
    flex-shrink: 0;
}
.happi-accordion .accordion-button:not(.collapsed)::after {
    transform: rotate(180deg) !important;
    background-color: var(--gradient-warm) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}
.happi-accordion .accordion-body {
    padding: 0 2rem 2rem 2rem;
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ---------- Blog list ----------
   The newest post gets the wide .blog-feature treatment and the rest fall into
   .grid--3 as .blog-card. Both share .blog-media and .blog-meta so a post looks
   like the same object in either slot. Titles stay Playfair, matching the
   .program-card headings — the gallery's Inter titles are a dense-photo-grid
   choice, not the editorial one. */
.blog-media { position: relative; overflow: hidden; background: #F3EDE1; display: block; }
.blog-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
/* Sits under the <img>, so it also covers the case where an upload 404s and
   the img removes itself. */
.blog-media-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: rgba(248, 170, 28, 0.5);
    background-color: #FFFBF3;
    background-image:
        radial-gradient(rgba(248, 170, 28, 0.13) 1.5px, transparent 1.5px),
        linear-gradient(135deg, #FFFCF5 0%, #F2ECE0 100%);
    background-size: 18px 18px, 100% 100%;
}
.blog-card:hover .blog-media img, .blog-feature:hover .blog-media img { transform: scale(1.06); }

/* Shared metadata strip: date, read time, and a New pill for fresh posts.
   The blogs table carries no category or author, so nothing else is claimed. */
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-bottom: 0.8rem; font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.blog-meta .dot { color: var(--text-light); }
.blog-meta i { color: var(--text-light); }
.blog-badge-new { background: rgba(44, 191, 193, 0.12); color: var(--teal-deep); border: 1px solid rgba(44, 191, 193, 0.28); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.55rem; border-radius: 50px; }

/* Featured (newest) post */
.blog-feature {
    display: grid; grid-template-columns: 1fr;
    background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.blog-feature:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(34, 40, 92, 0.09); border-color: rgba(248, 170, 28, 0.35); }
.blog-feature .blog-media { aspect-ratio: 16 / 10; }
.blog-feature-body { padding: 2.25rem; display: flex; flex-direction: column; justify-content: center; }
.blog-feature-title { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.75rem; color: var(--heading-color); transition: color 0.25s ease; }
.blog-feature-title a { color: inherit; text-decoration: none; }
.blog-feature:hover .blog-feature-title { color: #f48c06; }
.blog-feature-excerpt { color: var(--text-body); font-size: 1.02rem; line-height: 1.65; margin-bottom: 1.5rem; }
@media (min-width: 768px) {
    .blog-feature { grid-template-columns: 1.1fr 1fr; }
    .blog-feature .blog-media { aspect-ratio: auto; min-height: 340px; }
}
@media (max-width: 575.98px) {
    .blog-feature-body { padding: 1.5rem 1.25rem; }
    .blog-feature-title { font-size: 1.45rem; }
}

/* Standard card */
.blog-card { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease; }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(34, 40, 92, 0.09); border-color: rgba(248, 170, 28, 0.35); }
.blog-card .blog-media { aspect-ratio: 16 / 10; }
.blog-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.blog-title { font-size: 1.25rem; line-height: 1.4; margin: 0 0 0.6rem; color: var(--heading-color); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.25s ease; }
.blog-title a { color: inherit; text-decoration: none; }
.blog-card:hover .blog-title { color: var(--primary-deep); }
.blog-excerpt { color: var(--text-body); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.25rem; flex-grow: 1; }

.btn-read-more { align-self: flex-start; color: var(--on-primary); font-weight: 700; font-size: 0.9rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; background:#f48c06; padding: 8px 16px; border-radius: 100px; transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.btn-read-more i { transition: transform 0.25s ease; }
.blog-card:hover .btn-read-more, .blog-feature:hover .btn-read-more, .btn-read-more:hover { background: var(--primary-color); color: var(--navy-color); }
.blog-card:hover .btn-read-more i, .blog-feature:hover .btn-read-more i, .btn-read-more:hover i { transform: translateX(3px); }

.empty-state { text-align: center; padding: 3.5rem 1.5rem; grid-column: 1 / -1; background: var(--card-color); border: 1px dashed var(--card-border); border-radius: var(--radius-lg); }
.empty-state i { font-size: 2.5rem; color: rgba(248, 170, 28, 0.5); margin-bottom: 1rem; display: block; }
.empty-state h2 { color: var(--heading-color); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); max-width: 32rem; margin: 0 auto 1.5rem; }

@media (max-width: 767.98px) {
    .blog-content { padding: 1.25rem; }
    .blog-title { font-size: 1.15rem; }
    /* 8px vertical padding leaves a 38px pill — below the 44px touch minimum. */
    .btn-read-more { padding: 11px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .blog-card, .blog-feature, .blog-media img, .btn-read-more, .btn-read-more i, .blog-title, .blog-feature-title { transition: none; }
    .blog-card:hover, .blog-feature:hover { transform: none; }
    .blog-card:hover .blog-media img, .blog-feature:hover .blog-media img { transform: none; }
    .blog-card:hover .btn-read-more i, .blog-feature:hover .btn-read-more i, .btn-read-more:hover i { transform: none; }
}

/* ---------- Blog detail ---------- */
.blog-detail-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(248, 170, 28, 0.10) 0%, rgba(255, 194, 77, 0.14) 100%); padding: 70px 0 40px; }
.blog-detail-hero::before, .blog-detail-hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; }
.blog-detail-hero::before { top: -40px; right: -40px; width: 220px; height: 220px; background: rgba(248, 170, 28, 0.25); }
.blog-detail-hero::after { bottom: -60px; left: -40px; width: 260px; height: 260px; background: rgba(255, 194, 77, 0.3); }
.blog-detail-hero > .wrap { position: relative; z-index: 1; }
.blog-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-deep); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.blog-back-link:hover { color: var(--primary-hover); }
.blog-header { margin-top: 30px; }
.blog-header h1 { font-size: 3rem; font-weight: 900; color: var(--secondary-color); margin-bottom: 15px; line-height: 1.2; }
.blog-meta-main { color: var(--text-muted); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.blog-detail-section { padding: 60px 0; background-color: var(--surface-color); }
.blog-featured-img { width: 100%; border-radius: var(--radius-lg); margin-bottom: 40px; object-fit: cover; max-height: 500px; box-shadow: var(--shadow-md); display: block; }
.blog-content-body { font-size: 1.1rem; line-height: 1.8; color: var(--text-body); margin-bottom: 50px; }
.blog-content-body h2, .blog-content-body h3 { color: var(--primary-strong); margin-top: 30px; margin-bottom: 15px; font-weight: bold; }
.blog-content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }
.blog-content-body p { margin-bottom: 20px; }
.blog-share { border-top: 1px solid var(--card-border); padding-top: 1.5rem; margin-top: 3rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.blog-share strong { color: var(--navy-color); }
.share-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--card-border); color: var(--text-body); transition: all 0.2s ease; }
.share-icon:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.sidebar-card { background: #fff; padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: 30px; }
.sidebar-card--enroll { background: linear-gradient(135deg, rgba(248, 170, 28,0.1), rgba(248, 170, 28,0.05)); border: 2px solid rgba(248, 170, 28,0.2); }
.sidebar-title { font-size: 1.3rem; font-weight: 800; color: var(--secondary-color); margin-bottom: 25px; }
.recent-posts { list-style: none; margin: 0; padding: 0; }
.recent-post-item { display: flex; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.recent-post-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.recent-post-img, .recent-post-img-fallback { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.recent-post-img-fallback { background: #eee; display: flex; align-items: center; justify-content: center; color: #ccc; }
.recent-post-info h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; line-height: 1.4; }
.recent-post-info h3 a { color: var(--text-body); text-decoration: none; transition: color 0.2s; }
.recent-post-info h3 a:hover { color: var(--primary-deep); }
.recent-post-info span { font-size: 0.8rem; color: var(--text-muted); }
.btn-enroll-full { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.85rem; border-radius: 50px; font-weight: 700; color: #fff; background: var(--gradient-hero); border: none; box-shadow: var(--shadow-glow); }

/* ---------- Instructor area ---------- */
.instr-stat { border-radius: 14px; padding: 14px 18px; background: #fff; border: 1.5px solid #E9E4DB; }
.instr-stat .num { font-size: 1.6rem; font-weight: 800; color: #22285C; }
.instr-stat.is-blue { border-color: var(--cyan-color); }
.instr-stat.is-blue .num { color: var(--cyan-color); }
.instr-stat.is-yellow { border-color: var(--coral-color); }
.instr-stat.is-yellow .num { color: #A96F04; }
.instr-panel { background: #fff; border-radius: 1rem; box-shadow: var(--shadow-sm); padding: 1.5rem; height: 100%; }
.instr-panel h2 { font-size: 1.4rem; font-family: 'Inter', sans-serif; font-weight: 800; color: var(--navy-color); }
.instr-class-card, .instr-analytics-card { border: 1px solid var(--card-border); border-radius: 0.75rem; padding: 1rem; height: 100%; }
.badge-pill { display: inline-flex; align-items: center; border-radius: 50px; padding: 0.3rem 0.75rem; font-size: 0.8rem; font-weight: 600; }
.badge-pill--light { background: #F4F1EA; border: 1px solid var(--card-border); color: var(--text-body); }
.badge-pill--success { background: var(--cyan-color); color: #fff; }
.badge-pill--warning { background: var(--coral-color); color: #22285C; }
.instr-form .field { margin-bottom: 0.9rem; }
.instr-form label { font-weight: 600; color: var(--navy-color); display: block; margin-bottom: 0.35rem; font-size: 0.9rem; }
.instr-form input, .instr-form select, .instr-form textarea { width: 100%; border-radius: 0.5rem; border: 1px solid var(--card-border); padding: 0.55rem 0.75rem; }
.btn-instr-primary { background: var(--cyan-color); color: #fff; border: none; border-radius: 0.5rem; padding: 0.65rem 1rem; font-weight: 700; width: 100%; }
.btn-instr-success { background: var(--navy-color); color: #fff; border: none; border-radius: 0.5rem; padding: 0.65rem 1rem; font-weight: 700; width: 100%; }
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th, .simple-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--card-border); font-size: 0.9rem; }
.auth-shell { min-height: calc(100vh - 84px); display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 1rem; box-shadow: var(--shadow-md); padding: 2.5rem; }
.alert-box { border-radius: 0.6rem; padding: 0.85rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-box--error { background: #FDECEC; color: #B3261E; border: 1px solid #F6C6C4; }
.alert-box--success { background: #EAF6EC; color: #1E7B34; border: 1px solid #C7E8CE; }
