/* ═══════════════════════════════════════════
   MAROON HOSTING — MEGA MENU
   Robert Walters-style navigation
   ═══════════════════════════════════════════ */

/* ── Reset base nav ── */
nav {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  height: 72px;
  padding: 0 48px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  background: rgba(250,246,240,0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

/* ── Top-level nav list ── */
.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  list-style: none;
  margin: 0; padding: 0;
  gap: 0;
}

/* ── Each top-level item ── */
.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
  position: static;
}

.nav-item > a,
.nav-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-top: none; border-left: none; border-right: none;
  background: none;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  position: relative;
}

.nav-item > a:hover,
.nav-trigger:hover,
.nav-item.is-open > .nav-trigger,
.nav-item > a.active {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}

/* chevron SVG */
.nav-chevron {
  width: 12px; height: 12px;
  transition: transform 0.22s ease;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}
.nav-item.is-open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* CTA button */
.nav-cta-btn {
  margin-left: 12px;
  padding: 10px 22px;
  background: var(--maroon);
  color: white !important;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  box-shadow: 0 4px 16px rgba(107,18,37,0.22);
}
.nav-cta-btn:hover {
  background: var(--maroon-light) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   MEGA PANEL
   ═══════════════════════════════════════════ */
.mega-panel {
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(26,20,16,0.12);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  pointer-events: none;
}
.mega-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 48px 48px;
}

/* Section label above columns */
.mega-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mega-eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Grid layouts */
.mega-grid {
  display: grid;
  gap: 0 32px;
}
.mega-grid-4 { grid-template-columns: repeat(4, 1fr); }
.mega-grid-3 { grid-template-columns: repeat(3, 1fr) 280px; } /* last col = featured card */
.mega-grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Column heading */
.mega-col-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Individual link */
.mega-link {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.15s;
  cursor: pointer;
}
.mega-link:hover {
  background: var(--cream);
}
.mega-link:hover .ml-title {
  color: var(--maroon);
}

.ml-icon {
  width: 36px; height: 36px;
  background: rgba(107,18,37,0.07);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.mega-link:hover .ml-icon {
  background: rgba(107,18,37,0.14);
}

.ml-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 2px;
  line-height: 1.3;
  transition: color 0.15s;
}
.ml-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Featured card (right column) */
.mega-featured {
  background: var(--maroon);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  text-decoration: none;
  transition: background 0.2s;
}
.mega-featured:hover { background: var(--maroon-light); }

.mf-tag {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.mf-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}
.mf-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 600;
  transition: gap 0.18s;
}
.mega-featured:hover .mf-cta { gap: 10px; }

/* ═══════════════════════════════════════════
   BACKDROP OVERLAY
   ═══════════════════════════════════════════ */
.mega-backdrop {
  position: fixed;
  inset: 72px 0 0 0;
  background: rgba(26,20,16,0.3);
  backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0s linear 0.22s;
}
.mega-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s;
}

/* ═══════════════════════════════════════════
   MOBILE HAMBURGER
   ═══════════════════════════════════════════ */
.ham-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}
.ham-btn:hover { background: var(--cream); }
.ham-line {
  display: block;
  width: 22px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.25s;
  transform-origin: center;
}
.ham-btn.is-open .ham-line:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.ham-btn.is-open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ham-btn.is-open .ham-line:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ═══════════════════════════════════════════
   MOBILE DRAWER
   ═══════════════════════════════════════════ */
.mob-drawer {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: white;
  z-index: 1001;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 40px rgba(0,0,0,0.15);
}
.mob-drawer.is-open { transform: translateX(0); }

.mob-drawer-inner { padding: 16px 20px 40px; }

.mob-section { margin-bottom: 8px; }

.mob-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  transition: background 0.15s;
}
.mob-acc-btn:hover { background: var(--cream); }
.mob-acc-chevron {
  width: 14px; height: 14px;
  stroke: var(--text-muted); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.mob-section.is-open .mob-acc-chevron { transform: rotate(180deg); }

.mob-acc-body {
  display: none;
  padding: 4px 8px 12px;
}
.mob-section.is-open .mob-acc-body { display: block; }

.mob-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.mob-link:hover { background: var(--cream); color: var(--maroon); }
.mob-link-icon { font-size: 16px; flex-shrink: 0; }
.mob-link-text {}
.mob-link-title { font-size: 14px; font-weight: 600; }
.mob-link-sub { font-size: 12px; color: var(--text-muted); }

.mob-plain-link {
  display: block;
  padding: 13px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  transition: background 0.15s;
}
.mob-plain-link:hover { background: var(--cream); color: var(--maroon); }

.mob-cta {
  display: block;
  text-align: center;
  background: var(--maroon);
  color: white !important;
  padding: 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  margin-top: 16px;
  transition: background 0.2s;
  box-shadow: 0 4px 20px rgba(107,18,37,0.25);
}
.mob-cta:hover { background: var(--maroon-light) !important; }

.mob-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Page offset for fixed nav */
body { padding-top: 72px; }
.page-hero { padding-top: 40px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .nav-inner, .nav-cta-btn { display: none !important; }
  .ham-btn { display: flex !important; }
  .mob-drawer { display: block; }
}

@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .mega-inner { padding: 28px 20px 32px; }
}

/* ═══════════════════════════════════════════
   LOGIN DROPDOWN
   ═══════════════════════════════════════════ */
.login-dropdown {
  position: relative;
  margin-right: 6px;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.login-btn:hover,
.login-dropdown.is-open .login-btn {
  border-color: var(--maroon);
  color: var(--maroon);
  background: rgba(107,18,37,0.04);
}
.login-icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
}
.login-chevron {
  width: 11px; height: 11px;
  opacity: 0.5;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.login-dropdown.is-open .login-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown menu */
.login-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 56px rgba(26,20,16,0.14), 0 4px 16px rgba(26,20,16,0.06);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 1100;
}
.login-dropdown.is-open .login-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-menu-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 10px 10px;
}

.login-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 9px;
  text-decoration: none;
  transition: background 0.14s;
  cursor: pointer;
}
.login-option:hover {
  background: var(--cream);
}
.login-option:hover .lo-title {
  color: var(--maroon);
}
.lo-icon {
  font-size: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  border-radius: 8px;
  flex-shrink: 0;
}
.lo-text { flex: 1; }
.lo-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  transition: color 0.14s;
  line-height: 1.3;
}
.lo-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.login-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}
.login-option-create .lo-icon {
  background: rgba(107,18,37,0.08);
}
.login-option-create .lo-title {
  color: var(--maroon);
}

/* Mobile login section */
.mob-login-section {
  padding: 12px 12px 0;
}
.mob-login-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mob-login-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mob-login-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  transition: background 0.14s, color 0.14s;
}
.mob-login-link:hover { background: var(--cream); color: var(--maroon); }
.mob-login-link.create {
  background: rgba(107,18,37,0.06);
  color: var(--maroon);
  font-weight: 600;
  margin-top: 4px;
}
.mob-login-link.create:hover { background: rgba(107,18,37,0.1); }

/* ═══════════════════════════════════════════
   NAV CONTAINER  — constrains nav content
   ═══════════════════════════════════════════ */
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 0;
}

/* Nav takes full width, inner content constrained */
nav {
  padding: 0 40px !important;
  justify-content: center !important;
}

@media (max-width: 640px) {
  nav { padding: 0 20px !important; }
}
