/* =========================================================
   APLS website — styles.css
   Palette matches the APLS brand deck.
   Plain CSS, no build step. Edit freely.
   ========================================================= */

:root {
  /* Warm, friendly palette — cream base with playful accents */
  --navy:    #3B5A4A;  /* deep soft green — headings, footer, deep sections */
  --blue:    #256E80;  /* teal — links & secondary accents (AA on white/cream) */
  --gold:    #F5C45B;  /* warm yellow — highlights */
  --red:     #E5714E;  /* warm coral — primary buttons & CTAs */
  --coral-text: #B84824;  /* darker coral — for coral TEXT/links (AA on white/cream) */
  --green:   #6FA85A;  /* leaf green — accents */
  --text:    #46413A;  /* warm charcoal — body text */
  --muted:   #615A50;  /* muted warm brown-gray — darkened for AA contrast */
  --light:   #F4EBDC;  /* warm sand — alternating sections */
  --white:   #FFFFFF;
  --cream:   #FBF6EC;  /* page background */
  --peach:   #FCE9DC;  /* hero tint */
  --coral-d: #d15f3d;  /* coral hover */
  --radius:  16px;
  --shadow:  0 8px 26px rgba(59, 90, 74, 0.10);
  --maxw:    1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--cream);
}

h1, h2, h3 { line-height: 1.2; color: var(--navy); font-weight: 800; }
h1 { font-size: clamp(1.7rem, 3.8vw, 3rem); margin: 0 0 .5rem; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Accessibility helpers ---------- */
/* Skip link — hidden off-screen until focused by keyboard */
.skip-link {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: .65em 1.1em;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Keep the sticky header from covering the focused main content */
#main-content { scroll-margin-top: 90px; }
#main-content:focus { outline: none; }

/* Visible keyboard focus for all interactive elements */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  /* ≥18.7px bold keeps white-on-coral buttons in the WCAG "large text" tier (needs 3:1) */
  font-size: 1.2rem;
  padding: .65em 1.35em;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { font-size: 1.3rem; padding: .75em 1.6em; }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--coral-d); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-ghost.on-dark { color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost.on-dark:hover { background: var(--white); color: var(--navy); }

/* ---------- Utility bar ---------- */
.utility-bar { background: var(--navy); color: #e7efe9; font-size: .9rem; }
.utility-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: flex-end; padding: 6px 20px; }
.utility-item { color: #e7efe9; white-space: nowrap; }
.utility-item:hover { color: #fff; text-decoration: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 2px 12px rgba(31,58,95,.07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 50px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--navy); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; }
.site-nav a { color: var(--navy); font-weight: 700; white-space: nowrap; }
.site-nav a:hover { color: var(--blue); text-decoration: none; }
.btn-nav { padding: .5em 1.1em; }
.header-cta { display: none; }

/* Programs dropdown submenu */
.nav-programs { position: relative; display: inline-flex; align-items: center; padding: 6px 0; }
.nav-programs > a::after {
  content: ""; display: inline-block; position: relative; top: -2px;
  width: .55rem; height: .55rem; margin-left: .55rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.submenu { display: none; }
@media (min-width: 1221px) {
  .nav-programs:hover .submenu, .nav-programs:focus-within .submenu {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    min-width: 240px; background: var(--white);
    box-shadow: 0 12px 28px rgba(31,58,95,.16); border-radius: 12px;
    padding: .4rem 0; z-index: 60;
  }
}
.submenu a { padding: .55rem 1.2rem; font-weight: 700; white-space: nowrap; color: var(--navy); }
.submenu a:hover { background: var(--cream); color: var(--blue); }
.submenu a[aria-current="page"] { color: var(--coral-text); }
.submenu a.nav-current-neutral[aria-current="page"] { color: var(--navy); }
.submenu a.nav-current-neutral[aria-current="page"]:hover { color: var(--blue); }
.submenu-overview { display: none; }

/* Mobile navigation */
.nav-toggle {
  display: none; border: 0; background: transparent; color: var(--navy);
  font: inherit;
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--peach) 0%, var(--cream) 55%, #EFF4EA 100%); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.5rem; align-items: center; }
.hero-text, .hero-image { min-width: 0; }
.eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; margin-bottom: .6rem; }
.hero-tagline { font-size: 1.28rem; font-weight: 700; color: var(--text); max-width: 46ch; margin: .2rem 0 1rem; line-height: 1.35; }
.hero-tagline-accent { color: var(--blue); }
.hero-sub { font-size: 1.12rem; color: var(--text); max-width: 56ch; }
.hero-clarify { font-size: .96rem; color: var(--muted); max-width: 42ch; margin: .6rem 0 0; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.hero-note { display: inline-block; background: rgba(245,196,91,.30); color: #8a6412; padding: .4em .9em; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.hero-image-placeholder {
  aspect-ratio: 4 / 3; border-radius: var(--radius); background: repeating-linear-gradient(45deg, #F1E7D6, #F1E7D6 12px, #F8F1E4 12px, #F8F1E4 24px);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; text-align: center; padding: 1rem; box-shadow: var(--shadow);
}
.hero-illustration { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.hero-slideshow { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; }
.hero-slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* ---------- Page hero (subpages) ---------- */
.page-hero { background: linear-gradient(160deg, var(--peach) 0%, var(--cream) 60%, #EFF4EA 100%); padding: clamp(2.2rem, 5vw, 3.6rem) 0; text-align: center; }
.page-hero h1 { max-width: 22ch; margin: 0 auto .5rem; }
.page-hero p { color: var(--muted); max-width: 62ch; margin: 0 auto; font-size: 1.12rem; }
.page-hero .tour-actions { justify-content: center; }

/* ---------- Prose (long-form copy) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 1.08rem; }
.prose h3 { margin-top: 1.6rem; }
.story-highlight {
  margin: 1.8rem 0 0;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--red);
  background: var(--peach);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.story-highlight h3 { margin: 0 0 .45rem; font-size: 1.18rem; }
.story-highlight p { margin: 0; font-size: 1rem; color: var(--text); }
.story-highlight p + p { margin-top: .55rem; font-weight: 700; }

/* ---------- Video ---------- */
.video-wrap { max-width: 900px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrap video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: var(--light); }
/* "Our story" flows straight into "Why APLS" (both plain cream) — collapse the
   doubled padding so the seam reads as one connected block, not an empty band. */
#our-story { padding-bottom: 0; }
.section-title { text-align: center; margin: 0 0 .6rem; }
.section-title.light { color: var(--white); }
.section-lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 2rem; font-size: 1.08rem; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(0,0,0,.10); padding: 1.3rem 0; }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem 1.5rem; text-align: center; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-weight: 800; color: #fff; font-size: 1.15rem; line-height: 1.2; }
.stat-label { color: #e7efe9; font-size: .85rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card { background: var(--white); border: 1px solid #e7edf4; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); text-align: center; }
.card-icon { font-size: 2rem; margin-bottom: .5rem; }
.card h3 { text-wrap: balance; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card h3 em { color: var(--coral-text); font-style: normal; }
.teacher-card .avatar { font-size: 2.4rem; }
.teacher-card .avatar-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto .6rem; }
.teacher-card .teacher-meta { font-weight: 600; color: var(--navy); }
.teacher-card .teacher-bio { margin-top: .5rem; }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-inline: auto; }

/* ---------- Differentiator chips ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem .7rem; padding: 0; margin: 1.6rem auto 0; max-width: 860px; }
.chip { display: inline-flex; align-items: center; gap: .45rem; background: var(--light); color: var(--navy); font-weight: 700; font-size: .92rem; padding: .5em 1em; border-radius: 999px; border: 1px solid #e7ddc9; }

/* ---------- Feature list (differentiators, expanded) ---------- */
.feature-list-title { text-align: center; margin: 2.4rem 0 1.2rem; }
.feature-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.6rem; padding: 0; margin: 0 auto; max-width: 920px; }
.feature { display: flex; gap: .8rem; align-items: flex-start; text-align: left; }
.feature-mark { font-size: 1.5rem; line-height: 1.2; flex: none; }
.feature strong { display: block; color: var(--navy); font-size: 1.02rem; margin-bottom: .15rem; }
.feature p strong { display: inline; color: inherit; font-size: inherit; margin: 0; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 700px) { .feature-list { grid-template-columns: 1fr; } }

/* ---------- Programs ---------- */
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.program { background: var(--white); border-radius: var(--radius); padding: 1.5rem; border-top: 4px solid var(--red); box-shadow: var(--shadow); }
.program-media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin: 0 0 1.1rem; }
.program:nth-child(4n+2) { border-top-color: var(--blue); }
.program:nth-child(4n+3) { border-top-color: var(--green); }
.program:nth-child(4n+4) { border-top-color: var(--gold); }
.program .ages { display: inline-block; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700; padding: .15em .7em; border-radius: 999px; margin: 0 0 .6rem; }
.program p:not(.ages) { color: var(--muted); margin: 0; }
a.program { display: block; text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
a.program:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(59,90,74,0.16); text-decoration: none; }
a.program h3 { color: var(--navy); }
.program-more { display: inline-block; margin-top: .9rem; color: var(--coral-text); font-weight: 800; }

.home-proof-cards .card { text-align: left; }
.home-proof-cards .card-icon { margin-bottom: .35rem; }
.home-proof-cards .card h3 { margin-bottom: .45rem; }

/* ---------- Program detail sections (programs.html) ---------- */
.jumpbar { background: var(--white); border-bottom: 1px solid #e7ddc9; }
.jumpbar-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .8rem 0; }
.jumpbar a { font-size: .9rem; font-weight: 700; color: var(--navy); background: var(--light); padding: .35em .9em; border-radius: 999px; text-decoration: none; transition: background .15s, color .15s; }
.jumpbar a:hover { background: var(--red); color: #fff; }
.program-detail { scroll-margin-top: 84px; text-align: center; }
.program-detail .prose { text-align: left; }
.badge-open { display: inline-block; background: #4E8A3C; color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: .25em .8em; border-radius: 999px; margin: 0 0 .6rem; }
.program-detail .badge-open { display: block; width: fit-content; margin: 0 auto .6rem; }
.prog-dates { text-align: center; font-weight: 700; color: var(--navy); margin: .2rem 0 1.2rem; }
.schedule-table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 1rem; }
.schedule-table th, .schedule-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid #e7ddc9; vertical-align: top; }
.schedule-table thead th { background: var(--navy); color: #fff; }
.schedule-table tbody td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; width: 1%; }
.schedule-table tbody tr:nth-child(even) { background: var(--light); }
/* First column is shrink-to-fit above, so keep its header on one line to set the width. */
@media (min-width: 561px) {
  .tuition-table thead th:first-child { white-space: nowrap; }
}
@media (max-width: 560px) {
  .preschool-sample-table { table-layout: fixed; font-size: .86rem; }
  .preschool-sample-table th, .preschool-sample-table td { padding: .45rem .4rem; overflow-wrap: anywhere; }
  .preschool-sample-table tbody td:first-child { width: auto; white-space: normal; }
}
.prog-downloads { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin: 0 0 1.4rem; padding: 0; }
.prog-downloads a { font-weight: 700; color: var(--blue); text-decoration: none; font-size: .98rem; }
.prog-downloads a:hover { text-decoration: underline; }
.program-tuition { margin: 2rem 0 1.5rem; padding: 1.5rem 0; border-block: 1px solid #e7ddc9; }
.program-tuition h2 { margin-top: 0; }
.program-tuition-note { color: var(--muted); }
.program-tuition .tuition-table { max-width: 760px; }
.program-tuition-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1rem; }
.program-tuition-actions .text-link { color: var(--blue); font-weight: 700; }
@media (max-width: 560px) {
  .program-tuition .tuition-table, #tuition-root .tuition-table { table-layout: fixed; font-size: .9rem; }
  .program-tuition .tuition-table th, .program-tuition .tuition-table td,
  #tuition-root .tuition-table th, #tuition-root .tuition-table td { padding: .5rem .45rem; white-space: normal; overflow-wrap: anywhere; }
  .program-tuition .tuition-table tbody td:first-child,
  #tuition-root .tuition-table tbody td:first-child { width: auto; white-space: normal; overflow-wrap: anywhere; }
  .program-tuition-actions { align-items: stretch; flex-direction: column; }
  .program-tuition-actions .btn { width: 100%; text-align: center; }
}

/* ---------- Program subpage hero figure ---------- */
.program-figure { max-width: 900px; margin: 0 auto 2.4rem; padding: 0 1rem; }
.program-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.program-figure figcaption { text-align: center; color: var(--muted); font-size: .82rem; margin-top: .5rem; }

/* ---------- Story rows (alternating image + text) ---------- */
.story-rows { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3.5rem); max-width: var(--maxw); margin: 0 auto; }
.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.story-row.reverse .story-row-media { order: 2; }
.story-row-media { margin: 0; }
.story-row-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.story-row-media figcaption { text-align: center; color: var(--muted); font-size: .82rem; margin-top: .5rem; }
.story-row-text > :first-child { margin-top: 0; }
.story-row-text > :last-child { margin-bottom: 0; }
.story-row-text .story-highlight { margin-top: 1.2rem; }
/* prose that continues below a story row, kept in the same section */
.story-follow { margin-top: clamp(2rem, 4vw, 3rem); }
@media (max-width: 760px) {
  .story-row { grid-template-columns: 1fr; }
  .story-row.reverse .story-row-media { order: 0; }
}

/* ---------- Programs hub cards ---------- */
.programs-hero { padding: clamp(1rem, 2.2vw, 1.55rem) 0; }
.programs-hero h1 { max-width: 34ch; font-size: clamp(1.8rem, 2.7vw, 2.35rem); }
.programs-hero p { max-width: 68ch; }
.programs-section { padding-top: clamp(1.4rem, 3vw, 2.2rem); }
.programs-toolbar { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: .55rem; }
.programs-toolbar h2 { margin: 0 0 .15rem; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.programs-toolbar p { margin: 0; color: var(--muted); }
.program-filters { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .55rem; width: 100%; }
.program-filter { border: 1px solid #cfc4b1; background: var(--white); color: var(--navy); border-radius: 999px; padding: .55em 1em; font: inherit; font-size: .9rem; font-weight: 800; line-height: 1.2; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.program-filter:hover { border-color: var(--blue); color: var(--blue); }
.program-filter.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter-status { color: var(--muted); font-size: .85rem; margin: 0 0 .9rem; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 1.4rem; }
.hub-card { display: flex; flex-direction: column; height: 100%; background: var(--white); border-radius: var(--radius); border-top: 4px solid var(--red); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
.hub-card:nth-child(4n+2) { border-top-color: var(--blue); }
.hub-card:nth-child(4n+3) { border-top-color: var(--green); }
.hub-card:nth-child(4n+4) { border-top-color: var(--gold); }
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(59,90,74,0.16); }
.hub-card[hidden] { display: none; }
.hub-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--light); }
.hub-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hub-body h3 { margin: 0 0 .15rem; }
.hub-ages { color: var(--blue); font-weight: 700; font-size: .9rem; margin: 0 0 .5rem; }
.hub-body p { color: var(--muted); margin: 0 0 .65rem; font-size: .92rem; }
.hub-facts { margin: 0 0 .7rem; padding: .5rem 0; border-top: 1px solid #eadfce; border-bottom: 1px solid #eadfce; }
.hub-facts div { display: grid; grid-template-columns: 5.7rem 1fr; gap: .55rem; padding: .1rem 0; }
.hub-facts dt { color: var(--navy); font-size: .85rem; font-weight: 800; }
.hub-facts dd { margin: 0; color: var(--muted); font-size: .9rem; }
.hub-card .badge-open { align-self: flex-start; margin: 0 0 .5rem; }
.badge-status { align-self: flex-start; display: inline-block; background: var(--light); color: var(--navy); border: 1px solid #d9cdb9; font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: .25em .8em; border-radius: 999px; margin: 0 0 .5rem; }
@media (max-width: 1100px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 641px) and (max-width: 949px) {
  .program-filters { display: grid; grid-template-columns: repeat(4, max-content); }
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .program-filter { padding: .65em .9em; }
}

/* ---------- Enrollment hub cards ---------- */
.enroll-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.enroll-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-top: 4px solid var(--blue); transition: transform .15s ease, box-shadow .15s ease; }
.enroll-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(59,90,74,0.16); }
.enroll-card-feature { border-top-color: var(--red); }
.enroll-card-feature .go { color: var(--coral-text); }
.enroll-icon { font-size: 2rem; line-height: 1; margin: 0 0 .6rem; }
.enroll-card h3 { margin: 0 0 .3rem; color: var(--navy); }
.enroll-card p { color: var(--muted); margin: 0 0 1rem; font-size: .98rem; }
.enroll-card .go { margin-top: auto; color: var(--coral-text); font-weight: 800; }
@media (max-width: 640px) { .enroll-cards { grid-template-columns: 1fr; } }

/* ---------- Enrollment steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 1.2rem; }
.step { position: relative; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.6rem 1.5rem 4.6rem; }
.step-num { position: absolute; left: 1.4rem; top: 1.5rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0 0 .35rem; color: var(--navy); }
.step p { color: var(--muted); margin: 0 0 1rem; }
.step p:last-child { margin-bottom: 0; }
.step .btn { margin-top: .2rem; }

/* ---------- Tour booking ---------- */
.booking-placeholder { display: flex; flex-direction: column; gap: .4rem; align-items: center; text-align: center; background: var(--peach); border: 2px dashed var(--red); border-radius: var(--radius); padding: 2.4rem 1.4rem; margin: 0 0 1.2rem; }
.booking-placeholder strong { color: var(--navy); font-size: 1.05rem; }
.booking-placeholder span { color: var(--muted); font-size: .95rem; }
.booking-fallback { color: var(--muted); }
.tour-step-label { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.1rem; color: var(--navy); margin: 1.8rem 0 .7rem; }
.tour-step-num { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--red); color: #fff; font-size: .95rem; flex: 0 0 auto; }
.tour-step-note { color: var(--muted); font-size: .96rem; margin: -.3rem 0 1rem; }
/* Tighten the top of the tour page so families reach the form quickly. */
#tour { padding-top: clamp(1rem, 2vw, 1.4rem); }
#tour .tour-step-label:first-child { margin-top: 0; }
.tour-lock { background: var(--light); border: 2px dashed var(--muted); border-radius: var(--radius); padding: 1.6rem 1.4rem; margin: 0 0 1.2rem; color: var(--muted); text-align: center; }
.tour-calendar { position: relative; }
.tour-calendar.is-locked .calendly-inline-widget { pointer-events: none; }
.tour-avail { background: var(--white); border: 1px solid #e6e0d6; border-left: 4px solid var(--blue); border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 1.1rem; box-shadow: var(--shadow); }
.tour-avail p { margin: 0; color: var(--text); font-size: .98rem; }
.tour-avail-times { margin-bottom: .5rem !important; }
.tour-avail-times strong, .tour-avail-legend strong { color: var(--navy); }
.tour-avail-legend { display: flex; align-items: flex-start; gap: .55rem; color: var(--muted); }
.tour-avail-dot { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #d9e8f5; border: 1px solid #a9cdea; margin-top: .1rem; }
.tour-lock-badge { position: absolute; inset: 0; z-index: 2; cursor: not-allowed; display: flex; justify-content: center; align-items: flex-start; padding-top: 1rem; }
.tour-lock-badge .msg { display: inline-flex; align-items: center; gap: .5rem; max-width: 90%; background: var(--navy); color: #fff; font-weight: 700; font-size: .95rem; padding: .6rem 1.15rem; border-radius: 999px; box-shadow: var(--shadow); text-align: center; }
.inquiry-done { display: flex; flex-direction: column; gap: .3rem; align-items: center; text-align: center; background: #eaf7ee; border: 2px solid #2e7d46; border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 0 1.2rem; }
.inquiry-done strong { color: #1f5a32; font-size: 1.05rem; }
.inquiry-done span { color: var(--muted); font-size: .95rem; }
.tour-mini-steps { list-style: none; margin: 0 0 1.3rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.tour-mini-steps li { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--text); }
.tour-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0 0; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 0 1.2rem; overflow: hidden; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 1rem 0; list-style: none; position: relative; padding-right: 1.8rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); color: var(--coral-text); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); margin: 0 0 1.1rem; }

/* ---------- Forms page groups ---------- */
.form-group { margin: 0 0 1.6rem; }
.form-group h3 { margin: 0 0 .4rem; color: var(--navy); }
.prog-downloads-stack { flex-direction: column; gap: .7rem; }

/* ---------- Tuition fee list ---------- */
.fee-list { margin: 0 0 1.8rem; padding-left: 1.2rem; }
.fee-list li { margin-bottom: .8rem; color: var(--muted); }
.fee-list li strong { color: var(--text); }

/* ---------- Calendar tables ---------- */
.calendar-content-section { padding-top: clamp(1.25rem, 2vw, 1.75rem); }
#calendar-root > h2:first-child { margin-top: 0; }
.cal-table { margin-bottom: 2.2rem; }
.cal-table .cal-month { background: var(--peach); color: var(--navy); text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; padding: .5rem .8rem; }
.public-calendar-preview { margin: 2.4rem 0 3rem; }
.public-calendar-preview > h2 { margin-bottom: 1rem; }
.public-calendar-card { overflow: hidden; border: 1px solid #d5ddd7; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.public-calendar-toolbar { min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: .7rem; padding: .5rem .8rem; }
.public-calendar-title { min-width: 0; text-align: center; }
.public-calendar-title strong, .public-calendar-title small { display: block; }
.public-calendar-title strong { color: var(--navy); font-size: 1.2rem; line-height: 1.2; }
.public-calendar-title small { margin-top: .2rem; color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.public-calendar-nav { width: 40px; height: 40px; border: 1px solid #cbd5cd; border-radius: 50%; color: var(--navy); background: var(--white); cursor: pointer; font-size: 1.1rem; font-weight: 800; }
.public-calendar-nav:hover:not(:disabled) { border-color: #789184; background: #edf4ef; }
.public-calendar-nav:disabled { cursor: default; opacity: .35; }
.public-calendar-weekdays, .public-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.public-calendar-weekdays { border-top: 1px solid #cfd8d1; border-left: 1px solid #cfd8d1; color: #fff; background: var(--green); }
.public-calendar-weekdays span { min-width: 0; padding: .5rem .1rem; border-right: 1px solid rgba(255, 255, 255, .2); font-size: .7rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.public-calendar-grid { border-top: 1px solid #d9dfda; border-left: 1px solid #d9dfda; }
.public-calendar-day { min-width: 0; min-height: 72px; padding: .35rem .35rem; border-right: 1px solid #d9dfda; border-bottom: 1px solid #d9dfda; background: #fffefa; overflow: hidden; }
.public-calendar-day.is-weekend { background: #f5f1e9; }
.public-calendar-day.is-outside { background: #ecece7; }
.public-calendar-day-number { display: block; margin-bottom: .25rem; color: #526158; font-size: .76rem; font-weight: 800; line-height: 1; }
.public-calendar-event, .public-calendar-agenda-number { border-left: 4px solid transparent; color: #24332b; font-weight: 800; }
.public-calendar-event { width: 26px; height: 24px; display: inline-grid; place-items: center; margin: 0 .15rem .15rem 0; border-radius: 3px; font-size: .7rem; }
.public-calendar-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem .75rem; padding: .7rem .8rem; border-top: 1px solid #d9dfda; }
.public-calendar-legend span { min-width: 0; display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .68rem; font-weight: 800; line-height: 1.2; }
.public-calendar-legend i { width: 11px; height: 11px; min-width: 11px; display: inline-block; border: 1px solid transparent; border-radius: 2px; }
.public-calendar-agenda { border-top: 1px solid #d8ded8; padding: 0 1.1rem .35rem; }
.public-calendar-agenda-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 0 .7rem; }
.public-calendar-agenda-heading h3 { margin: 0; font-size: 1.1rem; }
.public-calendar-agenda-heading > span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.public-calendar-agenda-item { display: flex; align-items: flex-start; gap: .8rem; padding: .75rem 0; border-top: 1px solid #ece7dc; }
.public-calendar-agenda-number { width: 38px; min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 3px; }
.public-calendar-agenda-copy { min-width: 0; display: grid; gap: .15rem; }
.public-calendar-agenda-copy strong { color: var(--navy); }
.public-calendar-agenda-copy span { color: var(--muted); font-size: .86rem; }
.public-calendar-card .calendar-color-school-closed { border-color: #d6c900; background: #f5f0a8; }
.public-calendar-card .calendar-color-school-event { border-color: #f5a623; background: #fbd49a; }
.public-calendar-card .calendar-color-childcare-program { border-color: #55a969; background: #b9dfbf; }
.public-calendar-card .calendar-color-school-boundary { border-color: #159cc9; background: #b6e4f2; }
.public-calendar-card .calendar-color-none { border-color: #b9c3bc; background: #edf0ed; }
.public-calendar-legend i.calendar-color-school-closed { background: #d6c900; }
.public-calendar-legend i.calendar-color-school-event { background: #f5a623; }
.public-calendar-legend i.calendar-color-childcare-program { background: #55a969; }
.public-calendar-legend i.calendar-color-school-boundary { background: #159cc9; }
@media (max-width: 640px) {
  .public-calendar-toolbar { min-height: 58px; grid-template-columns: 36px minmax(0, 1fr) 36px; padding: .45rem .55rem; }
  .public-calendar-nav { width: 36px; height: 36px; }
  .public-calendar-title strong { font-size: 1rem; }
  .public-calendar-title small { font-size: .58rem; }
  .public-calendar-day { min-height: 50px; padding: .25rem .2rem; }
  .public-calendar-day-number { font-size: .7rem; }
  .public-calendar-event { width: 20px; height: 19px; margin-right: .1rem; font-size: .62rem; }
  .public-calendar-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .6rem; padding: .65rem .6rem; }
  .public-calendar-legend span { font-size: .66rem; }
  .public-calendar-agenda { padding-right: .7rem; padding-left: .7rem; }
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; align-items: stretch; grid-auto-rows: 1fr; }
.contact-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.4rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.contact-icon { font-size: 2rem; line-height: 1; display: block; margin: 0 0 .6rem; }
.contact-card h3 { margin: 0 0 .5rem; color: var(--navy); }
.contact-card p { margin: 0 0 .5rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card a { color: var(--blue); font-weight: 700; text-decoration: none; word-break: break-word; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .muted { font-size: .88rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-locations { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin: 0 0 1.8rem; }
.contact-address { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.5rem; border-top: 4px solid var(--blue); }
.contact-address h3 { margin: 0 0 .4rem; color: var(--navy); }
.contact-address p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .contact-locations { grid-template-columns: 1fr; } }

.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 7; }
.contact-map iframe { display: block; width: 100%; height: 100%; }
@media (max-width: 640px) { .contact-map { aspect-ratio: 4 / 3; } }

/* Homepage enrollment + tour cards */
.home-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; }
@media (max-width: 760px) { .home-cta-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.muted { color: var(--muted); }

.back-link { margin-top: 1.6rem; }
.back-link a { color: var(--muted); font-weight: 700; text-decoration: none; }
.back-link a:hover { color: var(--coral-text); }

/* Offset anchor jumps so the sticky header doesn't cover the target */
:target { scroll-margin-top: 90px; }
.prog-meta { text-align: center; margin: 0 0 1.1rem; }
.prog-meta .ages { display: inline-block; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700; padding: .2em .8em; border-radius: 999px; }
.prog-meta .langs { display: inline-block; border: 1.5px solid var(--blue); color: var(--blue); font-size: .82rem; font-weight: 700; padding: .2em .8em; border-radius: 999px; }
.prog-highlights { margin: 0 0 1.4rem; padding-left: 1.2rem; }
.prog-highlights li { font-size: 1.05rem; margin-bottom: .4rem; }
.camp-theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 2rem; }
.program-detail .btn { display: inline-block; }

@media (max-width: 560px) {
  .camp-theme-list { grid-template-columns: 1fr; }
}

/* ---------- Navy / testimonials ---------- */
.section-navy { background: var(--navy); }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.quotes blockquote { background: rgba(255,255,255,.06); border-left: 4px solid var(--gold); margin: 0; padding: 1.4rem 1.6rem; border-radius: 0 var(--radius) var(--radius) 0; }
.quotes p { color: #F3EEE2; font-size: 1.08rem; font-style: italic; }
.quotes cite { color: var(--gold); font-weight: 700; font-style: normal; }

/* ---------- Mission ---------- */
.mission { max-width: 760px; text-align: center; }
.mission p { font-size: 1.15rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue), var(--navy)); color: #fff; padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band p { color: #FBEEE6; margin: 0; max-width: 46ch; }
.cta-actions { display: flex; flex-direction: column; gap: .8rem; min-width: 240px; }
.cta-actions .btn { width: 100%; text-align: center; }

/* ---------- Contact form (legacy) ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .5rem 0; border-bottom: 1px solid #e2e8f0; }
.contact-form-wrap { background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.contact-form { display: grid; gap: .8rem; }
.contact-form label { display: grid; gap: .3rem; font-weight: 700; font-size: .92rem; color: var(--navy); }
.contact-form input, .contact-form textarea { font: inherit; padding: .6em .8em; border: 1px solid #cdd7e2; border-radius: 8px; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: #33463C; color: #d7e0da; padding: 2.5rem 0 1.5rem; font-size: .95rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 2rem; }
.footer-col strong { color: #fff; display: block; margin-bottom: .6rem; }
.footer-col a { color: #d7e0da; display: inline-block; }
.footer-col.footer-note a { display: inline; }
.footer-col a:hover { color: #fff; }
.footer-note .small { font-size: .82rem; color: #9db0a5; }

/* ---------- Quick-answer chat ---------- */
.chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: .55rem;
  min-height: 52px; padding: .65rem 1rem; border: 0; border-radius: 8px;
  background: var(--red); color: var(--white); box-shadow: 0 10px 28px rgba(20, 28, 24, .28);
  font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
}
.chat-launcher:hover { background: var(--coral-d); }
.chat-launcher[hidden] { display: none; }
.chat-launcher-icon {
  position: relative; display: grid; place-items: center; width: 28px; height: 24px;
  border-radius: 7px; background: var(--white); color: var(--red); font-size: .95rem;
}
.chat-launcher-icon::after {
  content: ""; position: absolute; left: 5px; bottom: -5px;
  width: 0; height: 0; border-top: 7px solid var(--white); border-right: 7px solid transparent;
}
.chat-launcher:hover .chat-launcher-icon { color: var(--coral-d); }
.chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: grid; grid-template-rows: auto minmax(180px, 1fr) auto auto;
  width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 40px));
  overflow: hidden; border: 1px solid #d9d2c5; border-radius: 8px;
  background: var(--white); box-shadow: 0 18px 50px rgba(20, 28, 24, .3);
}
.chat-panel[hidden] { display: none; }
.chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem; background: var(--navy); color: var(--white);
}
.chat-heading h2 { margin: 0; color: var(--white); font-size: 1.1rem; letter-spacing: 0; }
.chat-heading p { margin: .1rem 0 0; color: #d7e0da; font-size: .78rem; line-height: 1.3; }
.chat-close {
  flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--white); font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.chat-close:hover { background: rgba(255,255,255,.12); }
.chat-messages {
  overflow-y: auto; overscroll-behavior: contain; padding: 1rem;
  background: #f8f3e9;
}
.chat-message { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 .75rem; }
.chat-message p {
  max-width: 88%; margin: 0; padding: .7rem .85rem; border-radius: 8px;
  background: var(--white); color: var(--text); box-shadow: 0 2px 8px rgba(59, 90, 74, .08);
  font-size: .94rem; line-height: 1.45;
}
.chat-message-user { align-items: flex-end; }
.chat-message-user p { background: var(--blue); color: var(--white); }
.chat-message a { margin: .35rem .25rem 0; font-size: .88rem; font-weight: 800; text-decoration: underline; }
.chat-choices { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .9rem; }
.chat-choice {
  padding: .45rem .7rem; border: 1px solid var(--blue); border-radius: 8px;
  background: var(--white); color: var(--blue); font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer;
}
.chat-choice:hover { background: #e9f3f4; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .75rem; border-top: 1px solid #e5ded1; }
.chat-form input {
  min-width: 0; width: 100%; padding: .65rem .75rem; border: 1px solid #bcb5a9; border-radius: 8px;
  color: var(--text); background: var(--white); font: inherit; font-size: .92rem;
}
.chat-form input:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--navy); }
.chat-send {
  padding: .55rem .8rem; border: 0; border-radius: 8px;
  background: var(--red); color: var(--white); font: inherit; font-weight: 800; cursor: pointer;
}
.chat-send:hover { background: var(--coral-d); }
.chat-note { margin: 0; padding: 0 .75rem .55rem; color: var(--muted); text-align: center; font-size: .72rem; line-height: 1.3; }

@media (max-width: 560px) {
  .chat-launcher { right: 12px; bottom: 12px; width: 144px; padding: 0 1rem; justify-content: flex-start; }
  .chat-panel { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(620px, calc(100vh - 16px)); }
}

/* ---------- Booking card ---------- */
.tour-card { text-align: center; }
.booking-placeholder {
  border: 2px dashed #e0d3bd; border-radius: var(--radius); background: var(--light);
  color: var(--muted); font-weight: 700; padding: 2rem 1rem; margin: 0 0 1rem; text-align: center;
}
.tour-card .small { color: var(--muted); margin: .8rem 0 0; }

/* ---------- Gallery strip ---------- */
.gallery-carousel { position: relative; }
.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery-tile {
  aspect-ratio: 1 / 1; width: 100%; height: auto; border-radius: var(--radius); object-fit: cover;
  background: var(--light); box-shadow: var(--shadow); display: block;
}
.gallery-arrow { display: none; }

@media (max-width: 600px) {
  .gallery-strip {
    display: flex; overflow-x: auto; gap: .85rem;
    scroll-snap-type: x mandatory; overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .gallery-strip::-webkit-scrollbar { display: none; }
  .gallery-tile { flex: 0 0 82%; width: auto; min-width: 0; scroll-snap-align: start; }
  .gallery-arrow {
    position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 2px solid var(--white); border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 4px 14px rgba(59, 90, 74, .22);
    font: inherit; font-size: 1.35rem; font-weight: 800; line-height: 1; cursor: pointer;
  }
  .gallery-arrow-prev { left: .5rem; }
  .gallery-arrow-next { right: .5rem; }
  .gallery-arrow:disabled { opacity: .35; cursor: default; }
}

.section-cta { text-align: center; margin: 1.6rem 0 0; }

/* ---------- Photo gallery (gallery.html) ---------- */
.photo-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.photo-card {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--light); box-shadow: var(--shadow);
}
.photo-card img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
}
.photo-card figcaption {
  padding: .7rem 1rem; font-weight: 700; color: var(--text); text-align: center;
}
.video-thumb { transition: transform .15s ease, box-shadow .15s ease; }
.video-thumb:hover, .video-thumb:focus-within { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(59, 90, 74, .16); }
.video-thumb a { display: block; text-decoration: none; color: var(--text); }
.video-thumb-media { position: relative; display: block; }
.video-thumb-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.video-thumb-play {
  position: absolute; inset: 0; margin: auto;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(229, 113, 78, .92); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center;
}
.video-thumb-play::before {
  content: ""; border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff; margin-left: 4px;
}
.video-thumb-caption { display: block; padding: .7rem 1rem; font-weight: 700; color: var(--text); text-align: center; }

/* Clickable gallery photos */
.photo-card:not(.video-thumb) img { cursor: zoom-in; transition: transform .15s ease; }
.photo-card:not(.video-thumb):hover img { transform: scale(1.02); }

.instagram-gallery-section { background: #eef3ed; }
.instagram-gallery-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
  margin-bottom: 2rem;
}
.instagram-gallery-heading h2 { margin-bottom: .45rem; }
.instagram-gallery-heading p:last-child { max-width: 62ch; margin-bottom: 0; color: var(--muted); }
.instagram-gallery-heading .btn { flex: 0 0 auto; }
.instagram-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.instagram-gallery-card { min-width: 0; }
.instagram-gallery-card .instagram-media { min-width: 0 !important; width: 100% !important; margin: 0 !important; }
.instagram-gallery-caption { margin: .55rem .3rem 0; color: var(--muted); font-size: .92rem; text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 3vh 4vw;
  background: rgba(20, 28, 24, .92);
}
.lightbox.is-open { display: flex; }
.lightbox-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox-img {
  max-width: 100%; max-height: 84vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  object-fit: contain;
}
.lightbox-caption { margin-top: 1rem; color: #fff; font-weight: 700; text-align: center; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255, 255, 255, .14); color: #fff;
  border: none; cursor: pointer; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, .3); }
.lightbox-close { top: 2vh; right: 3vw; }
.lightbox-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2vw; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox-prev { left: 1vw; }
  .lightbox-next { right: 1vw; }
  .lightbox-close { top: 1vh; right: 2vw; }
}

/* ---------- Open House popup ---------- */
.open-house-dialog {
  width: min(92vw, 58vh, 620px); max-width: none; max-height: 92vh;
  padding: 0; border: 0; border-radius: 8px; overflow: visible;
  background: transparent; box-shadow: 0 24px 70px rgba(20, 28, 24, .38);
}
.open-house-dialog::backdrop { background: rgba(20, 28, 24, .76); }
.open-house-popup { position: relative; }
.open-house-popup img {
  display: block; width: 100%; height: auto; border-radius: 8px;
}
.open-house-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 2px solid rgba(59, 90, 74, .18); border-radius: 50%;
  background: rgba(255, 255, 255, .96); color: var(--navy); box-shadow: 0 4px 16px rgba(20, 28, 24, .22);
  font: inherit; font-size: 2rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.open-house-close:hover { background: var(--white); color: var(--coral-text); }
body.open-house-popup-open { overflow: hidden; }

/* ---------- Events & announcements ---------- */
.event-feature {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.event-details { padding-top: clamp(.25rem, 2vw, 1.5rem); }
.event-details h2 { margin: 0 0 .65rem; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.event-date { color: var(--navy); font-size: 1.15rem; }
.event-facts { margin: 1.5rem 0; border-top: 1px solid #dfd2bc; }
.event-facts div { display: grid; grid-template-columns: 5rem 1fr; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid #dfd2bc; }
.event-facts dt { color: var(--navy); font-weight: 800; }
.event-facts dd { margin: 0; }
.event-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.event-flyer { width: min(100%, 620px); margin: 0 auto; text-align: center; }
.event-flyer a { display: block; }
.event-flyer img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.event-flyer figcaption { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.event-feature-no-image { grid-template-columns: minmax(0, 760px); }
.event-list-section { padding-top: 0; }
.event-list-section h2 { margin-bottom: 1.35rem; }
.event-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.event-card {
  padding: clamp(1.25rem, 3vw, 1.8rem); border: 1px solid #dfd2bc; border-radius: 8px;
  background: var(--white); box-shadow: 0 8px 22px rgba(59, 90, 74, .08);
}
.event-card h3 { margin: 0 0 .55rem; color: var(--navy); font-size: 1.35rem; }
.event-card-date { color: var(--navy); font-weight: 800; }
.event-card .event-actions { margin-top: 1.2rem; }
.events-empty { text-align: center; }

@media (max-width: 760px) {
  .event-feature { grid-template-columns: 1fr; gap: 2rem; }
  .event-details { padding-top: 0; }
  .event-actions { flex-direction: column; }
  .event-actions .btn { width: 100%; text-align: center; }
  .event-list-grid { grid-template-columns: 1fr; }
  .instagram-gallery-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .instagram-gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .instagram-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-image { order: -1; }
  .quotes, .footer-inner { grid-template-columns: 1fr; }
}

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

/* Header collapses to a hamburger menu earlier so the enlarged school name
   never crowds the nav links on mid-width screens */
@media (max-width: 1220px) {
  /* mobile nav */
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 26px; height: 3px; background: currentColor; border-radius: 2px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - 70px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--white); box-shadow: 0 8px 20px rgba(31,58,95,.12); padding: .5rem 0;
  }
  .site-nav a { padding: .8rem 20px; }
  .site-nav .btn-nav {
    display: block; margin: .5rem 20px; padding: .65em 1.1em;
    color: #fff; text-align: center;
  }
  .header-cta { display: inline-block; margin-left: auto; margin-right: .55rem; padding: .5em .95em; font-size: .85rem; white-space: nowrap; }
  .site-nav.is-open { display: flex; }
  .header-inner { position: relative; }

  /* Expand Programs/Enrollment in place so mobile users can choose a destination. */
  .nav-programs { display: flex; flex-direction: column; align-items: stretch; padding: 0; }
  .nav-programs > a { display: flex; align-items: center; justify-content: space-between; padding: .8rem 20px; }
  .nav-programs > a::after {
    flex: 0 0 auto; margin-left: 1rem; color: var(--muted);
  }
  .nav-programs.is-open > a::after { top: 2px; transform: rotate(225deg); }
  .submenu { display: none; }
  .nav-programs.is-open > .submenu {
    display: flex; flex-direction: column; position: static;
    min-width: 0; padding: .25rem 0 .45rem; transform: none;
    border-radius: 0; background: var(--cream); box-shadow: none;
  }
  .nav-programs.is-open > .submenu a {
    display: block; padding: .65rem 20px .65rem 38px; white-space: normal;
  }
  .nav-programs.is-open > .submenu .submenu-overview {
    display: block; color: var(--blue); border-bottom: 1px solid #e7dbc7;
  }
}

@media (max-width: 560px) {
  .cards, .program-grid { grid-template-columns: 1fr; }
  .cards.cols-3, .cards.cols-2 { grid-template-columns: 1fr; }
  .utility-inner { gap: .5rem 1rem; font-size: .82rem; justify-content: center; }
  .header-inner { gap: .35rem; padding-inline: 12px; }
  .brand { flex: 1 1 auto; min-width: 0; gap: .45rem; overflow: hidden; }
  .brand-text { min-width: 0; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 1.15rem; white-space: normal; line-height: 1.1; }
  .brand-logo { flex: 0 0 auto; height: 38px; }
  .nav-toggle { flex: 0 0 auto; }
  .header-cta {
    display: inline-block; position: static; flex: 0 0 auto;
    margin: 0 .15rem 0 auto; padding: .45rem .75rem;
    font-size: 0; text-align: center;
  }
  .header-cta::after { content: "Tour"; font-size: .85rem; }

  /* Stack hero CTAs at equal width. */
  .hero-actions { flex-direction: column; align-items: stretch; gap: .6rem; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* Tour actions: stack equal width */
  .tour-actions { flex-direction: column; align-items: stretch; }
  .tour-actions .btn { width: 100%; text-align: center; }
}
