/* ==========================================================================
   SchoolMaster Landing Page — landing.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --hero-gradient: linear-gradient(-45deg, #0d1b4b, #1a237e, #0a3d62, #3a0647);
    --primary-blue: #1565c0;
    --primary-dark: #0d47a1;
    --accent: #00bcd4;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted-light: rgba(255, 255, 255, 0.65);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.18);
    --border-radius-card: 16px;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 96 top and bottom meant 192px of nothing between one section and the
       next, which read as the page having ended. 64 still separates them
       clearly and keeps a screen's worth of content in view. */
    --section-padding: 64px 0;
}

/* --------------------------------------------------------------------------
   Theme tokens
   Three states, because "follow the device" has to be the default:
     :root                                  — light, and the only full definition
     @media dark + :not([data-theme=light]) — device is dark, visitor hasn't chosen
     [data-theme="dark"]                    — visitor chose dark, beats the media query
   App.razor stamps data-theme on <html> from the sm-theme cookie, and omits it
   entirely when no cookie is set so the media query decides.

   The --mud-palette-* overrides are deliberate: MudThemeProvider writes its own
   values onto :root from an inline <style> late in the body, so plain :root here
   would lose. The [data-theme] / :not() selectors outrank it.
   -------------------------------------------------------------------------- */
:root {
    --surface:       #ffffff;
    --surface-alt:   #f8fafc;
    --surface-card:  #ffffff;
    --border-soft:   #e2e8f0;
    --hover-soft:    #f1f5f9;
    --heading:       #0d1b4b;
    --body:          #64748b;
    --body-dim:      #94a3b8;
    --icon-dim:      #cbd5e1;
    --appbar-solid:  rgba(255, 255, 255, 0.96);
    --nav-scrolled:  #334155;
    --dark:          #0d1b4b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --surface:       #0b1220;
        --surface-alt:   #0f1729;
        --surface-card:  #141d31;
        --border-soft:   #24314b;
        --hover-soft:    #1b2740;
        --heading:       #e8eefc;
        --body:          #a3b3cc;
        --body-dim:      #7e8fa8;
        --icon-dim:      #47566f;
        --appbar-solid:  rgba(11, 18, 32, 0.94);
        --nav-scrolled:  #cbd7ee;
        --dark:          #e8eefc;

        --mud-palette-surface:       #141d31;
        --mud-palette-background:    #0b1220;
        --mud-palette-text-primary:   #e8eefc;
        --mud-palette-text-secondary: #a3b3cc;
        --mud-palette-divider:        #24314b;
        --mud-palette-lines-default:  #24314b;
    }
}

:root[data-theme="dark"] {
    --surface:       #0b1220;
    --surface-alt:   #0f1729;
    --surface-card:  #141d31;
    --border-soft:   #24314b;
    --hover-soft:    #1b2740;
    --heading:       #e8eefc;
    --body:          #a3b3cc;
    --body-dim:      #7e8fa8;
    --icon-dim:      #47566f;
    --appbar-solid:  rgba(11, 18, 32, 0.94);
    --nav-scrolled:  #cbd7ee;
    --dark:          #e8eefc;

    --mud-palette-surface:        #141d31;
    --mud-palette-background:     #0b1220;
    --mud-palette-text-primary:   #e8eefc;
    --mud-palette-text-secondary: #a3b3cc;
    --mud-palette-divider:        #24314b;
    --mud-palette-lines-default:  #24314b;
}

/* The page itself, so the browser paints the right ground behind everything. */
body {
    background: var(--surface);
    color: var(--heading);
}

/* --------------------------------------------------------------------------
   Base Reset for Landing
   -------------------------------------------------------------------------- */
