/* * {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 100vh;
} */

.carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 1000px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  background-color: #ddd; /* Prevent layout shift */
  opacity: 0;
  transition: opacity 5s ease;
}

.carousel.loaded {
  opacity: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 10;
  user-select: none;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

@media (max-width: 600px) {
  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.4rem 0.8rem;
  }
  .carousel {
     height: unset;
     max-width: unset;
  }
}

@media (max-width: 1200px) {
  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.4rem 0.8rem;
  }
  .carousel {
     height: unset;
     max-width: unset;
  }
}
