/* Carousel container */
.carousel-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

/* Main carousel styling */
.carousel {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f1f1f1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Slide track, to make slides move in flex */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

/* Individual slide */
.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;         /* Ensures it fills the container width */
  height: 100%;        /* Ensures it fills the container height */
  object-fit: contain; /* Ensures image fits without cropping */
  display: block;
}

/* Caption styles */
.caption {
  position: absolute;
  bottom: 10px;
  left: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide:hover .caption {
  opacity: 1;
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  transition: background-color 0.3s ease;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Carousel indicators (dots) */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: rgba(0, 0, 0, 1);
}

.indicator:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .carousel {
    aspect-ratio: unset;
    height: 300px;
  }

  .caption {
    font-size: 16px;
    padding: 5px;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.4rem;
  }
}
