/**
 * AAH Header — Dark navy, premium consultancy aesthetic.
 * Sticky, responsive, accessible, fully editable via WordPress menus.
 */

/* ── Header shell ──────────────────────────────────────────────────── */
.aah-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 18, 30, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line-gold);
  transition: padding .4s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  padding: 16px 0;
}

.aah-header.scrolled {
  padding: 10px 0;
  box-shadow: 0 1px 0 var(--line-gold), 0 14px 40px -24px #000;
  background: rgba(9, 18, 30, .96);
}

/* ── Inner container ────────────────────────────────────────────────── */
.aah-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Brand ──────────────────────────────────────────────────────────── */
.aah-header__brand { flex-shrink: 0; }

.aah-header__brand .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
}

.aah-header__brand .brand .mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 600;
  font-size: 1.1rem;
}

.aah-header__brand .brand .bname {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}

.aah-header__brand .brand .bname b {
  color: var(--gold);
  font-weight: 600;
}

.aah-header__brand .custom-logo-link { display: block; max-width: 190px; line-height: 0; }
.aah-header__brand .custom-logo { max-width: 100%; height: auto; }

/* ── Desktop nav ────────────────────────────────────────────────────── */
#primary-nav { margin-left: auto; }

.aah-menu-list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aah-menu-list li { position: relative; white-space: nowrap; }

.aah-menu-list li a,
.aah-nav-link {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 4px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: color .25s var(--ease);
}

.aah-menu-list li a:hover,
.aah-menu-list li a:focus-visible,
.aah-nav-link:hover,
.aah-nav-link:focus-visible { color: var(--gold); }

.aah-menu-list li.current-menu-item a,
.aah-menu-list li.current_page_item a,
.aah-nav-link[aria-current="page"] { color: var(--gold); }

.aah-menu-list li.current-menu-item a::after,
.aah-menu-list li.current_page_item a::after,
.aah-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--gold);
}

/* ── Dropdown submenu ───────────────────────────────────────────────── */
.aah-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 180px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  background: var(--navy-2);
  border: 1px solid var(--line-gold);
  border-radius: 6px;
  box-shadow: 0 20px 25px -5px rgba(10,23,38,.15);
  z-index: 100;
}

.aah-nav-item--has-children:hover > .aah-submenu,
.aah-nav-item--has-children:focus-within > .aah-submenu {
  display: grid;
  gap: 8px;
}

.aah-submenu li a,
.aah-submenu-link {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  border-radius: 4px;
  transition: all .2s;
  text-decoration: none;
}

.aah-submenu li a:hover,
.aah-submenu li a:focus-visible,
.aah-submenu-link:hover,
.aah-submenu-link:focus-visible { color: var(--gold); background: rgba(198,161,91,.1); }

.aah-nav-caret {
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  transition: transform .3s var(--ease);
}

.aah-nav-item--has-children:hover .aah-nav-caret,
.aah-nav-item--has-children:focus-within .aah-nav-caret {
  transform: rotate(180deg);
}

/* ── CTA button ─────────────────────────────────────────────────────── */
.aah-header__cta { flex-shrink: 0; }
.aah-header__cta .btn { padding: 12px 22px; font-size: 12px; }

/* ── Progress bar ───────────────────────────────────────────────────── */
#progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  z-index: 100;
  transition: width .1s linear;
}

/* ── Hamburger ──────────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 3px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
  transition: border-color .3s var(--ease);
}

.nav-toggle:hover { border-color: var(--gold); }

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: .3s var(--ease);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Mobile nav ─────────────────────────────────────────────────────── */
.aah-mobile-nav {
  display: none;
}

.aah-mobile-overlay {
  display: none;
}

/* ── Focus states ───────────────────────────────────────────────────── */
.aah-menu-list li a:focus-visible,
.aah-submenu li a:focus-visible,
.aah-nav-link:focus-visible,
.aah-submenu-link:focus-visible,
.aah-header .btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ── Responsive: Tablet (≤1024px) ───────────────────────────────────── */
@media (max-width: 1024px) {
  .aah-header__inner { padding: 0 24px; }
  .aah-header__cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  #primary-nav { display: none; }

  .aah-mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(8,16,28,.98);
    backdrop-filter: blur(8px);
    z-index: 55;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
  }

  .aah-mobile-nav[aria-hidden="false"] { transform: translateX(0); }

  .aah-mobile-nav__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 80px 24px 40px;
    gap: 24px;
  }

  .aah-mobile-nav__brand { margin-bottom: 32px; }

  .aah-mobile-nav .aah-menu-list {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .aah-mobile-nav .aah-menu-list li a,
  .aah-mobile-nav .aah-nav-link {
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: #fff;
    font-weight: 600;
    padding: 8px 0;
  }

  .aah-mobile-nav .aah-menu-list li a::after,
  .aah-mobile-nav .aah-nav-link::after { display: none; }
  .aah-mobile-nav__cta { margin-top: 32px; }
  .aah-mobile-nav__cta .btn { padding: 15px 28px; font-size: 14px; }

  .aah-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8,16,28,.72);
    z-index: 54;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }

  .aah-mobile-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }

  /* ── Mobile close button ──────────────────────────────────────────── */
  .aah-mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s var(--ease);
  }

  .aah-mobile-close:hover {
    border-color: var(--gold);
    color: var(--gold);
  }

  .aah-mobile-close:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
  }
}

@media (max-width: 767px) {
  .aah-header__inner { padding: 0 16px; }
}

@media print { .aah-header { display: none !important; } }
