﻿/* ==========================================================================
   06-NAVIGATION.CSS â€” NEOMETIS Design System
   Navbar desktop, megamenu, drawer mobile, estados scroll.
   Depende de 01-tokens.css + 04-components.css.
   ========================================================================== */

/* =========================================================================
   NM-NAV â€” Barra principal
   ========================================================================= */

:where(.nm-nav, .nm-drawer) {
  --nm-nav-font: var(--font-body);
  --nm-nav-link-font-size: var(--text-xs, 0.75rem);
  --nm-nav-link-letter-spacing: 0.14em;
  --nm-nav-logo-h: 2.5rem;
  --nm-nav-logo-h-scroll: 2.125rem;
  --nm-nav-drawer-logo-h: 2.125rem;
  --nm-nav-duration-fast: var(--duration-fast, var(--dur-fast, 120ms));
  --nm-nav-duration-normal: var(--duration-normal, var(--dur-base, 200ms));
  --nm-nav-duration-slow: var(--duration-slow, var(--dur-slow, 350ms));
}

.nm-nav {
  --nm-nav-link-h: var(--btn-height-sm, 2rem);    /* alineado al sistema de botones */
  --nm-nav-link-pad-x: 0.85rem;
  --nm-nav-link-gap: 0.625rem;
  --nm-nav-cta-gap: 1.75rem;
  --nm-nav-cta-min-w: 7.75rem;
  --nm-nav-h: var(--nav-height, var(--nav-h, 4.5rem));
  --nm-nav-h-scroll: var(--nav-height-scroll, var(--nav-h-sm, 3.5rem));
  --nm-nav-bg: var(--nav-bg, rgba(1, 30, 40, 0.9));
  --nm-nav-blur: var(--nav-blur, var(--glass-blur, 16px));
  --nm-nav-border: var(--color-border-medium, var(--border-mid, rgba(32, 188, 194, 0.22)));
  --nm-nav-text: var(--color-text-secondary, var(--text-primary, #d4c1b2));
  --nm-nav-text-strong: var(--color-text, var(--text-bright, #f3f9fa));
  --nm-nav-muted: var(--color-text-subtle, var(--text-muted, #6d808a));
  --nm-nav-brand: var(--color-brand, var(--nm-accent, #20bcc2));
  --nm-nav-active: var(--color-accent, var(--nm-amber, #e39051));
  --nm-nav-surface: var(--color-bg-surface, var(--surface-1, #011e28));
  --nm-nav-elevated: var(--color-bg-elevated, var(--surface-2, #01293a));
  --nm-nav-deep: var(--color-bg-deep, var(--surface-0, #010f14));
  --nm-nav-shadow: var(--shadow-nav, 0 1px 0 rgba(32, 188, 194, 0.1), 0 4px 20px rgba(0, 0, 0, 0.4));
  position: fixed;
  top: var(--nm-admin-bar-offset);
  left: 0;
  right: 0;
  z-index: var(--z-sticky, var(--z-nav, 500));
  height: var(--nm-nav-h);
  background: transparent;
  transition: background var(--nm-nav-duration-slow) var(--ease-out),
              height var(--nm-nav-duration-normal) var(--ease-out),
              box-shadow var(--nm-nav-duration-normal) var(--ease-out);
}

.nm-nav--solid {
  background: var(--nm-nav-bg);
  backdrop-filter: blur(var(--nm-nav-blur));
  -webkit-backdrop-filter: blur(var(--nm-nav-blur));
  box-shadow: var(--nm-nav-shadow);
}

/* Estado al hacer scroll */
.nm-nav.is-scrolled {
  height: var(--nm-nav-h-scroll);
  background: var(--nm-nav-bg);
  backdrop-filter: blur(var(--nm-nav-blur));
  -webkit-backdrop-filter: blur(var(--nm-nav-blur));
  box-shadow: var(--nm-nav-shadow);
}

.nm-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 0;
}

.nm-nav__actions {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: var(--nm-nav-cta-gap);
}

/* Logo canonico para home e internas */
:where(.nm-nav, .nm-drawer) .nm-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
}

:where(.nm-nav, .nm-drawer) .nm-logo__asset {
  display: block;
  width: auto;
  height: var(--nm-nav-logo-h);
  max-width: min(12rem, 42vw);
  object-fit: contain;
  transition:
    height var(--nm-nav-duration-normal) var(--ease-out),
    opacity var(--nm-nav-duration-fast) var(--ease-out),
    transform var(--nm-nav-duration-fast) var(--ease-out);
}

:where(.nm-nav, .nm-drawer) .nm-logo:hover .nm-logo__asset {
  opacity: 0.92;
  transform: translateY(-1px);
}

.nm-nav.is-scrolled .nm-logo__asset {
  height: var(--nm-nav-logo-h-scroll);
}

.nm-drawer__header .nm-logo__asset {
  height: var(--nm-nav-drawer-logo-h);
  max-width: 10.5rem;
}

/* =========================================================================
   NAV DESKTOP
   ========================================================================= */

.nm-nav__desktop {
  display: flex;
  align-items: center;
  gap: var(--nm-nav-link-gap);
  margin-left: auto;
}

.nm-nav__item {
  position: relative;
}

.nm-nav__control {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nm-nav-link-h);
  gap: 0;
}

.nm-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--nm-nav-link-h);
  padding: 0 var(--nm-nav-link-pad-x);
  font-family: var(--nm-nav-font);
  font-size: var(--nm-nav-link-font-size);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--nm-nav-link-letter-spacing);
  line-height: 1;
  text-transform: uppercase;
  color: var(--nm-nav-text);
  background: none;
  border: none;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nm-nav__link--parent {
  padding-right: 0.12rem;
}

.nm-nav__link--static {
  cursor: default;
}

.nm-nav__link-label {
  position: relative;
  display: inline-block;
}

.nm-nav__submenu-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.22rem;
  width: auto;
  min-width: 0.9rem;
  height: var(--nm-nav-link-h);
  padding: 0;
  color: var(--nm-nav-text);
  background: none;
  border: 0;
  cursor: pointer;
}

.nm-nav__submenu-trigger:focus-visible {
  outline: 2px solid var(--nm-nav-brand);
  outline-offset: 2px;
}

.nm-nav__desktop .nm-nav__link-label::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  background: var(--nm-nav-active);
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.nm-nav__desktop .nm-nav__link::after,
.nm-nav__item.has-submenu > .nm-nav__control::after {
  display: none;
}

.nm-nav__item.is-current > .nm-nav__link .nm-nav__link-label::after,
.nm-nav__item.is-current > .nm-nav__control > .nm-nav__link .nm-nav__link-label::after,
.nm-nav__item.has-section-current:not(.has-submenu) > .nm-nav__link .nm-nav__link-label::after {
  opacity: 1;
  transform: scaleX(1);
}

.nm-nav__branch-dot {
  display: none;
  width: 0.24rem;
  height: 0.24rem;
  flex: 0 0 auto;
  border-radius: var(--radius-full, 999px);
  background: var(--nm-nav-active);
  box-shadow: 0 0 0 3px rgba(227, 144, 81, 0.12);
  opacity: 0;
  transform: scale(0.62);
  transition:
    opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-normal) var(--ease-spring);
}

.nm-nav__item.has-current-descendant:not(.is-current) > .nm-nav__control .nm-nav__branch-dot,
.nm-nav__item.has-section-current.has-submenu:not(.is-current) > .nm-nav__control .nm-nav__branch-dot {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.nm-nav__item.has-current-descendant:not(.is-current) > .nm-nav__control > .nm-nav__link,
.nm-nav__item.has-section-current.has-submenu:not(.is-current) > .nm-nav__control > .nm-nav__link {
  color: var(--nm-nav-text-strong);
}

.nm-nav__item.has-current-descendant:not(.is-current) > .nm-nav__control > .nm-nav__link .nm-nav__link-label::after,
.nm-nav__item.has-section-current.has-submenu:not(.is-current) > .nm-nav__control > .nm-nav__link .nm-nav__link-label::after {
  background: linear-gradient(90deg, var(--nm-nav-active) 0%, var(--nm-nav-brand) 100%);
  opacity: 1;
  transform: scaleX(1);
}

.nm-nav__link:hover,
.nm-nav__submenu-trigger:hover,
.nm-nav__item:hover > .nm-nav__link,
.nm-nav__item:hover > .nm-nav__control > .nm-nav__link,
.nm-nav__item:hover > .nm-nav__control > .nm-nav__submenu-trigger,
.nm-nav__item.is-active > .nm-nav__link,
.nm-nav__item.is-active > .nm-nav__control > .nm-nav__link,
.nm-nav__item.is-active > .nm-nav__control > .nm-nav__submenu-trigger,
.nm-nav__item.has-section-current:not(.has-submenu) > .nm-nav__link {
  color: var(--nm-nav-brand);
}

.nm-nav__item.has-current-descendant.is-active:not(.is-current) > .nm-nav__control > .nm-nav__link,
.nm-nav__item.has-section-current.has-submenu.is-active:not(.is-current) > .nm-nav__control > .nm-nav__link {
  color: var(--nm-nav-text-strong);
}

.nm-nav__item.is-current > .nm-nav__link,
.nm-nav__item.is-current > .nm-nav__control > .nm-nav__link,
.nm-nav__item.is-current > .nm-nav__control > .nm-nav__submenu-trigger {
  color: var(--nm-nav-active);
}

.nm-nav__item.is-current > .nm-nav__link .nm-nav__link-label::after,
.nm-nav__item.is-current > .nm-nav__control > .nm-nav__link .nm-nav__link-label::after {
  height: 2px;
  background: var(--nm-nav-active);
}

.nm-nav__item.has-section-current:not(.has-submenu) > .nm-nav__link {
  color: var(--nm-nav-active);
}

/* CTA en navbar — nm-btn + nm-btn--nav aportan dimensiones y tipografia */
.nm-nav__link--cta {
  min-width: var(--nm-nav-cta-min-w);
  /* Apariencia — amber outline */
  color: var(--nm-secondary) !important;
  border: 1px solid rgba(227, 144, 81, 0.42);
  background: rgba(227, 144, 81, 0.04);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--duration-normal) var(--ease-out);
  margin-left: 0;
}

.nm-nav__link--cta:hover {
  background: rgba(227, 144, 81, 0.12) !important;
  color: var(--nm-amber) !important;
  border-color: var(--nm-amber);
  box-shadow: 0 0 0 1px rgba(227, 144, 81, 0.14);
}

.nm-nav__link--cta.is-current {
  color: var(--nm-amber) !important;
  border-color: var(--nm-amber);
  background: rgba(227, 144, 81, 0.14);
  box-shadow: 0 0 0 1px rgba(227, 144, 81, 0.18);
}

/* Chevron del dropdown */
.nm-nav__chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
  opacity: 0.5;
}

.nm-nav__item:hover .nm-nav__chevron,
.nm-nav__item:focus-within .nm-nav__chevron,
.nm-nav__item.is-active .nm-nav__chevron,
.nm-nav__submenu-trigger[aria-expanded="true"] .nm-nav__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nm-megamenu__link.is-current,
.nm-megamenu__link.is-section-current {
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.nm-megamenu__link.is-current {
  color: var(--color-accent);
}

.nm-megamenu__link.is-section-current {
  color: var(--color-brand);
}

.nm-megamenu__link.is-current .nm-megamenu__link-dot,
.nm-megamenu__link.is-section-current .nm-megamenu__link-dot {
  opacity: 1;
  background: var(--color-accent);
}

/* =========================================================================
   MEGAMENU â€” ver tambiÃ©n 04-components.css para base
   ========================================================================= */

/* Override al tener data-open via JS */
.nm-megamenu[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nm-megamenu {
  position: absolute;
  top: calc(100% + 0.625rem);
  left: 50%;
  z-index: var(--z-dropdown);
  display: block;
  width: max-content;
  min-width: 13rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: var(--space-2);
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(1, 40, 52, 0.98) 0%, rgba(1, 22, 30, 0.98) 100%);
  border: 1px solid rgba(32, 188, 194, 0.26);
  border-bottom-color: rgba(212, 193, 178, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-0.4rem) scale(0.985);
  transform-origin: top center;
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out),
    visibility 0s linear var(--duration-normal);
}

.nm-megamenu::before {
  content: '';
  position: absolute;
  top: -0.36rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  background: rgba(1, 40, 52, 0.98);
  border-left: 1px solid rgba(32, 188, 194, 0.26);
  border-top: 1px solid rgba(32, 188, 194, 0.26);
  transform: translateX(-50%) rotate(45deg);
}

.nm-megamenu::after {
  content: '';
  position: absolute;
  top: -0.75rem;
  left: 0;
  right: 0;
  height: 0.75rem;
}

.nm-nav__item:hover .nm-megamenu,
.nm-nav__item:focus-within .nm-megamenu,
.nm-nav__item.is-active .nm-megamenu,
.nm-megamenu[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
  transition-delay: 0s;
}

.nm-megamenu--has-intro {
  min-width: 18rem;
}

.nm-megamenu__intro {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) var(--space-3) var(--space-4);
  border-right: 0;
  border-bottom: 1px solid rgba(32, 188, 194, 0.12);
  background: transparent;
}

.nm-megamenu__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-brand);
}

.nm-megamenu__eyebrow::before {
  content: '';
  width: 1.35rem;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent) 0%, rgba(227, 144, 81, 0) 100%);
}

.nm-megamenu__summary {
  max-width: 30ch;
  font-size: var(--text-xs);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

.nm-megamenu__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nm-megamenu__list > li {
  margin: 0;
}

.nm-megamenu__list > li + li {
  border-top: 1px solid rgba(32, 188, 194, 0.08);
}

.nm-megamenu__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: 2.5rem;
  padding: 0.72rem var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  line-height: 1.35;
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: normal;
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.nm-megamenu__link:hover,
.nm-megamenu__link:focus-visible {
  color: var(--color-text);
  background: rgba(32, 188, 194, 0.08);
  transform: translateX(2px);
}

.nm-megamenu__link-dot {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: var(--radius-full);
  background: var(--color-brand);
  opacity: 0.48;
  transition:
    opacity var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.nm-megamenu__link:hover .nm-megamenu__link-dot,
.nm-megamenu__link:focus-visible .nm-megamenu__link-dot {
  opacity: 1;
  transform: scale(1.25);
}

.nm-megamenu__link.is-current,
.nm-megamenu__link.is-section-current {
  color: var(--color-text);
  background: rgba(32, 188, 194, 0.1);
}

.nm-megamenu__link.is-current {
  color: var(--color-accent);
  background:
    linear-gradient(90deg, rgba(227, 144, 81, 0.18) 0%, rgba(227, 144, 81, 0.06) 100%);
  box-shadow:
    inset 2px 0 0 var(--color-accent),
    inset 0 0 0 1px rgba(227, 144, 81, 0.12);
  font-weight: var(--fw-semibold);
}

.nm-megamenu__link.is-section-current {
  color: var(--color-brand);
}

.nm-megamenu__link.is-current .nm-megamenu__link-dot,
.nm-megamenu__link.is-section-current .nm-megamenu__link-dot {
  opacity: 1;
  background: var(--color-accent);
}

.nm-megamenu__link.is-current .nm-megamenu__link-dot {
  box-shadow: 0 0 0 3px rgba(227, 144, 81, 0.14);
  transform: scale(1.25);
}

/* =========================================================================
   MOBILE NAV CANONICA - drawer compartido home/internas
   ========================================================================= */

.nm-nav,
.nm-drawer {
  --nm-mobile-nav-h: var(--nav-height, var(--nav-h, 4.5rem));
  --nm-mobile-drawer-w: var(--drawer-width, min(380px, 92vw));
  --nm-mobile-bg: linear-gradient(180deg, rgba(1, 30, 40, 0.985) 0%, rgba(1, 15, 20, 0.995) 100%);
  --nm-mobile-panel-bg: rgba(1, 30, 40, 0.68);
  --nm-mobile-panel-bg-strong: rgba(1, 10, 15, 0.66);
  --nm-mobile-border: rgba(32, 188, 194, 0.12);
  --nm-mobile-border-strong: rgba(32, 188, 194, 0.28);
  --nm-mobile-accent: #20bcc2;
  --nm-mobile-active: #e39051;
  --nm-mobile-text: #d4c1b2;
  --nm-mobile-text-strong: #f3f9fa;
  --nm-mobile-text-muted: #9baab3;
  --nm-mobile-text-soft: #6d808a;
  --nm-mobile-link-font-size: var(--text-xs, 0.75rem);
  --nm-mobile-sublink-font-size: var(--text-xs, 0.75rem);
  --nm-mobile-link-letter-spacing: 0.14em;
  --nm-mobile-sublink-letter-spacing: 0.04em;
  --nm-mobile-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nm-mobile-drawer-duration: 360ms;
  --nm-mobile-submenu-duration: 280ms;
}

.nm-nav__mobile-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--nm-mobile-text);
  background: rgba(1, 30, 40, 0.28);
  border: 1px solid var(--nm-mobile-border-strong);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    color 160ms var(--nm-mobile-ease),
    background 160ms var(--nm-mobile-ease),
    border-color 160ms var(--nm-mobile-ease);
  z-index: calc(var(--z-nav, var(--z-sticky, 200)) + 10);
}

.nm-nav__mobile-trigger:hover,
.nm-nav__mobile-trigger:focus-visible,
.nm-nav__mobile-trigger[aria-expanded="true"] {
  color: var(--nm-mobile-accent);
  background: rgba(32, 188, 194, 0.08);
  border-color: rgba(32, 188, 194, 0.42);
}

.nm-hamburger {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
}

.nm-hamburger__line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: left center;
  transition:
    transform 260ms var(--nm-mobile-ease),
    opacity 180ms var(--nm-mobile-ease),
    width 260ms var(--nm-mobile-ease);
}

.nm-nav__mobile-trigger[aria-expanded="true"] .nm-hamburger__line:nth-child(1) {
  transform: rotate(40deg) translateY(-1px);
}

.nm-nav__mobile-trigger[aria-expanded="true"] .nm-hamburger__line:nth-child(2) {
  width: 0;
  opacity: 0;
}

.nm-nav__mobile-trigger[aria-expanded="true"] .nm-hamburger__line:nth-child(3) {
  transform: rotate(-40deg) translateY(1px);
}

.nm-drawer {
  position: fixed;
  inset: var(--nm-admin-bar-offset, 0px) 0 0 0;
  z-index: var(--z-modal, 1000);
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear var(--nm-mobile-drawer-duration);
}

.nm-drawer.is-open,
.nm-drawer[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.nm-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity var(--nm-mobile-drawer-duration) var(--nm-mobile-ease);
}

.nm-drawer.is-open .nm-drawer__overlay,
.nm-drawer[aria-hidden="false"] .nm-drawer__overlay {
  opacity: 1;
}

.nm-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--nm-mobile-drawer-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--nm-mobile-text);
  background: var(--nm-mobile-bg);
  border-left: 1px solid var(--nm-mobile-border-strong);
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.55);
  opacity: 0.98;
  transform: translate3d(100%, 0, 0);
  will-change: transform;
  transition:
    transform var(--nm-mobile-drawer-duration) var(--nm-mobile-ease),
    opacity var(--nm-mobile-drawer-duration) var(--nm-mobile-ease);
}

