/* Hero Banner: karusel + banner samping. Angka dari artifact "Habits Home v2". */

/*
 * Container yang di-align tengah membuat widget menciut ke max-content —
 * gambar tidak menyumbang lebar apa pun, jadi karuselnya bisa jadi 0px
 * (CLAUDE.md §5.12). Advanced → Width tetap menang (selektor ber-id).
 */
.elementor-widget-habits_hero { width: 100%; }

/*
 * Posisi banner samping per perangkat datang dari kelas prefix_class di
 * pembungkus widget, dan kelas itu HANYA menyetel token; aturan tata letaknya
 * ditulis sekali di bawah. Bawaan kalau kelas tidak ada: di kanan.
 *
 * Di bawah: grid-auto-flow column, jadi berapa pun jumlah bannernya mereka
 * berbagi satu baris sama lebar tanpa perlu tahu jumlahnya.
 */
.hbt-hero-side-right {
  --hbt-hero-tpl: minmax(0, 1fr) var(--hbt-hero-side-w, 33.333%);
  --hbt-hero-side-flow: row; --hbt-hero-tile-ratio: auto; --hbt-hero-side-display: grid;
}
.hbt-hero-side-below {
  --hbt-hero-tpl: minmax(0, 1fr);
  --hbt-hero-side-flow: column; --hbt-hero-tile-ratio: var(--hbt-hero-side-ratio, 16 / 9); --hbt-hero-side-display: grid;
}
.hbt-hero-side-none { --hbt-hero-tpl: minmax(0, 1fr); --hbt-hero-side-display: none; }

@media (max-width: 1024px) {
  .hbt-hero-tablet-side-right {
    --hbt-hero-tpl: minmax(0, 1fr) var(--hbt-hero-side-w, 33.333%);
    --hbt-hero-side-flow: row; --hbt-hero-tile-ratio: auto; --hbt-hero-side-display: grid;
  }
  .hbt-hero-tablet-side-below {
    --hbt-hero-tpl: minmax(0, 1fr);
    --hbt-hero-side-flow: column; --hbt-hero-tile-ratio: var(--hbt-hero-side-ratio, 16 / 9); --hbt-hero-side-display: grid;
  }
  .hbt-hero-tablet-side-none { --hbt-hero-tpl: minmax(0, 1fr); --hbt-hero-side-display: none; }
}
@media (max-width: 767px) {
  /* Angka ponsel di pembungkus juga, supaya control (selektor ber-id) tetap menang. */
  .elementor-widget-habits_hero { --hbt-hero-gap: 10px; --hbt-hero-radius: 14px; }
  .hbt-hero-mobile-side-right {
    --hbt-hero-tpl: minmax(0, 1fr) var(--hbt-hero-side-w, 33.333%);
    --hbt-hero-side-flow: row; --hbt-hero-tile-ratio: auto; --hbt-hero-side-display: grid;
  }
  .hbt-hero-mobile-side-below {
    --hbt-hero-tpl: minmax(0, 1fr);
    --hbt-hero-side-flow: column; --hbt-hero-tile-ratio: var(--hbt-hero-side-ratio, 16 / 9); --hbt-hero-side-display: grid;
  }
  .hbt-hero-mobile-side-none { --hbt-hero-tpl: minmax(0, 1fr); --hbt-hero-side-display: none; }
}

.hbt-hero {
  display: grid;
  grid-template-columns: var(--hbt-hero-tpl, minmax(0, 1fr) var(--hbt-hero-side-w, 33.333%));
  gap: var(--hbt-hero-gap, 16px);
  font-family: var(--hbt-font);
}

/* ------------------------------------------------------------ karusel */
.hbt-hero__main {
  position: relative; min-width: 0;
  aspect-ratio: var(--hbt-hero-ratio, 16 / 9);
  border-radius: var(--hbt-hero-radius, 20px);
  overflow: hidden;
  background: var(--hbt-surface);
}

/*
 * overflow-x: auto memaksa overflow-y ikut auto kalau dibiarkan visible —
 * jalur jadi bisa digulir vertikal tanpa diminta (CLAUDE.md §5.13).
 */
.hbt-hero__track {
  display: flex; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
}
.hbt-hero__track::-webkit-scrollbar { display: none; }
.hbt-hero__track:focus-visible { box-shadow: inset 0 0 0 2px var(--hbt-accent); }

