/* ============================================
   carousel.css — Carousel Component Styles
   ============================================ */

/* --- Wrapper --- */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #000;
  user-select: none;
}

/* --- Track Wrapper (clips overflow) --- */
.carousel-track-wrapper {
  width: 100%;
  overflow: hidden;
}

/* --- Track (holds all slides side by side) --- */
.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* --- Individual Slides --- */
.carousel-slide {
  position: relative;
  width: 98.5vw;
  height: 85vh;
  max-height: 720px;
  overflow: hidden;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* --- Video / YouTube Slide --- */
.carousel-slide--video video,
.carousel-slide--video .carousel-youtube {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

/* --- Caption overlay --- */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4rem 3rem 3.5rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.carousel-heading {
  font-family: 'Cinzel', serif;
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--color-carousel-heading, #EDE9FE);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,1), 0 0 60px rgba(180,150,255,0.55);
  margin-bottom: 0.75rem;
  max-width: 820px;
}

.carousel-subheading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-carousel-sub, #D1C4FF);
  letter-spacing: 0.03em;
  line-height: 1.65;
  max-width: 580px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  margin: 0;
}

/* --- Prev / Next Buttons --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.carousel-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.65);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel-btn--prev { left: 1.25rem; }
.carousel-btn--next { right: 1.25rem; }

/* --- Dots --- */
.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease, width 0.3s ease, border-radius 0.3s ease;
}

.carousel-dot.active {
  background-color: #fff;
  width: 26px;
  border-radius: 5px;
  border-color: #fff;
}

.carousel-dot:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.7);
}

/* --- Sound Toggle (video slides) --- */
.video-controls {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sound-toggle,
.video-pause-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color 0.25s ease, opacity 0.4s ease;
}

.sound-toggle:hover,
.video-pause-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Caption fades out while video is playing (unmuted or explicitly playing) */
.carousel-caption.caption-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.carousel-caption {
  transition: opacity 0.5s ease,
              background var(--transition);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .carousel-slide {
    height: 58vw;
    min-height: 260px;
    max-height: 480px;
  }

  .carousel-caption {
    padding: 2rem 1.5rem;
  }

  .carousel-heading  { font-size: 1.8rem; letter-spacing: 0.02em; }
  .carousel-subheading { font-size: 0.9rem; }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .carousel-btn--prev { left: 0.6rem; }
  .carousel-btn--next { right: 0.6rem; }
}

@media (max-width: 480px) {
  .carousel-slide {
    height: 62vw;
    min-height: 200px;
  }

  .carousel-heading { font-size: 1.15rem; }

  /* Smaller arrow buttons on very small screens */
  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .carousel-btn--prev { left: 0.4rem; }
  .carousel-btn--next { right: 0.4rem; }
}