.nm-drawer__panel:focus {
  outline: none;
}

.nm-drawer.is-open .nm-drawer__panel,
.nm-drawer[aria-hidden="false"] .nm-drawer__panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.nm-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nm-mobile-nav-h);
  padding: 0 var(--space-5, 1.25rem);
  flex-shrink: 0;
  position: relative;
  background: rgba(1, 30, 40, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nm-drawer__header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--nm-mobile-accent) 0%, rgba(32, 188, 194, 0.24) 45%, transparent 72%);
}

.nm-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--nm-mobile-text-muted);
  background: transparent;
  border: 1px solid var(--nm-mobile-border-strong);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition:
    color 160ms var(--nm-mobile-ease),
    background 160ms var(--nm-mobile-ease),
    border-color 160ms var(--nm-mobile-ease);
}

.nm-drawer__close:hover,
.nm-drawer__close:focus-visible {
  color: var(--nm-mobile-accent);
  background: rgba(32, 188, 194, 0.08);
  border-color: rgba(32, 188, 194, 0.42);
}

.nm-drawer__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2, 0.5rem) 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 188, 194, 0.22) transparent;
}

.nm-drawer__nav::-webkit-scrollbar {
  width: 3px;
}

.nm-drawer__nav::-webkit-scrollbar-track {
  background: transparent;
}

