/**
 * PATH: wp-content/themes/ahura-child/assets/css/header.css
 *
 * Non-critical CSS loaded async. Enhances desktop dropdown and scrolled state.
 *
 * FIXES v3:
 *  1. Dropdown uses opacity/visibility (GPU composited, no reflow).
 *  2. inset-inline-start:0 for RTL-safe positioning (submenu opens to right).
 *  3. current-menu-item underline: uses the same ::after pseudo-element
 *     as in critical CSS — no duplication, no specificity conflict.
 *  4. Removed redundant .current-menu-item color declarations
 *     (handled in critical CSS already).
 *  5. Hover underline in header.css synced with critical CSS approach.
 */

/* ── Desktop dropdown submenu ── */
.np-nav__list > li { position: relative; }

/* Hidden by default — GPU composited approach, NO display:none */
.np-nav__list > li > ul {
  position      : absolute;
  top           : calc(100% + 8px);
  inset-inline-start: 0;
  min-width     : 210px;
  background    : #0d1428;
  border        : 1px solid rgba(56,189,248,.12);
  border-radius : 14px;
  padding       : 8px;
  margin        : 0;
  list-style    : none;
  opacity       : 0;
  visibility    : hidden;
  pointer-events: none;
  transform     : translateY(8px);
  transition    : opacity .16s ease, visibility .16s ease, transform .16s ease;
  z-index       : 100;
  box-shadow    : 0 16px 48px rgba(0,0,0,.38);
}

/* Show on hover or keyboard focus-within */
.np-nav__list > li:hover     > ul,
.np-nav__list > li:focus-within > ul {
  opacity       : 1;
  visibility    : visible;
  pointer-events: auto;
  transform     : translateY(0);
}

/* Dropdown items */
.np-nav__list > li > ul a {
  display        : block;
  padding        : 10px 12px;
  border-radius  : 10px;
  color          : rgba(229,231,235,.85);
  text-decoration: none;
  font-size      : 14px;
  white-space    : nowrap;
  transition     : background .12s ease, color .12s ease;
}
.np-nav__list > li > ul a:hover {
  background: rgba(124,106,247,.14);
  color     : #7c6af7;
}

/* Current item in dropdown */
.np-nav__list > li > ul li.current-menu-item > a {
  color     : #7c6af7;
  background: rgba(124,106,247,.10);
}

/* Subtle scale on nav link hover */
.np-nav__list > li > a {
  transition: color .15s ease, transform .12s ease;
}
.np-nav__list > li > a:hover {
  transform: translateY(-1px);
}

/* Keep current-page item stable (no nudge) */
.np-nav__list > li.current-menu-item     > a,
.np-nav__list > li.current-menu-ancestor > a,
.np-nav__list > li.current_page_item     > a {
  transform: none !important;
}

/* ── Scrolled header: stronger blur ── */
.np-header.is-scrolled {
  backdrop-filter: blur(14px) saturate(1.5);
}