/* ==========================================================================
   Neo AshOS — Global header system
   Loaded LAST on every page. Single source of truth for:
   logo, primary navigation, mega menus, mobile menu, skip link, focus states.
   It intentionally out-specifies the older nav rules in style.css,
   site-enhancements.css, site-fixes.css, phase4-premium.css and
   neo-mobile-first.css (which are left untouched for page-level styling).

   Token names are prefixed (--neo-brand-*, --neo-ink*) on purpose:
   --neo-bg / --neo-text / --neo-muted / --neo-blue / --neo-orange are already
   used by neo-phase2.css and style.css and must not be redefined.
   ========================================================================== */
:root{
  --neo-brand-navy:#041E42;
  --neo-brand-blue:#0D4DA8;
  --neo-brand-cyan:#11D9FF;
  --neo-brand-orange:#F57A30;
  --neo-surface:#F7FAFD;
  --neo-hairline:#E3EAF3;
  --neo-ink:#0B1929;
  --neo-ink-muted:#5B6B80;
  --neo-header-h:72px;
  --neo-container:1280px;
}

/* ---------- Header bar ---------- */
html body nav:not(.neo-global-nav),
html body header.topbar{
  position:sticky!important;top:0!important;z-index:1000!important;
  height:var(--neo-header-h)!important;min-height:var(--neo-header-h)!important;max-height:var(--neo-header-h)!important;
  margin:0!important;
  background:rgba(255,255,255,.98)!important;
  border:0!important;border-bottom:1px solid var(--neo-hairline)!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important; /* keeps position:fixed mobile menu relative to viewport */
  transition:box-shadow .2s ease;
}
html body nav:not(.neo-global-nav){
  display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:nowrap!important;
  gap:clamp(12px,1.6vw,28px)!important;
  padding:0 max(clamp(16px,3vw,40px),calc((100vw - var(--neo-container))/2))!important;
}
html body header.topbar{padding:0 clamp(16px,3vw,40px)!important}
html body header.topbar .topbar-inner{
  display:flex!important;align-items:center!important;flex-wrap:nowrap!important;
  gap:clamp(12px,1.6vw,28px)!important;height:100%!important;
  width:100%!important;max-width:var(--neo-container)!important;margin:0 auto!important;padding:0!important;
}
html body nav.is-scrolled,html body header.topbar.is-scrolled{box-shadow:0 8px 24px rgba(4,30,66,.07)!important}

/* ---------- Logo (navbar symbol + wordmark; separate from any hero identity) ---------- */
html body nav .nav-logo,html body header.topbar .nav-logo{
  display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important;
  width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;
  padding:0!important;margin:0!important;text-decoration:none!important;
}
html body nav .neo-navbar-symbol-wrap,html body header.topbar .neo-navbar-symbol-wrap{
  display:flex!important;align-items:center!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;
}
html body nav .nav-logo .neo-navbar-symbol,html body header.topbar .nav-logo .neo-navbar-symbol,
html body nav .nav-logo .nav-logo-img{
  display:block!important;height:42px!important;width:auto!important;max-width:none!important;max-height:42px!important;
  aspect-ratio:403/308;object-fit:contain!important;content:normal!important;margin:0!important;
}
html body nav .neo-navbar-copy,html body header.topbar .neo-navbar-copy{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:3px!important;line-height:1!important;min-width:0}
html body nav .nav-brand-name,html body header.topbar .nav-brand-name{
  font:700 19px/1 Rajdhani,Inter,system-ui,sans-serif!important;letter-spacing:.05em!important;color:var(--neo-brand-navy)!important;white-space:nowrap!important;text-transform:uppercase!important;
}
html body nav .nav-brand-sub,html body header.topbar .nav-brand-sub{
  font:500 10.5px/1.2 Inter,system-ui,sans-serif!important;letter-spacing:.02em!important;color:var(--neo-ink-muted)!important;white-space:nowrap!important;margin:0!important;
}