.nm-drawer__nav::-webkit-scrollbar-thumb {
  background: rgba(32, 188, 194, 0.24);
  border-radius: 2px;
}

.nm-drawer__item {
  border-bottom: 1px solid var(--nm-mobile-border);
}

.nm-drawer__trigger {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  min-height: 3.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: default;
  position: relative;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms var(--nm-mobile-ease);
}

.nm-drawer__trigger::before,
.nm-drawer__direct::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-3, 0.75rem);
  bottom: var(--space-3, 0.75rem);
  width: 2px;
  background: var(--nm-mobile-accent);
  border-radius: 0 1px 1px 0;
  opacity: 0;
  transform: scaleY(0.35);
  transition:
    opacity 220ms var(--nm-mobile-ease),
    transform 280ms var(--nm-mobile-ease);
}

.nm-drawer__trigger:hover,
.nm-drawer__item.is-open > .nm-drawer__trigger,
.nm-drawer__item.is-current > .nm-drawer__trigger {
  background: rgba(32, 188, 194, 0.06);
}

.nm-drawer__item.is-current > .nm-drawer__trigger {
  background: rgba(227, 144, 81, 0.08);
}

.nm-drawer__trigger:hover::before,
.nm-drawer__item.is-open > .nm-drawer__trigger::before,
.nm-drawer__item.is-current > .nm-drawer__trigger::before,
.nm-drawer__direct:hover::before,
.nm-drawer__direct.is-current::before,
.nm-drawer__direct.is-section-current::before {
  opacity: 1;
  transform: scaleY(1);
}

