/*
Theme Name: Kadence Chantilly
Template: kadence
Description: Chantilly Schools child theme for Kadence — custom elegant design
Version: 2.0.0
Author: Chantilly Schools
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --c-primary:      #eb1c25;
    --c-primary-dark: #c5231e;
    --c-primary-soft: #fde8e9;
    --c-ink:          #1f2024;
    --c-body:         #4b4d52;
    --c-muted:        #84868c;
    --c-line:         #ececec;
    --c-surface:      #ffffff;
    --c-mist:         #f7f7f6;
    --c-dark:         #1c1d21;

    --radius:    18px;
    --radius-sm: 12px;
    --radius-lg: 28px;

    --shadow:    0 1px 2px rgba(16,17,20,.04), 0 8px 30px -12px rgba(16,17,20,.12);
    --shadow-lg: 0 24px 60px -20px rgba(16,17,20,.22);

    --container: 1200px;
    --pad:       clamp(20px, 5vw, 28px);

    /* IMPORTANT: Kadence uses --global-palette9 as the content-box background.
       It MUST stay light or the whole site goes dark. */
    --global-palette9: #ffffff;
}

/* ==========================================================================
   Base
   ========================================================================== */
/* overflow-x: clip (NOT hidden) — clip does not create a scroll container,
   so position:sticky on the masthead keeps working. !important overrides
   Kadence's parent `body{overflow-x:hidden}`, which would otherwise break it. */
html, body { overflow-x: clip !important; max-width: 100%; }
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--c-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
.cx-hero h1, .cx-hero p, .cx-finalcta h2 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--c-ink);
    line-height: 1.18;
    letter-spacing: -0.015em;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

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

/* ==========================================================================
   Layout helpers (used by custom templates)
   ========================================================================== */
.cx-container,
.cx-section, .cx-section--tight,
[class^="cx-"], [class*=" cx-"] { box-sizing: border-box; }
.cx-container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--pad);
}
.cx-section { padding-block: clamp(56px, 8vw, 104px); }
.cx-section--tight { padding-block: clamp(40px, 6vw, 72px); }
.cx-mist { background: var(--c-mist); }
.cx-dark { background: var(--c-dark); color: rgba(255,255,255,.82); }

