/* ══════════════════════════════════════════════
   MENÚ PRINCIPAL — Nacional de Carpas
   Desktop + Responsive
   ══════════════════════════════════════════════ */

:root {
  --nav-h:      72px;
  --gold:       #C9A84C;
  --gold-dark:  #a8892e;
  --gold-light: rgba(201,168,76,.08);
  --ink:        #1a1a2e;
  --muted:      #4a5568;
  --border:     rgba(0,0,0,.07);
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wrapper ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  z-index: 1000;
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}

/* Línea dorada superior */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-dark) 20%, var(--gold) 50%, var(--gold-dark) 80%, transparent 100%);
  pointer-events: none;
}

/* Transparente sobre hero: texto blanco (solo en páginas con .hero) */
body:has(.hero) .site-header:not(.scrolled) .nav-link        { color: rgba(255,255,255,.92); }
body:has(.hero) .site-header:not(.scrolled) .nav-link:hover  { color: var(--gold); background: rgba(255,255,255,.08); }
body:has(.hero) .site-header:not(.scrolled) .nav-toggle span { background: #fff; }
body:has(.hero) .site-header:not(.scrolled) .nav-cta {
  background: rgba(201,168,76,.18);
  color: #fff;
  border: 1px solid rgba(201,168,76,.55);
  box-shadow: none;
}
body:has(.hero) .site-header:not(.scrolled) .nav-cta:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* Sólido al hacer scroll */
.site-header.scrolled {
  background: rgba(3,3,3, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,168,76,.15);
  box-shadow: 0 1px 0 rgba(201,168,76,.1), 0 4px 6px rgba(0,0,0,.03), 0 12px 32px rgba(0,0,0,.07);
}
.site-header.scrolled .nav-link { color: #fff; }

/* ── Nav row ──────────────────────────────────── */
.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ── Logo ──────────────────────────────────────── */
.nav-logo { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo img { height: 140px; width: auto; display: block; margin-top: 40px; filter: drop-shadow(0 0 4px rgba(0,0,0,0.85)); }

/* ── Desktop links ─────────────────────────────── */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  position: relative;
  transition: color .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s var(--ease);
}
.nav-link:hover,
.nav-link.active        { color: var(--gold-dark); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover         { background: var(--gold-light); }

.chevron {
  width: 13px; height: 13px;
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}
.has-dropdown:hover .chevron,
.has-dropdown:focus-within .chevron { transform: rotate(180deg); }

/* ── Dropdown ──────────────────────────────────── */
.has-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  list-style: none;
  margin: 0;
  padding: 12px 8px 8px;
  min-width: 260px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13), 0 0 0 1px var(--border);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-decoration: none;
  border-radius: 10px;
  transition: background .2s var(--ease);
}
.dd-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--gold-light); color: var(--gold-dark); flex-shrink: 0; }
.dropdown-menu li a strong {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.dropdown-menu li a small {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  margin-top: 1px;
}
.dropdown-menu li a:hover { background: var(--gold-light); }
.dropdown-menu li a:hover strong { color: var(--gold-dark); }

/* Separador entre items */
.dropdown-menu li + li { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 2px; }

/* ── CTA button ────────────────────────────────── */
.nav-cta {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: .87rem;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(201,168,76,.35);
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.nav-cta:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,.45);
}
.nav-cta:active { transform: translateY(0); }

/* ── Hamburger button ──────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  margin-left: auto;
  flex-shrink: 0;
  transition: background .2s var(--ease);
}
.nav-toggle:hover { background: rgba(0,0,0,.05); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile overlay ────────────────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,15,25,.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1001;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.mobile-overlay.visible {
  display: block;
  opacity: 1;
}

/* ── Mobile drawer ─────────────────────────────── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -110%;
  width: min(300px, 82vw);
  height: 100%;
  background: #fff;
  z-index: 1002;
  padding: calc(var(--nav-h) + 20px) 16px 32px;
  overflow-y: auto;
  transition: right .32s var(--ease);
  box-shadow: -6px 0 40px rgba(0,0,0,.15);
}
.mobile-drawer.open { right: 0; }

.mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mobile-close:hover { background: rgba(201,168,76,.15); color: var(--gold-dark); }

.mobile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Links principales */
.mobile-links > li > a,
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  color: var(--ink);
  font-size: .97rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
  text-align: left;
}
.mobile-links > li > a:hover,
.mobile-dropdown-toggle:hover {
  background: rgba(0,0,0,.04);
  color: var(--gold-dark);
}

.mobile-dropdown-toggle svg {
  width: 16px; height: 16px; flex-shrink: 0;
  transition: transform .25s var(--ease);
}
.mobile-has-dropdown.open .mobile-dropdown-toggle svg { transform: rotate(180deg); }

/* Sub-menú móvil */
.mobile-dropdown {
  display: none;
  list-style: none;
  margin: 4px 0 4px 12px;
  padding: 0;
  border-left: 2px solid rgba(201,168,76,.35);
  padding-left: 12px;
}
.mobile-has-dropdown.open .mobile-dropdown { display: block; }
.mobile-dropdown li a {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mobile-dropdown li a:hover {
  background: var(--gold-light);
  color: var(--ink);
}

/* CTA móvil */
.mobile-cta-link {
  display: block;
  margin-top: 16px;
  background: var(--gold) !important;
  color: var(--ink) !important;
  text-align: center;
  border-radius: 50px !important;
  font-weight: 700 !important;
  padding: 14px 16px !important;
  box-shadow: 0 4px 14px rgba(201,168,76,.38);
  transition: background .25s var(--ease), transform .25s var(--ease) !important;
}
.mobile-cta-link:hover {
  background: var(--gold-dark) !important;
  transform: translateY(-1px) !important;
}

/* Separador visual en móvil */
.mobile-links > li + li {
  border-top: 1px solid rgba(0,0,0,.05);
  padding-top: 2px;
}

/* ── Responsive breakpoint ─────────────────────── */
@media (max-width: 920px) {
  .nav-links,
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .nav-container { padding: 0 16px; gap: 0; }
 
}