.nm-drawer__parent-link,
.nm-drawer__direct {
  min-height: 3.25rem;
  color: inherit;
  text-decoration: none;
}

.nm-drawer__parent-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: var(--space-4, 1rem) 0 var(--space-4, 1rem) var(--space-5, 1.25rem);
}

.nm-drawer__parent-link--static {
  cursor: default;
}

.nm-drawer__trigger-copy {
  flex: 1;
  min-width: 0;
}

.nm-drawer__trigger-summary {
  display: none;
}

.nm-drawer__trigger-title,
.nm-drawer__direct {
  font-family: var(--nm-nav-font);
  font-size: var(--nm-mobile-link-font-size);
  font-weight: var(--fw-semibold, 600);
  letter-spacing: var(--nm-mobile-link-letter-spacing);
  line-height: 1;
  text-transform: uppercase;
}

.nm-drawer__trigger-title {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--nm-mobile-text);
  transition: color 160ms var(--nm-mobile-ease);
}

.nm-drawer__trigger-title::after {
  content: '';
  width: 0;
  height: 0.32rem;
  margin-left: 0;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--nm-mobile-active);
  box-shadow: 0 0 0 3px rgba(227, 144, 81, 0.12);
  opacity: 0;
  transform: scale(0.55);
  transition:
    width 160ms var(--nm-mobile-ease),
    margin-left 160ms var(--nm-mobile-ease),
    opacity 160ms var(--nm-mobile-ease),
    transform 260ms var(--nm-mobile-ease);
}

