body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
}

h2 {
  text-align: center;
  margin: 20px 0;
}

/* --- CARRUSEL --- */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: scrollLoop 20s linear infinite;
}

.carousel-track img {
  width: 300px;
  height: 200px;
  margin: 10px;
  border-radius: 8px;
  object-fit: cover;
}

@keyframes scrollLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Pausa al pasar el ratón */
.carousel-wrapper:hover .carousel-track {
  animation-play-state: paused;
}

/* --- BOTONES --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(33, 150, 243, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
  line-height: 40px;
  text-align: center;
  z-index: 10;
}

.carousel-btn.left { left: 10px; }
.carousel-btn.right { right: 10px; }

/* --- INDICADORES --- */
.carousel-indicators {
  text-align: center;
  margin-top: 10px;
}

.indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 5px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.indicator.active {
  background-color: #2196f3;
}


@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === MODAL DE IMÁGENES === */
.image-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}

.image-modal-content {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  z-index: 100000;
}

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 100000;
}