@charset "UTF-8";
/* CSS Document */
.carrusel-fundido {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100vh; /* Define una altura fija o adaptativa para el contenedor */
  margin: auto;
  overflow: hidden;
}

.carrusel-fundido img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  /* 12 segundos en total para el ciclo completo de 3 imágenes */
  animation: fundido 64s infinite ease-in-out;
}

/* Retrasos calculados: Duración total (12s) / Número de imágenes (3) = 4s por imagen */
.carrusel-fundido img:nth-child(1) { animation-delay: 0s; }
.carrusel-fundido img:nth-child(2) { animation-delay: 4s; }
.carrusel-fundido img:nth-child(3) { animation-delay: 8s; }
.carrusel-fundido img:nth-child(4) { animation-delay: 12s; }
.carrusel-fundido img:nth-child(5) { animation-delay: 16s; }
.carrusel-fundido img:nth-child(6) { animation-delay: 20s; }
.carrusel-fundido img:nth-child(7) { animation-delay: 24s; }
.carrusel-fundido img:nth-child(8) { animation-delay: 28s; }
.carrusel-fundido img:nth-child(9) { animation-delay: 32s; }
.carrusel-fundido img:nth-child(10) { animation-delay: 36s; }
.carrusel-fundido img:nth-child(11) { animation-delay: 40s; }
.carrusel-fundido img:nth-child(12) { animation-delay: 44s; }
.carrusel-fundido img:nth-child(13) { animation-delay: 48s; }
.carrusel-fundido img:nth-child(14) { animation-delay: 52s; }
.carrusel-fundido img:nth-child(15) { animation-delay: 56s; }
.carrusel-fundido img:nth-child(16) { animation-delay: 60s; }
.carrusel-fundido img:nth-child(17) { animation-delay: 64s; }
.carrusel-fundido img:nth-child(18) { animation-delay: 68s; }
.carrusel-fundido img:nth-child(19) { animation-delay: 72s; }
.carrusel-fundido img:nth-child(20) { animation-delay: 76s; }
.carrusel-fundido img:nth-child(21) { animation-delay: 80s; }
.carrusel-fundido img:nth-child(22) { animation-delay: 84s; }
.carrusel-fundido img:nth-child(23) { animation-delay: 88s; }

/* Control del tiempo para cada imagen dentro de los 12 segundos globales */
@keyframes fundido {
  0% { opacity: 0; }
  5% { opacity: 1; }   /* Fundido de entrada rápido (0.6s) */
  33% { opacity: 1; }  /* Se mantiene visible (aprox. 3.4s) */
  38% { opacity: 0; }  /* Fundido de salida hacia la siguiente imagen */
  100% { opacity: 0; } /* Permanece invisible el resto del ciclo */
}
