/* ========== VARIABLES GLOBALES ADICIONALES ========== */
:root {
  --color-bg: #FFFFFF;
  --color-text: #111111;
  --color-primary: #004080;   /* Azul del logo */
  --color-secondary: #E32636; /* Rojo del logo */
  --color-accent: #C8102E;    /* Rojo bandera dominicana para acentos */
  --color-border: #002D72;    /* Azul bandera dominicana para bordes */
  --color-footer: #E32636;    /* Footer en rojo */
  --transition: all 0.2s ease;
  --font-family: 'Inter', 'Montserrat', 'Poppins', sans-serif;
}

/* ========== ESTILOS GLOBALES ADICIONALES ========== */
/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  text-align: center;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.main-header {
  background-color: #004080;
  color: #FFFFFF;
  width: 100%;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #FFFFFF;
  border-radius: 50%;
  color: #004080;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 18px;
}

.social-icon:hover {
  background-color: #f0f0f0;
  transform: scale(1.1);
}

.lang-switch {
  position: static;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.lang-btn {
  background-color: #FFFFFF;
  color: var(--color-primary);
  border: 2px solid var(--color-border);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  min-width: 80px;
  text-align: center;
}

.lang-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 45, 114, 0.2);
  transform: translateY(-1px);
}

.lang-btn[aria-pressed="true"] {
  background-color: #FFFFFF;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.title-section {
  text-align: center;
  width: 100%;
}

.main-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px 0;
  cursor: pointer;
}

.site-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  opacity: 0.9;
}

.sub-title {
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  opacity: 0.9;
}

/* Hero */
.hero {
  background: url('../../playa-dominicana.jpg') center center / cover no-repeat;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  position: relative;
  overflow: hidden;
  contain: layout style paint;
  gap: 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.logo {
  margin-bottom: 0;
}

.logo img {
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: transform;
}

/* Botones principales */
.main-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 16px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.btn:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--color-primary);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.btn:active {
  transform: scale(0.95);
}

/* Footer */
.footer {
  background-color: var(--color-footer);
  color: white;
  width: 100%;
  padding: 20px 24px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: auto;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  color: var(--color-primary);
  font-size: 18px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background-color: var(--color-primary);
  color: #fff;
  transform: scale(1.1);
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #25D366;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* ========== FORMULARIOS ========== */
form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 16px;
  color: #222;
  text-align: left;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  margin-bottom: 14px;
  transition: var(--transition);
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,64,128,0.1);
  outline: none;
  transform: translateY(-1px);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* ========== BOTONES ========== */
.btn-submit {
  width: 100%;
  max-width: 300px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--color-secondary), #b71c1c);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(227,38,54,0.22);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(227,38,54,0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ========== ESTILOS PARA SELECTORES DE ADULTOS Y NIÑOS ========== */
/* Estilos consistentes y funcionales para selects de adultos y niños */
#adultos, #ninos {
  /* Mantener apariencia personalizada pero funcional */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Icono de flecha personalizado */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;

  /* Espaciado para el icono */
  padding-right: 40px;

  /* Interacción */
  cursor: pointer;
  position: relative;
  z-index: 1;

  /* Apariencia visual */
  background-color: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
  font-family: inherit;
  color: #333;

  /* Transiciones */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Estados de foco */
#adultos:focus, #ninos:focus {
  outline: none;
  border-color: #004080;
  box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.1);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23004080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Estados de hover */
#adultos:hover, #ninos:hover {
  border-color: #004080;
}

/* Asegurar que las opciones sean visibles */
#adultos option, #ninos option {
  background-color: #fff !important;
  color: #333 !important;
  padding: 8px !important;
}

/* Forzar visibilidad y funcionalidad */
#adultos, #ninos {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
}

