/* Approved header refinement. Apply Now stays outside the desktop outline. */
.ah-header__inner { gap: clamp(14px, 2vw, 28px); }
.ah-header-menu-shell {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 6px 20px;
  border: 1px solid var(--ah-blue-deep);
  border-color: color-mix(in srgb, var(--ah-blue-deep) 72%, transparent);
  border-radius: 18px;
  background: var(--ah-white);
}
.ah-header-menu-shell .ah-primary-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); margin: 0; order: 0; }
.ah-header-menu-shell .ah-menu { gap: clamp(14px, 1.8vw, 24px); }
.ah-header-menu-shell .ah-menu a, .ah-family-portal { white-space: nowrap; }
.ah-header-menu-shell .ah-family-portal { display: inline-flex; align-items: center; min-height: 44px; }
.ah-header .ah-header-actions { flex: 0 0 auto; }
/* Give the standalone CTA its own breathing room without widening every gap. */
@media (min-width: 1025px) {
  .ah-header .ah-header-actions { margin-left: clamp(14px, calc(7.5vw - 66px), 28px); }
}
.ah-brand { min-width: 0; }
.ah-brand__mark { max-width: 100%; min-width: 0; }
.ah-brand__mark img { height: auto; max-width: min(100%, var(--ah-logo-scrolled-desktop, 150px)); object-fit: contain; }
.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header-menu-shell {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ah-submenu-toggle { display: none; }

@media (max-width: 1024px) {
  /* Backdrop filters/transforms would make fixed navigation use a short ancestor. */
  .ah-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ah-header .ah-header__inner,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner,
  .ah-home-logo-left.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner,
  .ah-home-logo-center.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px auto;
    gap: 10px;
    padding-block: 10px;
  }
  .ah-header .ah-brand,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-brand,
  .ah-home-logo-left.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-brand,
  .ah-home-logo-center.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
    flex-shrink: 1;
  }
  .ah-brand__text { min-width: 0; overflow-wrap: anywhere; }
  .ah-brand__mark img { max-width: min(100%, var(--ah-logo-scrolled-mobile, 90px)); max-height: 56px; }
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-brand__mark img { max-width: min(100%, var(--ah-logo-home-mobile, 120px)); max-height: 64px; }
  .ah-header .ah-header-menu-shell,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header-menu-shell {
    display: contents;
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .ah-header .ah-menu-toggle,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-menu-toggle {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    position: static;
    width: 44px;
    height: 44px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    border-radius: 8px;
  }
  .ah-header .ah-header-actions,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header-actions {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    position: static;
    margin: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .ah-header .ah-header-actions .ah-button { min-height: 44px; padding: .65rem .8rem; font-size: .72rem; white-space: nowrap; }
  .ah-header .ah-header-actions .ah-button span { display: none; }
  .ah-header .ah-header-entry-cta,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header-entry-cta { display: none; }
  .ah-header .ah-header-menu-shell .ah-primary-nav,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-primary-nav {
    position: fixed;
    inset: var(--ah-mobile-menu-top, 112px) 0 0;
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--ah-mobile-menu-top, 112px));
    max-height: calc(100dvh - var(--ah-mobile-menu-top, 112px));
    min-height: 0;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px var(--ah-gutter) max(32px, env(safe-area-inset-bottom));
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--ah-white);
    color: var(--ah-blue);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
    z-index: 999;
  }
  .ah-header .ah-header-menu-shell .ah-primary-nav.is-open { display: block; }
  .ah-header-menu-shell .ah-menu { display: flex; flex-direction: column; gap: 0; width: 100%; }
  .ah-header-menu-shell .ah-menu > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .ah-header-menu-shell .ah-menu a,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-menu a { color: var(--ah-blue); white-space: normal; overflow-wrap: anywhere; }
  .ah-header-menu-shell .ah-family-portal { display: flex; width: 100%; min-height: 58px; border-bottom: 1px solid var(--ah-border); color: var(--ah-blue); white-space: normal; }
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-family-portal { color: var(--ah-blue); }
  .ah-header-menu-shell .ah-menu .sub-menu { grid-column: 1 / -1; display: none; width: 100%; background: var(--ah-white); }
  .ah-header-menu-shell .ah-menu li.is-expanded > .sub-menu { display: block; }
  .ah-submenu-toggle { display: grid; place-items: center; align-self: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ah-blue); }
  .ah-submenu-toggle::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
  .ah-submenu-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
  html.ah-menu-open, body.ah-menu-open { overflow: hidden; }
  /* Keep sticky inner-page controls visible while body scrolling is locked. */
  body.ah-menu-open .ah-site-shell { position: fixed; left: 0; right: 0; top: var(--ah-admin-offset, 0px); }
}
@media (max-width: 390px) {
  .ah-header .ah-header__inner,
  .ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner,
  .ah-home-logo-left.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner,
  .ah-home-logo-center.ah-header-overlay .ah-site-shell:not(.is-scrolled) .ah-header__inner { width: calc(100% - 24px); gap: 8px; }
}
