/* carousel.css */

@media (min-width: 992px) {
  /* Mengincar semua elemen <img> di dalam container bertema slider/carousel */
  .carousel img, 
  .swiper-slide img, 
  .slider img,
  [class*="carousel"] img {
    object-fit: contain !important;
  }
}

.carousel-container {
    width: min(100%, 520px);
    margin: 0 auto;
}

.carousel-track-container {
    background: #fff;
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.carousel-slide > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(156, 163, 175, 0.72);
    border: none;
    cursor: pointer;
    color: white;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-button:hover {
    background: rgba(107, 114, 128, 0.82);
}

.carousel-button--left {
    left: 10px;
}

.carousel-button--right {
    right: 10px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.carousel-indicator {
    border: none;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    background: rgba(0,0,0,0.3);
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicator.current-slide {
    background: #065f46; /* Warna emerald-800 sesuai tema */
}

.is-hidden { display: none; }

@media (min-width: 1024px) {
  .carousel-container {
    width: min(100%, 560px);
  }

  .carousel-track-container {
    max-height: 700px;
  }
}


/* Reset dasar untuk Swiper */
.swiper,
.swiper-container {
  width: 100%;
  position: relative;
  padding-bottom: 40px; /* Ruang untuk titik nav/dots */
}

/* Biarkan tinggi wrapper mengikuti tinggi konten gambar */
.swiper-wrapper {
  height: auto !important;
  display: flex;
  align-items: center;
}

.swiper-slide {
  height: auto !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Styling Default Gambar (Mobile) */
.swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

@media (min-width: 1024px) {
  /* 1. Hilangkan batasan height pada pembungkus utama */
  .swiper,
  .swiper-container,
  .swiper-wrapper,
  .swiper-slide {
    height: auto !important;
    max-height: none !important;
  }

  /* 2. Ubah properti gambar agar tampil UTUH tanpa terpotong */
  .swiper-slide img {
    object-fit: contain !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 650px !important; /* Memberikan tinggi yang cukup untuk brosur */
    margin: 0 auto;
  }
}

/* Modal Styles */
.registration-modal {
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0,0,0,0.5);
    display: none;
}
.registration-modal.open {
    display: flex !important;
}
