/* Shared compact banner sizing for all inner pages except the homepage. */
:root {
  --inner-banner-height: 420px;
  --inner-banner-pad-top: 38px;
  --inner-banner-pad-bottom: 32px;
}

.about-hero-banner,
.management-hero,
.academics-hero,
.admissions-hero,
.courses-hero,
.facilities-hero,
.gallery-hero,
.contact-hero {
  height: var(--inner-banner-height) !important;
  min-height: var(--inner-banner-height) !important;
}

.about-hero-grid,
.management-hero-grid,
.academics-hero-shell,
.admissions-hero-shell,
.courses-hero-shell,
.facilities-hero-shell,
.gallery-hero-shell,
.contact-hero-shell {
  min-height: inherit !important;
}

.about-hero-copy,
.management-hero-content,
.academics-hero-copy,
.admissions-hero-copy,
.courses-hero-copy,
.facilities-hero-copy,
.gallery-hero-copy,
.contact-hero-copy {
  padding-bottom: var(--inner-banner-pad-bottom) !important;
  padding-top: var(--inner-banner-pad-top) !important;
}

.about-hero-copy h1,
.management-hero h1,
.academics-hero-copy h1,
.admissions-hero-copy h1,
.courses-hero-copy h1,
.facilities-hero h1,
.gallery-hero-copy h1,
.contact-hero h1,
.inner-hero h1 {
  font-size: clamp(2.35rem, 3.8vw, 3.55rem) !important;
  line-height: 1.06 !important;
  margin-bottom: 16px !important;
}

.about-hero-copy .hero-lead,
.management-hero .hero-lead,
.academics-hero .hero-lead,
.admissions-hero .hero-lead,
.courses-hero .hero-lead,
.facilities-hero .hero-lead,
.gallery-hero .hero-lead,
.contact-hero .hero-lead,
.inner-hero .lead {
  font-size: clamp(0.98rem, 1.14vw, 1.08rem) !important;
  line-height: 1.56 !important;
  margin-bottom: 20px !important;
}

.about-hero-banner .about-welcome,
.management-hero .management-welcome,
.academics-hero .academics-kicker,
.admissions-hero .admissions-kicker,
.courses-hero .courses-kicker,
.facilities-hero .facilities-kicker,
.gallery-hero .gallery-kicker,
.contact-hero .contact-kicker,
.inner-hero .eyebrow {
  margin-bottom: 12px !important;
}

.about-hero-tags li,
.hero-highlights li,
.academics-hero-tags li,
.admissions-hero-tags li,
.courses-hero-tags li,
.facilities-hero-tags li,
.gallery-hero-tags li,
.contact-hero-tags li,
.hero-meta span {
  min-height: 42px !important;
  padding: 8px 16px !important;
}

.inner-hero {
  align-items: center;
  display: flex;
  height: var(--inner-banner-height);
  min-height: var(--inner-banner-height);
  padding: var(--inner-banner-pad-top) 0 var(--inner-banner-pad-bottom);
}

.inner-hero-grid {
  width: 100%;
}

.inner-visual {
  min-height: clamp(250px, 30vh, 280px);
}

@media (max-width: 1380px) {
  .header-cta {
    display: none;
  }
}

