/* Slider: Initially auto height */
.slider {
  position: relative;
  width: 50%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  background-color: rgb(0, 108, 108);
}

/* Slides: hidden except active one */
.slide {
  display: none;
  width: 100%;
  height: auto;
}

.slide.active {
  display: block;
}

/* Images: Full width, auto height */
.slide img {
  width: 100%;
  height: auto; /* Very important */
  object-fit: contain;
  display: block;
}

/* Captions */
.caption {
  position: absolute;
  color: #fff;
  background: rgba(2, 108, 108, 0.6);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  max-width: 80%;
}

/* Caption positions */
.bottom-left {
  bottom: 20px;
  left: 20px;
}

.center-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.top-right {
  top: 20px;
  right: 20px;
}

/* Responsive caption sizes */
@media (max-width: 992px) {
  .caption {
    font-size: 1.2rem;
    padding: 8px 16px;
  }
}

@media (max-width: 768px) {
  .caption {
    font-size: 1rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .caption {
    font-size: 0.9rem;
    padding: 4px 8px;
  }
}
