/* ===== MENÚ RESPONSIVO MEJORADO PARA CHROMEBOOKS PEQUEÑAS ===== */

/* Variables CSS para el menú - barra negra, letras blancas sencillas */
/* --barra-altura se define en barra_superior.css (46/44/42px por breakpoint) */
:root {
  --menu-bg-color: #5ACDD1;
  --menu-text-color: #ffffff;
  --menu-hover-color: rgba(255, 255, 255, 0.85);
  --menu-active-color: #ffffff;
  --menu-shadow: none;
  --menu-transition: color 0.2s ease;
  --menu-border-radius: 0;
  --menu-altura: 72px;
  /* Espacio para barra + menú (una sola línea compacta como en referencia) */
  --header-total: calc(var(--barra-altura, 46px) + 72px);
}

/* ===== MEJORAS PARA EL MENÚ PRINCIPAL ===== */

/* Botón hamburguesa mejorado */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--menu-text-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--menu-border-radius);
  transition: var(--menu-transition);
  position: relative;
  z-index: 10001;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.menu-toggle:active {
  transform: scale(0.95);
}

/* Navegación mejorada */
.navegacion {
  display: flex;
  background-color: var(--menu-bg-color);
  transition: var(--menu-transition);
  box-shadow: var(--menu-shadow);
}

.navegacion ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  align-items: center;
}

.navegacion li a {
  text-decoration: none;
  color: var(--menu-text-color);
  font-weight: 500;
  font-size: 16px;
  font-family: Arial, sans-serif;
  padding: 0.25rem 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.navegacion li a:hover {
  color: var(--menu-hover-color);
}

/* Opción activa - sin raya/franja blanca: sin borde, outline, sombra ni subrayado */
.navegacion li.nav-activo > a,
.navegacion .dropdown.nav-activo > a {
  color: #fff;
  font-weight: 600;
  border: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  padding-bottom: 0.4rem;
}
.navegacion .submenu li.nav-activo a {
  color: #fff;
  font-weight: 500;
}

/* Iconos en el menú (proporcionales al texto) */
.navegacion li a i {
  font-size: 1.05em;
  min-width: 1.05em;
  text-align: center;
  margin-top: 5px;
}

/* Enlaces solo icono (Inicio, Nosotros, Motor de Reservas): área de clic cómoda */
.navegacion li a[title="Inicio"],
.navegacion li a[title="Nosotros"],
.navegacion li a[title="Motor de Reservas"] {
  padding: 0.4rem 0.5rem;
}

/* Texto en enlaces que en desktop solo muestran icono - visible solo en panel móvil */
.nav-texto-movil {
  display: none;
}

/* ===== RESPONSIVE DESIGN MEJORADO ===== */

/* Overlay oscuro cuando el menú está abierto (solo móvil) */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.menu-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 1025px) {
  .menu-overlay { display: none !important; }
}

/* Overlay en dispositivos pequeños - más suave para no tapar tanto */
@media (max-width: 768px) {
  .menu-overlay {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease;
  }
}

