:root {
    --school-red: #b7192b;
    --school-red-dark: #861222;
    --school-yellow: #f7c948;
    --ink: #202431;
    --muted: #687386;
    --line: rgba(26, 32, 44, 0.10);
    --surface: #ffffff;
    --soft: #fff7e5;
    --shadow: 0 18px 55px rgba(80, 35, 35, 0.14);
}

[data-bs-theme="dark"] {
    --ink: #f5f7fb;
    --muted: #bac3d1;
    --line: rgba(255, 255, 255, 0.14);
    --surface: #151923;
    --soft: #211a1c;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
    background: #0f131b;
    color: var(--ink);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Prompt", "Sarabun", system-ui, sans-serif;
    color: var(--ink);
    background: #fff;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .muted-section {
    background: #0f131b;
}

a {
    text-decoration: none;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--surface);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.page-loader span {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(183, 25, 43, 0.16);
    border-top-color: var(--school-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.school-nav {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

[data-bs-theme="dark"] .school-nav {
    background: rgba(15, 19, 27, 0.82);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--school-red), var(--school-yellow));
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(183, 25, 43, 0.25);
}

.brand-mark.big {
    width: 70px;
    height: 70px;
    margin: 0 0 18px;
    font-size: 34px;
}

.btn-school {
    color: #fff;
    background: linear-gradient(135deg, var(--school-red), #e04b31);
    border: 0;
    box-shadow: 0 12px 26px rgba(183, 25, 43, 0.24);
}

.btn-school:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-glass,
.icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    backdrop-filter: blur(14px);
}

.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--ink);
    border-color: var(--line);
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    color: #fff;
}

.hero-section .carousel-inner,
.hero-section .carousel-item {
    min-height: 660px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.carousel-item.active .hero-bg {
    animation: kenburns 6.5s ease-out both;
}

@keyframes kenburns {
    0% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1.12);
    }
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(80, 10, 20, 0.84), rgba(80, 10, 20, 0.38), rgba(247, 201, 72, 0.20));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.min-vh-75 {
    min-height: 650px;
}

.hero-kicker {
    display: inline-flex;
    padding: 9px 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.hero-section h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(2.4rem, 5vw, 5.2rem);
    font-weight: 800;
}

.hero-section p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.2rem;
}

