/* ===== HERO CAROUSEL ===== */
.hero-carousel{
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
}

/* Track */
.carousel-track{
  width: 100%;
  height: 100%;
  position: relative;
}

/* ===== SLIDE ===== */
.carousel-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}

.carousel-slide.active{
  opacity: 1;
  z-index: 1;
}

/* ===== IMAGE ZOOM EFFECT ===== */
.carousel-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 6s ease;
}

.carousel-slide.active img{
  transform: scale(1);
}

/* Overlay */
.carousel-slide::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.35),
    rgba(0,0,0,.6)
  );
  z-index: 1;
}

/* ===== CONTENT ===== */
.carousel-content{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #ffffff;
  max-width: 1200px;
  padding: 0 24px;
  z-index: 2;
  pointer-events: none;
}

/* RESET STATE – TEXT STARTS FROM TOP */
.carousel-content h1,
.carousel-content p{
  opacity: 0;
  transform: translateY(-36px); /* NGA LART */
}

/* ===== ACTIVE SLIDE TEXT ANIMATION ===== */
.carousel-slide.active .carousel-content h1{
  animation: titleFadeDown 1s cubic-bezier(.22,.61,.36,1) forwards;
}

.carousel-slide.active .carousel-content p{
  animation: subtitleFadeDown .9s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: .25s;
}

/* ===== TITLE ===== */
.carousel-content h1{
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .7px;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-family: 'Times New Roman', Times, serif;
  text-shadow:
    0 10px 30px rgba(12,44,87,.35),
    0 2px 8px rgba(12,44,87,.45);
}

/* ===== SUBTITLE ===== */
.carousel-content p{
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.65;
  color: rgba(255,255,255,.92);
  max-width: 720px;
  margin: 0 auto;
}

/* ===== ANIMATIONS (TOP → BOTTOM) ===== */
@keyframes titleFadeDown{
  from{
    opacity: 0;
    transform: translateY(-40px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtitleFadeDown{
  from{
    opacity: 0;
    transform: translateY(-28px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ARROWS ===== */
.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 30%;
  border: none;
  background: rgba(255,255,255,.28);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: .25s;
  z-index: 5;
}

.carousel-btn:hover{
  background: rgba(0,0,0,.6);
}

.carousel-btn.prev{ left: 24px; }
.carousel-btn.next{ right: 24px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px){
  .hero-carousel{
    height: 360px;
  }

  .carousel-content h1{
    font-size: 22px;
    margin-bottom: 10px;
  }

  .carousel-content p{
    font-size: 14px;
  }
}

@media (min-width: 1600px){
  .hero-carousel{
    height: 800px;
  }
}
