/* ==================================================================
   SchoolHub PH - one stylesheet for the site and the admin panel
   ------------------------------------------------------------------
   1.  Base and variables
   2.  Small building blocks (buttons, cards, notices)
   3.  Login pages
   4.  The hub (home page, school list)
   5.  A school website
   6.  The admin panel
   7.  Mobile adjustments
   8.  The feature pack (gallery, clubs, awards, advisory, helper)
   ================================================================== */

/* ============================ 1. BASE ============================ */

:root {
    --brand: #1d4ed8;
    --accent: #f59e0b;
    --brand-soft: #eef2ff;
    --ink: #101828;
    --ink-soft: #4b5565;
    --line: #e4e7ec;
    --bg: #f6f7fb;
    --card: #ffffff;
    --good: #0f8a4c;
    --good-soft: #e7f7ee;
    --warn: #b54708;
    --warn-soft: #fdf3e2;
    --bad: #b42318;
    --bad-soft: #fdeceb;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .06);
    --radius: 14px;
    --radius-sm: 10px;
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

code {
    font-family: Consolas, "Courier New", monospace;
    font-size: .88em;
    background: #f2f4f7;
    padding: .12em .4em;
    border-radius: 6px;
    color: #344054;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.shell { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.shell-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose blockquote {
    margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid var(--brand);
    background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }

/* ===================== 2. SMALL BUILDING BLOCKS ================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem;
    padding: .62rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: .95rem;
    cursor: pointer; text-decoration: none; text-align: center;
    transition: filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(.95); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); color: #2b1a00; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem;
}
.card + .card { margin-top: 1.2rem; }
.card-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.badge {
    display: inline-block; padding: .15rem .6rem; border-radius: 999px;
    font-size: .78rem; font-weight: 700; letter-spacing: .01em;
}
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-soft { background: var(--brand-soft); color: var(--brand); }

.notice {
    border-radius: var(--radius-sm);
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 1rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice ul { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.notice-good { background: var(--good-soft); border-color: #b7e4c9; color: #075c34; }
.notice-warn { background: var(--warn-soft); border-color: #f3d9ac; color: #7a3606; }
.notice-bad { background: var(--bad-soft); border-color: #f5c6c2; color: #8e1c14; }
.notice-info { background: var(--brand-soft); border-color: #c7d2fe; color: #1e3a8a; }

.tight li { margin-bottom: .3rem; }
.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: .5rem; }

.mini-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: .9rem; }
.mini-table td { padding: .4rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-table td:first-child { color: var(--ink-soft); width: 42%; }

.avatar {
    width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
    border: 3px solid #fff; box-shadow: var(--shadow); background: #fff;
}
.avatar-sm { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }

.pill-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.pill {
    background: var(--brand-soft); color: var(--brand);
    border-radius: 999px; padding: .28rem .8rem; font-size: .84rem; font-weight: 600;
}

.empty {
    text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft);
    border: 1px dashed var(--line); border-radius: var(--radius); background: #fff;
}

/* ========================= 3. LOGIN PAGES ======================== */

.auth-body {
    background: linear-gradient(160deg, #1e293b 0%, #1d4ed8 55%, #0ea5e9 100%);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.auth-wrap { width: min(560px, 100%); }
.auth-wrap-wide { width: min(880px, 100%); }
.auth-card {
    background: #fff; border-radius: 18px; padding: 2rem 1.75rem;
    box-shadow: 0 20px 50px rgba(4, 12, 40, .35);
}
.auth-brand { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; }
.auth-brand:hover { text-decoration: none; }
.auth-brand-mark {
    width: 38px; height: 38px; border-radius: 11px; background: var(--brand);
    color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem;
}
.auth-brand-text { font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.auth-title { font-size: 1.55rem; margin-bottom: .25rem; }
.auth-sub { color: var(--ink-soft); margin-bottom: 1.4rem; }
.auth-links { margin: 1.2rem 0 .4rem; }
.auth-hint { font-size: .82rem; color: var(--ink-soft); margin: 1rem 0 0; }
.auth-foot { text-align: center; color: #e0e7ff; font-size: .84rem; margin-top: 1.2rem; }
.auth-foot a { color: #fff; text-decoration: underline; }

/* ========================== 4. THE HUB =========================== */

.hub-top {
    background: linear-gradient(135deg, #111c3f 0%, var(--brand) 70%);
    color: #fff; padding: 1rem 0;
}
.hub-top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.hub-brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.1rem; }
.hub-brand:hover { text-decoration: none; color: #fff; }
.hub-brand-mark {
    width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .18);
    display: grid; place-items: center; font-size: .9rem; border: 1px solid rgba(255, 255, 255, .3);
}
.hub-nav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hub-nav a { color: #e8edff; font-weight: 600; font-size: .92rem; padding: .35rem .6rem; border-radius: 8px; }
.hub-nav a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; color: #fff; }

.hub-hero { padding: 3.5rem 0 2.5rem; text-align: center; }
.hub-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hub-hero p { color: var(--ink-soft); max-width: 46rem; margin-inline: auto; font-size: 1.05rem; }

.search-row { display: flex; gap: .6rem; max-width: 620px; margin: 1.6rem auto 0; }
.search-row input {
    flex: 1; padding: .85rem 1.1rem; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; background: #fff;
}
.search-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.school-card { display: block; color: inherit; padding: 0; overflow: hidden; }
.school-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s ease; }
.school-card-cover { height: 132px; background: var(--brand-soft); object-fit: cover; width: 100%; }
.school-card-body { padding: 1rem 1.15rem 1.2rem; }
.school-card-body h3 { margin-bottom: .2rem; font-size: 1.08rem; }
.school-card-body p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; color: var(--brand); }
.stat span { font-size: .85rem; color: var(--ink-soft); }

/* ====================== 5. A SCHOOL WEBSITE ====================== */

.site-top { background: var(--brand); color: #fff; }
.site-top-bar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; padding: .5rem 0; font-size: .84rem; }
.site-top-bar a { color: #fff; }
.site-head { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.site-logo { width: 66px; height: 66px; border-radius: 50%; background: #fff; object-fit: contain; padding: 4px; flex: none; }
.site-head-text h1 { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.5rem); color: #fff; }
.site-head-text p { margin: 0; font-size: .85rem; color: rgba(255, 255, 255, .85); }

.site-nav-wrap { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 900; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; padding: .35rem 0; }
.site-nav a {
    display: inline-flex; align-items: center; padding: .65rem .95rem; font-weight: 600; font-size: .92rem;
    color: var(--ink); border-radius: 8px; border: none; text-decoration: none;
    transition: all .18s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; line-height: 1.4;
}
.site-nav a:hover, .site-nav a.is-active {
    color: var(--brand) !important; background: var(--brand-soft, rgba(29, 78, 216, 0.08)) !important; text-decoration: none !important;
}
.nav-toggle { display: none; }

/* Navigation dropdown menus */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}
button.nav-dropdown-toggle,
.nav-dropdown-toggle {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .65rem .95rem;
    font-family: inherit;
    font-weight: 600;
    font-size: .92rem;
    color: var(--ink);
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
}
button.nav-dropdown-toggle:hover,
.nav-dropdown:hover > button.nav-dropdown-toggle,
.nav-dropdown.is-open > button.nav-dropdown-toggle,
button.nav-dropdown-toggle.is-active,
.nav-dropdown.is-active > button.nav-dropdown-toggle {
    color: var(--brand) !important;
    background: var(--brand-soft, rgba(29, 78, 216, 0.08)) !important;
}
.nav-dropdown-toggle .nav-arrow {
    font-size: .70rem;
    line-height: 1;
    transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    margin-left: 2px;
    opacity: .75;
}
.nav-dropdown:hover .nav-arrow,
.nav-dropdown.is-open .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--brand);
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 250px;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.95);
    padding: 6px;
    box-sizing: border-box;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu,
.nav-dropdown.is-open > .nav-dropdown-menu {
    display: block !important;
    animation: navDropdownFade .18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes navDropdownFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: .65rem .95rem !important;
    font-size: .90rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    transition: all .15s ease !important;
    white-space: nowrap;
    text-align: left;
}
.nav-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: var(--brand) !important;
    padding-left: 1.15rem !important;
    text-decoration: none !important;
}
.nav-dropdown-item.is-active {
    background: var(--brand-soft, rgba(29, 78, 216, 0.08)) !important;
    color: var(--brand) !important;
    font-weight: 700 !important;
}

/* Hero Banner & Height Options */
.site-hero {
    background: linear-gradient(140deg, var(--brand) 0%, #0b2a63 100%);
    color: #fff;
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 380px;
}
.site-hero.is-cover {
    background-size: cover;
    background-position: center;
    min-height: 460px;
}
.site-hero.banner-compact {
    min-height: 320px;
    padding: 3rem 0;
}
.site-hero.banner-standard {
    min-height: 460px;
    padding: 5rem 0;
}
.site-hero.banner-grand {
    min-height: 560px;
    padding: 7.5rem 0;
}
.site-hero-inner { position: relative; z-index: 2; max-width: 44rem; }
.site-hero h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); color: #fff; }
.site-hero p { color: rgba(255, 255, 255, .92); font-size: 1.05rem; }
.site-hero .btn-accent { margin-top: .4rem; }
.hero-veil { position: absolute; inset: 0; background: rgba(6, 16, 44, .55); z-index: 1; }

.section { padding: 2.8rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; justify-content: space-between; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: .9rem; }

.news-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.news-card img { height: 168px; width: 100%; object-fit: cover; }
.news-card-body { padding: 1rem 1.15rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.news-card-body h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.news-card-body h3 a { color: var(--ink); }
.news-card-body .meta { font-size: .78rem; color: var(--ink-soft); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.news-card-body p { font-size: .9rem; color: var(--ink-soft); flex: 1; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list b { min-width: 108px; color: var(--ink-soft); font-weight: 600; }

.staff-card { text-align: center; padding: 1.2rem; }
.staff-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto .7rem; background: var(--brand-soft); }
.staff-card h3 { font-size: .98rem; margin-bottom: .1rem; }
.staff-card p { margin: 0; font-size: .85rem; color: var(--ink-soft); }

.site-foot { background: #0f172a; color: #cbd5e1; padding: 2.4rem 0 1.4rem; margin-top: 2rem; }
.site-foot a { color: #fff; }
.site-foot-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot h4 { color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.site-foot p, .site-foot li { font-size: .88rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .3rem; }
.site-foot-bottom { border-top: 1px solid #1e293b; margin-top: 1.6rem; padding-top: 1rem; font-size: .8rem; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }

.post-body { font-size: 1.02rem; }
.post-body img { border-radius: var(--radius); margin: 1rem 0; }
.post-body h2 { margin-top: 1.6rem; }
.post-hero { width: 100%; border-radius: var(--radius); margin-bottom: 1.2rem; object-fit: cover; max-height: 420px; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: .8rem; }
.breadcrumb a { font-weight: 600; }

/* ========================= 6. ADMIN PANEL ======================== */

.admin-body { background: #f2f4f8; }
.admin-layout { display: flex; min-height: 100vh; align-items: flex-start; }

.admin-side {
    width: 254px; min-width: 254px; max-width: 254px; flex: 0 0 254px;
    box-sizing: border-box; background: #101a33; color: #c9d3e8; padding: 1.1rem .9rem 2rem;
    position: sticky; top: 0; height: 100vh; max-height: 100vh;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.admin-side::-webkit-scrollbar { width: 6px; }
.admin-side::-webkit-scrollbar-track { background: transparent; }
.admin-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 4px; }
.admin-side::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .45); }
.admin-side-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; padding: .3rem .4rem 1rem; }
.admin-side-brand:hover { text-decoration: none; color: #fff; }
.admin-side-brand .site-logo, .admin-side-brand .mark {
    width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: #fff; padding: 2px;
}
.admin-side-school { font-size: .8rem; color: #93a3c4; padding: 0 .4rem 1rem; }
.admin-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7d8db3; padding: 1rem .5rem .35rem; font-weight: 700; }
.admin-nav { list-style: none; margin: 0; padding: 0; }
.admin-nav a {
    display: flex; align-items: center; gap: .6rem; justify-content: space-between;
    padding: .58rem .7rem; border-radius: 9px; color: #d6def0; font-size: .92rem; font-weight: 600;
    margin-bottom: .12rem;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.admin-nav a.is-active { background: var(--brand); color: #fff; }
.admin-nav .count { background: var(--accent); color: #2b1a00; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; font-weight: 800; }

.admin-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.admin-bar {
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .7rem 1.4rem; display: flex; flex-wrap: wrap; gap: .7rem;
    align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15;
}
.admin-bar h1 { font-size: 1.12rem; margin: 0; }
.admin-bar-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.admin-content { padding: 1.5rem 1.4rem 3rem; width: min(1000px, 100%); }

.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .88rem; }
.field .help { font-size: .8rem; color: var(--ink-soft); }
.field .file-hint { font-size: .78rem; color: var(--ink-soft); }
.field .file-hint.is-bad { color: var(--bad); font-weight: 700; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="number"], input[type="date"], input[type="color"],
select, textarea {
    width: 100%; padding: .62rem .8rem; font: inherit; font-size: .95rem;
    color: var(--ink); background: #fff;
    border: 1px solid #d3d8e0; border-radius: var(--radius-sm);
}
input[type="color"] { padding: .2rem; height: 44px; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
textarea { min-height: 150px; resize: vertical; }

.check-row { display: flex; align-items: center; gap: .5rem; }
.check-row input { width: auto; }
.check-row label { font-weight: 600; font-size: .9rem; }

.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.switch-row + .switch-row { margin-top: .5rem; }
.switch-row span { font-size: .92rem; font-weight: 600; }
.switch-row input { width: auto; transform: scale(1.3); }

.editor {
    min-height: 260px; padding: .9rem 1rem; background: #fff;
    border: 1px solid #d3d8e0; border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    overflow-y: auto;
}
.editor:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.editor-bar {
    display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem;
    background: #f8fafc; border: 1px solid #d3d8e0; border-bottom: 1px solid var(--line);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-btn {
    font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
    background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: .25rem .55rem; color: var(--ink);
}
.editor-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.editor-templates {
    display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
    padding: .4rem .45rem; background: #fff; border: 1px solid #d3d8e0;
    border-bottom: 0; border-radius: 0;
}
.editor-tpl-lead { font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-right: .15rem; }
.editor-tpl {
    font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
    background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 999px;
    padding: .25rem .7rem; color: var(--brand);
}
.editor-tpl:hover { background: var(--brand); color: #fff; }
.editor-tpl-view { margin-left: auto; background: #fff; }
.editor-preview {
    margin-top: .8rem; padding: .9rem 1rem; background: #fff;
    border: 1px dashed var(--brand); border-radius: var(--radius-sm);
}
.editor-preview-head {
    margin: 0 0 .6rem; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: var(--brand);
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .row-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.admin-table img.thumb { width: 60px; height: 44px; object-fit: cover; border-radius: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toolbar input[type="search"], .toolbar input[type="text"] { max-width: 280px; }

.color-demo { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.color-demo-top { background: var(--demo-primary, #1d4ed8); color: #fff; padding: 1rem 1.1rem; }
.color-demo-top strong { font-size: 1.05rem; }
.color-demo-body { padding: 1rem 1.1rem; }
.color-demo-body .btn { background: var(--demo-accent, #f59e0b); color: #2b1a00; margin-top: .5rem; }

.palette-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.palette {
    width: 40px; height: 40px; border-radius: 10px; border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0;
}
.palette:hover { transform: scale(1.06); }

.step-list { counter-reset: admin-step; list-style: none; padding: 0; margin: 0; }
.step-list li { position: relative; padding: 0 0 1rem 2.4rem; counter-increment: admin-step; }
.step-list li::before {
    content: counter(admin-step); position: absolute; left: 0; top: .1rem;
    width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.plate { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.upload-preview { width: 120px; height: 120px; object-fit: contain; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-sm); }

html[dir="rtl"] .admin-side { text-align: right; }

/* ========================== 7. MOBILE ============================ */

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { padding-bottom: 1rem; position: static; height: auto; max-height: none; overflow-y: visible; }
    .admin-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .25rem; }
    .admin-content { width: 100%; }
}

@media (max-width: 720px) {
    body { font-size: 15.5px; }
    .hub-hero { padding: 2.4rem 0 1.8rem; }
    .auth-card { padding: 1.5rem 1.2rem; }
    .search-row { flex-direction: column; }
    .search-row .btn { width: 100%; }
    .section { padding: 2rem 0; }
    .site-head { gap: .7rem; padding: .8rem 0; }
    .site-logo { width: 52px; height: 52px; }
    .nav-toggle {
        display: inline-flex; align-items: center; gap: .4rem; margin: .5rem 0;
        background: var(--brand-soft); color: var(--brand); border: 0;
        border-radius: var(--radius-sm); padding: .5rem .8rem; font: inherit; font-weight: 700; cursor: pointer;
    }
    #site-nav { display: none; flex-direction: column; width: 100%; padding-bottom: .5rem; }
    #site-nav.is-open { display: flex; }
    .site-nav a { border-bottom: 0; border-left: 3px solid transparent; padding: .6rem .3rem; width: 100%; }
    .site-nav a:hover, .site-nav a.is-active { border-left-color: var(--brand); background: var(--brand-soft); }
    .nav-dropdown { display: flex; flex-direction: column; width: 100%; }
    .nav-dropdown-toggle {
        justify-content: space-between; width: 100%; padding: .65rem .4rem;
        border-bottom: 0; border-left: 3px solid transparent; font-size: .95rem;
    }
    .nav-dropdown-toggle:hover, .nav-dropdown.is-active .nav-dropdown-toggle {
        border-left-color: var(--brand); background: var(--brand-soft);
    }
    .nav-dropdown-menu {
        position: static; box-shadow: none; border: none; border-left: 3px solid var(--brand);
        background: #f8fafc; border-radius: 0; padding: .2rem 0 .2rem .75rem;
        transform: none; display: none; opacity: 1; visibility: visible;
    }
    .nav-dropdown.is-open .nav-dropdown-menu { display: block; }
    .nav-dropdown-item { padding: .55rem .6rem !important; font-size: .9rem !important; }
    .info-list b { min-width: 92px; }
    .admin-table th, .admin-table td { padding: .55rem .6rem; }
    .admin-bar { padding: .6rem .9rem; }
    .admin-content { padding: 1rem .9rem 2.5rem; }
}

@media print {
    .hub-top, .site-top, .site-nav-wrap, .admin-side, .admin-bar, .site-foot, .btn { display: none !important; }
    body { background: #fff; }
}

/* ==================================================================
   8. THE FEATURE PACK
   ------------------------------------------------------------------
   The styles of the sections every school website can show: the
   advisory strip, the Philippine clock, the gallery, the clubs, the
   achievements, the issuances, the downloads, the transparency board,
   the past principals, the enrollment page, the question helper and
   the switch page in the admin panel.
   ================================================================== */

/* ---- The advisory strip along the top of a website -------------- */
.advisory { color: #fff; font-weight: 600; font-size: .92rem; }
.advisory .shell { padding: .6rem 1rem; }
.advisory-info    { background: #1d4ed8; }
.advisory-success { background: #0f8a4c; }
.advisory-warning { background: #b54708; }
.advisory-danger  { background: #b42318; }

/* ---- The live Philippine clock in the top bar ------------------- */
.ph-clock { font-variant-numeric: tabular-nums; }

/* ---- The photo gallery ------------------------------------------ */
.gallery-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.gallery-item {
    margin: 0; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-item figcaption { padding: .7rem .9rem; display: grid; gap: .15rem; }
.gallery-item figcaption strong { font-size: .95rem; }

.gallery-admin-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.gallery-admin-item {
    margin: 0; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-sm); overflow: hidden;
}
.gallery-admin-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-admin-item figcaption { padding: .6rem .8rem; display: grid; gap: .15rem; }
.gallery-admin-item .row-actions { padding: 0 .8rem .8rem; flex-wrap: wrap; }

/* ---- Clubs and organizations ------------------------------------ */
.club-card { display: flex; gap: 1rem; align-items: flex-start; }
.club-logo {
    width: 72px; height: 72px; object-fit: cover; border-radius: 12px;
    border: 1px solid var(--line); flex: 0 0 auto;
}
.club-body { min-width: 0; }
.club-body h4 { margin-bottom: .3rem; }
.club-body h5 { margin: .6rem 0 .2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.club-body .tight { margin: 0; padding-left: 1.1rem; }

/* ---- Achievements ----------------------------------------------- */
.award-card { display: flex; gap: 1rem; align-items: flex-start; }
.award-card > img {
    width: 130px; height: 130px; object-fit: cover; border-radius: 12px;
    border: 1px solid var(--line); flex: 0 0 auto;
}
.award-body { min-width: 0; }
.award-body h3 { margin: .15rem 0 .3rem; color: var(--brand); }
.award-who { margin: 0 0 .2rem; display: grid; }

/* ---- Issuances and the transparency board ----------------------- */
.issuance-card h3 { margin: .35rem 0 .4rem; }
.group-title {
    margin: 1.8rem 0 .8rem; padding-bottom: .4rem;
    border-bottom: 2px solid var(--brand-soft); color: var(--brand);
    font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em;
}
.board-section:first-of-type .group-title { margin-top: .6rem; }

/* ---- Downloads and the past principals -------------------------- */
.download-card h4 { margin-bottom: .35rem; }
.person-card { text-align: center; }
.person-card img {
    width: 110px; height: 110px; object-fit: cover; border-radius: 50%;
    margin: 0 auto .7rem; border: 3px solid var(--brand-soft);
}
.person-card h3 { font-size: 1rem; margin-bottom: .2rem; }

/* ---- The switch page in the admin panel ------------------------- */
.switch-grid {
    display: grid; gap: .7rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.switch-card {
    display: flex; gap: .7rem; align-items: flex-start;
    padding: .8rem .9rem; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer;
}
.switch-card:hover { border-color: var(--brand); }
.switch-card input { width: auto; margin-top: .25rem; transform: scale(1.25); }
.switch-body { display: grid; gap: .2rem; min-width: 0; }
.switch-body strong { font-size: .95rem; }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

/* ---- The question helper on a website --------------------------- */
.chatbot { position: fixed; right: 18px; bottom: 76px; z-index: 40; }
.chatbot-toggle {
    border: 0; cursor: pointer; font: inherit; font-weight: 700;
    background: var(--accent); color: #1f2937; padding: .7rem 1.1rem;
    border-radius: 999px; box-shadow: var(--shadow);
}
.chatbot-panel {
    position: absolute; right: 0; bottom: 3.2rem; width: min(340px, calc(100vw - 36px));
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.chatbot-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem; padding: .7rem .9rem; background: var(--brand); color: #fff;
}
.chatbot-close {
    border: 0; background: transparent; color: #fff; font-size: 1.4rem;
    line-height: 1; cursor: pointer; padding: 0 .2rem;
}
.chatbot-log {
    padding: .8rem .9rem; max-height: 300px; overflow-y: auto;
    display: grid; gap: .5rem; align-content: start;
}
.chatbot-log p { margin: 0; padding: .5rem .7rem; border-radius: var(--radius-sm); font-size: .9rem; }
.chatbot-bot  { background: var(--brand-soft); color: var(--ink); }
.chatbot-user { background: #eef7ee; color: var(--ink); margin-left: 1.6rem; }
.chatbot-link { font-size: .88rem; font-weight: 600; }
.chatbot-form { display: flex; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid var(--line); }
.chatbot-form input { flex: 1 1 auto; min-width: 0; }
.chatbot-note { margin: 0; padding: 0 .9rem .8rem; font-size: .76rem; color: var(--ink-soft); }

/* ================== 9. MOBILE ADJUSTMENTS (PACK) ================== */
@media (max-width: 720px) {
    .club-card, .award-card { flex-direction: column; }
    .club-logo { width: 60px; height: 60px; }
    .award-card > img { width: 100%; height: 190px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .chatbot { right: 12px; bottom: 70px; }
    .chatbot-panel { width: calc(100vw - 24px); }
}

/* ================== 10. PAGE NUMBERS AND SEARCH RESULTS ===========
   The row of page numbers under a long list, and the results of the
   search inside one school website. */
.pager {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
    justify-content: center; margin-top: 1.6rem;
}
.pager-gap { color: var(--ink-soft); padding: 0 .2rem; }

.search-result h3 { margin: .2rem 0 .4rem; }
.search-result .meta { margin: 0; text-transform: uppercase; letter-spacing: .04em; }

/* ================== 11. MAIL SETTINGS PAGE ========================
   The step-by-step answer of the mail server, shown when a test
   message fails, so the reason is visible instead of guessed. */
.code-box {
    background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm);
    padding: .9rem 1rem; font-size: .82rem; line-height: 1.5;
    font-family: Consolas, "Courier New", monospace; overflow-x: auto;
}

/* A picture that the browser is shrinking before it is sent. */
.field .file-hint { word-break: break-word; }

/* ================== 12. SUBSCRIPTIONS & GCASH BILLING ============= */
.plan-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .12);
}
.gcash-badge {
    background: #005ce6;
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.thumb:hover {
    opacity: .85;
    transform: scale(1.04);
    transition: transform .15s ease, opacity .15s ease;
}

/* ================== 13. WEBSITE DESIGN THEMES & LAYOUTS =========== */

/* --- Typography Pairings --- */
.font-sans,
body.font-sans {
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-family: var(--font);
}
.font-sans h1, .font-sans h2, .font-sans h3, .font-sans h4, .font-sans .btn {
    font-family: var(--font);
    letter-spacing: -0.01em;
}

.font-serif,
body.font-serif {
    --font: "Merriweather", "Georgia", "Times New Roman", serif;
    font-family: var(--font);
}
.font-serif h1, .font-serif h2, .font-serif h3, .font-serif h4,
.font-serif .site-head h1, .font-serif .section-head h2 {
    font-family: "Merriweather", Georgia, serif !important;
    letter-spacing: -0.015em;
    font-weight: 700;
}

.font-display,
body.font-display {
    --font: "Inter", "Segoe UI", system-ui, sans-serif;
    font-family: var(--font);
}
.font-display h1, .font-display h2, .font-display h3, .font-display h4,
.font-display .site-head h1, .font-display .section-head h2,
.font-display .hero-split-left h2, .font-display .hero-minimal h2 {
    font-family: "Cinzel", "Playfair Display", "Georgia", serif !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.font-rounded,
body.font-rounded {
    --font: "Outfit", "Poppins", "Segoe UI", sans-serif;
    font-family: var(--font);
}
.font-rounded h1, .font-rounded h2, .font-rounded h3, .font-rounded h4,
.font-rounded .site-head h1, .font-rounded .section-head h2,
.font-rounded .btn, .font-rounded .pill {
    font-family: "Outfit", "Poppins", sans-serif !important;
    font-weight: 700;
}

/* --- Corner Radii Overrides --- */
.radius-sharp {
    --radius: 2px !important;
    --radius-sm: 2px !important;
}
.radius-sharp .card,
.radius-sharp .btn,
.radius-sharp .stat,
.radius-sharp .plate,
.radius-sharp .table-wrap,
.radius-sharp .news-card,
.radius-sharp .hero-tile,
.radius-sharp .hero-split-card,
.radius-sharp input,
.radius-sharp select,
.radius-sharp textarea {
    border-radius: 2px !important;
}

.radius-rounded {
    --radius: 12px !important;
    --radius-sm: 8px !important;
}
.radius-rounded .card,
.radius-rounded .stat,
.radius-rounded .plate,
.radius-rounded .table-wrap,
.radius-rounded .news-card,
.radius-rounded .hero-tile,
.radius-rounded .hero-split-card {
    border-radius: 12px !important;
}
.radius-rounded .btn,
.radius-rounded input,
.radius-rounded select,
.radius-rounded textarea {
    border-radius: 8px !important;
}

.radius-smooth {
    --radius: 22px !important;
    --radius-sm: 14px !important;
}
.radius-smooth .card,
.radius-smooth .stat,
.radius-smooth .plate,
.radius-smooth .table-wrap,
.radius-smooth .news-card,
.radius-smooth .hero-tile,
.radius-smooth .hero-split-card {
    border-radius: 22px !important;
}
.radius-smooth .btn,
.radius-smooth input,
.radius-smooth select,
.radius-smooth textarea {
    border-radius: 14px !important;
}

/* --- Card Surface Styles --- */
.card-bordered .card {
    box-shadow: none !important;
    border: 2px solid var(--line) !important;
    background: #ffffff;
}
.card-shadow .card {
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.04) !important;
    border: 1px solid rgba(228, 231, 236, 0.85) !important;
    background: #ffffff;
}
.card-accent_top .card {
    border: 1px solid var(--line) !important;
    border-top: 5px solid var(--brand) !important;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.06) !important;
    background: #ffffff;
}

/* ================== THEME ARCHETYPES ================== */

/* 1. DepEd Classic & Institutional */
.theme-classic {
    background: #f4f6f9;
}
.theme-classic .site-top {
    border-bottom: 4px solid var(--accent);
    background: #0b1a30;
}
.theme-classic .site-top-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.theme-classic .site-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.theme-classic .site-logo {
    border: 3px solid var(--accent);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.theme-classic .site-nav-wrap {
    background: #ffffff;
    border-bottom: 2px solid #cbd5e1;
}
.theme-classic .site-nav a.is-active {
    color: var(--brand);
    border-bottom: 3px solid var(--brand);
    font-weight: 700;
}
.theme-classic .section-head h2 {
    color: #0f172a;
    border-bottom: 2px solid var(--line);
    padding-bottom: 0.4rem;
}
.theme-classic .card {
    border: 1px solid #cbd5e1;
}
.theme-classic .site-foot {
    background: #091424;
    border-top: 4px solid var(--accent);
}

/* 2. Modern Vanguard (Contemporary University) */
.theme-modern {
    background: #f8fafc;
}
.theme-modern .site-top {
    background: linear-gradient(135deg, var(--brand) 0%, #1e1b4b 100%);
}
.theme-modern .site-nav-wrap {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(16, 24, 40, 0.05);
}
.theme-modern .site-nav a.is-active {
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: var(--radius-sm);
    border-bottom: none;
    font-weight: 700;
}
.theme-modern .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-modern .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.1) !important;
}
.theme-modern .site-foot {
    background: #0f172a;
}

/* 3. Dynamic Sparks (Student Life & Sports) */
.theme-vibrant {
    background: #fafafa;
}
.theme-vibrant .site-top {
    background: var(--brand);
    position: relative;
    overflow: hidden;
}
.theme-vibrant .site-top::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent) 0%, #ef4444 50%, var(--accent) 100%);
}
.theme-vibrant .site-nav a.is-active {
    color: #fff;
    background: var(--brand);
    border-radius: var(--radius-sm);
    border-bottom: none;
    font-weight: 700;
}
.theme-vibrant .pill {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}
.theme-vibrant .section-head h2 {
    position: relative;
    padding-left: 1rem;
    font-weight: 800;
}
.theme-vibrant .section-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 5px;
    background: var(--accent);
    border-radius: 999px;
}
.theme-vibrant .btn-primary {
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
}

/* 4. Heritage & Elite Academy */
.theme-heritage {
    background: #fbf9f4;
}
.theme-heritage .site-top {
    background: #181c20;
    border-bottom: 3px solid #d4af37;
}
.theme-heritage .site-top-bar {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #d1d5db;
}
.theme-heritage .site-head-text h1 {
    font-family: "Cinzel", "Playfair Display", Georgia, serif !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
}
.theme-heritage .site-logo {
    border: 3px solid #d4af37;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.theme-heritage .site-nav-wrap {
    background: #ffffff;
    border-bottom: 1px solid #e5dfd3;
}
.theme-heritage .site-nav a.is-active {
    color: #854d0e;
    border-bottom: 3px solid #d4af37;
    font-weight: 700;
}
.theme-heritage .card {
    background: #ffffff;
    border: 1px solid #e5dfd3;
    outline: 1px solid #f3efe6;
}
.theme-heritage .section-head h2 {
    font-family: "Cinzel", "Playfair Display", Georgia, serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e293b;
    border-bottom: 1px solid #e5dfd3;
    padding-bottom: 0.5rem;
}
.theme-heritage .site-foot {
    background: #111417;
    border-top: 3px solid #d4af37;
}

/* 5. Civic & Community Portal */
.theme-portal {
    background: #f1f4f8;
}
.theme-portal .site-top {
    background: #0284c7;
}
.theme-portal .site-top-bar {
    background: #0369a1;
}
.theme-portal .site-nav-wrap {
    background: #ffffff;
    border-bottom: 2px solid #0284c7;
}
.theme-portal .site-nav a.is-active {
    color: #0369a1;
    border-bottom: 3px solid #0284c7;
    font-weight: 700;
}
.theme-portal .card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px !important;
}
.theme-portal .section {
    padding: 2.2rem 0;
}
.theme-portal .site-foot {
    background: #0f172a;
}

/* ================== HEADER LAYOUT VARIATIONS ================== */

/* 1. Centered Crest Header */
.header-centered .site-head {
    flex-direction: column;
    text-align: center;
    padding: 2.2rem 0 1.5rem;
}
.header-centered .site-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto;
}
.header-centered .site-head-text h1 {
    font-size: clamp(1.4rem, 3.2vw, 2.1rem);
    margin-top: 0.6rem;
}
.header-centered .site-head-text p {
    max-width: 580px;
    margin: 0.3rem auto 0;
}
.header-centered .site-nav {
    justify-content: center;
}

/* 2. Inline Modern Header */
.header-inline .site-head {
    display: none;
}
.header-inline .site-top {
    padding: 0;
}
.header-inline .site-inline-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    gap: 1.2rem;
}
.header-inline .site-inline-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    text-decoration: none;
}
.header-inline .site-inline-brand:hover {
    text-decoration: none;
}
.header-inline .site-inline-brand h1 {
    font-size: 1.25rem;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}
.header-inline .site-inline-brand p {
    font-size: 0.82rem;
    margin: 0;
    opacity: 0.85;
}
.header-inline .site-inline-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    flex: none;
}
.header-inline .site-nav-wrap {
    background: #fff;
}

/* 3. Floating Glass Header */
.header-floating .site-nav-wrap {
    position: sticky;
    top: 14px;
    z-index: 25;
    background: transparent;
    border: 0;
    margin: 0 auto -20px;
}
.header-floating .site-nav-shell {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(228, 231, 236, 0.9);
    border-radius: 999px;
    box-shadow: 0 10px 32px rgba(16, 24, 40, 0.14);
    padding: 0.3rem 0.9rem;
}
.header-floating .site-nav {
    justify-content: center;
}
.header-floating .site-nav a {
    padding: 0.6rem 1rem;
    border-bottom: 0;
    border-radius: 999px;
    color: var(--ink);
}
.header-floating .site-nav a.is-active,
.header-floating .site-nav a:hover {
    background: var(--brand);
    color: #ffffff;
    text-decoration: none;
}

/* ================== HERO LAYOUT VARIATIONS ================== */

/* 1. Split Showcase Hero */
.hero-split {
    padding: 3.5rem 0;
    background: linear-gradient(145deg, #0f1c3f 0%, var(--brand) 100%);
    color: #fff;
}
.hero-split-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
}
.hero-split-left h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.8rem;
}
.hero-split-left p {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.4rem;
}
.hero-split-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.hero-split-right {
    display: flex;
    justify-content: center;
}
.hero-split-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #fff;
    width: 100%;
    max-width: 390px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}
.hero-split-cover-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

/* 2. Minimal Crest Hero */
.hero-minimal {
    padding: 3rem 0 2rem;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    text-align: center;
}
.hero-minimal-inner {
    max-width: 720px;
    margin: 0 auto;
}
.hero-minimal-crest {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    margin: 0 auto 1rem;
    object-fit: contain;
    padding: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.hero-minimal h2 {
    font-size: 2rem;
    margin-bottom: 0.4rem;
    color: var(--ink);
}
.hero-minimal-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.hero-tile {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.18s ease;
}
.hero-tile:hover {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}
.hero-tile span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink-soft);
    margin-top: 0.2rem;
}

/* 3. Solid Brand Gradient Hero */
.hero-solid {
    background: linear-gradient(135deg, var(--brand) 0%, #091a3e 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.hero-solid-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--bg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
}

@media (max-width: 780px) {
    .hero-split-grid {
        grid-template-columns: 1fr;
    }
    .header-floating .site-nav-shell {
        border-radius: var(--radius);
    }
}

/* Responsive YouTube Video Embeds & Quill Video Support */
.ratio-youtube {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    background: #000;
}
.ratio-youtube iframe,
.ratio-youtube video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.prose iframe.ql-video {
    position: static;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.ql-editor iframe.ql-video {
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
    display: block;
}