.hbt-hero__slide {
  position: relative; flex: 0 0 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
}

/* Satu aturan berwenang untuk tautan + gambar banner, dipakai karusel dan
   banner samping. Kelas digandakan: `.elementor img { height: auto }` dan
   Theme Style → Link sama-sama (0,1,1). */
.hbt-hero__link.hbt-hero__link {
  position: absolute; inset: 0; display: block;
  color: inherit; text-decoration: none;
}
.hbt-hero__img.hbt-hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block;
  border: 0; border-radius: 0; box-shadow: none;
}
.hbt-hero__link:focus-visible { outline: 2px solid var(--hbt-accent); outline-offset: -4px; }

/* Tombol berkelas ganda: reset tema dan kit mewarnai `button` dan
   `button:hover` (0,1,1). */
.hbt-hero__arrow.hbt-hero__arrow {
  position: absolute; top: 50%; z-index: 2;
  width: 44px; height: 44px; margin: -22px 0 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--hbt-pill);
  background: var(--hbt-hero-arrow-bg, rgba(255, 255, 255, .92));
  color: var(--hbt-hero-arrow, var(--hbt-ink));
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: transform .15s ease;
}
.hbt-hero__arrow.hbt-hero__arrow:hover { transform: scale(1.06); }
.hbt-hero__arrow.hbt-hero__arrow:focus-visible { outline: 2px solid var(--hbt-accent); outline-offset: 2px; }
.hbt-hero__arrow--prev { left: 16px; }
.hbt-hero__arrow--next { right: 16px; }
/* Di layar sentuh banner digeser jari; panah hanya menutupi gambar. */
@media (hover: none), (max-width: 767px) { .hbt-hero__arrow.hbt-hero__arrow { display: none; } }

.hbt-hero__bar {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2;
  display: flex; justify-content: center; align-items: center; gap: 2px;
  pointer-events: none;
}
/* Kotak sentuh 20×20, titiknya digambar ::before — titik 7px terlalu kecil
   untuk ditekan jari. */
.hbt-hero__dot.hbt-hero__dot,
.hbt-hero__pause.hbt-hero__pause {
  pointer-events: auto;
  position: relative;
  width: 20px; height: 20px; margin: 0; padding: 0;
  border: 0; border-radius: var(--hbt-pill);
  background: transparent; box-shadow: none;
  cursor: pointer;
}
.hbt-hero__dot.hbt-hero__dot::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: var(--hbt-pill);
  background: var(--hbt-hero-dot, rgba(255, 255, 255, .6));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
  transition: width .25s ease, margin .25s ease, background-color .25s ease;
}
.hbt-hero__dot.hbt-hero__dot[aria-current="true"] { width: 30px; }
.hbt-hero__dot.hbt-hero__dot[aria-current="true"]::before {
  width: 22px; margin-left: -11px;
  background: var(--hbt-hero-dot-on, #fff);
}
.hbt-hero__dot.hbt-hero__dot:focus-visible,
.hbt-hero__pause.hbt-hero__pause:focus-visible { outline: 2px solid #fff; outline-offset: 0; }

.hbt-hero__pause.hbt-hero__pause {
  margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(23, 23, 23, .45); color: #fff;
}
.hbt-hero__pause[hidden] { display: none; }
.hbt-hero__ico-play { display: none; }
.hbt-hero__pause[aria-pressed="true"] .hbt-hero__ico-play { display: block; }
.hbt-hero__pause[aria-pressed="true"] .hbt-hero__ico-pause { display: none; }

/* ------------------------------------------------------ banner samping */
.hbt-hero__side {
  display: var(--hbt-hero-side-display, grid);
  grid-auto-flow: var(--hbt-hero-side-flow, row);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: var(--hbt-hero-gap, 16px);
  min-width: 0; min-height: 0;
}
/*
 * Di kanan: gambar absolut, jadi petak tidak punya tinggi sendiri dan
 * barisnya mengikuti tinggi karusel. Di bawah: petak punya rasio sendiri.
 */
.hbt-hero__tile {
  position: relative; min-height: 0;
  aspect-ratio: var(--hbt-hero-tile-ratio, auto);
  border-radius: var(--hbt-hero-radius, 20px);
  overflow: hidden;
  background: var(--hbt-surface);
}

@media (max-width: 767px) {
  .hbt-hero__bar { bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .hbt-hero__dot.hbt-hero__dot::before { transition: none; }
}
