/* ── Shared Mobile Nav: Hamburger + Off-Canvas Side Drawer ── */

/* Force nav-links visible above 768px (overrides any page-level hide at 900px) */
@media (min-width: 769px) {
  .nav-links { display: flex !important; }
}

/* ─── Hamburger Button ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: inherit;
  margin-left: auto;
}
.nav-hamburger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 3px;
}
.nav-hamburger span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ─── Backdrop Overlay ───────────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 299;
  cursor: pointer;
}
.nav-overlay.open {
  display: block;
}

/* ─── Side Drawer ────────────────────────────────────────── */
.nav-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  height: 100dvh;
  background: #0d47a1;
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-sidebar.open {
  transform: translateX(0);
}

.nav-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.nav-sidebar-title {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s, background 0.2s;
}
.nav-sidebar-close:hover,
.nav-sidebar-close:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.nav-sidebar nav ul {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}
.nav-sidebar nav ul li a {
  display: block;
  padding: 0.9rem 1.5rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s, padding-left 0.2s;
}
.nav-sidebar nav ul li a:hover,
.nav-sidebar nav ul li a:focus-visible {
  color: white;
  border-left-color: #d4a852;
  background: rgba(255, 255, 255, 0.08);
  padding-left: 1.8rem;
  outline: none;
}

/* ─── Breakpoints ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links { display: none !important; }
}

@media (max-width: 576px) {
  .nav-sidebar { width: 100%; max-width: 100vw; }
  .nav-sidebar nav ul li a { font-size: 0.92rem; padding: 0.95rem 1.25rem; }
}
