/* ==========================================================================
   KCS V2 - Astra theme integration layer.
   Only rules that must override the parent theme live here.
   ========================================================================== */

/* --- CRITICAL LAYOUT FIX. Astra's .ast-container is display:flex (it drives the
   theme's own header row). Our .kcs-page wrappers share a parent carrying that
   same class, so hero content and the injected footer were being laid out as
   side-by-side flex items instead of stacked blocks. Restore normal block flow
   for exactly the containers wrapping our content; the header's own
   .ast-container never contains .kcs-page, so it is untouched. --- */
.ast-container:has(> .kcs-page){
  display:block !important;
  width:100% !important;
  max-width:none !important;
  padding-left:0 !important;
  padding-right:0 !important;
}
.kcs-page{ width:100% !important; }

/* Astra's off-canvas mobile panel is fixed-position just outside the viewport;
   body-level clipping alone is not reliable across browsers. */
html{ overflow-x:hidden; }

/* Remove the theme's default content padding/margin around our full-bleed pages */
.ast-page-builder-template .site-content .ast-container,
.site-content .ast-container:has(> .kcs-page){ padding-top:0; padding-bottom:0; }

/* --- Display face. Astra injects a global heading font (Poppins) with higher
   specificity than a single component class, which silently replaced the serif
   display face on every heading. Re-assert it, scoped to our pages only so the
   rest of the site keeps the theme's typography. --- */
.kcs-page .kcs-h1,
.kcs-page .kcs-h2,
.kcs-page .kcs-h3,
.kcs-page h1, .kcs-page h2, .kcs-page h3,
.kcs-page h4, .kcs-page h5,
.kcs-page .kcs-card h3, .kcs-page .kcs-card h4,
.kcs-page .kcs-flagship-card h3,
.kcs-page .kcs-numlist__item h4,
.kcs-page .kcs-steps .step h5,
.kcs-page .kcs-hero__plate .v,
.kcs-page details.kcs-card summary{
  font-family:var(--kcs-font-display) !important;
  font-weight:700 !important;
  letter-spacing:-.01em;
  text-transform:none !important;
}
/* Small structural labels stay in the body face on purpose */
.kcs-page .kcs-eyebrow,
.kcs-page .kcs-badge,
.kcs-page .kcs-card .k,
.kcs-page .kcs-trust b,
.kcs-page .kcs-footer-extra h5,
.kcs-page .kcs-btn{
  font-family:var(--kcs-font-body) !important;
  letter-spacing:.14em;
}
.kcs-page .kcs-btn{ letter-spacing:0; font-weight:700 !important; }
.kcs-page .kcs-numlist__item .n,
.kcs-page .kcs-steps .step .n,
.kcs-page .kcs-acc-list li{ font-family:var(--kcs-font-mono) !important; letter-spacing:0; }

