/* Contenedor Principal con prevención de saltos de línea (CLS) */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto; 
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background-color: #111;
  
  /* Mantiene la proporción de aspecto 16:9 automáticamente */
  aspect-ratio: 16 / 9; 
}

/* Encabezado del Título (Superpuesto arriba con degradado para legibilidad) */
.carousel-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  padding: 25px 20px;
  text-align: center;
}

.carousel-title {
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* Desplazamiento de diapositivas */
.carousel-track-container {
  width: 100%;
  height: 100%;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Evita que la imagen se deforme */
}

/* Subtítulos de las imágenes */
.slide-caption {
  position: absolute;
  bottom: 15px;
  left: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-left: 4px solid #e50914; /* Detalle estético en rojo */
  font-family: sans-serif;
  font-size: 1.1rem;
  border-radius: 0 4px 4px 0;
}

/* Botones Laterales */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

.carousel-control:hover {
  background: #e50914; /* Rojo Dragón */
  transform: translateY(-50%) scale(1.1);
}

.prev { left: 20px; }
.next { right: 20px; }

/* Puntos de navegación inferiores (Dots) */
.carousel-indicators {
  position: absolute;
  bottom: 3px;  
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}