/* ═══════════════════════════════════════════════════════════════
   05 · PRIMARY NAVIGATION
   Centered menu · full-width mega-menus that don't distort
   ═══════════════════════════════════════════════════════════════ */

.nav-primary {
  background: var(--navy-800);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  position: relative;            /* containing block for mega menus */
}

/* The nav row · items CENTERED · aux floats absolute on the right */
.nav-primary__inner {
  display: flex;
  align-items: stretch;
  justify-content: center;       /* ← centers menu items horizontally */
  height: var(--nav-h);
  position: relative;
}

.nav-item {
  /* important: NO position: relative here.
     We want the mega to be positioned against .nav-primary, not .nav-item,
     so all mega-menus open at the same centered position. */
}

.nav-item__link {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease);
  position: relative;
  text-decoration: none;
}
.nav-item__link::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-item:hover  .nav-item__link,
.nav-item.is-open .nav-item__link { color: var(--gold-400); }

.nav-item:hover  .nav-item__link::after,
.nav-item.is-open .nav-item__link::after { transform: scaleX(1); }

.nav-item__chev {
  width: 10px;
  height: 10px;
  transition: transform 0.3s var(--ease);
}
.nav-item:hover  .nav-item__chev,
.nav-item.is-open .nav-item__chev { transform: rotate(180deg); }

/* ╭─────────────────────────────────────────────────╮
   │ MEGA MENUS                                       │
   │ All position to .nav-primary (not nav-item),     │
   │ open as a single full-container-width panel.     │
   │ This is what prevents layout distortion.         │
   ╰─────────────────────────────────────────────────╯ */
.mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);

  width: calc(100% - (var(--container-pad) * 2));
  max-width: var(--container);

  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--gold-500);

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease),
    visibility 0s linear 0.28s;

  z-index: var(--z-mega);
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}

.nav-item:hover .mega,
.nav-item.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease),
    visibility 0s;
}

/* Mega grid layout */
.mega__grid     { display: grid; gap: 0; }
.mega__col      { padding: 32px; border-right: 1px solid var(--line); }
.mega__col:last-child { border-right: 0; }

.mega__title {
  font-family: 'DM Sans', Georgia, serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold-600);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mega__title::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--gold-500);
}

.mega__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 12px;
  margin-left: -12px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  border-left: 2px solid transparent;
  border-radius: 2px;
}
.mega__link:hover {
  color: var(--navy-800);
  background: var(--navy-100);
  border-left-color: var(--gold-500);
  padding-left: 14px;
}
.mega__link__arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s var(--ease);
  color: var(--gold-500);
  font-size: 14px;
}
.mega__link:hover .mega__link__arrow {
  opacity: 1;
  transform: translateX(0);
}
.mega__link__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--amber-500);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 8px;
}
.mega__link__badge--new { background: var(--gold-500); }

/* ─── Mega featured panel (right column with image + CTA) ─── */
.mega__featured {
  background: var(--navy-800);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mega__featured__img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.mega__featured__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(24, 41, 64, 0.95) 100%);
}
.mega__featured__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  z-index: 1;
}
.mega__featured__body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.mega__featured__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 6px;
}
.mega__featured__meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mega__featured__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.mega__featured__price__from {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}
.mega__featured__price__num {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-400);
  letter-spacing: -0.02em;
}
.mega__featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-500);
  align-self: flex-start;
  margin-top: auto;
  transition: gap 0.25s var(--ease);
}
.mega__featured__cta:hover { gap: 14px; }

/* ─── Mega backdrop · subtle blur when mega is open ─── */
.mega-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 46, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  z-index: 40;
}
.mega-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease);
}

/* ╭─────────────────────────────────────────────────╮
   │ Nav-aux: Search + Book Now floated absolute      │
   │ to the right so menu items stay perfectly        │
   │ centered.                                        │
   ╰─────────────────────────────────────────────────╯ */
.nav-aux {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  z-index: var(--z-nav-aux);
}
.nav-aux__btn {
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s var(--ease);
}
.nav-aux__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-400);
}
.nav-aux__btn--accent {
  background: var(--gold-500);
  color: var(--navy-900);
  border-left: 0;
}
.nav-aux__btn--accent:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}

/* ───────────────────────────────────────────────
   More dynamic mega-menu open + page blur scrim
   ─────────────────────────────────────────────── */
.mega {
  transform: translateX(-50%) translateY(14px) scale(0.985);
  transform-origin: top center;
}
.nav-item:hover .mega,
.nav-item.is-open .mega {
  transform: translateX(-50%) translateY(0) scale(1);
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}
/* staggered, lively entrance of mega columns */
.nav-item:hover .mega__col,
.nav-item:hover .mega__featured,
.nav-item.is-open .mega__col,
.nav-item.is-open .mega__featured {
  animation: megaColIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nav-item .mega__col:nth-child(2) { animation-delay: 0.04s; }
.nav-item .mega__col:nth-child(3) { animation-delay: 0.08s; }
.nav-item .mega__col:nth-child(4) { animation-delay: 0.12s; }
@keyframes megaColIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page-behind blur scrim — appears when any mega is hovered/open */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-float); /* 90: below header (100) + mega, above page */
  background: rgba(11, 30, 53, 0.30);
  -webkit-backdrop-filter: blur(5px) saturate(0.95);
          backdrop-filter: blur(5px) saturate(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}
.site-header:has(.nav-item:hover) ~ .nav-scrim,
.site-header:has(.nav-item.is-open) ~ .nav-scrim {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 1024px) {
  .nav-scrim { display: none; } /* desktop hover only */
}
@media (prefers-reduced-motion: reduce) {
  .nav-scrim { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-item:hover .mega__col, .nav-item.is-open .mega__col { animation: none; }
}

/* ─── Underline reveal on mega sub-links (matches top-nav) ─── */
.mega__link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.25s var(--ease);
}
.mega__link:hover {
  text-decoration-color: var(--gold-500);
}
/* topbar + footer links: same tasteful underline reveal */
.topbar__links a, .footer a:not(.btn):not(.site-logo):not(.footer__cert-logo) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.25s var(--ease);
}
.topbar__links a:hover, .footer a:not(.btn):not(.site-logo):not(.footer__cert-logo):hover {
  text-decoration-color: var(--gold-500);
}