.cx-eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-primary);
    margin-bottom: 14px;
}
.cx-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.cx-head--left { margin-inline: 0; text-align: left; }
.cx-head h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 700;
    margin: 0 0 14px;
}
.cx-head p {
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    color: var(--c-muted);
    margin: 0;
}
.cx-dark .cx-head h2 { color: #fff; }
.cx-dark .cx-head p  { color: rgba(255,255,255,.62); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.cx-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1;
    letter-spacing: .01em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.cx-btn svg { width: 17px; height: 17px; }
.cx-btn--primary {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 10px 24px -10px rgba(235,28,37,.65);
}
.cx-btn--primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(235,28,37,.6); }
.cx-btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.cx-btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-2px); }
.cx-btn--light { background: #fff; color: var(--c-primary); }
.cx-btn--light:hover { background: #fff; color: var(--c-primary-dark); transform: translateY(-2px); }
.cx-btn--outline-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.55); }
.cx-btn--outline-light:hover { background: #fff; color: var(--c-primary); border-color: #fff; transform: translateY(-2px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.cx-hero {
    position: relative;
    min-height: min(86vh, 760px);
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    background: #1c1d21;
}
.cx-hero__bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}
.cx-hero__bg::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(20,20,24,.30) 0%, rgba(20,20,24,.55) 55%, rgba(20,20,24,.82) 100%),
        linear-gradient(105deg, rgba(235,28,37,.30) 0%, rgba(20,20,24,0) 60%);
}
.cx-hero__inner { position: relative; z-index: 2; max-width: 760px; padding-block: 80px; }
.cx-hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    margin-bottom: 22px;
}
.cx-hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 4px rgba(235,28,37,.3); }
.cx-hero h1 {
    color: #fff;
    font-size: clamp(2.1rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}
.cx-hero h1 .accent { color: #ff5760; }
.cx-hero p {
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    color: rgba(255,255,255,.86);
    max-width: 620px;
    margin: 0 0 32px;
    line-height: 1.6;
}
.cx-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cx-hero__scroll {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
    z-index: 2; color: rgba(255,255,255,.7);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.cx-hero__scroll span { animation: cx-bob 1.8s ease-in-out infinite; }
@keyframes cx-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ==========================================================================
   Announcement strip
   ========================================================================== */
.cx-announce {
    background: var(--c-primary);
    color: #fff;
    padding: 10px 20px;
    font-size: 14px; font-weight: 500;
    line-height: 1.45;
}
.cx-announce__inner {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px 14px;
}
.cx-announce__tag {
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 11px; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    white-space: nowrap;
}
.cx-announce__text { opacity: .95; }
.cx-announce a {
    color: #fff; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    padding-bottom: 1px; border-bottom: 1.5px solid rgba(255,255,255,.55);
    transition: gap .2s ease, border-color .2s ease;
}
.cx-announce a:hover { gap: 9px; border-color: #fff; }
.cx-announce a svg { width: 15px; height: 15px; }
@media (max-width: 600px) {
    .cx-announce { font-size: 12.5px; padding: 9px 14px; }
    .cx-announce__text { width: 100%; text-align: center; }
}

/* ==========================================================================
   Highlight cards (Why choose)
   ========================================================================== */
.cx-grid { display: grid; gap: 22px; }
.cx-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cx-grid--2 { grid-template-columns: repeat(2, 1fr); }

.cx-feature {
    display: block;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 1px 2px rgba(17,18,22,.04), 0 10px 28px -18px rgba(17,18,22,.22);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cx-feature:hover { transform: translateY(-5px); border-color: transparent; box-shadow: var(--shadow-lg); }
.cx-feature__icon {
    width: 54px; height: 54px; border-radius: 14px;
    background: var(--c-primary-soft); color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.cx-feature__icon svg { width: 30px; height: 30px; }
.cx-feature:hover .cx-feature__icon { background: var(--c-primary); color: #fff; transform: scale(1.06); }
.cx-feature h3 { font-size: 1.16rem; font-weight: 600; margin: 0 0 9px; color: var(--c-ink); }
.cx-feature p { font-size: .95rem; color: var(--c-muted); margin: 0 0 14px; line-height: 1.6; }
.cx-feature__more { font-size: 13.5px; font-weight: 600; color: var(--c-primary); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cx-feature:hover .cx-feature__more { gap: 10px; }

/* ==========================================================================
   Image cards / bento
   ========================================================================== */
.cx-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.cx-bento .cx-imgcard:nth-child(1) { grid-column: span 3; }
.cx-bento .cx-imgcard:nth-child(2) { grid-column: span 3; }
.cx-bento .cx-imgcard:nth-child(3) { grid-column: span 2; }
.cx-bento .cx-imgcard:nth-child(4) { grid-column: span 4; }

.cx-imgcard {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 270px;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow);
    isolation: isolate;
}
.cx-imgcard img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform .5s ease;
}
.cx-imgcard::after {
    content: '';
    position: absolute; inset: 0;
    /* uniform charcoal wash so every photo reads on the same dark base
       (kills the per-image colour cast) + strong foot for label legibility */
    background:
        linear-gradient(180deg, rgba(22,23,27,.20) 0%, rgba(22,23,27,.34) 42%, rgba(22,23,27,.92) 100%),
        linear-gradient(180deg, rgba(22,23,27,.10) 0%, rgba(22,23,27,.10) 100%);
    z-index: -1;
}
.cx-imgcard:hover img { transform: scale(1.06); }
.cx-imgcard__body { padding: 26px; color: #fff; }
.cx-imgcard__body h3 { color: #fff; font-size: 1.2rem; font-weight: 600; margin: 0 0 7px; }
.cx-imgcard__body p { color: rgba(255,255,255,.82); font-size: .9rem; margin: 0; line-height: 1.55; }

/* ==========================================================================
   Stats band
   ========================================================================== */
.cx-stats {
    background: linear-gradient(120deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff;
}
.cx-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.cx-stat__value { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 4.5vw, 3.3rem); line-height: 1; color: #fff; }
.cx-stat__label { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-top: 10px; }
.cx-stat__desc  { font-size: 13px; color: rgba(255,255,255,.78); margin-top: 6px; }
.cx-stats__grid > div + div { position: relative; }
.cx-stats__grid > div + div::before {
    content: ''; position: absolute; left: -15px; top: 10%; height: 80%; width: 1px;
    background: rgba(255,255,255,.22);
}

/* ==========================================================================
   Admissions steps
   ========================================================================== */
.cx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.cx-step {
    position: relative;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 30px 24px;
}
.cx-step__num {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--c-primary); color: #fff;
    font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.cx-step h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 8px; }
.cx-step p  { font-size: .92rem; color: var(--c-muted); margin: 0; line-height: 1.6; }

/* ==========================================================================
   News cards
   ========================================================================== */
.cx-news { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.cx-news:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cx-news__img { aspect-ratio: 16/10; overflow: hidden; }
.cx-news__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cx-news:hover .cx-news__img img { transform: scale(1.05); }
.cx-news__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.cx-news__cat { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary); margin-bottom: 10px; }
.cx-news__body h3 { font-size: 1.12rem; font-weight: 600; margin: 0 0 10px; }
.cx-news__body h3 a { color: var(--c-ink); }
.cx-news__body h3 a:hover { color: var(--c-primary); }
.cx-news__body p { font-size: .92rem; color: var(--c-muted); margin: 0 0 16px; }
.cx-news__meta { margin-top: auto; font-size: 13px; color: var(--c-primary); font-weight: 600; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.cx-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cx-quote {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 30px 28px; display: flex; flex-direction: column;
}
.cx-quote__mark { font-family: 'Poppins', serif; font-size: 3rem; line-height: .6; color: var(--c-primary); opacity: .25; height: 26px; }
.cx-quote p { font-size: 1rem; color: var(--c-ink); line-height: 1.65; margin: 0 0 22px; }
.cx-quote__who { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.cx-quote__who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.cx-quote__name { font-weight: 700; font-size: .95rem; color: var(--c-ink); font-family: 'Poppins', sans-serif; }
.cx-quote__role { font-size: 12.5px; color: var(--c-muted); }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cx-finalcta {
    position: relative;
    background: linear-gradient(120deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff; text-align: center; overflow: hidden;
}
.cx-finalcta::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.14), transparent 45%);
}
.cx-finalcta__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cx-finalcta h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; margin: 0 0 16px; }
.cx-finalcta p { color: rgba(255,255,255,.92); font-size: 1.12rem; margin: 0 0 30px; }
.cx-finalcta .cx-hero__cta { justify-content: center; }

/* ==========================================================================
   Section CTA centering helper
   ========================================================================== */
.cx-center { text-align: center; margin-top: 40px; }

/* ==========================================================================
   Custom header — utility top-bar + sticky masthead with dropdowns
   ========================================================================== */
.cx-skip {
    position: absolute; left: -9999px; top: 0; z-index: 1000;
    background: var(--c-primary); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.cx-skip:focus { left: 0; color: #fff; }

/* ---- Utility top-bar ---- */
.cx-topbar {
    background: var(--c-dark);
    color: rgba(255,255,255,.62);
    font-size: 13px;
}
.cx-topbar__row {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 40px; gap: 18px;
}
.cx-topbar a { color: rgba(255,255,255,.72); transition: color .18s ease; }
.cx-topbar a:hover { color: #fff; }
.cx-topbar__contact { display: flex; align-items: center; gap: 22px; }
.cx-topbar__contact a, .cx-topbar__loc {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap;
}
.cx-topbar__loc { color: rgba(255,255,255,.62); }
.cx-topbar svg { width: 15px; height: 15px; color: var(--c-primary); flex: none; }
.cx-topbar__meta { display: flex; align-items: center; gap: 14px; }
.cx-topbar__portal {
    display: inline-flex; align-items: center; gap: 7px; font-weight: 600;
    letter-spacing: .01em;
}
.cx-topbar__portal svg { color: currentColor; }
.cx-topbar__divider { width: 1px; height: 16px; background: rgba(255,255,255,.18); }
.cx-topbar__social { display: inline-flex; }
.cx-topbar__social svg { width: 17px; height: 17px; color: rgba(255,255,255,.72); transition: color .18s ease; }
.cx-topbar__social:hover svg { color: #fff; }

/* ---- Sticky masthead ---- */
.cx-mast {
    position: sticky; top: 0; z-index: 200;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    transition: box-shadow .25s ease, padding .25s ease;
}
.cx-mast__row {
    display: flex; align-items: center; gap: 22px;
    min-height: 78px; transition: min-height .25s ease;
}
.cx-mast__brand { display: inline-flex; align-items: center; flex: none; }
.cx-mast__brand img {
    height: 58px; width: auto; display: block; transition: height .25s ease;
}
/* Scrolled state — applied via JS once the top-bar scrolls away */
html.cx-scrolled .cx-mast { box-shadow: 0 6px 24px -14px rgba(16,17,20,.28); }
html.cx-scrolled .cx-mast__row { min-height: 64px; }
html.cx-scrolled .cx-mast__brand img { height: 48px; }

/* ---- Primary nav ---- */
.cx-nav { margin-left: auto; }
.cx-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.cx-nav__list > li { position: relative; }
.cx-nav__list > li > a {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14.5px;
    color: var(--c-ink); padding: 10px 14px; border-radius: 8px;
    transition: color .18s ease, background .18s ease;
}
.cx-nav__list > li > a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--c-primary); border-radius: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.cx-nav__list > li:hover > a { color: var(--c-primary); }
.cx-nav__list > li:hover > a::after,
.cx-nav__list > li.is-current > a::after { transform: scaleX(1); }
.cx-nav__list > li.is-current > a { color: var(--c-primary); }

/* caret */
.cx-nav__caret {
    width: 7px; height: 7px; margin-top: -3px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .2s ease; opacity: .6;
}
.cx-nav__has:hover .cx-nav__caret { transform: rotate(225deg); margin-top: 2px; opacity: 1; }

/* dropdown */
.cx-nav__drop {
    position: absolute; top: calc(100% - 2px); left: 0; z-index: 50;
    min-width: 210px; list-style: none; margin: 0; padding: 8px;
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.cx-nav__has:hover .cx-nav__drop,
.cx-nav__has:focus-within .cx-nav__drop { opacity: 1; visibility: visible; transform: translateY(0); }
.cx-nav__drop li a {
    display: block; padding: 10px 14px; border-radius: 8px;
    font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 14px; color: var(--c-body);
    transition: background .15s ease, color .15s ease;
}
.cx-nav__drop li a:hover { background: var(--c-mist); color: var(--c-primary); }

/* ---- Masthead actions ---- */
.cx-mast__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.cx-mast__cta { padding: 11px 20px; font-size: 14px; }
.cx-mast__cta svg { width: 16px; height: 16px; }

/* ---- Burger (hidden on desktop) ---- */
.cx-burger {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 46px; height: 46px; border: 0;
    border-radius: 12px; background: var(--c-mist); cursor: pointer;
    transition: background .15s ease;
}
.cx-burger:hover { background: var(--c-primary-soft); }
.cx-burger span { display: block; height: 2.5px; width: 21px; background: var(--c-ink); border-radius: 3px; transition: transform .25s ease, opacity .2s ease, background .15s ease; }
.cx-burger:hover span { background: var(--c-primary); }
.cx-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.cx-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cx-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- Mobile drawer ---- */
.cx-drawer { position: fixed; inset: 0; z-index: 500; visibility: hidden; }
.cx-drawer.is-open { visibility: visible; }
.cx-drawer__scrim {
    position: absolute; inset: 0; z-index: 1;
    background: rgba(16,17,20,.5); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity .3s ease;
}
.cx-drawer.is-open .cx-drawer__scrim { opacity: 1; }
.cx-drawer__panel {
    position: absolute; top: 0; right: 0; z-index: 2;
    height: 100%; width: min(88vw, 360px);
    background: #fff; box-shadow: -20px 0 60px -20px rgba(16,17,20,.45);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
}
.cx-drawer.is-open .cx-drawer__panel { transform: translateX(0); }
.cx-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--c-line);
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.cx-drawer__head img { height: 46px; width: auto; }
.cx-drawer__close {
    width: 48px; height: 48px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-mist); border: 0; color: var(--c-ink); cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .12s ease;
    -webkit-tap-highlight-color: transparent;
}
.cx-drawer__close:hover { background: var(--c-primary); color: #fff; }
.cx-drawer__close:active { transform: scale(.9); }
.cx-drawer__close svg { width: 28px; height: 28px; display: block; }
.cx-drawer__nav { display: flex; flex-direction: column; padding: 12px 14px; gap: 2px; }
.cx-drawer__nav a {
    position: relative;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15.5px; color: var(--c-ink);
    padding: 14px 14px; border-radius: 12px;
    display: flex; align-items: center; justify-content: space-between;
    transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.cx-drawer__nav a::after {
    content: ''; width: 7px; height: 7px;
    border-right: 2px solid currentColor; border-top: 2px solid currentColor;
    transform: rotate(45deg); color: var(--c-muted); opacity: .4;
    transition: transform .15s ease, opacity .15s ease;
}
.cx-drawer__nav a:hover, .cx-drawer__nav a:focus-visible { background: var(--c-mist); color: var(--c-primary); }
.cx-drawer__nav a:hover::after { opacity: .75; transform: translateX(2px) rotate(45deg); }
.cx-drawer__nav a.is-current { background: var(--c-primary-soft); color: var(--c-primary); }
.cx-drawer__nav a.is-current::after { color: var(--c-primary); opacity: .8; }

.cx-drawer__foot { margin-top: auto; padding: 18px 20px 26px; border-top: 1px solid var(--c-line); }
.cx-drawer__enroll.cx-btn { width: 100%; justify-content: center; gap: 8px; }
.cx-drawer__portal {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 10px; padding: 11px;
    border: 1px solid var(--c-line); border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--c-ink);
    transition: border-color .15s ease, color .15s ease;
}
.cx-drawer__portal:hover { border-color: var(--c-primary); color: var(--c-primary); }
.cx-drawer__portal svg { width: 16px; height: 16px; }
.cx-drawer__contact { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; font-size: 14px; }
.cx-drawer__contact a { color: var(--c-body); font-weight: 500; display: flex; align-items: center; gap: 11px; }
.cx-drawer__contact a:hover { color: var(--c-primary); }
.cx-drawer__contact svg { width: 16px; height: 16px; color: var(--c-primary); flex-shrink: 0; }
.cx-drawer__social { display: flex; gap: 10px; margin-top: 18px; }
.cx-drawer__social a {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--c-mist); color: var(--c-ink);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.cx-drawer__social a:hover { background: var(--c-primary); color: #fff; }
.cx-drawer__social svg { width: 17px; height: 17px; }
body.cx-noscroll { overflow: hidden; }

/* ---- Header responsive ---- */
@media (max-width: 992px) {
    .cx-nav, .cx-mast__cta { display: none; }
    .cx-burger { display: flex; }
    .cx-mast__actions { margin-left: auto; }   /* nav (which held margin-left:auto) is hidden — push burger to the edge */
    .cx-mast__row { min-height: 66px; }
    .cx-mast__brand img { height: 50px; }
}
@media (max-width: 820px) {
    .cx-topbar__loc { display: none; }
}
/* ---- Inner (Gutenberg) pages: restore side breathing room on mobile ----
   Kadence edge padding is 0 site-wide (.content-container.site-container{padding:0}),
   so constrained content AND full-bleed band content touch the screen edges.
   Most inner-page bodies are wrapped in a top-level .wp-block-group.alignfull band,
   with columns/images/text inside that go full-width on mobile. Padding the BAND
   insets all its content uniformly while the band background still bleeds edge-to-edge
   (padding paints inside the element). Cover heroes read --global-content-edge-padding
   for their inner container. */
@media (max-width: 768px) {
    body { --global-content-edge-padding: 22px; }
    .entry-content.single-content > :not(.alignfull):not(.alignwide),
    .entry-content.single-content > .wp-block-group.alignfull {
        padding-left: 22px; padding-right: 22px; box-sizing: border-box;
    }
    /* images that fill a stacked column keep their rounded corners now they're inset */
    .entry-content.single-content .wp-block-image img { border-radius: 12px; }
}
@media (max-width: 600px) {
    .cx-topbar__contact a span { display: none; }
    .cx-topbar__contact a svg { width: 17px; height: 17px; }
    .cx-topbar__contact { gap: 16px; }
    .cx-topbar__portal span { }
}

/* ==========================================================================
   Inner (block-editor) pages — make custom color slugs actually render.
   Kadence does not generate background rules for these custom slugs.
   ========================================================================== */
.has-primary-background-color    { background-color: #eb1c25 !important; }
.has-primary-dark-background-color{ background-color: #c5231e !important; }
.has-off-white-background-color  { background-color: #f8f8f7 !important; }
.has-dark-gray-background-color  { background-color: #2e2e2e !important; }
.has-light-gray-background-color { background-color: #e2e1e0 !important; }
.has-primary-color   { color: #eb1c25 !important; }
.has-dark-gray-color { color: #2e2e2e !important; }
.has-white-color     { color: #ffffff !important; }
.has-off-white-color { color: #f8f8f7 !important; }
.has-gray-color      { color: #666762 !important; }

/* Inner-page hero covers — give each a relevant background image.
   The existing dim overlay span keeps the heading readable. */
.entry-content > .wp-block-cover:first-child,
.entry-content .wp-block-cover:first-of-type {
    background-size: cover !important;
    background-position: center !important;
    min-height: 46vh !important;
}
.entry-content .wp-block-cover:first-of-type .wp-block-cover__inner-container { padding-block: 30px; }
.page-id-9  .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/community.jpg'); }
.page-id-10 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/academics-primary.jpg'); }
.page-id-11 .wp-block-cover:first-of-type { background-image: linear-gradient(120deg, rgba(235,28,37,.92), rgba(197,35,30,.92)), url('/wp-content/uploads/graduation.jpg'); }
.page-id-12 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/facilities-admin.jpg'); }
.page-id-13 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/facilities-classrooms.jpg'); }
.page-id-14 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/life-sports.jpg'); }
.page-id-16 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/community.jpg'); }
.page-id-17 .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/facilities-library.jpg'); }
.page-id-7  .wp-block-cover:first-of-type { background-image: url('/wp-content/uploads/arts.jpg'); }

/* Block buttons rounded + branded */
.wp-block-button__link { border-radius: 999px !important; font-family: 'Montserrat', sans-serif; font-weight: 600; padding: 14px 30px; }
.entry-content .wp-block-cover { border-radius: 0; }
.entry-content .wp-block-cover h1 { color: #fff; }

/* ==========================================================================
   Inner-page polish — upgrade Gutenberg block pages to the cx- design system
   so About / Academics / Admissions / Facilities / Life / Contact / Careers /
   Downloads / Privacy / Terms match the hand-built homepage. Block content
   carries inline styles, so overrides use !important.
   ========================================================================== */

/* ---- Hero cover (first cover on each page) ---- */
.entry-content > .wp-block-cover:first-child,
.entry-content .wp-block-cover:first-of-type {
    min-height: clamp(300px, 44vh, 460px) !important;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.entry-content .wp-block-cover:first-of-type .wp-block-cover__inner-container { max-width: 820px; }
.entry-content .wp-block-cover:first-of-type .wp-block-cover__background {
    background: linear-gradient(180deg, rgba(18,18,22,.30) 0%, rgba(18,18,22,.66) 100%) !important;
    opacity: 1 !important;
}
.page-id-11 .wp-block-cover:first-of-type .wp-block-cover__background {
    background: linear-gradient(120deg, rgba(235,28,37,.78), rgba(150,22,26,.90)) !important;
}
.entry-content .wp-block-cover:first-of-type h1 {
    font-size: clamp(2.1rem, 5vw, 3.3rem) !important;
    font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px;
}
.entry-content .wp-block-cover:first-of-type p { font-size: clamp(1.02rem, 1.6vw, 1.2rem); opacity: .92; }

/* ---- Section rhythm + reading width ---- */
.entry-content .wp-block-group.alignfull { padding-block: clamp(56px, 7vw, 92px) !important; }
.entry-content h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; margin: 0 0 16px; letter-spacing: -.015em; }
.entry-content h3 { font-size: 1.32rem; font-weight: 700; }
.entry-content p  { line-height: 1.75; }
.entry-content .has-gray-color { color: var(--c-body) !important; }

/* ---- Cards: inline-styled white / off-white groups → depth + hover ---- */
.entry-content .wp-block-group[style*="background:#fff"],
.entry-content .wp-block-group[style*="background:#f8f8f7"],
.entry-content .cx-card {
    border: 1px solid var(--c-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow) !important;
    padding: 28px !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
/* className-based cards (rebuilt pages — clean blocks, no inline bg) */
.entry-content .cx-card           { background: #fff; }
.entry-content .cx-card--soft     { background: #f8f8f7; }
.entry-content .wp-block-group[style*="background:#fff"]:hover,
.entry-content .cx-card:not(.cx-card--soft):hover {
    transform: translateY(-5px);
    border-color: transparent !important;
    box-shadow: var(--shadow-lg) !important;
}
/* uppercase eyebrow label inside soft cards (Mission / Vision, etc.) */
.entry-content .cx-label,
.entry-content .cx-card--soft h4 {
    font-size: 1rem !important; font-weight: 700 !important;
    text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px;
    color: var(--c-primary) !important;
}
.entry-content .cx-card--soft h4 + p { margin-top: 0; }
/* small age/stage eyebrow tag (Academics levels, etc.) */
.entry-content .cx-agetag {
    font-size: 12px !important; font-weight: 700 !important;
    text-transform: uppercase; letter-spacing: .1em; margin: 0 0 8px;
}
/* outline button on a cover/hero — white outline (Admissions, homepage "Book a tour") */
.entry-content .wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link {
    background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.9);
    color: #fff !important; box-shadow: none;
}
/* numbered process steps (Admissions) */
.entry-content .cx-stepnum {
    font-size: 48px !important; font-weight: 800 !important; line-height: 1;
    color: var(--c-primary) !important; font-family: 'Poppins', sans-serif; margin: 0 0 6px;
}

/* ---- Columns ---- */
.entry-content .wp-block-columns { gap: clamp(28px, 4vw, 52px) !important; align-items: center; }

/* ---- Images: rounded + soft shadow ---- */
.entry-content .wp-block-image { margin: 0; }
.entry-content .wp-block-image img { border-radius: 18px !important; box-shadow: var(--shadow); display: block; }

/* ---- Lists: branded soft-red check bullets ---- */
.entry-content .wp-block-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 11px; }
.entry-content .wp-block-list li { position: relative; padding-left: 30px; color: var(--c-body); line-height: 1.6; }
.entry-content .wp-block-list li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 19px; height: 19px;
    border-radius: 6px; background-color: var(--c-primary-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eb1c25' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 6'/%3E%3C/svg%3E");
    background-size: 12px; background-position: center; background-repeat: no-repeat;
}
/* List sitting on the red/primary band (e.g. About "Kaizen philosophy"):
   white text + frosted-glass check chips, centered as a group. */
.entry-content .has-primary-background-color .wp-block-list {
    width: fit-content; max-width: 100%; margin: 26px auto 0;
    gap: 15px; font-size: 1.03rem;
}
.entry-content .has-primary-background-color .wp-block-list li {
    color: #fff; padding-left: 36px;
}
.entry-content .has-primary-background-color .wp-block-list li::before {
    width: 22px; height: 22px; border-radius: 7px; top: 1px;
    background-color: rgba(255,255,255,.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 6'/%3E%3C/svg%3E");
    background-size: 13px;
}

/* ---- Separator ---- */
.entry-content .wp-block-separator { border: 0; height: 1px; background: var(--c-line); opacity: 1; }

/* ---- Block buttons: branded shadow ---- */
.entry-content .wp-block-button__link { box-shadow: 0 10px 24px -12px rgba(235,28,37,.5); }

/* ---- Contact form (Contact Form 7) ---- */
.wpcf7-form p { margin: 0 0 18px; }
.wpcf7-form label { display: block; font-family: 'Montserrat', sans-serif; font-weight: 600; color: var(--c-ink); font-size: 14px; margin-bottom: 7px; }
.wpcf7-form input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.wpcf7-form textarea, .wpcf7-form select {
    width: 100%; padding: 13px 16px; font: inherit; color: var(--c-ink);
    background: #fff; border: 1px solid var(--c-line); border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus, .wpcf7-form select:focus {
    outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.wpcf7-form textarea { min-height: 150px; resize: vertical; }
.wpcf7-submit {
    background: var(--c-primary) !important; color: #fff !important; border: 0 !important;
    border-radius: 999px !important; padding: 14px 34px !important; font-weight: 600 !important;
    cursor: pointer; box-shadow: 0 10px 24px -10px rgba(235,28,37,.6);
    transition: transform .18s ease, background .18s ease;
}
.wpcf7-submit:hover { background: var(--c-primary-dark) !important; transform: translateY(-2px); }

/* ---- Gallery ---- */
.entry-content .wp-block-gallery figure { overflow: hidden; border-radius: 16px; box-shadow: var(--shadow); margin: 0; }
.entry-content .wp-block-gallery img { border-radius: 16px; transition: transform .45s ease; }
.entry-content .wp-block-gallery figure:hover img { transform: scale(1.06); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .cx-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .cx-steps   { grid-template-columns: repeat(2, 1fr); }
    .cx-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 34px 30px; }
    .cx-stats__grid > div + div::before { display: none; }
    .cx-bento { grid-template-columns: repeat(2, 1fr); }
    .cx-bento .cx-imgcard:nth-child(n) { grid-column: span 1; }
    .cx-quotes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .cx-grid--4, .cx-grid--3, .cx-grid--2,
    .cx-steps, .cx-bento, .cx-quotes { grid-template-columns: 1fr; }
    .cx-stats__grid { grid-template-columns: repeat(2, 1fr); }
    .cx-hero { min-height: 78vh; }
    .cx-hero__cta { flex-direction: column; align-items: stretch; }
    .cx-hero__cta .cx-btn { justify-content: center; }
}

/* ==========================================================================
   Footer (custom footer.php)
   ========================================================================== */
.cx-footer { background: #16171a; color: rgba(255,255,255,.66); }
.cx-footer a { color: rgba(255,255,255,.66); transition: color .15s ease; }
.cx-footer a:hover { color: #fff; }
.cx-footer__top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding-block: clamp(48px, 6vw, 72px);
}
/* Brand white logo (logo-white.png) — red shield crest + white wordmark,
   built for dark backgrounds. No filter, no chip needed. */
.cx-footer__brand img { height: 56px; width: auto; display: block; margin-bottom: 20px; }
.cx-footer__brand p { font-size: .92rem; line-height: 1.7; max-width: 320px; margin: 0 0 20px; }
.cx-footer__social { display: flex; gap: 10px; }
.cx-footer__social a {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
}
.cx-footer__social a:hover { background: var(--c-primary); }
.cx-footer__social svg { width: 18px; height: 18px; }
.cx-footer h4 { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 18px; }
.cx-footer ul { list-style: none; margin: 0; padding: 0; }
.cx-footer li { margin-bottom: 11px; font-size: .92rem; }
.cx-footer__contact li { display: flex; gap: 11px; align-items: flex-start; }
.cx-footer__contact svg { width: 17px; height: 17px; color: var(--c-primary); flex-shrink: 0; margin-top: 3px; }
.cx-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-block: 22px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    font-size: 13.5px; color: rgba(255,255,255,.5);
}
@media (max-width: 880px) { .cx-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cx-footer__top { grid-template-columns: 1fr; } }

/* ==========================================================================
   School Life (page-id-14) — uniform card grid
   Equal-height white cards + fixed-aspect images so rows never go ragged.
   ========================================================================== */
.page-id-14 .wp-block-columns { align-items: stretch; }
.page-id-14 .wp-block-column { display: flex; }
.page-id-14 .wp-block-column > .wp-block-group {
    flex: 1; display: flex; flex-direction: column; margin: 0;
}
.page-id-14 .wp-block-column > .wp-block-group > .wp-block-image { margin: 0 0 16px; }
.page-id-14 .entry-content .wp-block-image img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 12px !important; box-shadow: none !important; margin: 0;
}
.page-id-14 .wp-block-column h3 { margin: 0 0 8px; }
.page-id-14 .wp-block-column p { margin: 0; }
/* keep the "15+ Clubs" callout red — beat the generic #fff card border */
body.page-id-14 .entry-content .wp-block-group[style*="#eb1c25"],
body.page-id-14 .entry-content .cx-card--accent {
    border: 2px solid var(--c-primary) !important;
    background: #fff8f8 !important;
    justify-content: center;
}
/* red accent callout card (rebuilt, className-based) */
.entry-content .cx-card--accent { background: #fff8f8; border: 2px solid var(--c-primary) !important; }
/* facility / school-life card titles a touch smaller than section h3 */
.page-id-13 .entry-content .wp-block-column h3,
.page-id-14 .entry-content .wp-block-column h3 { font-size: 1.1rem !important; font-weight: 600; }

/* ==========================================================================
   Homepage rebuilt as editable blocks (page-id-8)
   ========================================================================== */
/* announcement bar (first block) */
.entry-content .cx-home-announce {
    background: var(--c-primary) !important; color: #fff !important;
    text-align: center; padding: 11px 16px !important; font-size: 14px; margin: 0 !important;
}
.entry-content .cx-home-announce a { color: #fff; text-decoration: underline; font-weight: 600; }
.entry-content .cx-home-announce strong { font-weight: 700; }

/* hero cover (targeted by className, since the announcement block is first) */
.entry-content .cx-home-hero {
    background-image: url('/wp-content/uploads/hero-school.jpg');
    background-size: cover !important; background-position: center !important;
    min-height: clamp(440px, 72vh, 660px) !important;
    justify-content: flex-start;
}
.entry-content .cx-home-hero .wp-block-cover__inner-container { max-width: 760px; margin-left: 0; }
.entry-content .cx-home-hero .wp-block-cover__background {
    background: linear-gradient(90deg, rgba(18,18,22,.74) 0%, rgba(18,18,22,.48) 60%, rgba(18,18,22,.28) 100%) !important;
}
.entry-content .cx-home-hero h1 {
    text-align: left !important; font-size: clamp(2.1rem, 5vw, 3.3rem) !important;
    font-weight: 800; letter-spacing: -.02em; margin: 6px 0 12px;
}
.entry-content .cx-home-hero p { text-align: left !important; }
.entry-content .wp-block-cover h1 mark { background: transparent; color: #ff5d62; }
.entry-content .cx-home-badge {
    display: inline-block; background: rgba(255,255,255,.16); color: #fff;
    border: 1px solid rgba(255,255,255,.32); border-radius: 999px;
    padding: 7px 16px; font-size: 13px; font-weight: 600; margin: 0 0 4px;
}
.page-id-8 .wp-block-cover .wp-block-buttons { justify-content: flex-start; }

/* stats band (red, 4 columns with values) */
.entry-content .cx-stats-band { background: var(--c-primary) !important; }
.entry-content .cx-stats-band .wp-block-column { text-align: center; }
.entry-content .cx-stats-band p { color: #fff; }
.entry-content .cx-stats-band .cx-statnum {
    font-size: clamp(2.2rem, 4vw, 3rem) !important; font-weight: 800 !important;
    line-height: 1; margin: 0; font-family: 'Poppins', sans-serif;
}
.entry-content .cx-stats-band .cx-statlabel { font-weight: 700; margin: 10px 0 3px; }
.entry-content .cx-stats-band .wp-block-group > p:last-child { font-size: 13px; opacity: .82; }

/* testimonial quote cards */
.entry-content .cx-quote-card .cx-quote-who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.entry-content .cx-quote-card .cx-quote-who img {
    width: 46px; height: 46px; border-radius: 50% !important; object-fit: cover;
    box-shadow: none !important; margin: 0;
}
.entry-content .cx-quote-card .cx-quote-name { font-weight: 700; color: var(--c-ink); }

/* final CTA band */
.entry-content .cx-finalcta-band { background: var(--c-primary) !important; }
.entry-content .cx-finalcta-band h2, .entry-content .cx-finalcta-band p { color: #fff; }
.entry-content .cx-finalcta-band .wp-block-buttons { justify-content: center; }

