.carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

/* Contenedor que agrupa todas las imágenes */
.carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100vh; /* ocupa alto de la pantalla */
  max-height: 600px; /* límite en desktop */
}

/* Estilo de las imágenes */
.carousel-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* rellena manteniendo proporción */
  object-position: center; /* centrado */
  flex-shrink: 0;
}

/* Botones de navegación */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 10;
  transition: background-color 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Media queries */
@media screen and (max-width: 1024px) {
  .carousel-container {
    height: 50vh;
    max-height: 400px;
  }

  /* se mete un poco bajo el difuminado */
  .carousel {
    margin-top: -10px;
  }

  .carousel-prev,
  .carousel-next {
    font-size: 1.5rem;
    padding: 8px;
  }
}

@media screen and (max-width: 768px) {
  .carousel-container {
    height: 40vh;
    max-height: 300px;
  }

  .carousel {
    margin-top: -15px;
  }

  .carousel-prev,
  .carousel-next {
    font-size: 1.2rem;
    padding: 6px;
  }
}

@media screen and (max-width: 480px) {
  .carousel-container {
    height: 35vh;
    max-height: 220px;
  }

  .carousel {
    margin-top: -20px; /* más metido en móviles chicos */
  }

  .carousel-prev,
  .carousel-next {
    font-size: 1rem;
    padding: 5px;
  }
}