/* ------------------------------------------------------------- header --- */
.ast-primary-header-bar{ min-height:92px; }
.site-header{ position:sticky; top:0; z-index:999; background:#fff; border-bottom:1px solid var(--kcs-line,#DCE2EE); }

.site-header-primary-section-right{ flex-shrink:0 !important; display:flex; align-items:center; gap:10px; }
.ast-header-button-1, .ast-builder-button-wrap{ flex-shrink:0 !important; width:auto !important; min-width:max-content; }

/* Student Portal: secondary outline. Same metrics as Apply Now. */
.ast-builder-button-wrap a.ast-custom-button-link,
a.ast-custom-button-link{
  display:inline-flex !important; align-items:center; justify-content:center;
  height:44px !important; padding:0 20px !important;
  background:transparent !important;
  border:1.5px solid var(--kcs-navy,#03094B) !important;
  color:var(--kcs-navy,#03094B) !important;
  border-radius:5px !important;
  font-family:var(--kcs-font-body,-apple-system,sans-serif) !important;
  font-size:.82rem !important; font-weight:700 !important;
  text-transform:none !important; letter-spacing:0 !important;
  line-height:1 !important; white-space:nowrap; writing-mode:horizontal-tb !important;
  text-decoration:none !important; box-shadow:none !important;
  transition:background-color .16s ease, color .16s ease;
}
.ast-builder-button-wrap a.ast-custom-button-link:hover,
a.ast-custom-button-link:hover{ background:var(--kcs-navy,#03094B) !important; color:#fff !important; }
a.ast-custom-button-link .ast-custom-button{
  writing-mode:horizontal-tb !important; white-space:nowrap;
  font-size:inherit; font-weight:inherit; color:inherit; line-height:1;
}

/* Primary nav */
#primary-menu, .main-header-menu{ display:flex; flex-wrap:nowrap !important; align-items:center; }
.main-header-menu > .menu-item > a{
  padding-left:.8em !important; padding-right:.8em !important;
  font-family:var(--kcs-font-body,-apple-system,sans-serif);
  font-size:.83rem; font-weight:600; letter-spacing:.01em;
  color:var(--kcs-navy,#03094B); white-space:nowrap;
}
.main-header-menu > .menu-item > a:hover{ color:var(--kcs-coral,#FF5A37); }
.main-header-menu > .menu-item.current-menu-item > a{ color:var(--kcs-navy,#03094B); }
@media (min-width:1025px) and (max-width:1400px){
  .main-header-menu > .menu-item > a{ padding-left:.6em !important; padding-right:.6em !important; font-size:.8rem; }
}

/* Apply Now: the single filled CTA. Rendered as a real menu item so it stays
   server-side, crawlable and keyboard reachable. Astra gives menu links the full
   header line-height, which is what made it a full-height slab - reset it. */
.main-header-menu > .menu-item.kcs-nav-cta{ display:flex; align-items:center; margin-left:8px; }
.main-header-menu > .menu-item.kcs-nav-cta > a{
  display:inline-flex !important; align-items:center; justify-content:center;
  height:44px; line-height:1 !important;
  padding:0 22px !important;
  background:var(--kcs-coral,#FF5A37);
  border:1.5px solid var(--kcs-coral,#FF5A37);
  color:var(--kcs-navy,#03094B) !important; border-radius:5px;
  font-size:.82rem; font-weight:700;
  transition:background-color .16s ease, border-color .16s ease;
}
.main-header-menu > .menu-item.kcs-nav-cta > a:hover{
  background:var(--kcs-coral-deep,#E8431F); border-color:var(--kcs-coral-deep,#E8431F); color:#fff !important;
}
.main-header-menu > .menu-item.kcs-nav-cta .ast-icon{ display:none; }

/* Sub-menus */
.main-header-menu .sub-menu{ border-top:2px solid var(--kcs-coral,#FF5A37); border-radius:0 0 6px 6px; padding:6px 0; }
.main-header-menu .sub-menu a{ font-size:.82rem; font-weight:500; padding:9px 18px !important; }
.main-header-menu .sub-menu a:hover{ color:var(--kcs-coral,#FF5A37); }

/* Keyboard focus */
.main-header-menu a:focus-visible, a.ast-custom-button-link:focus-visible{
  outline:3px solid var(--kcs-coral,#FF5A37); outline-offset:2px;
}

/* Astra's own footer bar sits below our expanded footer; tone it to match */
.site-footer .ast-footer-copyright, .site-below-footer-wrap{
  background:var(--kcs-navy-deep,#020733) !important;
  color:rgba(255,255,255,.5) !important;
  border-top:1px solid rgba(255,255,255,.12);
}
.site-footer .ast-footer-copyright *, .site-below-footer-wrap *{ color:rgba(255,255,255,.5) !important; font-size:.75rem; }


/* ================= KCS NAV FIX ================= */
.ast-primary-header-bar .main-header-bar-navigation, .site-header .main-navigation{ max-width:100%; }
#ast-hf-menu-1, .main-header-menu{ flex-wrap:wrap; }
#ast-hf-menu-1 > .menu-item > a, .main-header-menu > .menu-item > a{
  font-size:13.5px !important; letter-spacing:.02em; padding-left:12px !important; padding-right:12px !important; white-space:nowrap;
}
/* dropdowns: readable, scrollable, never taller than the screen */
#ast-hf-menu-1 .sub-menu, .main-header-menu .sub-menu{
  min-width:280px; max-height:70vh; overflow-y:auto; border-radius:8px; box-shadow:0 10px 26px rgba(10,25,47,.12);
}
#ast-hf-menu-1 .sub-menu a, .main-header-menu .sub-menu a{ font-size:13.5px !important; line-height:1.4; padding-top:9px !important; padding-bottom:9px !important; }
@media (max-width:1200px){ #ast-hf-menu-1 > .menu-item > a, .main-header-menu > .menu-item > a{ font-size:12.5px !important; padding-left:9px !important; padding-right:9px !important; } }
@media (max-width:921px){ #ast-hf-menu-1 .sub-menu, .main-header-menu .sub-menu{ max-height:none; box-shadow:none; } }
