/* ==========================================================================
   AHVA Drawer Navigation – FINAL CLEAN VERSION (#2)
   ========================================================================== */

/* Global drawer vars */
:root {
  --ahva-panel-width: 285px;
  --ahva-z-drawer: 99998;
  --ahva-z-toggle: 99999;
  --ahva-bg: #131922;
  --ahva-bg-2: #0f141c;
  --ahva-bg-3: #0d1219;
  --ahva-border: rgba(255,255,255,.06);
  --ahva-ink: #e6edf6;
  --ahva-ink-soft: #c6d5e7;
  --ahva-hover: #0c2147;
}

/* ============================================================
   TOGGLE BUTTON
   ============================================================ */
.nav-toggle {
  position: relative;
  z-index: 99999;
}

/* ============================================================
   OVERLAY
   ============================================================ */
.ahva-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 99997;
}

/* NAV-DEBUG: overlay active state wired to .active from JS */
.ahva-nav__overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   NAV ROOT
   ============================================================ */
.ahva-nav {
  position: relative;
  z-index: var(--ahva-z-drawer);
}

/* NAV-DEBUG: drawer base (closed) */
.ahva-nav__list {
  position: fixed;
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  margin-left: auto;
  padding: 1.25rem 1.5rem 2.5rem;
  background: rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -16px 0 45px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);      /* off-screen by default */
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity   0.28s ease-out;
  z-index: 99999;                     /* above hero/content */
  color: #f7f7f8;
  overflow-y: auto;
}

/* NAV-DEBUG: drawer open state wired to .open from JS */
.ahva-nav__list.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}


/* ============================================================
   BASIC LIST RESET
   ============================================================ */
.ahva-nav__list,
.ahva-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Divider */
.ahva-nav__item {
  border-bottom: 1px solid rgba(255,255,255,.05);
}

/* ============================================================
   LINKS & TRIGGERS
   ============================================================ */
.ahva-nav__link,
.ahva-nav__trigger {
  display: flex;
  align-items: center;
  gap: .75rem;
font-size: medium;
  width: 100%;
  padding: 16px 18px;

  color: var(--ahva-ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;

  background: transparent;
  border: 0;
  cursor: pointer;

  text-decoration: none;
}

/* Hover effects */
.ahva-nav__link:hover,
.ahva-nav__trigger:hover,
.ahva-nav__sub .ahva-nav__link:hover {
  background: var(--ahva-hover);
  color: var(--ahva-ink);
}

/* Icons */
.ahva-nav__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: .92;
}

.ahva-nav__link:hover .ahva-nav__icon,
.ahva-nav__trigger:hover .ahva-nav__icon {
  opacity: 1;
}

/* ============================================================
   ARROW / CHEVRON
   ============================================================ */
.ahva-nav__trigger::after {
  content: none !important;
}

.ahva-nav__arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  opacity: .75;
  transition: transform .2s ease, opacity .2s ease;
}

.ahva-nav__item--open > .ahva-nav__trigger .ahva-nav__arrow {
  transform: rotate(90deg);
  opacity: 1;
}

/* ============================================================
   SUBMENU
   ============================================================ */
.ahva-nav__item--has-sub > .ahva-nav__trigger {
  background: #121821;
}

.ahva-nav__item--open > .ahva-nav__trigger {
  background: #11161e;
}

.ahva-nav__sub {
  display: none;
  padding: 8px 0 12px 40px;
  background: var(--ahva-bg-2);
}

.ahva-nav__item--open .ahva-nav__sub {
  display: block;
}

.ahva-nav__sub .ahva-nav__link {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 18px;
  color: var(--ahva-ink-soft);
  background: var(--ahva-bg-2);
}

.ahva-nav__sub .ahva-nav__link:hover {
  color: var(--ahva-ink);
  background: #141b25;
}

.ahva-nav__sub .ahva-nav__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: .9;
}

/* ============================================================
   CLOSE BUTTON (Glass Red)
   ============================================================ */
.ahva-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  margin: 14px 14px 10px 14px;

  background: linear-gradient(to bottom,
    rgba(255,70,70,0.6),
    rgba(170,0,0,0.6)
  );
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);

  box-shadow:
    0 3px 10px rgba(0,0,0,.6),
    inset 0 0 12px rgba(255,255,255,.18);

  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease;
  z-index: 99998;
}

.ahva-nav__close:hover {
  transform: scale(1.07);
}

.ahva-nav__close svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2.4;
}

/* ===============================
   Drawer Title Bar
================================*/
.ahva-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  height: 64px;

  background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0.25),
      rgba(100, 160, 220, 0.18),
      rgba(40, 60, 90, 0.25)
  );
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);

  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Label text */
.ahva-nav__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e6eefc;
  text-shadow: 0 1px 3px rgba(0, 20, 40, 0.6);
}

/* Close button — keep consistent */
.ahva-nav__close {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ahva-nav__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* container for nav image + hamburger */
.nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 2rem;
}

/* left navigation image */
.nav-image {
  height: 32px;          /* adjust to taste */
  width: auto;
  display: block;
}

/* hamburger button */
.nav-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* hamburger container */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  padding-top: 1rem;
}

/* individual lines */
.ham-line {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  position: relative;

  /* white outline */
  box-shadow:
    0 0 0 0.25px rgba(255, 255, 255, 0.9);

  /* smooth hover glow */
  transition:
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.nav-toggle:hover .ham-line {
  box-shadow:
    0 0 0 0.25px rgba(255, 255, 255, 0.95),
    0 0 6px rgba(255, 255, 255, 0.35);
}

.nav-toggle:active .hamburger {
  transform: scale(0.96);
}

.nav-label-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.45rem;
  line-height: 1;
}

.nav-section-icon {
  display: block;
}

/* optional hover glow for the section header */
.nav-section:hover .navc-seg {
  filter: url(#navc-glow);
}

.ahva-nav__overlay {
  pointer-events: none;
}

.ahva-nav__overlay.active {
  pointer-events: auto;
}

