/* ==========================================================
   Header & navigation (all public pages)
   Heights are fixed to match existing page offsets:
     ≥768px: topbar 44 + bar 86 = 130px     <768px: bar 70px
   ========================================================== */
:root { --n-navy: #102B52; --n-navy-d: #091A34; --n-gold: #C5A15D; --n-ink: #0F172A; --n-muted: #475569; }
.n-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition: transform 250ms ease;
}
.n-header *, .n-drawer * { box-sizing: border-box; }
.n-wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; gap: 16px; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; padding: 10px 16px; background: #fff; color: var(--n-navy, #102B52); font-weight: 700; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ---------- Top bar ---------- */
.n-topbar { height: 44px; background: var(--n-navy-d); color: rgba(255,255,255,.85); font-size: 13px; overflow: hidden; transition: height 250ms ease; }
.n-topbar .n-wrap { justify-content: space-between; }
.n-topbar ul { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.n-topbar a { color: rgba(255,255,255,.9); text-decoration: none; }
.n-topbar a:hover { color: var(--n-gold); }
.n-topbar i { color: var(--n-gold); margin-right: 4px; }
.n-topbar__right { display: flex; align-items: center; gap: 14px; }
.n-topbar__right a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); }
.n-topbar__right a i { margin: 0; color: #fff; }

/* ---------- Main bar ---------- */
.n-bar { height: 86px; background: #fff; border-bottom: 1px solid rgba(16,43,82,.08); transition: height 250ms ease, box-shadow 250ms ease; }
.n-header.is-scrolled .n-bar { box-shadow: 0 6px 24px rgba(9,26,52,.10); }

.n-logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; flex-shrink: 0; }
.n-logo img { height: 58px; width: auto; transition: height 250ms ease; }
.n-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.n-logo__text strong { font-family: 'Fraunces', Georgia, serif; font-size: 20px; color: var(--n-navy, #102B52); letter-spacing: .01em; }
.n-logo__text small { font-size: 11px; font-weight: 600; color: #8A6A2F; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

/* ---------- Desktop menu ---------- */
.n-nav { margin-left: auto; }
.n-menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.n-item { position: relative; display: flex; align-items: center; }
.n-link {
  display: block; padding: 10px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--n-ink) !important; text-decoration: none !important;
  position: relative; transition: color 150ms ease, background 150ms ease;
}
.n-link::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--n-gold); transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.n-link:hover { color: var(--n-navy) !important; background: #F5F6F8; }
.n-item.is-active > .n-link { color: var(--n-navy) !important; }
.n-item.is-active > .n-link::after, .n-link:hover::after { transform: scaleX(1); }

.n-has-sub .n-link { padding-right: 4px; }
.n-subtoggle { width: 28px; height: 36px; border: 0; background: none; color: var(--n-muted); cursor: pointer; border-radius: 6px; font-size: 11px; }
.n-subtoggle i { transition: transform 200ms ease; }
.n-has-sub.is-open .n-subtoggle i { transform: rotate(180deg); }

.n-sub, .n-dropdown__panel {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 250px; padding: 8px;
  background: #fff; border: 1px solid rgba(16,43,82,.08); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(9,26,52,.16);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
.n-sub::before, .n-dropdown__panel::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.n-has-sub:hover .n-sub, .n-has-sub.is-open .n-sub, .n-has-sub:focus-within .n-sub,
.n-dropdown.is-open .n-dropdown__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.n-sub ul { list-style: none; margin: 0; padding: 0; }
.n-sub a, .n-dropdown__panel a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--n-ink) !important; font-size: 14px; font-weight: 600; text-decoration: none !important;
}
.n-sub a i, .n-dropdown__panel a i { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: #F7F1E3; color: var(--n-navy); font-size: 13px; }
.n-sub a:hover, .n-dropdown__panel a:hover { background: #F5F6F8; color: var(--n-navy) !important; }
.n-sub__all { margin-top: 4px; border-top: 1px solid rgba(16,43,82,.08); border-radius: 0 0 8px 8px !important; color: var(--n-navy) !important; font-size: 13px !important; }
.n-sub__all i { background: none !important; width: auto !important; height: auto !important; color: var(--n-gold) !important; }

/* ---------- Actions ---------- */
.n-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.n-dropdown { position: relative; }
.n-dropdown__panel { left: auto; right: 0; min-width: 220px; }
.n-dropdown__email { margin: 4px 12px 8px; font-size: 12px; color: var(--n-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-dropdown__panel .n-danger, .n-dropdown__panel .n-danger i { color: #B91C1C !important; }

.n-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1.1; white-space: nowrap;
  text-decoration: none !important; cursor: pointer; transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.n-btn:hover { transform: translateY(-1px); }
.n-btn--gold { background: var(--n-gold); color: var(--n-navy-d) !important; }
.n-btn--gold:hover { background: #D4B477; box-shadow: 0 6px 16px rgba(197,161,93,.35); }
.n-btn--ghost { background: #F5F6F8; color: var(--n-navy) !important; }
.n-btn--ghost:hover { background: #ECEEF2; }
.n-btn--outline { border-color: var(--n-navy); color: var(--n-navy) !important; background: #fff; }
.n-btn--wa { background: #15803D; color: #fff !important; }
.n-btn--block { width: 100%; }
.n-caret { font-size: 10px; transition: transform 200ms ease; }
.n-dropdown.is-open .n-caret { transform: rotate(180deg); }
.n-iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #F5F6F8; color: var(--n-navy); cursor: pointer; }

.n-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: #F5F6F8; cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.n-burger span { display: block; height: 2px; border-radius: 2px; background: var(--n-navy); }
.n-burger span:nth-child(2) { width: 70%; margin-left: auto; }

/* ---------- Drawer ---------- */
.n-overlay { position: fixed; inset: 0; z-index: 1090; background: rgba(6,18,36,.55); opacity: 0; transition: opacity 250ms ease; }
.n-overlay.is-open { opacity: 1; }
.n-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100; width: min(360px, 88vw);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; box-shadow: -12px 0 40px rgba(6,18,36,.25);
  font-family: 'Montserrat', system-ui, sans-serif;
  transform: translateX(100%); visibility: hidden; transition: transform 280ms ease, visibility 280ms;
}
.n-drawer.is-open { transform: translateX(0); visibility: visible; }
.n-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(16,43,82,.08); }
.n-drawer__head .n-logo img { height: 44px; }
.n-drawer__head .n-logo__text strong { font-size: 17px; }
.n-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: #F5F6F8; color: var(--n-navy, #102B52); font-size: 20px; cursor: pointer; }
.n-dmenu, .n-dsub { list-style: none; margin: 0; padding: 0; }
.n-dmenu { padding: 8px 12px; }
.n-dmenu > li { border-bottom: 1px solid rgba(16,43,82,.06); }
.n-dmenu a { display: flex; align-items: center; min-height: 52px; padding: 0 8px; font-size: 16px; font-weight: 600; color: #0F172A !important; text-decoration: none !important; }
.n-dmenu li.is-active > a, .n-dmenu li.is-active > .n-drow > a { color: #102B52 !important; box-shadow: inset 3px 0 0 #C5A15D; }
.n-drow { display: flex; align-items: center; }
.n-drow a { flex: 1; }
.n-dtoggle { width: 48px; height: 48px; border: 0; background: none; color: #475569; cursor: pointer; }
.n-dtoggle i { transition: transform 200ms ease; }
.n-dtoggle[aria-expanded="true"] i { transform: rotate(180deg); }
.n-dsub { padding: 0 0 8px 8px; }
.n-dsub a { min-height: 44px; font-size: 15px; font-weight: 500; gap: 10px; }
.n-dsub a i { width: 22px; text-align: center; color: #C5A15D; }
.n-drawer__cta { padding: 16px; display: grid; gap: 10px; }
.n-drawer__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.n-drawer__login { margin-top: auto; padding: 12px 16px 20px; display: grid; gap: 4px; background: #F5F6F8; }
.n-drawer__login a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #102B52 !important; font-weight: 600; text-decoration: none !important; }
html.n-lock, html.n-lock body { overflow: hidden; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1279px) {
  .n-link { padding: 10px 9px; font-size: 14px; }
  .n-logo__text strong { font-size: 18px; }
  .n-hide-md { display: none; }
}
@media (max-width: 1199px) {
  .n-logo__text { display: none; }
  .n-btn { padding: 10px 14px; }
}
@media (max-width: 991px) {
  .n-nav, .n-actions .n-dropdown { display: none; }
  .n-burger { display: flex; }
  .n-logo__text { display: flex; }
  .n-actions { margin-left: auto; }
}
@media (max-width: 767px) {
  .n-topbar { height: 0; }
  .n-bar { height: 70px; }
  .n-wrap { padding: 0 14px; gap: 10px; }
  .n-logo img { height: 46px; }
  .n-logo__text strong { font-size: 16px; }
  .n-logo__text small { font-size: 9.5px; }
  .n-cta { display: none; }
}
@media (max-width: 359px) {
  .n-logo__text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .n-header, .n-header *, .n-drawer, .n-overlay { transition: none !important; }
}

/* Hide legacy header pieces if any old markup remains */
.header, .menu.menu_mm { display: none !important; }
