.carousel {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 400px;
  margin: auto;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel-slide.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.caption {
  position: absolute;
  bottom: 40px;  /* Ubicado arriba de los indicadores */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
  max-width: 90%;
  z-index: 12;
}

.caption h3 {
  margin-bottom: 5px;
  font-size: 18px;  /* Tamaño reducido del título */
  font-weight: bold;
}

.caption p {
  font-size: 14px;  /* Tamaño del texto */
}

.controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: auto;
  z-index: 10;
  padding: 0 10px;
}

.control-btn {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
  user-select: none;
}

.control-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.control-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}

.indicator {
  height: 12px;
  width: 12px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.indicator.active {
  background-color: #fff;
}

@media (max-width: 600px) {
  .caption {
    font-size: 14px;
    padding: 8px 12px;
  }
}