.landing-page * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(36px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-36px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(36px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

@keyframes pulse-dot {
    0%, 100% { transform: scale(1);    opacity: 0.5; }
    50%       { transform: scale(1.4); opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

@keyframes wave-border {
    0%   { border-color: rgba(0, 188, 212, 0.4); }
    50%  { border-color: rgba(21,  101, 192, 0.8); }
    100% { border-color: rgba(0, 188, 212, 0.4); }
}

/* --------------------------------------------------------------------------
   Scroll-Reveal System
   -------------------------------------------------------------------------- */
/* Visible by default. Only hidden once landing.js has set .sm-js on <html>, so a
   script that fails to load or run leaves a readable page rather than a blank one. */
.animate-on-scroll {
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.sm-js .animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* --------------------------------------------------------------------------
   Public Navbar
   -------------------------------------------------------------------------- */
.public-appbar {
    background: transparent !important;
    box-shadow: none !important;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.public-appbar.scrolled {
    background: var(--appbar-solid) !important;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.10) !important;
    backdrop-filter: blur(10px);
}

/* The wordmark. This was written against .public-logo-text, which the markup
   never used — so the name inherited MudBlazor's text colour and sat dark on the
   dark hero. It went unnoticed while a logo image was beside it; once the logo
   came out of the bar the name was the whole brand and had to be legible. */
.public-brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    transition: color 0.4s ease;
}

.public-appbar.scrolled .public-brand-name {
    color: var(--primary-blue);
}

.nav-btn-login {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease;
}

.public-appbar.scrolled .nav-btn-login {
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

.nav-btn-started {
    background: white !important;
    color: var(--primary-blue) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.public-appbar.scrolled .nav-btn-started {
    background: var(--primary-blue) !important;
    color: white !important;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    /* Shorter than the old full-screen hero so the features peek above the fold,
       with a floor that keeps the copy, stats panel and controls from crowding. */
    min-height: 560px;
    min-height: max(75vh, 560px);
    /* Backdrop is the carousel now; this colour only shows while the first image decodes. */
    background: #0d1b4b;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 88px 0 104px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg,
        rgba(13,27,75,0.90) 0%,
        rgba(26,35,126,0.82) 50%,
        rgba(10,61,98,0.88) 100%);
}

/* Mesh texture overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* Glow orb bottom-right */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,188,212,0.15) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 6px 16px;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.5s ease forwards;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    color: white;
    line-height: 1.18;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #00bcd4, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted-light);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 540px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.25s forwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.hero-btn-primary {
    background: white !important;
    color: var(--primary-dark) !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.hero-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
}

.hero-btn-outline {
    border: 2px solid rgba(255,255,255,0.5) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.hero-btn-outline:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: white !important;
}

.hero-trust {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.6s forwards;
}

.trust-avatars {
    display: flex;
}

.trust-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid white;
    background: linear-gradient(135deg, #1565c0, #7c4dff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    margin-left: -10px;
}

.trust-avatar:first-child { margin-left: 0; }

.trust-text {
    color: var(--text-muted-light);
    font-size: 0.875rem;
}

/* Hero mockup card (floating) */
.hero-mockup-wrapper {
    opacity: 0;
    animation: fadeInRight 0.8s ease 0.3s forwards;
}

.hero-mockup {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: float 4s ease-in-out infinite;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mockup-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.mockup-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.mockup-stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

.mockup-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 8px;
    overflow: hidden;
}

.mockup-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #00bcd4, #7c4dff);
    animation: shimmer 2.5s linear infinite;
    background-size: 200% auto;
}

/* Hero image frame */
.hero-image-frame {
    max-width: 500px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    transform: rotate(-2deg);
    overflow: hidden;
    animation: float 5s ease-in-out infinite;
}

.hero-screenshot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* --------------------------------------------------------------------------
   Wave Divider
   -------------------------------------------------------------------------- */
.wave-divider {
    overflow: hidden;
    line-height: 0;
    margin-top: -2px;
}

.wave-divider svg {
    display: block;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Section Common
   -------------------------------------------------------------------------- */
.landing-section {
    padding: var(--section-padding);
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(21,101,192,0.1), rgba(0,188,212,0.1));
    color: var(--primary-blue);
    border: 1px solid rgba(21,101,192,0.2);
    border-radius: 50px;
    padding: 4px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: #0d1b4b;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--body);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Feature Cards
   -------------------------------------------------------------------------- */
.features-section {
    background: #f8faff;
}

.feature-card {
    background: var(--surface-card);
    border-radius: var(--border-radius-card);
    border: 1px solid rgba(0,0,0,0.07);
    padding: 28px 24px;
    height: 100%;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(21, 101, 192, 0.15);
}

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon-wrap.blue   { background: linear-gradient(135deg, #1565c0, #1976d2); }
.feature-icon-wrap.teal   { background: linear-gradient(135deg, #00838f, #00bcd4); }
.feature-icon-wrap.purple { background: linear-gradient(135deg, #6a1b9a, #9c27b0); }
.feature-icon-wrap.green  { background: linear-gradient(135deg, #2e7d32, #43a047); }
.feature-icon-wrap.orange { background: linear-gradient(135deg, #e65100, #f57c00); }
.feature-icon-wrap.indigo { background: linear-gradient(135deg, #283593, #3f51b5); }

.feature-icon-wrap .mud-icon-root {
    color: white !important;
    font-size: 1.6rem !important;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--body);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Stats Section
   -------------------------------------------------------------------------- */
.stats-section {
    background: linear-gradient(135deg, #0d1b4b 0%, #1a237e 50%, #0a3d62 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 10% 50%, rgba(0,188,212,0.08) 0%, transparent 50%),
                      radial-gradient(circle at 90% 50%, rgba(124,77,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.stat-item {
    text-align: center;
    position: relative;
    padding: 24px 16px;
}

.stat-number {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    color: #00bcd4;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}

/* Animated particles for stats */
.stat-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 188, 212, 0.3);
    animation: pulse-dot 3s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Schools Section
   -------------------------------------------------------------------------- */
.schools-section {
    background: var(--surface-alt);
}

.school-card-pub {
    background: var(--surface-card);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius-card);
    padding: 20px;
    text-align: center;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    cursor: default;
}

.school-card-pub:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.school-avatar-pub {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 12px;
}

.school-name-pub {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
}

.empty-school-banner {
    border: 2px dashed rgba(21,101,192,0.25);
    border-radius: var(--border-radius-card);
    padding: 48px 32px;
    text-align: center;
    background: rgba(21,101,192,0.02);
    animation: wave-border 3s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   News Section
   -------------------------------------------------------------------------- */
.news-section {
    background: #f8faff;
}

.news-card {
    background: var(--surface-card);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.07);
    height: 100%;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

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

.news-card-image {
    height: 160px;
    background: var(--hero-gradient);
    background-size: 300% 300%;
    animation: heroGradient 8s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

.news-chip.announcement { background: rgba(21,101,192,0.1); color: #1565c0; }
.news-chip.news         { background: rgba(0,131,143,0.1);  color: #00838f; }
.news-chip.event        { background: rgba(230,81,0,0.1);   color: #e65100; }

.news-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.875rem;
    color: var(--body);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 12px;
}

.news-placeholder {
    text-align: center;
    padding: 64px 32px;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, #0a3d62 0%, #1a237e 50%, #3a0647 100%);
    position: relative;
    overflow: hidden;
    /* Its own padding, which is why it kept 96 after the shared value came
       down. The closing section should match the rest, not tower over them. */
    padding: var(--section-padding);
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(0,188,212,0.1) 0%, transparent 60%);
}

.cta-card {
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 56px 40px;
    text-align: center;
    backdrop-filter: blur(16px);
    animation: wave-border 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.cta-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.landing-footer {
    background: #0d1117;
    padding: 64px 0 32px;
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.footer-tagline {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    margin-top: 6px;
    line-height: 1.6;
}

.footer-heading {
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.footer-link {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: rgba(255,255,255,0.9);
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 40px 0 24px;
}

.footer-copyright {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    text-align: center;
}

.footer-gradient-bar {
    height: 3px;
    background: linear-gradient(90deg, #1565c0, #00bcd4, #7c4dff, #1565c0);
    background-size: 300% auto;
    animation: shimmer 4s linear infinite;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-btn-primary,
    .hero-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .landing-section {
        padding: 44px 0;
    }

    .hero-section {
        padding: 80px 0 64px;
    }

    .cta-card {
        padding: 40px 24px;
    }
}

/* --------------------------------------------------------------------------
   Supplemental — aliases and components added for Phase 1 Razor templates
   -------------------------------------------------------------------------- */

/* Hero aliases */
.hero-headline {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    color: white;
    line-height: 1.18;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-brand {
    background: linear-gradient(135deg, #00bcd4, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 60px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

/* Generic enter animation used inside hero (no scroll trigger needed) */
.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Mockup aliases */
.mockup-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.mockup-body   { padding: 0; }

.mockup-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.mockup-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.mockup-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 70px;
}

.mockup-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 8px;
}

/* School card */
.school-card {
    border: 1.5px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.school-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.school-initials-avatar {
    background: linear-gradient(135deg, #1565c0, #00bcd4) !important;
    color: white !important;
    font-weight: 700 !important;
}

/* News card content */
.news-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 0.875rem;
    color: var(--body);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-type-chip {
    position: absolute;
    top: 12px;
    left: 12px;
}

.news-card-gradient-banner {
    width: 100%;
    height: 100%;
}

.banner-news         { background: linear-gradient(135deg, #1565c0 0%, #00bcd4 100%); }
.banner-announcement { background: linear-gradient(135deg, #e65100 0%, #ff9800 100%); }
.banner-event        { background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%); }

/* Stats particles */
.stats-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    top: 40%;
    animation: pulse-dot 3s ease-in-out infinite;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

/* Navbar link */
.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: color 0.2s ease !important;
}

/* Tokenised: the solid bar is dark in dark mode, so a fixed slate here left the
   links almost unreadable against it. */
.public-appbar.scrolled .nav-link {
    color: var(--nav-scrolled) !important;
}

/* Section header block */
.section-header {
    text-align: center;
    margin-bottom: 8px;
}

/* Footer link list */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Showcase Section
   -------------------------------------------------------------------------- */
.showcase-section {
    background: var(--surface);
}

.showcase-image-frame {
    /* The panel holds a chart now, not a photograph. At 480px its axis
       labels and the figures above the bars were a smudge, so it takes the
       whole of its column and stops only where the column does. */
    max-width: 100%;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.showcase-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    transition: transform 0.5s ease;
}

.showcase-image-frame:hover .showcase-image {
    transform: scale(1.03);
}

.showcase-bullets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.showcase-bullet {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Gallery Section
   -------------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    background: var(--surface-card);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

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

.gallery-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-caption {
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    background: white;
}

/* --------------------------------------------------------------------------
   Hero Stats Panel
   -------------------------------------------------------------------------- */
.hero-stats-panel {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 420px;
    color: white;
    animation: fadeInRight 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hsp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.hsp-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.hsp-card--full {
    grid-column: span 2;
}

.hsp-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.hsp-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.hsp-chart-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.hsp-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hsp-bar-row {
    display: grid;
    grid-template-columns: 60px 1fr 36px;
    align-items: center;
    gap: 8px;
}

.hsp-bar-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hsp-bar-track {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.hsp-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #00bcd4, #7c4dff);
    width: var(--pct, 0%);
    animation: expand-bar 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hsp-bar-count {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

@keyframes expand-bar {
    from { width: 0; }
    to   { width: var(--pct, 0%); }
}

/* --------------------------------------------------------------------------
   Feature Card Image
   -------------------------------------------------------------------------- */
.feature-card-image {
    height: 180px;
    overflow: hidden;
}

.feature-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.feature-card:hover .feature-img {
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Dashboard — school banner */
.dashboard-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Dashboard — quick action card */
.quick-action-btn {
    border: 1.5px solid var(--border-soft);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(21, 101, 192, 0.2);
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

/* CSS custom property for dark color */
/* --dark now lives in the theme token block near the top of this file. */

/* --------------------------------------------------------------------------
   Hero carousel — the web counterpart of the desktop ImageCarouselControl.
   Five images cross-fade behind the blue overlay while the matching caption
   swaps in as the headline. Driven entirely by CSS + landing.js, because the
   landing page renders as static SSR and has no interactive Blazor circuit.
   -------------------------------------------------------------------------- */
.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1);
    /* Fade out is quicker than fade in, matching the desktop 1.0s / 1.5s pair. */
    transition: opacity 1s cubic-bezier(0.55, 0, 1, 0.45),
                transform 7s ease-out;
    will-change: opacity, transform;
}

.hero-slide.is-active {
    opacity: 1;
    /* Slow push-in over most of the 6s hold, so a held slide never looks like a still. */
    transform: scale(1.07);
    transition: opacity 1.5s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 7s ease-out;
}

/* Slides are <picture>/<img> rather than CSS backgrounds so they can carry a WebP
   source with a JPG fallback, and so the ones below the fold of the rotation can
   be held back until they are needed. */
.hero-slide picture,
.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    object-fit: cover;
    object-position: center center;
}

/* ── Rotating headline ──────────────────────────────────────────────────── */
.hero-caption-stage {
    position: relative;
    /* Three lines are reserved so the subtitle and buttons hold their place
       when a two-line caption follows a three-line one. */
    min-height: 3.54em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(2rem, 4vw, 3.05rem);
}

.hero-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(14px);
    /* visibility drops the off-screen captions out of the accessibility tree, so a
       screen reader reads one headline instead of all five stacked in the <h1>.
       It flips only after the fade-out has finished. */
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.55, 0, 1, 0.45),
                transform 0.8s ease,
                visibility 0s linear 0.8s;
    pointer-events: none;
}

.hero-caption.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s,
                transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s,
                visibility 0s linear 0s;
}

.hero-caption-line {
    display: block;
}

/* ── Controls: arrows flanking the dots, centred above the wave ─────────── */
.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 72px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    pointer-events: none;
}

.hero-controls > * {
    pointer-events: auto;
}

.hero-nav {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero-nav svg {
    width: 20px;
    height: 20px;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: scale(1.08);
}

.hero-nav:focus-visible,
.hero-dot:focus-visible {
    outline: 2px solid #00bcd4;
    outline-offset: 3px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.hero-dot:hover {
    opacity: 0.75;
}

.hero-dot.is-active {
    opacity: 1;
    /* Active dot stretches into a pill so the position reads at a glance. */
    width: 26px;
    border-radius: 5px;
}

/* ── Wave divider: pinned to the bottom so it can't sit beside the flex copy ─ */
.hero-section .wave-divider {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

.hero-section .wave-divider svg {
    height: 56px;
}

/* Filled from CSS rather than a fill="" attribute so it follows the theme —
   it has to match the Features section it flows into. */
.wave-divider path {
    fill: var(--surface-alt);
}

/* Section padding already spaces the hero; the old inner padding made it 100vh tall. */
.hero-section .hero-content {
    padding-top: 0;
    padding-bottom: 0;
}

/* The badge is inline-flex, but a column flex parent stretches it edge to edge. */
.hero-section .hero-badge {
    align-self: flex-start;
}

.hero-section .hero-trust {
    margin-top: 28px;
    /* Never had a colour of its own, so it inherited the page's dark body text
       and all but vanished against the hero. */
    color: var(--text-muted-light);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: max(70vh, 520px);
        padding: 92px 0 96px;
    }

    .hero-controls {
        bottom: 60px;
        gap: 10px;
    }

    /* Arrows give way to swipe on touch, leaving the dots as the position cue. */
    .hero-nav {
        display: none;
    }

    .hero-section .wave-divider svg {
        height: 40px;
    }
}

/* On narrow phones the longer captions wrap past the three reserved lines and
   would run into the subtitle, so step the headline down to keep them at three. */
@media (max-width: 430px) {
    .hero-caption-stage {
        font-size: clamp(1.4rem, 5.6vw, 1.8rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide.is-active,
    .hero-caption,
    .hero-caption.is-active {
        transition-duration: 0.01ms;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Public mobile drawer
   Plain markup toggled by landing.js. The public pages render as static SSR,
   so this replaces the MudDrawer that needed an interactive circuit to open —
   and it opens instantly, with no server round-trip.
   -------------------------------------------------------------------------- */
/* 960px is MudBlazor's md breakpoint, so the swap lands where MudHidden used to. */
.pub-desktop-nav {
    display: none;
    align-items: center;
}

@media (min-width: 960px) {
    .pub-desktop-nav { display: flex; }
    .pub-nav-toggle  { display: none !important; }
}

.pub-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, color 0.4s ease;
}

.pub-nav-toggle svg {
    width: 27px;
    height: 27px;
}

.pub-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* The bar turns white on scroll, so the icon has to follow it. */
.public-appbar.scrolled .pub-nav-toggle {
    color: var(--primary-blue);
}

.public-appbar.scrolled .pub-nav-toggle:hover {
    background: rgba(21, 101, 192, 0.10);
}

.pub-scrim {
    position: fixed;
    inset: 0;
    z-index: 1290;
    background: rgba(13, 27, 75, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.pub-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1300;
    width: 264px;
    max-width: 82vw;
    display: flex;
    flex-direction: column;
    background: var(--surface-card);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.3s;
    overflow-y: auto;
}

body.pub-drawer-open .pub-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

body.pub-drawer-open .pub-drawer {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0s;
}

/* Holds the page still while the drawer is over it. */
body.pub-drawer-open {
    overflow: hidden;
}

.pub-drawer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 8px 0 14px;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.pub-drawer-brand {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--dark);
}

.pub-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--body);
    cursor: pointer;
}

.pub-drawer-close svg {
    width: 18px;
    height: 18px;
}

.pub-drawer-close:hover {
    background: var(--hover-soft);
}

.pub-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.pub-drawer-links a {
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
}

.pub-drawer-links a:hover {
    background: var(--hover-soft);
}

.pub-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
}

.pub-drawer-btn {
    display: block;
    padding: 10px 16px;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.pub-drawer-btn--outline {
    border: 1.5px solid var(--primary-blue);
    color: var(--primary-blue);
}

.pub-drawer-btn--filled {
    background: var(--primary-blue);
    color: #fff;
}

.pub-nav-toggle:focus-visible,
.pub-drawer-close:focus-visible,
.pub-drawer a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Public app bar: theme + language toggles
   Plain links, so they work with no Blazor circuit. Each hits a GET endpoint
   that sets a cookie and redirects back.
   -------------------------------------------------------------------------- */
/* Bigger since the logo left the bar. 38px was a small target on a phone, and
   the two toggles are the only controls a visitor has up here until they reach
   the buttons. */
.pub-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background 0.25s ease, color 0.4s ease;
}

.pub-icon-btn svg {
    width: 24px;
    height: 24px;
}

.pub-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Once the bar goes solid the icons sit on the page background, not the hero. */
.public-appbar.scrolled .pub-icon-btn {
    color: var(--primary-blue);
}

.public-appbar.scrolled .pub-icon-btn:hover {
    background: rgba(21, 101, 192, 0.10);
}

.pub-theme-toggle {
    display: inline-flex;
}

/* Only one of the two theme links is ever shown. Light is the default, so the
   "go dark" link shows; each dark state swaps them. This mirrors the token
   blocks at the top of the file and needs no JavaScript. */
.pub-theme--to-light {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pub-theme--to-dark  { display: none; }
    :root:not([data-theme="light"]) .pub-theme--to-light { display: inline-flex; }
}

:root[data-theme="dark"] .pub-theme--to-dark  { display: none; }
:root[data-theme="dark"] .pub-theme--to-light { display: inline-flex; }

/* Toggles stay visible on mobile; only the nav links fold into the drawer. */
.pub-mobile-actions {
    display: flex;
    align-items: center;
}

@media (min-width: 960px) {
    .pub-mobile-actions { display: none; }
}

/* ==========================================================================
   Feature cards — icon, not photograph
   Eight stock photographs cost a visitor about a megabyte before they had read
   a word, and none of them said anything the title did not. The card is now an
   icon, a title and a line of text, which also lets four sit across a row
   instead of taking a screen each.
   ========================================================================== */
.feature-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border-soft);
    border-radius: 14px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon and heading share a line. On a narrow card the heading wraps beneath the
   icon rather than being squeezed, which is what align-items:flex-start and the
   wrap below are for. */
.feature-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.feature-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    min-width: 0;
    flex: 1;
}

.feature-card-desc {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--body);
}

.feature-card:hover { transform: translateY(-4px); }

@media (max-width: 599.98px) {
    .feature-card { padding: 12px; gap: 8px; border-radius: 12px; }
    .feature-icon { width: 32px; height: 32px; border-radius: 8px; }
    .feature-card-head { gap: 8px; }

    /* Two cards to a 390px row leaves about 150px, so a two-word heading beside a
       32px icon has roughly 110px. It wraps to a second line rather than being
       cut, and flex-basis:100% sends it under the icon when even that is tight. */
    .feature-card-title { font-size: 0.82rem; line-height: 1.25; }
    .feature-card-desc  { font-size: 0.74rem; line-height: 1.45; }
}

/* ==========================================================================
   Public news feed — a post, laid out like a post
   Who is speaking on top, what they said beneath, the picture last. The header
   is not decoration: this page carries posts from every school on the platform,
   and without a name on top a reader cannot tell whose reopening date they are
   reading.
   ========================================================================== */
/* Natural height, not 100%. Stretching every card to match the tallest left a
   post with no picture showing a block of nothing where the picture would have
   been. A feed is allowed a ragged bottom edge. */
.fb-post {
    background: var(--surface-card);
    border: 1.5px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.news-section .mud-grid-item { align-self: flex-start; }

.fb-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.fb-post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.fb-post-who { min-width: 0; flex: 1; }

.fb-post-school {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.25;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The second line carries three or four short pieces. It wraps rather than
   truncating, because the post type is the piece most worth keeping. */
.fb-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.74rem;
    color: var(--body-dim);
    line-height: 1.3;
    margin-top: 1px;
}
.fb-type { font-weight: 700; }
.fb-dot  { opacity: 0.55; }
.fb-important { color: #d32f2f; font-weight: 700; }

.fb-post-body { padding: 2px 14px 12px; }

.fb-post-title {
    margin: 0 0 5px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dark);
}

.fb-post-excerpt {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--body);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fixed height rather than an aspect ratio: the feed is a row of cards and
   pictures of different shapes make it read as a jumble. */
.fb-post-media { height: 190px; overflow: hidden; }
.fb-post-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 599.98px) {
    .fb-post-media { height: 165px; }
    .fb-avatar { width: 36px; height: 36px; font-size: 0.78rem; }
    .fb-post-head { padding: 10px 12px 6px; }
    .fb-post-body { padding: 2px 12px 10px; }
}

/* --------------------------------------------------------------------------
   School card avatar
   Initials drawn first, the logo laid over them. A logo file that is not there
   removes itself and the initials are already in place behind it, so a stale
   database value costs a 404 and nothing else.
   -------------------------------------------------------------------------- */
.school-avatar-stack {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.school-avatar-initials,
.school-avatar-logo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.school-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.school-avatar-logo {
    object-fit: cover;
    background: var(--surface-card);
}