.nm-drawer__item.has-current-descendant:not(.is-current) > .nm-drawer__trigger .nm-drawer__trigger-title::after,
.nm-drawer__item.has-section-current:not(.is-current) > .nm-drawer__trigger .nm-drawer__trigger-title::after {
  width: 0.32rem;
  margin-left: 0.36rem;
  opacity: 1;
  transform: scale(1);
}

.nm-drawer__direct {
  display: flex;
  align-items: center;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  color: var(--nm-mobile-text);
  border-bottom: 1px solid var(--nm-mobile-border);
  position: relative;
  transition:
    color 160ms var(--nm-mobile-ease),
    background 160ms var(--nm-mobile-ease);
}

.nm-drawer__trigger:hover .nm-drawer__trigger-title,
.nm-drawer__direct:hover,
.nm-drawer__item.has-current-descendant:not(.is-current) > .nm-drawer__trigger .nm-drawer__trigger-title,
.nm-drawer__item.has-section-current:not(.is-current) > .nm-drawer__trigger .nm-drawer__trigger-title {
  color: var(--nm-mobile-text-strong);
}

.nm-drawer__item.is-open > .nm-drawer__trigger .nm-drawer__trigger-title,
.nm-drawer__direct.is-section-current {
  color: var(--nm-mobile-accent);
}