/* ---------- Primary navigation (single row) ---------- */
html body .neo-global-nav{
  display:flex!important;flex:1 1 auto!important;min-width:0!important;align-items:center!important;justify-content:center!important;
  flex-wrap:nowrap!important;gap:2px!important;position:static!important;
  width:auto!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important;
  background:none!important;border:0!important;box-shadow:none!important;white-space:nowrap!important;
}
html body .neo-global-nav>a:not(.neo-mobile-cta),
html body .neo-global-nav .neo-drop-trigger{
  display:inline-flex!important;align-items:center!important;gap:6px!important;height:40px!important;margin:0!important;padding:0 13px!important;
  font:500 14.5px/1 Inter,system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;
  color:var(--neo-ink)!important;background:transparent!important;border:0!important;border-radius:10px!important;
  white-space:nowrap!important;text-decoration:none!important;cursor:pointer;box-shadow:none!important;
  transition:background-color .15s ease,color .15s ease;
}
html body .neo-global-nav>a:not(.neo-mobile-cta):hover,
html body .neo-global-nav .neo-drop-trigger:hover,
html body .neo-global-nav .neo-dropdown:focus-within>.neo-drop-trigger,
html body .neo-global-nav .neo-dropdown.open>.neo-drop-trigger{background:#EEF4FB!important;color:var(--neo-brand-blue)!important}
html body .neo-global-nav>a[aria-current="page"],
html body .neo-global-nav .neo-dropdown.has-active>.neo-drop-trigger{color:var(--neo-brand-blue)!important;background:#EAF2FD!important}
html body .neo-global-nav .neo-drop-trigger span{font-size:11px!important;line-height:1;transition:transform .18s ease}
html body .neo-global-nav .neo-dropdown:hover>.neo-drop-trigger span,
html body .neo-global-nav .neo-dropdown.open>.neo-drop-trigger span{transform:rotate(180deg)}
html body .neo-global-nav .neo-mobile-cta{display:none!important}

/* ---------- Mega menus ---------- */
html body .neo-global-nav .neo-dropdown{position:relative!important;display:flex!important;align-items:center!important;height:100%!important;margin:0!important}
html body .neo-global-nav .neo-dropdown-menu{
  display:grid!important;
  grid-template-columns:repeat(var(--cols,1),minmax(210px,1fr))!important;
  align-items:start!important;gap:6px 28px!important;
  position:absolute!important;top:100%!important;left:50%!important;right:auto!important;bottom:auto!important;
  width:max-content!important;min-width:250px!important;max-width:min(580px,calc(100vw - 32px))!important;
  margin:0!important;padding:20px 22px 22px!important;
  background:#fff!important;border:1px solid var(--neo-hairline)!important;border-radius:0 0 16px 16px!important;
  box-shadow:0 22px 48px rgba(4,30,66,.14)!important;
  opacity:0!important;visibility:hidden!important;pointer-events:none!important;
  transform:translateX(-50%) translateY(6px)!important;
  transition:opacity .16s ease,transform .16s ease,visibility 0s linear .16s!important;
  z-index:1001!important;white-space:normal!important;text-align:left!important;
}
html body .neo-global-nav .neo-dropdown:hover>.neo-dropdown-menu,
html body .neo-global-nav .neo-dropdown:focus-within>.neo-dropdown-menu,
html body .neo-global-nav .neo-dropdown.open>.neo-dropdown-menu{
  opacity:1!important;visibility:visible!important;pointer-events:auto!important;
  transform:translateX(-50%) translateY(0)!important;transition-delay:0s!important;
}
html body .neo-global-nav .neo-menu-group{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .neo-global-nav .neo-menu-label{
  font:700 11px/1 Inter,system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--neo-ink-muted);padding:2px 12px 10px;
}
html body .neo-global-nav .neo-dropdown-menu a{
  display:block!important;width:auto!important;height:auto!important;margin:0!important;padding:9px 12px!important;border-radius:9px!important;
  font:500 14px/1.3 Inter,system-ui,sans-serif!important;color:var(--neo-ink)!important;text-decoration:none!important;white-space:nowrap!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
html body .neo-global-nav .neo-dropdown-menu a:hover,
html body .neo-global-nav .neo-dropdown-menu a:focus-visible{background:#EEF4FB!important;color:var(--neo-brand-blue)!important}
html body .neo-global-nav .neo-dropdown-menu a[aria-current="page"]{color:var(--neo-brand-blue)!important;font-weight:600!important}

/* ---------- Right cluster: currency, language, CTA, hamburger ---------- */
html body nav .nav-right,html body header.topbar .nav-right{
  display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important;margin:0 0 0 auto!important;padding:0!important;
}
html body nav .nav-right .currency-sel{
  height:38px!important;padding:0 8px!important;font:500 13px/1 Inter,system-ui,sans-serif!important;color:var(--neo-ink)!important;
  background:#fff!important;border:1px solid var(--neo-hairline)!important;border-radius:10px!important;cursor:pointer;
}
html body nav .nav-right .lang-toggle{display:inline-flex!important;align-items:center!important;height:38px!important;padding:3px!important;gap:2px!important;background:#fff!important;border:1px solid var(--neo-hairline)!important;border-radius:10px!important}
html body nav .nav-right .lang-toggle button{
  min-width:36px!important;height:30px!important;padding:0 8px!important;font:600 12.5px/1 Inter,system-ui,sans-serif!important;
  color:var(--neo-ink-muted)!important;background:transparent!important;border:0!important;border-radius:7px!important;cursor:pointer;
}
html body nav .nav-right .lang-toggle button.active{background:var(--neo-brand-navy)!important;color:#fff!important}
html body nav .nav-right .btn,html body header.topbar .nav-right .btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;height:42px!important;min-height:42px!important;padding:0 20px!important;
  font:600 14px/1 Inter,system-ui,sans-serif!important;letter-spacing:0!important;white-space:nowrap!important;border-radius:12px!important;
  background:linear-gradient(135deg,#F57A30,#F59A2B)!important;color:#fff!important;border:0!important;box-shadow:none!important;text-decoration:none!important;
  transition:transform .15s ease,filter .15s ease;
}
html body nav .nav-right .btn:hover,html body header.topbar .nav-right .btn:hover{transform:translateY(-1px);filter:brightness(1.04)}
html body nav .nav-right .hamburger,html body header.topbar .nav-right .hamburger{
  display:none!important;width:44px!important;height:44px!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  background:#fff!important;border:1px solid var(--neo-hairline)!important;border-radius:12px!important;cursor:pointer;padding:0!important;margin:0!important;
}
html body nav .nav-right .hamburger span{display:block!important;width:20px!important;height:2px!important;margin:0!important;background:var(--neo-brand-navy)!important;border-radius:2px;transition:transform .2s ease,opacity .2s ease}
html body nav .nav-right .hamburger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
html body nav .nav-right .hamburger[aria-expanded="true"] span:nth-child(2){opacity:0}
html body nav .nav-right .hamburger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ---------- Skip link: keyboard-only ---------- */
html body .neo-skip-link{
  position:fixed!important;left:12px!important;top:12px!important;z-index:100000!important;
  transform:translateY(-250%)!important;padding:10px 16px!important;border-radius:10px!important;
  background:var(--neo-brand-navy)!important;color:#fff!important;font:600 14px/1 Inter,system-ui,sans-serif!important;
  text-decoration:none!important;box-shadow:none!important;transition:transform .15s ease;
}
html body .neo-skip-link:focus,html body .neo-skip-link:focus-visible{transform:translateY(0)!important;box-shadow:0 10px 30px rgba(4,30,66,.3)!important;outline:2px solid var(--neo-brand-cyan)!important;outline-offset:2px}
#main-content{scroll-margin-top:calc(var(--neo-header-h) + 12px)}

/* ---------- Focus visibility ---------- */
html body nav a:focus-visible,html body nav button:focus-visible,html body nav select:focus-visible,html body .neo-dropdown-menu a:focus-visible{
  outline:2px solid var(--neo-brand-blue)!important;outline-offset:2px!important;
}

/* ---------- Compact desktop: keep one row 1081–1240px ---------- */
@media(max-width:1240px){
  html body .neo-global-nav>a:not(.neo-mobile-cta),html body .neo-global-nav .neo-drop-trigger{padding:0 10px!important;font-size:14px!important}
  html body nav .nav-right .btn{padding:0 16px!important}
  html body nav .nav-right{gap:8px!important}
}
@media(max-width:1160px){
  html body nav .nav-brand-sub,html body header.topbar .nav-brand-sub{display:none!important}
}

/* ---------- Tablet / mobile: hamburger menu (<=1080px) ---------- */
@media(max-width:1080px){
  html body nav .nav-right .hamburger,html body header.topbar .nav-right .hamburger{display:inline-flex!important}
  html body .neo-global-nav{display:none!important}
  html body .neo-global-nav.mob-open{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:2px!important;
    position:fixed!important;top:var(--neo-header-h)!important;left:0!important;right:0!important;bottom:auto!important;
    width:auto!important;height:auto!important;max-height:calc(100vh - var(--neo-header-h))!important;max-height:calc(100dvh - var(--neo-header-h))!important;
    overflow-y:auto!important;overscroll-behavior:contain;padding:12px 16px 28px!important;
    background:#fff!important;border-bottom:1px solid var(--neo-hairline)!important;box-shadow:0 18px 40px rgba(4,30,66,.14)!important;z-index:999!important;
  }
  html body .neo-global-nav.mob-open>a:not(.neo-mobile-cta),
  html body .neo-global-nav.mob-open .neo-drop-trigger{width:100%!important;height:48px!important;justify-content:space-between!important;padding:0 12px!important;font-size:16px!important}
  html body .neo-global-nav.mob-open .neo-dropdown{display:block!important;height:auto!important;width:100%!important}
  html body .neo-global-nav.mob-open .neo-dropdown-menu{
    display:none!important;position:static!important;transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;
    width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding:4px 0 10px 12px!important;
    border:0!important;border-left:2px solid var(--neo-hairline)!important;border-radius:0!important;box-shadow:none!important;
    grid-template-columns:1fr!important;gap:4px!important;margin-left:12px!important;
  }
  html body .neo-global-nav.mob-open .neo-dropdown.open>.neo-dropdown-menu{display:grid!important}
  html body .neo-global-nav.mob-open .neo-dropdown:hover>.neo-dropdown-menu:not(:focus-within){transform:none!important}
  html body .neo-global-nav.mob-open .neo-dropdown-menu a{padding:12px 12px!important;font-size:15px!important;white-space:normal!important}
  html body .neo-global-nav.mob-open .neo-menu-label{padding:10px 12px 6px}
}
@media(max-width:1080px) and (min-width:641px){
  html body .neo-global-nav.mob-open .neo-mobile-cta{display:none!important}
}
@media(max-width:640px){
  html body nav .nav-right .btn,html body header.topbar .nav-right .btn{display:none!important}
  html body nav .nav-right .currency-sel{display:none!important}
  html body .neo-global-nav.mob-open .neo-mobile-cta{
    display:inline-flex!important;align-items:center;justify-content:center;width:100%;height:48px!important;margin-top:12px!important;padding:0 20px!important;
    font:600 15px/1 Inter,system-ui,sans-serif!important;color:#fff!important;border-radius:12px!important;border:0!important;text-decoration:none!important;
    background:linear-gradient(135deg,#F57A30,#F59A2B)!important;
  }
}
@media(max-width:420px){
  :root{--neo-header-h:64px}
  html body nav .nav-brand-sub,html body header.topbar .nav-brand-sub{display:none!important}
  html body nav .nav-logo .neo-navbar-symbol,html body header.topbar .nav-logo .neo-navbar-symbol{height:34px!important;max-height:34px!important}
  html body nav .nav-brand-name{font-size:17px!important}
  html body nav .nav-right .hamburger{width:42px!important;height:42px!important}
}
@media(max-width:360px){
  html body nav .nav-right .lang-toggle button{min-width:32px!important;padding:0 6px!important}
}

@media(prefers-reduced-motion:reduce){
  html body .neo-global-nav .neo-dropdown-menu,html body .neo-skip-link,html body nav .nav-right .hamburger span{transition:none!important}
}

/* ---------- Mobile menu polish ---------- */
@media(max-width:1080px){
  html body .neo-global-nav.mob-open>*{flex:0 0 auto!important}
  html body:has(.neo-global-nav.mob-open) .neo-ai-launcher,html body:has(.neo-global-nav.mob-open) #neoAiLauncher{display:none!important}
}
