/* ============================================================
   MENÚ v2 · PídeloPE
   Enlázalo DESPUÉS de index.css:
   <link rel="stylesheet" href="/nav.css?v=1">
   Y borra de index.css la sección vieja:
   desde "HEADER / NAVBAR PREMIUM" hasta antes de "RESTO DE ESTILOS".
   ============================================================ */

:root {
  --nav-bg: #0a1524;
  --nav-bg-2: #0f1d33;
  --nav-border: rgba(255, 255, 255, .08);
  --nav-text: #cbd5e1;
  --nav-accent: #5cc0e6;
  --nav-live: #ff2d55;
  --nav-h: 64px;
}

/* Tu index.css baja el tamaño con "* { font-size: .775em }" y se acumula en los
   elementos anidados. Aquí lo neutralizamos solo dentro del header y usamos px. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--nav-bg);
  color: #fff;
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  font-size: 14px;
}
.site-header * { font-size: inherit; }
.site-header ul { list-style: none; }
.site-header a,
.site-header button { font-family: var(--font-main, 'Poppins', sans-serif); }

.site-header .navbar {
  max-width: 1200px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header .logo { display: flex; align-items: center; flex-shrink: 0; }
.site-header .logo img { height: 40px; width: auto; display: block; transition: transform .25s ease; }
.site-header .logo:hover img { transform: scale(1.03); }

.site-header nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Lista principal (desktop) ---------- */
.site-header .nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--nav-h);
}
.site-header .nav-list > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.site-header .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 14px;
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}
.site-header .nav-link i {
  font-size: 14px;
  color: var(--nav-accent);
  opacity: .85;
  transition: opacity .2s ease;
}
.site-header .nav-link:hover,
.site-header .nav-link.active,
.site-header .has-sub.open > .nav-link { color: #fff; }
.site-header .nav-link:hover i { opacity: 1; }

/* Subrayado animado (activo / hover) */
.site-header .nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--nav-accent);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.site-header .nav-link:hover::after,
.site-header .nav-link.active::after { transform: scaleX(1); }

.site-header .nav-link .chev {
  font-size: 10px;
  margin-left: 2px;
  color: var(--nav-text);
  opacity: .6;
  transition: transform .25s ease;
}

/* Punto "en vivo" */
.site-header .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nav-live);
  animation: navPulse 1.6s infinite;
}
@keyframes navPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 45, 85, .6); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 45, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .live-dot { animation: none; }
}

/* ---------- Submenús ---------- */
.site-header .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 8px;
  background: var(--nav-bg-2);
  border: 1px solid var(--nav-border);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 10;
}
.site-header .submenu.align-right { left: auto; right: 0; }

.site-header .submenu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--nav-text);
  font-size: 14px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.site-header .submenu a i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--nav-accent);
}
.site-header .submenu .flag { width: 18px; text-align: center; font-size: 16px; }
.site-header .submenu a:hover,
.site-header .submenu a:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; }
.site-header .submenu a.active { background: rgba(92, 192, 230, .14); color: #fff; }

@media (min-width: 901px) {
  .site-header .has-sub:hover > .submenu,
  .site-header .has-sub.open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-header .has-sub:hover > .nav-link .chev,
  .site-header .has-sub.open > .nav-link .chev { transform: rotate(180deg); }
}

/* ---------- Redes sociales ---------- */
.site-header .nav-actions { display: flex; align-items: center; gap: 6px; }
.site-header .nav-actions-label { display: none; }
.site-header .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--nav-text);
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.site-header .social-link i { font-size: 16px; }
.site-header .social-link span { display: none; }
.site-header .social-link:hover { color: #fff; transform: translateY(-2px); }
.site-header .social-link.wa:hover { background: #25d366; }
.site-header .social-link.fb:hover { background: #1877f2; }
.site-header .social-link.tt:hover { background: #fe2c55; }

/* ---------- Accesibilidad ---------- */
.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: -2px;
  border-radius: 8px;
}

/* ---------- Botón hamburguesa ---------- */
.site-header .menu-toggle {
  display: none;
  position: relative;
  z-index: 3;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
}
.site-header .menu-toggle i { font-size: 20px; }

/* ---------- Overlay del menú móvil ---------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  z-index: 9998;
}
.nav-overlay.show { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* =========================================================
   MÓVIL / TABLET: menú lateral deslizante
   ========================================================= */
@media (max-width: 900px) {
  .site-header .menu-toggle { display: flex; }

  .site-header nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: min(86vw, 340px);
    height: 100vh;
    height: 100dvh;
    padding: var(--nav-h) 0 24px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
    background: var(--nav-bg);
    border-left: 1px solid var(--nav-border);
    box-shadow: -20px 0 50px rgba(0, 0, 0, .5);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.25, .8, .25, 1), visibility .3s;
  }
  .site-header nav.open { transform: none; visibility: visible; }

  .site-header .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    padding: 8px 0;
  }
  .site-header .nav-list > li {
    display: block;
    height: auto;
    border-bottom: 1px solid var(--nav-border);
  }

  .site-header .nav-link {
    width: 100%;
    height: auto;
    min-height: 52px;
    padding: 14px 22px;
    font-size: 16px;
  }
  .site-header .nav-link i { width: 22px; text-align: center; font-size: 16px; }
  .site-header .nav-link::after { display: none; }
  .site-header .nav-link.active {
    background: rgba(92, 192, 230, .12);
    box-shadow: inset 3px 0 0 var(--nav-accent);
  }
  .site-header .has-sub > .nav-link .chev { margin-left: auto; width: auto; font-size: 12px; }
  .site-header .has-sub.open > .nav-link .chev { transform: rotate(180deg); }

  /* Acordeón */
  .site-header .submenu,
  .site-header .submenu.align-right {
    position: static;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    background: rgba(0, 0, 0, .25);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height .35s ease, padding .35s ease;
  }
  .site-header .has-sub.open > .submenu { max-height: 480px; padding: 8px 12px; }
  .site-header .submenu a { padding: 13px 12px 13px 34px; font-size: 15px; }

  /* Redes al fondo del panel */
  .site-header .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: auto;
    padding: 18px 22px 0;
  }
  .site-header .nav-actions-label {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .site-header .social-link {
    width: auto;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    justify-content: flex-start;
  }
  .site-header .social-link span { display: inline; font-size: 15px; }
}