.nm-drawer__item.is-current > .nm-drawer__trigger .nm-drawer__trigger-title {
  color: var(--nm-mobile-active);
}

.nm-drawer__direct.is-current {
  color: var(--nm-mobile-active);
  background: rgba(227, 144, 81, 0.08);
}

.nm-drawer__direct.is-section-current {
  background: rgba(32, 188, 194, 0.05);
}

.nm-drawer__submenu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  width: 3.75rem;
  padding: 0 var(--space-5, 1.25rem) 0 var(--space-3, 0.75rem);
  gap: 0.45rem;
  color: var(--nm-mobile-text-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    color 160ms var(--nm-mobile-ease),
    background 160ms var(--nm-mobile-ease);
}

.nm-drawer__submenu-trigger:hover,
.nm-drawer__submenu-trigger:focus-visible,
.nm-drawer__submenu-trigger[aria-expanded="true"] {
  color: var(--nm-mobile-accent);
  background: rgba(32, 188, 194, 0.04);
}

.nm-drawer__item.is-current > .nm-drawer__trigger .nm-drawer__submenu-trigger,
.nm-drawer__item.has-current-descendant > .nm-drawer__trigger .nm-drawer__submenu-trigger {
  color: var(--nm-mobile-accent);
}

.nm-drawer__branch-dot {
  display: none;
}

