/* ============ SITE OVERRIDES — post-migration fixes ============ */

/* Menu popout: fit and scroll on small screens.
   The original design gave .hamburger-nav a hard max-height (90vh / 40rem at
   one breakpoint) while .hamburger-nav__group demanded min-height:90vh, with
   no overflow anywhere — on short viewports menu items simply clipped away.
   Let the panel hug its content, cap it to the viewport, scroll inside. */
.hamburger-nav {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 1.5rem) !important;
  max-height: calc(100dvh - 1.5rem) !important;
  /* no overflow:hidden here — it clipped the closed-state Menu button at the
     open panel's 1.5em radius (wrong corner roundness while closed) */
}
.hamburger-nav__group {
  min-height: 0 !important;
  flex: 0 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Slightly smaller items on short screens so more of the menu fits before scrolling */
@media (max-height: 760px) {
  .hamburger-nav__p { font-size: 1.55em; }
}
/* Near-full-width panel on phones */
@media (max-width: 479px) {
  .hamburger-nav__group { min-width: 92vw; }
}
/* Wide-but-short screens: wrap the list into columns instead of one tall
   scrolling column — the panel grows sideways and every item stays visible. */
@media (max-height: 720px) and (min-width: 700px) {
  .hamburger-nav__group {
    max-width: calc(100vw - 2rem);
  }
  .hamburger-nav__ul {
    flex-flow: column wrap;
    align-content: flex-start;
    max-height: calc(100dvh - 12rem);
    column-gap: 3.5em;
  }
  .hamburger-nav__p { font-size: 1.4em; }
}

/* Active-page dot: anchor to its own link row, not the whole list — in the
   wrapped multi-column layout the list-anchored dot floated to the far side
   of the panel next to a different column. */
.hamburger-nav__ul .hamburger-nav__a { position: relative; }

/* Menu logo: was absolutely pinned to the panel corner, which overlapped
   items once the panel scrolls. Flow it instead — bottom-anchored while the
   menu fits, scrolling after the last item when it doesn't. */
.hamburger-nav__group .fisar-menu-logo {
  position: static;
  margin: 1.5em 0 0;
}