.quick-band {
    position: relative;
    z-index: 2;
    margin-top: -54px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

[data-bs-theme="dark"] .quick-grid {
    background: rgba(21, 25, 35, 0.82);
}

.quick-grid a {
    display: grid;
    gap: 8px;
    place-items: center;
    min-height: 92px;
    color: var(--ink);
    border-radius: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quick-grid a:hover {
    background: rgba(247, 201, 72, 0.16);
    transform: translateY(-3px);
}

.quick-grid i {
    color: var(--school-red);
    font-size: 1.6rem;
}

.section-pad {
    padding: 88px 0;
}

.muted-section {
    background: var(--soft);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-heading.compact {
    display: block;
}

.section-heading span {
    display: block;
    color: var(--school-red);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    font-weight: 800;
}

.news-card,
.teacher-card,
.contact-form,
.ai-chat,
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.news-card {
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover,
.teacher-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.news-body {
    padding: 22px;
}

.pill {
    display: inline-flex;
    padding: 5px 10px;
    color: var(--school-red-dark);
    background: rgba(247, 201, 72, 0.32);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
}

.news-body h3 {
    margin: 12px 0 8px;
    font-size: 1.18rem;
    font-weight: 800;
}

.news-body p {
    color: var(--muted);
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline div,
.download-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(60, 40, 20, 0.08);
}

.timeline strong {
    min-width: 86px;
    color: var(--school-red);
}

.glass-panel {
    padding: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(255, 247, 229, 0.70));
    backdrop-filter: blur(18px);
}

[data-bs-theme="dark"] .glass-panel {
    background: linear-gradient(145deg, rgba(21, 25, 35, 0.86), rgba(52, 35, 22, 0.70));
}

.counter-row strong {
    display: block;
    color: var(--school-red);
    font-size: 2rem;
}

.counter-row span {
    color: var(--muted);
}

.teacher-card {
    padding: 22px;
    text-align: center;
}

.teacher-card img {
    width: 126px;
    height: 126px;
    margin-bottom: 16px;
    border: 5px solid rgba(247, 201, 72, 0.45);
    border-radius: 50%;
    object-fit: cover;
}

.teacher-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.teacher-card p,
.teacher-card span {
    color: var(--muted);
}

.download-list {
    display: grid;
    gap: 12px;
}

.download-item {
    color: var(--ink);
}

.download-item i:first-child {
    color: var(--school-red);
    font-size: 1.6rem;
}

.download-item span {
    flex: 1;
    font-weight: 700;
}

.download-item small {
    display: block;
    color: var(--muted);
    font-weight: 400;
}

.video-box {
    display: grid;
    place-items: center;
    min-height: 330px;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, rgba(183, 25, 43, 0.90), rgba(247, 201, 72, 0.78)), url("../images/school-hero.png") center/cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.video-box i {
    font-size: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.page-hero {
    padding: 84px 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(133, 18, 34, 0.95), rgba(183, 25, 43, 0.86), rgba(247, 201, 72, 0.68));
}

.page-hero h1,
.article-page h1 {
    font-weight: 800;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-page {
    padding: 70px 0 90px;
}

.back-link,
.article-meta {
    color: var(--muted);
}

.article-cover {
    width: 100%;
    max-height: 520px;
    margin: 26px 0;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.ai-summary {
    padding: 18px;
    margin-bottom: 24px;
    background: rgba(247, 201, 72, 0.18);
    border-left: 5px solid var(--school-yellow);
    border-radius: 8px;
}

.article-content {
    font-size: 1.08rem;
    line-height: 1.9;
}

.contact-form,
.ai-chat {
    padding: 26px;
}

.map-box iframe {
    width: 100%;
    min-height: 420px;
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.chat-messages {
    display: grid;
    gap: 12px;
    max-height: 430px;
    min-height: 300px;
    overflow: auto;
    padding: 18px;
    background: rgba(104, 115, 134, 0.08);
    border-radius: 8px;
}

.chat-messages div {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 8px;
}

.chat-messages .bot {
    background: var(--surface);
    border: 1px solid var(--line);
}

.chat-messages .user {
    justify-self: end;
    color: #fff;
    background: var(--school-red);
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 14px;
}

.site-footer {
    padding: 60px 0 24px;
    color: #f9fafb;
    background: #231416;
}

.site-footer a {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 8px;
}

.socials {
    display: flex;
    gap: 10px;
}

.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.footer-bottom {
    padding-top: 24px;
    margin-top: 34px;
    color: rgba(255, 255, 255, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.swal2-popup {
    font-family: "Prompt", "Sarabun", system-ui, sans-serif;
}

@media (max-width: 991.98px) {
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .hero-section,
    .min-vh-75 {
        min-height: 560px;
    }

    .hero-section h1 {
        font-size: 2.35rem;
    }

    .quick-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .section-pad {
        padding: 62px 0;
    }

    .section-heading {
        display: block;
    }
}

/* New Redesign Utilities */
.transition { transition: all 0.3s ease; }
.hover-lift:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important; }
.backdrop-blur { backdrop-filter: blur(10px); }
.inset-0 { top: 0; left: 0; right: 0; bottom: 0; }
.opacity-0 { opacity: 0; }
.hover-opacity-100:hover { opacity: 1; }
.group-hover:hover .gallery-img { transform: scale(1.1); }
.icon-circle { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; font-size: 1.8rem; }
.quick-icon-btn:hover .icon-circle { transform: scale(1.1) translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,0.5) 0%, rgba(15,23,42,0.1) 100%); z-index: 1; }
.hero-blue-gradient {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #fff;
    display: flex;
    align-items: center;
}
.hero-search-box {
    background: #fff;
    border-radius: 999px;
    padding: 6px;
    display: flex;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.hero-search-input {
    border: none;
    background: transparent;
    padding: 12px 24px;
    flex: 1;
    color: #333;
    outline: none;
    font-size: 1.1rem;
}
.hero-search-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 32px;
    font-weight: 600;
    transition: all 0.2s;
}
.hero-search-btn:hover {
    background: #0284c7;
    transform: translateY(-2px);
}
.install-app-float {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 10;
    animation: fadeUp 1s 1s forwards;
    opacity: 0;
}
.stat-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.stat-box:hover {
    transform: translateY(-5px);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    color: #64748b;
    font-size: 0.95rem;
}
.animate-up { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════ */
.topbar {
    background: #0f2040;
    color: rgba(255,255,255,.8);
    font-size: .78rem;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
@media (min-width: 768px) { .topbar { display: block; } }
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    gap: 12px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-left a {
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    text-decoration: none;
    line-height: 1;
    transition: color .15s;
}
.topbar-left a:hover { color: #f59e0b; }
.topbar-contact {
    display: inline-flex; align-items: center; gap: 5px;
    color: rgba(255,255,255,.72); font-size: .76rem;
    text-decoration: none; line-height: 1; transition: color .15s;
}
a.topbar-contact:hover { color: #f59e0b; }
.topbar-contact i { color: #f59e0b; font-size: .78rem; flex-shrink: 0; }
.topbar-divider { width: 1px; height: 14px; background: rgba(255,255,255,.18); flex-shrink: 0; }
.topbar-lang {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.4);
    color: #f59e0b; border-radius: 4px;
    padding: 2px 9px; cursor: pointer; font-size: .74rem; font-weight: 700;
    transition: background .14s, color .14s; line-height: 1.5;
}
.topbar-lang:hover { background: #f59e0b; color: #0f2040; }

/* ═══════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
[data-bs-theme="dark"] .site-header {
    background: rgba(15,19,27,.92);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 80px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}
.brand-logo {
    width: 54px; height: 54px; object-fit: contain; flex-shrink: 0;
}
.brand .brand-mark {
    width: 48px; height: 48px;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.brand-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}
.brand-text small {
    display: block;
    font-size: .7rem;
    color: var(--muted);
    line-height: 1.2;
}

/* Main Nav */
.main-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1;
    overflow: visible;
    height: 80px;
    min-width: 0;
}
.main-nav .nav-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0 13px;
    height: 80px;
    border-radius: 0;
    color: var(--ink);
    font-size: .93rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .14s, border-color .14s;
    white-space: nowrap;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
}
.main-nav .nav-link i:not(.nav-chevron) { display: none; }
.main-nav .nav-link:hover { color: #d97706; border-bottom-color: #f59e0b; background: none; }
.main-nav .nav-link.is-active { color: #d97706; border-bottom-color: #f59e0b; background: none; font-weight: 700; }
.nav-chevron { font-size: .55rem !important; margin-left: 1px; }

/* Dropdown */
.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
    padding: 6px;
    z-index: 500;
}
[data-bs-theme="dark"] .nav-dropdown-menu { background: #1a1f2e; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: .82rem;
    transition: background .12s;
}
.nav-dropdown-item:hover { background: rgba(183,25,43,.07); color: var(--school-red); }
.nav-dropdown-divider { margin: 4px 8px; border-color: var(--line); }

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.header-actions .icon-btn {
    width: 38px; height: 38px;
    color: var(--ink);
    border-color: var(--line);
    border-radius: 8px;
}
.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #f59e0b;
    color: #fff;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .14s, box-shadow .14s;
    box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.btn-login:hover { color: #fff; background: #d97706; box-shadow: 0 4px 14px rgba(245,158,11,.45); }
.nav-toggle { display: none; }
@media (max-width: 991.98px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .btn-login span { display: none; }
    .btn-login { padding: 7px 11px; }
}

/* ═══════════════════════════════════════════════
   MOBILE SLIDE MENU
═══════════════════════════════════════════════ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
}
.mobile-menu.is-open { pointer-events: all; }
.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .25s;
}
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--surface);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.mobile-menu-head .brand-text strong { font-size: .9rem; }
.mobile-menu-nav {
    overflow-y: auto;
    flex: 1;
    padding: 10px 8px 24px;
}
.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
    transition: background .13s;
}
.mobile-menu-nav a:hover { background: rgba(183,25,43,.07); color: var(--school-red); }
.mobile-login {
    margin-top: 10px;
    background: linear-gradient(135deg, var(--school-red), #e04b31) !important;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
}
.mobile-login:hover { opacity: .9; }

/* ═══════════════════════════════════════════════
   FOOTER REDESIGN
═══════════════════════════════════════════════ */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding: 60px 0 40px;
}
@media (max-width: 991.98px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding: 44px 0 32px; }
}
@media (max-width: 575.98px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; }
}
.footer-about .footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-brand .brand-mark { width: 40px; height: 40px; font-size: 1.1rem; flex-shrink: 0; }
.footer-brand strong { display: block; color: #fff; font-size: .9rem; font-weight: 700; line-height: 1.3; }
.footer-brand small { display: block; color: rgba(255,255,255,.5); font-size: .72rem; }
.footer-desc { color: rgba(255,255,255,.6); font-size: .82rem; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.1);
    border-radius: 8px;
    font-size: .95rem;
    transition: background .14s, color .14s;
    text-decoration: none;
    margin-bottom: 0;
}
.footer-social a:hover { background: rgba(255,255,255,.22); color: #fff; }
.footer-col h4 {
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
    display: block;
    color: rgba(255,255,255,.6);
    font-size: .82rem;
    text-decoration: none;
    transition: color .13s;
    margin-bottom: 0;
}
.footer-col ul a:hover { color: var(--school-yellow); }
.footer-contact-list { list-style: none; padding: 0; margin: 0 0 14px; }
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: rgba(255,255,255,.6);
    font-size: .8rem;
    margin-bottom: 8px;
}
.footer-contact-list i { color: var(--school-yellow); flex-shrink: 0; margin-top: 2px; }
.footer-map {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--school-yellow);
    font-size: .8rem;
    text-decoration: none;
    border: 1px solid rgba(247,201,72,.35);
    border-radius: 8px;
    padding: 6px 12px;
    transition: background .14s;
    margin-bottom: 0;
}
.footer-map:hover { background: rgba(247,201,72,.1); color: var(--school-yellow); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-copy { color: rgba(255,255,255,.45); font-size: .78rem; }

/* ═══════════════════════════════════════════════
   MOBILE BOTTOM NAV
═══════════════════════════════════════════════ */
.m-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 900;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
    grid-template-columns: repeat(5, 1fr);
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
}
[data-bs-theme="dark"] .m-bottom-nav { background: rgba(15,19,27,.96); }
@media (max-width: 767.98px) { .m-bottom-nav { display: grid; } }
.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    text-decoration: none;
    font-size: .62rem;
    transition: color .14s;
    position: relative;
}
.m-nav-item i { font-size: 1.1rem; }
.m-nav-item:hover { color: var(--school-red); }
.m-nav-item-fab { margin-top: -18px; }
.m-nav-fab {
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--school-red), #e04b31);
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(183,25,43,.35);
    transition: transform .15s;
}
.m-nav-item-fab:hover .m-nav-fab { transform: scale(1.08); }
.m-nav-fab-label { font-size: .6rem; color: var(--school-red); }

/* ═══════════════════════════════════════════════
   SEARCH OVERLAY
═══════════════════════════════════════════════ */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(255,255,255,.97);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
}
[data-bs-theme="dark"] .search-overlay { background: rgba(15,19,27,.97); }
.search-overlay.is-open { display: flex; }
.search-overlay-inner { width: 100%; max-width: 680px; padding: 0 20px; }
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 2px solid var(--school-red);
    border-radius: 14px;
    padding: 6px 12px;
    margin-bottom: 28px;
}
.search-form input[type="search"] {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--ink);
    font-family: inherit;
    padding: 6px 4px;
}
.search-form input::placeholder { color: var(--muted); }
.search-suggest h4 {
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 12px;
}
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.search-tags a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(183,25,43,.07);
    color: var(--ink);
    border-radius: 999px;
    font-size: .82rem;
    text-decoration: none;
    transition: background .13s;
}
.search-tags a:hover { background: rgba(183,25,43,.14); color: var(--school-red); }

