/* =============================================================
   HOME BANNER — IMAGE SLIDER (promo carousel)
   Menampilkan 3 banner promo (WebP) dan bisa di-slide/swipe.
   Override tampilan .banner khusus untuk versi slider gambar.
   ============================================================= */

.banner.banner-slider {
  padding: 0;
  background: #0b1830; /* fallback saat gambar loading */
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(45, 107, 255, .28);
  margin-bottom: 28px;
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.banner-slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 80%);
  color: #fff;
  z-index: 1;
}

.banner-slide-overlay h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.2;
  max-width: 70%;
}

.banner-slide-overlay p {
  font-size: 13px;
  color: rgba(255,255,255,.9);
  margin-top: 6px;
  max-width: 70%;
  line-height: 1.5;
}

.banner-slide-overlay .banner-cta {
  align-self: flex-start;
  margin-top: 12px;
  background: #fff;
  color: var(--c-primary);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 14px rgba(0,0,0,.2);
}

@media (min-width: 601px) {
  .banner-slide-overlay h2 { font-size: 24px; }
  .banner-slide-overlay p  { font-size: 15px; }
}

@media (min-width: 1201px) {
  .banner-slide-overlay { padding: 30px 32px; }
  .banner-slide-overlay h2 { font-size: 30px; }
  .banner-slide-overlay p  { font-size: 16px; }
}

/* Nav arrows */
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background .15s;
}

.banner-nav:hover { background: rgba(0, 0, 0, .55); }
.banner-nav svg { width: 18px; height: 18px; }
.banner-nav.prev { left: 10px; }
.banner-nav.next { right: 10px; }

@media (max-width: 480px) {
  .banner-nav { width: 26px; height: 26px; }
  .banner-nav svg { width: 15px; height: 15px; }
  .banner-nav.prev { left: 6px; }
  .banner-nav.next { right: 6px; }
}

/* Dots */
.banner.banner-slider .banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.banner.banner-slider .banner-dots .dot {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, .5);
  border-radius: 50%;
  cursor: pointer;
  transition: width .2s, background .2s;
}

.banner.banner-slider .banner-dots .dot.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* --- ADMIN: Banner Slide editor rows --- */
.banner-slide-editor {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 10px;
}

.banner-slide-editor .full {
  flex: 1;
  min-width: 180px;
}

.banner-slide-preview {
  width: 96px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #e8f0ff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide-preview.empty {
  font-size: 10px;
  color: var(--c-text-3);
  text-align: center;
  padding: 4px;
}

.banner-slide-move {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  align-self: center;
}

.banner-slide-move .btn-mini {
  white-space: nowrap;
}

.banner-slide-move .btn-mini:disabled {
  opacity: .4;
  cursor: not-allowed;
}
