
/* Mobile hamburger menu (ABNF) — v6 */
.hamburger-btn{display:none;position:absolute;top:0.75rem;right:0.75rem;padding:0.5rem;border:none;background:transparent;cursor:pointer;z-index:10001}
.hamburger-bars,.hamburger-bars::before,.hamburger-bars::after{content:"";display:block;width:24px;height:2px;background:currentColor;margin:6px 0;transition:transform .2s ease,opacity .2s ease}
.hamburger-btn[aria-expanded="true"] .hamburger-bars{transform:rotate(45deg)}
.hamburger-btn[aria-expanded="true"] .hamburger-bars::before{transform:translateY(8px) rotate(90deg)}
.hamburger-btn[aria-expanded="true"] .hamburger-bars::after{opacity:0}

.hamburger-menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:9998}
.hamburger-menu{position:fixed;top:0;right:0;height:100dvh;width:min(86vw,360px);background:#fff;box-shadow:-10px 0 30px rgba(0,0,0,.2);transform:translateX(100%);transition:transform .25s ease;z-index:10000;display:flex;flex-direction:column;padding:0}
.hamburger-menu.open{transform:translateX(0)}
.hamburger-menu-overlay.open{opacity:1;pointer-events:auto}

.mobile-menu-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem 1rem;border-bottom:1px solid rgba(0,0,0,.06)}
.mobile-menu-title{font-weight:700}
.mobile-close-btn{border:none;background:transparent;font-size:1.5rem;line-height:1;cursor:pointer;padding:.25rem .5rem}
.mobile-close-btn:focus{outline:2px solid #0003;outline-offset:2px}

.mobile-content{display:flex;flex-direction:column;gap:1rem;padding:1rem 1rem 2rem;overflow:auto;-webkit-overflow-scrolling:touch}
.mobile-lang{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:.25rem}
.mobile-nav{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}
.mobile-nav a{display:block;padding:.75rem 0;border-bottom:1px solid rgba(0,0,0,.06);text-decoration:none}
.mobile-nav details>summary{cursor:pointer;padding:.75rem 0;font-weight:600;list-style:none}
.mobile-nav details>summary::-webkit-details-marker{display:none}

/* Respect site fonts/colors */
.hamburger-menu, .mobile-nav a, .mobile-lang button, .mobile-lang a, .mobile-menu-title { color: inherit; }

/* Hide existing site mobile toggles/menus to avoid duplicates when ours is active */
@media (max-width:1023px){
  html.abnf-hide-existing-mobile .hamburger, 
  html.abnf-hide-existing-mobile .menu-toggle,
  html.abnf-hide-existing-mobile [class*="mobile-menu"],
  html.abnf-hide-existing-mobile [class*="offcanvas"],
  html.abnf-hide-existing-mobile [id*="mobile-menu"]{
    display:none !important;
  }
  /* Always hide header language switcher on mobile; we will render lang inside the off-canvas */
  header .language-switcher, .site-header .language-switcher { 
    display:none !important; 
  }
  /* Hide any language switchers OUTSIDE header on mobile too */
  .abnf-hide-lang-mobile{ display:none !important; }

  .hamburger-btn{display:block}
  .site-desktop-nav{display:none !important}
}
@media (min-width:1024px){
  .hamburger-menu-overlay{display:none}
  .hamburger-btn{display:none}
  .hamburger-menu{display:none}
}
