/* ========== RESET Y BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Arial", sans-serif;
  overflow: hidden;
  background-color: #000;
}

/* ========== SLIDER CONTAINER ========== */
.slider-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ========== SLIDES ========== */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1s ease;
  transform: scale(1.1);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== TEXTO SOBRE IMAGEN ========== */
.text-overlay {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  max-width: 90%;
  width: auto;
}

.text-overlay h2 {
  font-size: 2.5em;
  margin: 0 0 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.text-overlay p {
  font-size: 1.2em;
  margin: 5px 0;
}

.text-overlay span {
  font-style: italic;
  font-size: 1em;
  display: block;
  margin-top: 10px;
}

/* ========== FLECHAS DE NAVEGACIÓN ========== */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  color: #333;
}

.arrow:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

/* ========== BOTONES DE IDIOMA ========== */
.language-buttons {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 10;
}

.lang-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag {
  font-size: 1.2em;
}

.lang-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
  .text-overlay {
    bottom: 15%;
    padding: 15px;
  }
  
  .text-overlay h2 {
    font-size: 1.5em;
  }
  
  .text-overlay p {
    font-size: 1em;
  }
  
  .text-overlay span {
    font-size: 0.9em;
  }
  
  .arrow {
    font-size: 1.5em;
    padding: 5px 10px;
  }
  
  .left {
    left: 10px;
  }
  
  .right {
    right: 10px;
  }
  
  .language-buttons {
    flex-direction: column;
    gap: 8px;
    bottom: 10px;
  }
  
  .lang-btn {
    padding: 8px 15px;
    font-size: 0.85em;
  }
}

/* ========== ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: opacity 0.5s ease;
    transform: none;
  }
  
  .arrow, .lang-btn {
    transition: none;
  }
}

/* Focus visible para navegación con teclado */
.arrow:focus-visible,
.lang-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Para evitar el SCROLL en moviles */
/* ========== FIX PARA MÓVILES: SIN SCROLL ========== */

/* Usar viewport height dinámico (navegadores modernos) */
@supports (height: 100dvh) {
  .slider-container {
    height: 100dvh; /* Dynamic viewport height */
  }
}

/* Fallback para navegadores antiguos */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    overflow: hidden; /* Evitar scroll en la raíz */
    position: fixed; /* Fijar viewport */
    width: 100%;
  }
  
  .slider-container {
    height: 100vh;
    min-height: -webkit-fill-available; /* Para Safari iOS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* Ajustar texto para que no se salga */
  .text-overlay {
    bottom: 12%;
    padding: 12px 15px;
    width: 92%;
    max-width: none;
  }
  
  .text-overlay h2 {
    font-size: 1.3em;
    line-height: 1.2;
  }
  
  .text-overlay p {
    font-size: 0.95em;
  }
  
  .text-overlay span {
    font-size: 0.85em;
  }
  
  /* Botones de idioma más compactos */
  .language-buttons {
    bottom: 8px;
    gap: 6px;
  }
  
  .lang-btn {
    padding: 6px 12px;
    font-size: 0.8em;
  }
  
  /* Flechas más pequeñas y posicionadas */
  .arrow {
    font-size: 1.3em;
    padding: 4px 8px;
  }
  
  .left { left: 8px; }
  .right { right: 8px; }
}

/* Extra: evitar zoom accidental en inputs (si los agregas después) */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px; /* Evita zoom automático en iOS */
  }
}