/* Tablets y móviles (<=1024px) - menú hamburguesa como panel lateral */
@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
  
  /* Cuando el menú está abierto, la línea (header+nav) debe estar por encima del overlay */
  .linea:has(.navegacion.active) {
    z-index: 10002;
  }
  
  /* Mostrar texto en Inicio, Motor, etc. dentro del panel móvil */
  .nav-texto-movil {
    display: inline;
    margin-left: 0.35rem;
  }
  
  .linea {
    justify-content: space-between;
  }
  
  .navegacion {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: min(78%, 280px);
    height: 100vh;
    background: linear-gradient(180deg, var(--menu-bg-color) 0%, rgba(90, 205, 209, 0.98) 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    padding-top: calc(var(--barra-altura, 46px) + var(--menu-altura, 72px) + 1rem);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border-radius: 0 16px 16px 0;
    box-shadow: none;
    overflow-y: auto;
  }
  
  .navegacion.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }
  
  .navegacion ul {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    max-width: none;
    text-align: left;
  }
  
  .navegacion li {
    width: 100%;
  }
  
  .navegacion li a {
    font-size: clamp(1.05rem, 4.5vw, 1.2rem);
    padding: 0.9rem 1.1rem;
    justify-content: flex-start;
    border: none;
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: rgba(255,255,255,0.2);
  }
  
  .navegacion li a i {
    font-size: 1.15em;
    min-width: 1.4em;
  }
  
  .navegacion li a:hover {
    border-left-color: var(--menu-hover-color);
    background-color: rgba(255, 255, 255, 0.12);
    transform: none;
  }
  
  .navegacion li.nav-activo > a,
  .navegacion .dropdown.nav-activo > a {
    border-left-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Chromebooks muy pequeñas (<=900px) */
@media (max-width: 900px) {
  .navegacion ul {
    gap: 0.35rem;
  }
  
  .navegacion li a {
    font-size: 1.05rem;
    padding: 0.8rem 1rem;
  }
  
  .menu-toggle {
    font-size: 1.6rem;
    padding: 0.4rem;
  }
}

/* ===== REDISEÑO PREMIUM SOLO DISPOSITIVOS PEQUEÑOS (<=768px) ===== */
@media (max-width: 768px) {
  /* Menú lateral: empieza donde termina el header, termina al fondo de la pantalla */
  .navegacion {
    width: min(68%, 340px);
    top: calc(var(--barra-altura, 46px) + var(--menu-altura, 72px));
    left: 0;
    height: calc(100vh - var(--barra-altura, 46px) - var(--menu-altura, 72px));
    transform: translateX(-100%);
    background: linear-gradient(180deg, #072e32 0%, #0a3d42 40%, #0c4a50 100%);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
    border-radius: 0 28px 28px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  .navegacion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(255,159,67,0.08) 0%, transparent 100%);
    pointer-events: none;
  }
  
  .navegacion.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  }
  
  .navegacion ul {
    gap: 0.35rem;
    position: relative;
    z-index: 1;
  }
  
  .navegacion li {
    opacity: 0;
    transform: translateX(-20px);
  }
  
  .navegacion.active li {
    animation: navItemReveal 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  }
  .navegacion.active li:nth-child(1) { animation-delay: 0.05s; }
  .navegacion.active li:nth-child(2) { animation-delay: 0.08s; }
  .navegacion.active li:nth-child(3) { animation-delay: 0.11s; }
  .navegacion.active li:nth-child(4) { animation-delay: 0.14s; }
  .navegacion.active li:nth-child(5) { animation-delay: 0.17s; }
  .navegacion.active li:nth-child(6) { animation-delay: 0.2s; }
  .navegacion.active li:nth-child(7) { animation-delay: 0.23s; }
  .navegacion.active li:nth-child(8) { animation-delay: 0.26s; }
  .navegacion.active li:nth-child(9) { animation-delay: 0.29s; }
  .navegacion.active li:nth-child(10) { animation-delay: 0.32s; }
  .navegacion.active li:nth-child(11) { animation-delay: 0.35s; }
  .navegacion.active li:nth-child(12) { animation-delay: 0.38s; }
  .navegacion.active li:nth-child(13) { animation-delay: 0.41s; }
  .navegacion.active li:nth-child(14) { animation-delay: 0.44s; }
  .navegacion.active li:nth-child(15) { animation-delay: 0.47s; }
  
  @keyframes navItemReveal {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .navegacion li a {
    font-size: 0.98rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    min-height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid transparent;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
  }
  
  .navegacion li a:active {
    transform: scale(0.98);
  }
  
  .navegacion li a i {
    font-size: 1.15em;
    min-width: 1.4em;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-right: 0.5rem;
  }
  
  .navegacion li a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
  }
  
  .navegacion li.nav-activo > a,
  .navegacion .dropdown.nav-activo > a {
    background: rgba(255, 159, 67, 0.15);
    border-left-color: #ff9f43;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 159, 67, 0.15);
  }
  
  .navegacion li.nav-activo > a i,
  .navegacion .dropdown.nav-activo > a i {
    background: rgba(255, 159, 67, 0.25);
  }
  
  .menu-toggle {
    font-size: 1.7rem;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .contador-burbuja {
    background: #ff9f43 !important;
    color: #072e32 !important;
  }
  
  .navegacion .submenu a {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(255, 255, 255, 0.1);
  }
  .navegacion .submenu a:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Móviles (<=480px) */
@media (max-width: 480px) {
  .navegacion {
    width: min(68%, 300px);
    padding: 1rem 0.9rem;
    border-radius: 0 24px 24px 0;
  }
  
  .navegacion ul {
    gap: 0.3rem;
  }
  
  .navegacion li a {
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
    min-height: 42px;
    border-radius: 12px;
  }
  
  .navegacion li a i {
    font-size: 1.1em;
    min-width: 1.35em;
    height: 30px;
  }
}

/* Móviles muy pequeños (<=360px) */
@media (max-width: 360px) {
  .navegacion {
    width: min(70%, 270px);
    padding: 0.9rem 0.75rem;
  }
  
  .navegacion li a {
    font-size: 0.92rem;
    padding: 0.65rem 0.8rem;
    min-height: 40px;
  }
  
  .navegacion li a i {
    font-size: 1.05em;
    min-width: 1.3em;
    height: 28px;
  }
}

/* ===== MEJORAS PARA EL HEADER ===== */

/* Header responsivo - top = barra superior (var(--barra-altura) desde barra_superior.css) */
/* Logo siempre a la izquierda; menú a la derecha. Sin raya blanca debajo. */
.linea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0.5rem clamp(0.5rem, 1.5vw, 1rem);
  height: var(--menu-altura);
  min-height: var(--menu-altura);
  top: var(--barra-altura, 46px);
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--menu-bg-color);
  box-shadow: none;
  border: none;
  border-bottom: none;
  position: fixed;
  z-index: 9998;
  overflow: visible;
  margin-bottom: -4px;
  outline: none;
}
/* Sin franja entre menú y contenido: banda turquesa que tapa cualquier línea */
.linea::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--menu-bg-color);
  pointer-events: none;
  z-index: 1;
}

