/*
  Archivo: estilos.css
  Estilos modernizados para el sitio web de viajes
*/

/* Animaciones personalizadas */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in {
  animation: fadeIn 1s ease-in-out;
}
@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Card hover effect */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Accordion content */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.accordion-content.active {
  max-height: 500px;
  transition: max-height 0.5s ease-in;
}

/* Tabs de búsqueda */
.search-tab {
  transition: all 0.3s ease;
}
.search-tab.active {
  background-color: #3b82f6;
  color: white;
}
.search-tab:not(.active):hover {
  background-color: #e0e7ff;
}

/* Mejoras responsivas para formularios de búsqueda */
@media (max-width: 768px) {
  .search-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .search-tab i {
    margin-right: 0.25rem;
  }
  
  /* Ajustes para inputs en móviles */
  input, select, textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
  }
  
  /* Ajustes para botones en móviles */
  button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Hero section overlay */
.hero-overlay {
  background: rgba(0, 0, 0, 0.4);
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
}

/* Custom scrollbar - solo visible en desktop */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  ::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
  }
}

/* Mejoras responsivas generales */
@media (max-width: 768px) {
  /* Ajustes de tipografía para móviles */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
  }
  
  p {
    font-size: 1rem !important;
  }
  
  /* Ajustes de espaciado para móviles */
  .py-16 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .mb-12 {
    margin-bottom: 2rem !important;
  }
  
  .mb-16 {
    margin-bottom: 2.5rem !important;
  }
  
  /* Ajustes para cards y grids */
  .gap-8 {
    gap: 1rem !important;
  }
  
  .gap-12 {
    gap: 1.5rem !important;
  }
  
  .gap-16 {
    gap: 2rem !important;
  }
}

/* Estilos para el carrusel de destinos */
#destinations-carousel {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border-radius: 12px;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

/* Estilos para las tarjetas del carrusel */
.carousel-item {
  flex: 0 0 auto;
  width: calc(100% - 16px);
  margin: 0 8px;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(to bottom, var(--bg-card), var(--bg-secondary));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .carousel-container > div {
    width: calc(50% - 16px);
  }
}

@media (min-width: 1024px) {
  .carousel-container > div {
    width: calc(33.333% - 16px);
  }
}

@media (min-width: 1280px) {
  .carousel-container > div {
    width: calc(25% - 16px);
  }
}

/* Estilos para los controles del carrusel */
#prev-btn, #next-btn {
  transition: all 0.3s ease;
  background-color: var(--bg-card);
  color: var(--primary);
  border: 2px solid var(--primary);
}

#prev-btn:hover, #next-btn:hover {
  transform: scale(1.1);
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#prev-btn:active, #next-btn:active {
  transform: scale(0.95);
}

#prev-btn.opacity-50, #next-btn.opacity-50 {
  cursor: not-allowed;
}

/* Estilos para los puntos indicadores */
.carousel-dot {
  transition: all 0.3s ease;
  transform: scale(1);
}

.carousel-dot:hover {
  transform: scale(1.2);
}

.carousel-dot.active {
  transform: scale(1.3);
}

/* Efecto de desplazamiento suave para el carrusel */
@media (min-width: 768px) {
  .carousel-container > div {
    transform: scale(0.95);
    opacity: 0.8;
    transition: all 0.5s ease;
  }
  
  .carousel-container > div:hover {
    transform: scale(1);
    opacity: 1;
    z-index: 1;
  }
}

:root {
  /* Nueva paleta de colores más atractiva */
  --primary: #3B82F6;         /* Azul principal */
  --primary-hover: #2563EB;   /* Azul principal hover */
  --secondary: #F59E0B;       /* Naranja/ámbar */
  --secondary-hover: #D97706; /* Naranja/ámbar hover */
  
  /* Colores de fondo */
  --bg-primary: #F0F9FF;      /* Fondo principal (azul muy claro) */
  --bg-secondary: #E0F2FE;    /* Fondo secundario (azul más claro) */
  --bg-card: #FFFFFF;         /* Fondo de tarjetas */
  --bg-dark: #0F172A;         /* Fondo oscuro para secciones de contraste */
  
  /* Colores de acento */
  --accent-teal: #0D9488;     /* Acento turquesa */
  --accent-purple: #8B5CF6;   /* Acento púrpura */
  --accent-pink: #EC4899;     /* Acento rosa */
  --accent-green: #10B981;    /* Acento verde */
  
  /* Colores de texto */
  --text-primary: #1E293B;    /* Texto principal */
  --text-secondary: #475569;  /* Texto secundario */
  --text-light: #94A3B8;      /* Texto claro */
  --text-white: #FFFFFF;      /* Texto blanco */
  
  /* Colores de estado */
  --success: #10B981;         /* Éxito */
  --warning: #F59E0B;         /* Advertencia */
  --danger: #EF4444;          /* Peligro */
  --info: #3B82F6;            /* Información */
}

/* Reset y estilos base */
:root {
  --vh: 1vh; /* Variable para corregir altura en móviles */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden; /* Prevenir scroll horizontal en móviles */
  -webkit-tap-highlight-color: transparent; /* Eliminar highlight al tocar en móviles */
  font-size: 16px;
}

/* Mejoras para móviles */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Ajuste de logo y nombre en header */
  header .h-16 {
    height: 2.5rem;
  }
  
  header .text-xl {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  
  /* Mejora para el panel de búsqueda */
  #flights-search, #hotels-search, #cars-search {
    padding: 1rem !important;
  }
  
  /* Ajustes para los tabs de búsqueda */
  .search-tab {
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
  }
  
  .search-tab .p-2 {
    padding: 0.25rem !important;
  }
  
  /* Ajuste para los inputs de búsqueda */
  input, select {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 14px !important;
  }
  
  /* Ajuste para el botón de búsqueda */
  #flights-search button, #hotels-search button, #cars-search button {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 14px !important;
  }
  
  /* Ajustes para el hero section */
  .hero h1 {
    font-size: 1.75rem !important;
    line-height: 2.25rem !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .hero p {
    font-size: 1rem !important;
    line-height: 1.5rem !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Ajustes para los cards de ofertas */
  .card-hover {
    margin-bottom: 1rem;
  }
  
  /* Ajustes para el formulario de contacto */
  form label {
    font-size: 0.875rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  /* Ajustes para los botones de llamada */
  a[href^="tel:"] {
    padding: 0.25rem 0.75rem !important;
  }
  
  /* Fix para el vh en móviles */
  .h-screen, .min-h-screen {
    height: calc(var(--vh, 1vh) * 100);
  }
  
  /* Ajustes para el footer */
  footer h3 {
    font-size: 1.125rem !important;
  }
  
  footer .grid {
    gap: 1.5rem !important;
  }
}

/* Clase para bloquear scroll cuando el menú móvil está abierto */
body.menu-open {
  overflow: hidden;
}

/* Mejoras para imágenes responsivas */
img {
  max-width: 100%;
  height: auto;
}

/* Header moderno */
.header {
  background-color: rgba(var(--bg-dark), 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navegación */
nav a {
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

.search-tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

.search-content {
  display: none;
}

.search-content.active {
  display: block;
}

/* Hero Section Moderna */
.hero {
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100); /* Solución para móviles */
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll; /* Mejor rendimiento en móviles */
    padding-top: 60px; /* Espacio para el header fijo */
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--secondary);
  color: white;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