@media (max-width: 1220px) {
  /* backdrop-filter makes the header a containing block for the fixed drawer,
     trapping it inside the header box — drop it on mobile so the drawer fills the screen */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }

  .header-main { gap: 12px; min-height: 76px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand-logo { height: 42px; }
  .nav-toggle { display: flex; flex: 0 0 auto; margin-left: auto; }

  body.nav-open { overflow: hidden; }

  /* Dimmed backdrop behind the drawer (injected by JS) */
  .nav-backdrop {
    background: rgba(4, 20, 40, 0.32);
    inset: 0;
    opacity: 0;
    position: fixed;
    transition: opacity 0.32s ease;
    visibility: hidden;
    z-index: 95;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

  /* Off-canvas sidebar drawer */
  .main-nav {
    align-items: stretch;
    background: #fff;
    bottom: 0;
    box-shadow: -22px 0 60px rgba(6, 43, 85, 0.28);
    display: flex;
    flex-direction: column;
    gap: 0;
    left: auto;
    overflow-y: auto;
    padding: 74px 0 28px;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
    width: min(86vw, 350px);
    z-index: 100;
  }
  .nav-check:checked ~ .main-nav { transform: translateX(0); }

  /* Close button (injected by JS) */
  .nav-close {
    align-items: center;
    background: var(--page);
    border: none;
    border-radius: 10px;
    color: var(--navy-dark);
    cursor: pointer;
    display: flex;
    height: 40px;
    justify-content: center;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 40px;
    z-index: 2;
  }
  .nav-close svg { height: 22px; width: 22px; }

  /* Top-level links + dropdown parents as rows */
  .main-nav > a,
  .main-nav .nav-item > .nav-parent {
    border-bottom: 1px solid var(--border);
    color: #233149;
    font-size: 1rem;
    font-weight: 800;
    padding: 15px 24px;
  }
  .main-nav > a::after { display: none; }

  .main-nav .nav-item { border-bottom: 1px solid var(--border); display: block; }
  .main-nav .nav-item > .nav-parent { border-bottom: none; cursor: pointer; justify-content: space-between; width: 100%; }
  .nav-caret { display: inline-block; flex: 0 0 auto; }

  /* Accordion dropdowns */
  .nav-dropdown {
    background: var(--page);
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 0;
    opacity: 1;
    overflow: hidden;
    padding: 0 0 0 14px;
    position: static;
    transform: none;
    transition: max-height 0.34s ease;
    visibility: visible;
  }
  .nav-item.is-open .nav-dropdown { max-height: 660px; }
  .nav-dropdown::before { display: none; }
  .nav-dropdown a { border-bottom: none; color: #3a4a63; font-size: 0.92rem; font-weight: 700; padding: 11px 24px; white-space: normal; }
  .nav-dropdown a::after { display: none; }

  /* Admission CTA cloned into the drawer */
  .nav-drawer-cta { display: block; margin: 20px 24px 0; }
  .nav-drawer-cta .btn { display: flex; width: 100%; }
}

@media (max-width: 980px) {
  h1 {
    font-size: 3.55rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  .grid-4,
  .grid-3,
  .footer-grid,
  .gallery-grid,
  .academic-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .hero-grid,
  .about-layout,
  .parents-layout,
  .leadership-band,
  .admission-layout,
  .activity-showcase,
  .activity-tabs {
    grid-template-columns: 1fr;
  }

  .activity-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facility-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .facility-tile.large,
  .facility-tile.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .facility-tile {
    aspect-ratio: 4 / 3;
  }

  .contact-strip {
    grid-template-columns: 1fr;
  }

  .about-hero-banner,
  .management-hero,
  .academics-hero,
  .admissions-hero,
  .courses-hero,
  .facilities-hero,
  .gallery-hero,
  .contact-hero,
  .inner-hero {
    height: auto !important;
  }

  .contact-strip a,
  .contact-strip div {
    border-bottom: 1px solid var(--border);
    border-right: 0;
  }

  .contact-strip a:last-child,
  .contact-strip div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 9px 0;
  }

  .topbar-dot {
    display: none;
  }

  .brand-name {
    font-size: 0.84rem;
    max-width: 230px;
  }

  .brand-tag {
    display: none !important;
    font-size: 0.76rem;
  }

  .brand-mark {
    height: 42px;
    width: 42px;
  }

  .header-main {
    gap: 10px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .lead {
    font-size: 1rem;
  }

  .section {
    padding: 58px 0;
  }

  :root {
    --inner-banner-height: 480px;
    --inner-banner-pad-top: 34px;
    --inner-banner-pad-bottom: 28px;
  }

  .page-banner {
    padding: 58px 0 64px;
  }

  .about-hero-banner,
  .management-hero,
  .academics-hero,
  .admissions-hero,
  .courses-hero,
  .facilities-hero,
  .gallery-hero,
  .contact-hero,
  .inner-hero {
    height: var(--inner-banner-height) !important;
    min-height: var(--inner-banner-height) !important;
    padding: var(--inner-banner-pad-top) 0 var(--inner-banner-pad-bottom);
  }

  .about-hero-copy,
  .management-hero-content,
  .academics-hero-copy,
  .admissions-hero-copy,
  .courses-hero-copy,
  .facilities-hero-copy,
  .gallery-hero-copy,
  .contact-hero-copy {
    padding-bottom: var(--inner-banner-pad-bottom) !important;
    padding-top: var(--inner-banner-pad-top) !important;
  }

  .about-hero-copy h1,
  .management-hero h1,
  .academics-hero-copy h1,
  .admissions-hero-copy h1,
  .courses-hero-copy h1,
  .facilities-hero h1,
  .gallery-hero-copy h1,
  .contact-hero h1,
  .inner-hero h1 {
    font-size: clamp(1.95rem, 8vw, 2.35rem) !important;
    line-height: 1.08 !important;
    margin-bottom: 14px !important;
  }

  .about-hero-copy .hero-lead,
  .management-hero .hero-lead,
  .academics-hero .hero-lead,
  .admissions-hero .hero-lead,
  .courses-hero .hero-lead,
  .facilities-hero .hero-lead,
  .gallery-hero .hero-lead,
  .contact-hero .hero-lead,
  .inner-hero .lead {
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
    margin-bottom: 16px !important;
  }

  .about-hero-tags,
  .hero-highlights,
  .academics-hero-tags,
  .admissions-hero-tags,
  .courses-hero-tags,
  .facilities-hero-tags,
  .gallery-hero-tags,
  .contact-hero-tags,
  .hero-meta {
    gap: 8px !important;
  }

  .about-hero-tags li,
  .hero-highlights li,
  .academics-hero-tags li,
  .admissions-hero-tags li,
  .courses-hero-tags li,
  .facilities-hero-tags li,
  .gallery-hero-tags li,
  .contact-hero-tags li,
  .hero-meta span {
    font-size: 0.82rem !important;
    min-height: 34px !important;
    padding: 6px 11px !important;
  }

  .inner-visual {
    display: none;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .footer-grid,
  .gallery-grid,
  .academic-steps,
  .facility-mosaic,
  .activity-mosaic,
  .leader-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .cta-block,
  .stage-card {
    padding: 22px;
  }

  .hero {
    padding: 48px 0 68px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-panel {
    margin: 0;
    padding: 14px;
  }

  .hero-float {
    width: min(160px, calc(100% - 28px));
  }

  .hero-float.safe {
    left: 14px;
    top: 14px;
  }

  .hero-float.digital {
    bottom: 14px;
    right: 14px;
  }

  .admission-badge {
    border-width: 6px;
    bottom: 78px;
    height: 110px;
    right: 14px;
    width: 110px;
  }

  .hero-image,
  .parents-image,
  .image-panel {
    min-height: 270px;
  }

  .about-media .image-panel:first-child {
    min-height: 300px;
  }

  .parent-feature-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
  }

  .feature-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .feature-row span {
    border-radius: var(--radius);
    height: 58px;
  }

  .timeline-item {
    padding: 78px 22px 22px;
  }

  .gallery-feature {
    grid-column: span 1;
    grid-row: span 1;
  }

  .activity-card.featured {
    grid-row: auto;
  }

  .activity-card.featured img {
    aspect-ratio: 4 / 3;
  }
}