/* Logo fijo en la esquina izquierda, más grande y visible */
.linea > a:first-of-type {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 360px;
  position: relative;
  z-index: 10001;
}

.linea .logo {
  object-fit: contain;
  margin-top: 12px;
  height: 110px;
  width: auto;
  max-width: 100%;
  max-height: none;
  display: block;
  vertical-align: middle;
}

.logo {
  height: 110px;
  width: auto;
}

/* Navegación: una sola fila, ítems centrados (como referencia segunda foto) */
.navegacion {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
  max-width: 100%;
  overflow: visible;
  display: flex;
  justify-content: center;
}

.navegacion ul {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  column-gap: 0.3rem;
  row-gap: 0;
}

.navegacion li a {
  white-space: nowrap;
  padding: 0.25rem 0.35rem;
  font-size: 16px;
}

/* Responsive: logo y letras escalan; sin raya bajo la barra */
@media (max-width: 1024px) {
  :root {
    --menu-altura: 56px;
  }
  .linea {
    padding: 0 0.75rem;
    height: var(--menu-altura);
    top: var(--barra-altura, 46px);
    border: none;
    border-bottom: none;
  }
  .linea .logo,
  .logo {
    height: 64px;
  }
  .navegacion li a {
    font-size: 13px;
  }
  .navegacion ul {
    column-gap: 0.25rem;
  }
}

@media (max-width: 768px) {
  :root {
    --menu-altura: 64px;
  }
  .linea {
    padding: 0 0.75rem;
    height: var(--menu-altura);
    top: var(--barra-altura, 44px);
  }
  .linea .logo,
  .logo {
    height: 58px;
  }
  /* No sobrescribir estilos del menú lateral premium */
}

@media (max-width: 480px) {
  :root {
    --menu-altura: 60px;
  }
  .linea {
    padding: 0 0.5rem;
    height: var(--menu-altura);
    top: var(--barra-altura, 42px);
  }
  .linea .logo,
  .logo {
    height: 52px;
  }
  .navegacion li a {
    font-size: 12px;
  }
  .navegacion ul {
    column-gap: 0.18rem;
  }
}

@media (max-width: 360px) {
  :root {
    --menu-altura: 56px;
  }
  .linea {
    height: var(--menu-altura);
  }
  .linea .logo,
  .logo {
    height: 48px;
  }
  .navegacion li a {
    font-size: 11px;
  }
}

/* ===== MEJORAS PARA DROPDOWNS ===== */

/* Dropdowns responsivos */
.navegacion .dropdown {
  position: relative;
}

.navegacion .dropdown .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--menu-bg-color);
  box-shadow: var(--menu-shadow);
  border-radius: var(--menu-border-radius);
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 1000;
  animation: fadeInDropdown 0.2s ease-out;
}

.navegacion .dropdown:hover .submenu {
  display: block;
}

.navegacion .submenu li {
  display: block;
}

.navegacion .submenu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--menu-text-color);
  text-decoration: none;
  transition: var(--menu-transition);
  border-radius: 0;
}

.navegacion .submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--menu-hover-color);
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdowns en móvil */
@media (max-width: 1024px) {
  .navegacion .dropdown .submenu {
    position: static;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 0.5rem;
    display: none;
  }
  
  .navegacion .dropdown.active .submenu {
    display: block;
  }
  
  .navegacion .submenu a {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
  }
  
  .navegacion .submenu a:hover {
    border-left-color: var(--menu-hover-color);
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */

/* Focus visible para navegación por teclado */
.navegacion li a:focus,
.menu-toggle:focus {
  outline: 2px solid var(--menu-hover-color);
  outline-offset: 2px;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
  .navegacion,
  .navegacion li a,
  .menu-toggle,
  .logo {
    transition: none;
  }
  .navegacion li {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  @keyframes slideInMenu {
    from, to {
      opacity: 1;
      transform: none;
    }
  }
  
  @keyframes fadeInDropdown {
    from, to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ===== MEJORAS PARA PANTALLAS DE ALTA DENSIDAD ===== */

/* Soporte para pantallas retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navegacion li a {
    font-weight: 600;
  }
  
  .menu-toggle {
    font-weight: bold;
  }
}

/* ===== MEJORAS PARA ORIENTACIÓN LANDSCAPE EN MÓVILES ===== */

@media (max-width: 900px) and (orientation: landscape) {
  .navegacion {
    padding: 1rem;
  }
  
  .navegacion ul {
    max-width: 600px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .navegacion li {
    width: auto;
  }
  
  .navegacion li a {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
}

/* ===== CONTENIDO PRINCIPAL: espacio bajo barra + menú (evita disparejo) ===== */
/* Superposición de 2px para eliminar la rallita blanca entre menú y foto */
.hero,
.video-container {
  margin-top: calc(var(--header-total) - 2px) !important;
}
.hero {
  height: calc(100vh - var(--header-total) + 2px) !important;
}
.video-container {
  top: var(--header-total) !important;
  height: calc(100vh - var(--header-total)) !important;
} 