/* ═══════════════════════════════════════════════
   CONTACT FAB
═══════════════════════════════════════════════ */
.contact-fab {
    position: fixed;
    bottom: 78px; right: 20px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}
@media (min-width: 768px) { .contact-fab { bottom: 28px; } }
.contact-fab-menu {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s;
}
.contact-fab.is-open .contact-fab-menu {
    pointer-events: all;
    opacity: 1;
    transform: translateY(0);
}
.contact-fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transform: translateY(calc(var(--d, 0) * 6px));
    transition: transform .2s calc(var(--d, 0) * 30ms);
}
.contact-fab.is-open .contact-fab-item { transform: translateY(0); }
.contact-fab-label {
    background: #fff;
    color: #1f2937;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    white-space: nowrap;
}
.contact-fab-ic {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    background: var(--c, #374151);
    color: #fff;
    border-radius: 50%;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    flex-shrink: 0;
}
.contact-fab-toggle {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--school-red), #e04b31);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(183,25,43,.38);
    transition: transform .2s;
    position: relative;
}
.contact-fab-toggle:hover { transform: scale(1.07); }
.contact-fab-toggle .close-ic { display: none; }
.contact-fab.is-open .contact-fab-toggle .open-ic { display: none; }
.contact-fab.is-open .contact-fab-toggle .close-ic { display: block; }
.contact-fab-hint {
    font-size: .62rem;
    color: var(--muted);
    text-align: right;
    margin-top: 3px;
    transition: opacity .2s;
}
.contact-fab.is-open .contact-fab-hint { opacity: 0; }

/* ═══════════════════════════════════════════════
   SCROLL TO TOP
═══════════════════════════════════════════════ */
.scroll-top {
    position: fixed;
    bottom: 148px; right: 20px;
    z-index: 800;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s, color .14s;
    pointer-events: none;
}
@media (min-width: 768px) { .scroll-top { bottom: 96px; } }
.scroll-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { color: var(--school-red); }

/* body padding for mobile bottom nav */
@media (max-width: 767.98px) {
    body { padding-bottom: 60px; }
}