.nm-drawer__trigger-icon {
  width: 14px;
  height: 14px;
  color: currentColor;
  opacity: 0.58;
  flex-shrink: 0;
  transition:
    transform 260ms var(--nm-mobile-ease),
    opacity 160ms var(--nm-mobile-ease);
}

.nm-drawer__submenu-trigger:hover .nm-drawer__trigger-icon,
.nm-drawer__submenu-trigger[aria-expanded="true"] .nm-drawer__trigger-icon {
  opacity: 1;
}

.nm-drawer__submenu-trigger[aria-expanded="true"] .nm-drawer__trigger-icon {
  transform: rotate(180deg);
}

.nm-drawer__submenu {
  display: grid;
  grid-template-rows: 0fr;
  max-height: none;
  overflow: hidden;
  margin-left: var(--space-5, 1.25rem);
  background: var(--nm-mobile-panel-bg-strong);
  border-left: 2px solid rgba(32, 188, 194, 0.18);
  opacity: 0;
  transform: translateY(-2px);
  transition:
    grid-template-rows var(--nm-mobile-submenu-duration) var(--nm-mobile-ease),
    opacity 180ms var(--nm-mobile-ease),
    transform var(--nm-mobile-submenu-duration) var(--nm-mobile-ease);
}

.nm-drawer__item.is-open > .nm-drawer__submenu {
  grid-template-rows: 1fr;
  max-height: none;
  opacity: 1;
  transform: translateY(0);
}

