.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-height: 1000px;
  aspect-ratio: 16 / 9;
  margin: auto;
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

.caption {
  position: absolute;
  bottom: 30px;
  left: 30px;
  font-size: 2rem;
  color: white;
  background-color: rgba(0,0,0,0.5);
  padding: 10px 20px;
  border-radius: 5px;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background-color: rgba(0,0,0,0.4);
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1;
}

.nav.prev {
  left: 10px;
}

.nav.next {
  right: 10px;
}

.nav:hover {
  background-color: rgba(0,0,0,0.6);
}
