/* APMNU2 — CSS-only drawer with dual-hook support */
/* Desktop: hide the drawer entirely */
@media (min-width: 1001px) {
  #apmnu2-root, #apmnu2-check { display: none !important; }
}

/* Mobile rules */
@media (max-width: 1000px) {
  /* Hide any older apmnu elements outside our root to avoid duplicates */
  body :is(.apmnu-toggle,.apmnu-btn,.apmnu-overlay,.apmnu-panel,#apmnu-panel):not(#apmnu2-root *) {
    display: none !important;
  }

  /* Hide inline header nav across common variants so the header shrinks on front page, too */
  header .nav-links,
  header nav.nav-links,
  .site-header .nav-links,
  .site-header nav,
  header .navigation,
  header .primary-nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Button */
.apmnu2-btn {
  position: fixed; top: 14px; right: 14px;
  width: 44px; height: 44px; border: 0; border-radius: 9999px;
  background: rgba(0,0,0,.85); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
  z-index: 2147483000; /* ensure above hero/front */
  cursor: pointer; transition: transform .12s ease;
  border:1px solid rgba(255,255,255,.08);
}
html.admin-bar .apmnu2-btn { top: 58px; }
.apmnu2-btn:active { transform: scale(.98); }
.apmnu2-btn:before, .apmnu2-btn:after, .apmnu2-btn i {
  position:absolute; left:50%; transform:translateX(-50%);
  width:18px; height:2px; background:#fff; content:""; border-radius:1px;
}
.apmnu2-btn i { top:50%; margin-top:-1px; display:block; }
.apmnu2-btn:before { top: calc(50% - 6px); }
.apmnu2-btn:after  { top: calc(50% + 6px); }

/* Overlay + panel */
.apmnu2-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 2147482000; display: none;
  backdrop-filter: blur(1px);
}
.apmnu2-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 360px);
  background:#0f141a; color:#e8eef5; padding:20px 18px 28px;
  z-index: 2147482500; transform: translateX(100%); transition: transform .18s ease;
  overflow-y:auto; -webkit-overflow-scrolling: touch;
  border-left:1px solid rgba(255,255,255,.06);
  box-shadow: -8px 0 30px rgba(0,0,0,.35);
}

/* Open state via checkbox */
.apmnu2-check:checked ~ #apmnu2-root #apmnu2-overlay { display:block; }
.apmnu2-check:checked ~ #apmnu2-root #apmnu2-panel  { transform: translateX(0); }

/* Menu list */
.apmnu2-list, .apmnu2-list ul { list-style:none; margin:0; padding:0; }
.apmnu2-list > li { border-bottom: 1px solid rgba(255,255,255,.07); }
.apmnu2-list a { display:block; padding:13px 6px; color:#fff; text-decoration:none; border-radius:10px; line-height:1.25; }
.apmnu2-list a:hover, .apmnu2-list a:focus { background:rgba(255,255,255,.06); text-decoration:none; outline:none; }

/* Optional CTA class support */
.apmnu2-list a.nav-cta { background:#0a6; color:#fff; text-align:center; margin-top:8px; }
.apmnu2-list a.nav-cta:hover { filter:brightness(1.08); }