.nm-drawer__submenu-inner {
  min-height: 0;
  overflow: hidden;
  margin-left: 0;
  background: transparent;
  border-left: 0;
}

.nm-drawer__sublink {
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  min-height: 2.5rem;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  font-family: var(--nm-nav-font);
  font-size: var(--nm-mobile-sublink-font-size);
  font-weight: var(--fw-regular, 400);
  letter-spacing: var(--nm-mobile-sublink-letter-spacing);
  line-height: 1.35;
  color: var(--nm-mobile-text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 188, 194, 0.06);
  transition:
    color 160ms var(--nm-mobile-ease),
    background 160ms var(--nm-mobile-ease),
    padding-left 220ms var(--nm-mobile-ease);
}

.nm-drawer__sublink::before {
  content: '';
  width: 4px;
  height: 4px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--nm-mobile-accent);
  opacity: 0.34;
  transition:
    opacity 160ms var(--nm-mobile-ease),
    transform 160ms var(--nm-mobile-ease);
}

.nm-drawer__sublink::after {
  display: none;
}

.nm-drawer__sublink:hover,
.nm-drawer__sublink:focus-visible {
  color: var(--nm-mobile-text-strong);
  background: rgba(32, 188, 194, 0.06);
  padding-left: calc(var(--space-4, 1rem) + var(--space-2, 0.5rem));
}

.nm-drawer__sublink:hover::before,
.nm-drawer__sublink:focus-visible::before,
.nm-drawer__sublink.is-current::before,
.nm-drawer__sublink.is-section-current::before {
  opacity: 1;
  transform: scale(1.35);
}

.nm-drawer__sublink.is-current {
  color: var(--nm-mobile-active);
}

.nm-drawer__sublink.is-section-current {
  color: var(--nm-mobile-accent);
}

.nm-drawer__sublink:last-child {
  border-bottom: 0;
}

.nm-drawer__footer {
  flex-shrink: 0;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  background: rgba(1, 20, 28, 0.5);
  border-top: 1px solid var(--nm-mobile-border);
}

.nm-drawer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3, 0.75rem);
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-5, 1.25rem);
  color: #013743;
  background: var(--nm-mobile-active);
  border-radius: var(--radius-sm, 4px);
  font-family: var(--nm-nav-font);
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--fw-semibold, 600);
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 160ms var(--nm-mobile-ease),
    box-shadow 160ms var(--nm-mobile-ease);
}

.nm-drawer__cta:hover,
.nm-drawer__cta.is-current {
  background: #c97a3a;
  box-shadow: 0 0 0 1px rgba(227, 144, 81, 0.25), 0 0 12px rgba(227, 144, 81, 0.2);
}

.nm-drawer__cta svg {
  transition: transform 220ms var(--nm-mobile-ease);
}

.nm-drawer__cta:hover svg {
  transform: translateX(4px);
}

@media (min-width: 1024px) {
  .nm-nav__mobile-trigger {
    display: none;
  }
}

@media (max-width: 1023px) {
  .nm-nav__desktop {
    display: none;
  }

  .nm-nav__mobile-trigger {
    display: flex;
  }

  .nm-nav__actions .nm-nav__link--cta {
    display: none;
  }

  .nm-nav .nm-logo__asset,
  .nm-drawer__header .nm-logo__asset {
    height: 2rem;
    max-width: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-drawer,
  .nm-drawer__overlay,
  .nm-drawer__panel,
  .nm-drawer__submenu,
  .nm-hamburger__line {
    transition: none;
  }
}
