/* =========================
   Slider wrapper & track
   ========================= */
.hero .hero-slider {
  position: relative;
  overflow: hidden;
}
.hero .hero-slides {
  display: flex;
  width: 100%;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.hero .hero-slide { min-width: 100%; box-sizing: border-box; }

/* Nav buttons */
.hero .hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 40px; width: 40px; border-radius: 50%; border: 0;
  background: #ffffffcc; color: #111; font-size: 22px;
  line-height: 0; text-align: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: background .2s ease;
}
.hero .hero-nav:hover { background: #fff; }
.hero .hero-nav.prev { left: 12px; }
.hero .hero-nav.next { right: 12px; }

/* Dots */
.hero .hero-dots {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; gap: 8px; justify-content: center; align-items: center;
}
.hero .hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e2e8f0; cursor: pointer; border: 2px solid #ffffffb3;
}
.hero .hero-dot.is-active { background: #f59e0b; }

/* =========================
   Modern Countdown (scoped)
   ========================= */
/* Container */
.hero .countdown--modern {
  /* gunakan warna brand global dari style.css; fallback bila tidak ada */
  --brand: var(--brand-500, #f59e0b);
  --card-bg: rgba(255,255,255,0.75);
  --card-bg-2: rgba(255,255,255,0.55);
  --card-border: #e9eef5;
  --text-strong: #0f172a;
  --text-muted: #64748b;

  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

/* Card */
.hero .countdown--modern .cd-item {
  position: relative;
  isolation: isolate;
  border-radius: 16px;
  padding: 14px 16px 18px;
  min-width: 108px;
  background: linear-gradient(180deg, var(--card-bg), var(--card-bg-2));
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.06);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  text-align: center;
  overflow: hidden;
}

/* subtle top highlight */
.hero .countdown--modern .cd-item::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--brand) 70%, white 30%), transparent);
  opacity: .5;
}

/* glossy spot */
.hero .countdown--modern .cd-item::after {
  content: "";
  position: absolute; inset: -30% -20% auto auto; height: 60%; width: 60%;
  background: radial-gradient(120px 90px at 100% 0%, rgba(255,255,255,.6), transparent 60%);
  pointer-events: none;
}

/* Number */
.hero .countdown--modern .cd-num {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
  transition: transform .35s ease, opacity .35s ease;
  will-change: transform, opacity;
}

/* Label chip */
.hero .countdown--modern small {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

/* Progress bar */
.hero .countdown--modern .cd-progress {
  position: absolute; left: 10px; right: 10px; bottom: 8px; height: 4px;
  background: #eef2f7; border-radius: 999px; overflow: hidden;
}
.hero .countdown--modern .cd-progress::after {
  content: "";
  position: absolute; inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  background: linear-gradient(90deg, color-mix(in oklab, var(--brand) 86%, #fff 14%), #ffb02a);
  box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset;
}

/* Flip anim */
@keyframes cd-flip {
  0% { transform: rotateX(0) translateZ(0); opacity: 1; }
  45% { transform: rotateX(-90deg) translateZ(0); opacity: .2; }
  55% { transform: rotateX(90deg) translateZ(0); opacity: .2; }
  100% { transform: rotateX(0) translateZ(0); opacity: 1; }
}
.hero .countdown--modern .cd-num.flip {
  transform-style: preserve-3d;
  animation: cd-flip .48s ease both;
  backface-visibility: hidden;
  perspective: 600px;
}

/* ========================================
   Responsive tweaks to keep 4 boxes inline
   ======================================== */

/* Tablet/HP sedang */
@media (max-width: 768px) {
  .hero .hero-nav { display: none; }
  .hero .countdown--modern { gap: 12px; }
  .hero .countdown--modern .cd-item { min-width: 100px; padding: 12px 12px 16px; }
  .hero .countdown--modern .cd-progress { left: 8px; right: 8px; }
  .hero .countdown--modern small { font-size: 11px; padding: 3px 7px; }
}

/* HP kecil: paksa 4 kolom sama lebar */
@media (max-width: 560px) {
  .hero .countdown--modern {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .hero .countdown--modern .cd-item {
    min-width: 0;          /* override min-width agar tidak ngejatuhin kolom */
    padding: 10px 10px 14px;
  }
  .hero .countdown--modern .cd-num {
    font-size: clamp(22px, 6.5vw, 28px);
    letter-spacing: .2px;
  }
  .hero .countdown--modern small {
    font-size: 10.5px;
    padding: 3px 6px;
    letter-spacing: .25px;
  }
  .hero .countdown--modern .cd-progress { left: 6px; right: 6px; }
}

/* Sangat sempit (≤360px) */
@media (max-width: 360px) {
  .hero .countdown--modern .cd-item { padding: 8px 8px 12px; }
  .hero .countdown--modern .cd-num { font-size: 20px; }
  .hero .countdown--modern small { font-size: 10px; }
  .hero .countdown--modern .cd-progress { height: 3px; }
}