/* ============================================
   Shared Header: used by home & handbook pages
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--brand, #990e01);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 10px 30px rgba(0,0,0,.15);
}

.site-header .header-inner {
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 12px;
  position: relative;
  padding-inline: clamp(16px, 4vw, 40px);
}

.site-header .brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: .35rem .55rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  text-decoration: none;
}

.site-header .brand:hover,
.site-header .brand:focus {
  text-decoration: none;
}

.site-header .brand:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.site-header .brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.site-header .brand-name {
  letter-spacing: .08em;
  display: inline-block;
}

.primary-nav {
  display: none;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(18px, 3vw, 26px);
  align-items: center;
}

.primary-nav a {
  position: relative;
  color: #fff;
  font-weight: 700;
  padding: .5rem .25rem;
  line-height: 1;
  text-decoration: none;
}

.primary-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  width: 60%;
  height: 2px;
  background: rgba(255,255,255,.95);
  border-radius: 999px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .32s ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.primary-nav a[aria-current="page"] {
  color: #fff;
}

.primary-nav a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  border-radius: 6px;
}

@media (min-width: 768px) {
  .primary-nav {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

.hamburger {
  --size: 44px;
  width: var(--size);
  height: var(--size);
  display: inline-grid;
  place-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.hamburger:focus-visible {
  outline: 3px solid #fff;
  border-radius: 10px;
}

.hamburger .bar {
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.no-scroll {
  overflow: hidden;
}

.no-scroll .hamburger {
  visibility: hidden;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 80;
}

.nav-drawer {
  position: fixed;
  inset: 0 -1px 0 auto;
  width: var(--drawer-w, clamp(320px, 86vw, 420px));
  background: #1C1D21;
  color: #fff;
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.nav-drawer.open {
  transform: translateX(0);
  border-left: 1px solid rgba(255,255,255,.08);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: #1C1D21;
}

.drawer-header strong {
  color: #fff;
  letter-spacing: .02em;
}

.close-drawer {
  font-size: 28px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close-drawer:hover {
  background: rgba(255,255,255,.12);
}

.drawer-links {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-links li a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.drawer-links li a:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
  text-decoration: none;
}

.drawer-links li a[aria-current="page"] {
  background: rgba(255,255,255,.12);
}

.drawer-links li a[aria-current="page"]:hover {
  background: rgba(255,255,255,.18);
}

.drawer-links .divider {
  height: 1px;
  background: rgba(255,255,255,.15);
  margin: 10px 4px;
}

@media (min-width: 768px) {
  .nav-drawer .drawer-links [data-desktop-hide="primary"] {
    display: none !important;
  }
}