/* ========== ESTILOS ADICIONALES DE VALIDACIÓN DE TELÉFONO ========== */
/* Estados de validación para teléfono */
input[type="tel"].valid {
  border-color: #28a745 !important;
  background-color: #f8fff8 !important;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Responsive para teléfonos */
@media (max-width: 768px) {
  input[type="tel"] {
    font-size: 16px !important; /* Prevenir zoom en iOS */
  }
}

/* ========== ANIMACIONES ========== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== UTILIDADES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== ACCESSIBILITY ========== */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid #004080;
  outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    text-align: center;
    padding: 10px 15px;
  }

  .lang-switch {
    position: static;
    margin-top: 10px;
    justify-content: space-between;
    width: 100%;
  }

  .lang-btn {
    font-size: 1rem;
    padding: 12px 16px;
    min-width: 88px;
  }

  .main-title {
    font-size: 1.3rem;
  }

  .site-subtitle {
    font-size: 0.9rem;
  }

  .hero {
    flex: 1;
    padding: 20px 15px;
  }

  .logo img {
    max-width: 280px;
  }

  .main-buttons {
    max-width: 280px;
  }

  .social-icons {
    gap: 12px;
  }

  .social-icons a {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* WhatsApp flotante - IZQUIERDA en móviles */
  .whatsapp-float {
    left: 20px !important;
    right: auto !important;
    width: 60px !important;
    height: 60px !important;
    font-size: 24px !important;
    /* bottom será controlado dinámicamente por JavaScript */
  }

  #tawk_68e0482877b5c01950cc0f86 {
    height: 300px;
    margin: 15px auto;
  }
}

@media (max-width: 480px) {
  .hero {
    flex: 1;
    padding: 16px 10px;
  }

  .main-buttons {
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
  }

  .btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
  }

  .logo img {
    max-width: 250px;
  }

  .footer {
    padding: 12px;
    font-size: 1rem;
  }
}

/* ========== OPTIMIZACIONES DE IMÁGENES ========== */
/* Optimización de imágenes de logo */
img[src*="logo"] {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Clase para imágenes optimizadas */
.optimized {
  image-rendering: auto;
  will-change: auto;
}

/* Optimización para móviles */
@media (max-width: 768px) {
  img {
    max-width: 100%;
    height: auto;
  }
}

/* ========== TAWK.TO CHAT WIDGET ========== */
#tawk_68e0482877b5c01950cc0f86 {
  max-width: 100%;
  height: 400px;
  overflow: hidden;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,64,128,0.3);
  border: 2px solid var(--color-primary);
}

@media (max-width: 900px) {
  #tawk_68e0482877b5c01950cc0f86 {
    height: 300px;
    margin: 15px auto;
  }

  /* Posicionamiento agresivo del widget flotante - MÚLTIPLES SELECTORES CON CALCULO DINÁMICO */
  #tawkchat-container,
  div[id*="tawk"],
  div[class*="tawk"],
  iframe[src*="tawk.to"],
  [data-tawk-id],
  .tawk-min-container,
  .tawk-chat-container,
  div[style*="position"][style*="fixed"],
  div[style*="bottom"][style*="20px"],
  div[style*="right"][style*="20px"],
  [style*="position: fixed"],
  [style*="bottom"] {
    position: fixed !important;
    right: 20px !important;
    left: auto !important;
    z-index: 10000 !important;
    transform: none !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    /* La propiedad bottom se calcula dinámicamente via JavaScript */
  }
}

/* Posicionar widget flotante a la derecha abajo en desktop */
#tawkchat-container {
  right: 20px !important;
  bottom: 20px !important;
  left: auto !important;
}

/* ========== MEJORAS VISUALES PARA DESKTOP ========== */
@media (min-width: 1440px) {
  .main-title {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.4;
    letter-spacing: 0.5px;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ========== EFECTO DINÁMICO AL SUBTÍTULO EN DESKTOP ========== */
  @keyframes pulseZoom {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
  }

  .sub-title {
    animation: pulseZoom 2.5s ease-in-out infinite;
    display: inline-block;
  }
}

