/* Current-page indicators use the same geometry and styling as hover. */
.site-header #main-nav > a:not(.button):is(:hover, [aria-current="page"], [data-current-section="true"]),
.site-header .mega > summary:hover,
.site-header .mega:has(.directory a[aria-current="page"]) > summary,
.site-header .mega-panel .directory a:is(:hover, [aria-current="page"]) {
  background: #eee6d0;
  color: #292720;
  text-decoration: none;
}
.site-header .mega-panel .directory a[aria-current="page"] {
  border-radius: 7px;
  box-shadow: none;
}
.site-header .mega-bottom a:is([aria-current="page"], [data-current-section="true"]) {
  color: #292720;
  text-decoration: underline;
  text-decoration-thickness: auto;
  text-underline-offset: 4px;
  text-decoration-color: #c0b28d;
}
.clinic-footer .footer-navigation a:is(:hover, [aria-current="page"], [data-current-section="true"]) {
  color: #f1d89d;
  text-decoration: underline;
  text-decoration-thickness: auto;
  text-underline-offset: 4px;
  text-decoration-color: #aa8e50;
}

.mega-resource-links { display: flex; gap: 18px; align-items: center; }
.mega-resource-links a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c0b28d; }
.mega-help { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-backdrop { position: fixed; inset: 0; z-index: 19; background: #20271eeb; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s ease, visibility .3s; }
.menu-toggle { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.menu-icon { position: relative; display: inline-block; width: 18px; height: 16px; flex: 0 0 18px; }
.menu-icon > span { position: absolute; left: 0; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .25s ease, top .25s ease; }
.menu-icon > span:first-child { top: 4px; }
.menu-icon > span:last-child { top: 11px; }
.menu-toggle[aria-expanded="true"] .menu-icon > span:first-child { top: 7.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon > span:last-child { top: 7.5px; transform: rotate(-45deg); }

@media (max-width: 980px) {
  html { scrollbar-gutter: stable; }
  html.mobile-menu-open { overflow: hidden; overscroll-behavior: none; }
  /* Clip without making body a new scroll container: the header must stay sticky
     to the viewport when the menu opens partway down a page. */
  html.mobile-menu-open body { overflow: clip; overscroll-behavior: none; }
  .mobile-menu-open .mobile-menu-backdrop { opacity: 1; visibility: visible; pointer-events: auto; touch-action: none; }
  .site-header #main-nav { max-height: var(--mobile-menu-space, calc(100dvh - 145px)); overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
  .site-header #main-nav .mobile-book { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px 10px 22px; min-height: 58px; border: 0; font-size: 16px; line-height: 1.4; }
  .site-header #main-nav .mobile-book > span { flex: 0 0 34px; width: 34px; height: 34px; }
  .site-header .mega-panel .directory { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 8px 0 20px; }
  .site-header .mega-panel .directory-group { padding: 16px 12px 8px !important; border: 1px solid #e2e3d7; border-radius: 10px; background: #f5f5ee; margin: 0; }
  .site-header .mega-panel .directory-group:first-child { background: #f2eddd; border-color: #dfd5b8; }
  .site-header .mega-panel .directory h3 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #74613e; line-height: 1.6; padding: 0 8px 12px; margin: 0 0 4px; border-bottom: 1px solid #d8d9c9; }
  .site-header .mega-panel .directory a { font-size: 16px; font-weight: 500; min-height: 48px; padding: 12px 8px; line-height: 1.5; }
  .site-header .mega-bottom { display: grid; gap: 20px; margin: 0; padding: 20px 14px; border: 1px solid #e0ddcc; border-radius: 10px; background: #f3efe3; font-size: 14px; }
  .site-header .mega-resource-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .site-header .mega-resource-links a { display: flex; align-items: center; padding: 12px; min-height: 58px; border: 1px solid #d9d3bf; border-radius: 7px; background: #fffdf6; text-decoration: none; font-weight: 600; line-height: 1.5; }
  .site-header .mega-help { border-top: 1px solid #d9d3bf; padding-top: 17px; gap: 7px; line-height: 1.6; }
  .site-header .mega-help > span { font-size: 12px; color: #756a51; }
  .site-header .mega-help > a { font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
  .site-header .mega-bottom > a { justify-content: space-between; align-items: center; margin: 0; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle, .menu-icon > span, .mobile-menu-backdrop { transition: none; }
}
