/* ==========================================================================
   Header parity with index.html (about, admissions, beyond-academics, contact).
   Loaded last on these pages, so inner-page stylesheets (site.css, refined.css,
   v2.css, page CSS) cannot change the header's size, spacing or menu.
   Values mirror the index.html header in shared-chrome.css, at every breakpoint.
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--hp-cream);
  border-bottom: 1px solid var(--hp-rule);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header .hp-header-inner {
  max-width: 1440px;
  height: 96px;
  margin: 0 auto;
  padding: 0 var(--hp-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .hp-logo {
  flex: 0 0 auto;
  display: block;
}

.site-header .hp-logo img {
  width: 200px;
  height: auto;
}

.site-header .main-nav {
  position: static;
  inset: auto;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  opacity: 1;
  visibility: visible;
  max-height: none;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 0;
}

.site-header .main-nav > ul.hp-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header .hp-menu > li {
  position: relative;
  border-bottom: 0;
  margin: 0;
  padding: 0;
}

.site-header .hp-menu .nav-link {
  display: inline-flex;
  justify-content: initial;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 6px 0;
  margin: 0;
  font-family: var(--hp-nav);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  color: #1c2d47;
  white-space: nowrap;
  transition: color .2s ease;
}

.site-header .hp-menu .nav-link:hover {
  color: var(--hp-blue);
}

.site-header .hp-menu .nav-link[aria-current="page"] {
  color: var(--hp-blue);
}

.site-header .has-dd > .nav-link::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--hp-blue);
  margin-left: 2px;
}

.site-header .hp-sub {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 230px;
  margin: 0;
  padding: 10px;
  background: #fffdf8;
  border: 1px solid var(--hp-rule);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(18, 41, 75, .12);
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.site-header .has-dd:hover .hp-sub,
.site-header .has-dd:focus-within .hp-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-header .hp-sub a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  font-family: var(--hp-nav);
  font-size: 16px;
  color: #1c2d47;
}

.site-header .hp-sub a:hover {
  background: #f3efe4;
  color: var(--hp-blue);
}

.site-header .hp-header-cta {
  flex: 0 0 auto;
  display: inline-flex;
}

.site-header .hp-mobile-cta {
  display: none;
}

.site-header .menu-toggle {
  display: none;
}

/* ---------- index.html's breakpoints ---------- */
@media (max-width: 1280px) {
  .site-header .main-nav > ul.hp-menu {
    gap: 20px;
  }
  .site-header .hp-menu .nav-link {
    font-size: 16px;
  }
}

@media (max-width: 1200px) {
  .site-header .hp-header-inner {
    height: 84px;
  }
  .site-header .hp-header-cta {
    display: none;
  }
  .site-header .menu-toggle {
    display: block;
    flex: 0 0 auto;
    position: relative;
    width: 46px;
    height: 46px;
    border: 0;
    background: none;
    padding: 0;
  }
  .site-header .menu-toggle span {
    position: absolute;
    left: 11px;
    top: 22px;
    width: 24px;
    height: 2px;
    background: var(--hp-navy);
  }
  .site-header .menu-toggle span::before,
  .site-header .menu-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--hp-navy);
    transition: transform .25s ease, top .25s ease;
  }
  .site-header .menu-toggle span::before {
    top: -7px;
  }
  .site-header .menu-toggle span::after {
    top: 7px;
  }
  body.nav-open .site-header .menu-toggle span {
    background: transparent;
  }
  body.nav-open .site-header .menu-toggle span::before {
    top: 0;
    transform: rotate(45deg);
  }
  body.nav-open .site-header .menu-toggle span::after {
    top: 0;
    transform: rotate(-45deg);
  }
  .site-header .main-nav {
    display: none;
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hp-cream);
    overflow-y: auto;
    padding: 12px var(--hp-gutter) 40px;
    justify-content: flex-start;
    z-index: 55;
  }
  body.nav-open .site-header .main-nav {
    display: block;
  }
  body.nav-open {
    overflow: hidden;
  }
  .site-header .main-nav > ul.hp-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .site-header .hp-menu > li {
    border-bottom: 1px solid var(--hp-rule);
  }
  .site-header .hp-menu .nav-link {
    display: flex;
    width: 100%;
    justify-content: space-between;
    font-size: 20px;
    padding: 18px 0;
  }
  .site-header .has-dd > .nav-link::after {
    margin-left: auto;
  }
  .site-header .hp-sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: none;
    padding: 0 0 12px 8px;
    min-width: 0;
    display: none;
  }
  .site-header .has-dd.open .hp-sub {
    display: block;
  }
  .site-header .hp-sub a {
    font-size: 17px;
    padding: 8px 6px;
  }
  .site-header .hp-mobile-cta {
    display: block;
    padding-top: 28px;
    border: 0;
  }
  .site-header .hp-mobile-cta a {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .site-header .hp-header-inner {
    height: 76px;
  }
  .site-header .hp-logo img {
    width: 164px;
  }
  .site-header .main-nav {
    top: 76px;
    padding-top: 6px;
  }
}
