/* =========================================================
   HERO SLIDER (AAK / TM STYLE) - FINAL CLEAN
   - Full width section (edge-to-edge)
   - Background luar putih
   - Background gelap hanya di card (.tm-hero__wrap)
   - Controls (prev + dots + next) di tengah, berdekatan
   ========================================================= */

:root{
  --hero-gutter: var(--page-gutter, clamp(14px, 2.2vw, 32px));

  --hero-navy-1:#03101e;
  --hero-navy-2:#051430;
  --hero-blue-1:#082c66;
  --hero-blue-2:#0a3c87;
  --hero-sky:#2b8fe8;

  --hero-border: rgba(255,255,255,.10);
  --hero-text: rgba(255,255,255,.92);
  --hero-text-dim: rgba(255,255,255,.86);
}

/* ===== SECTION (FULL BLEED / FULL WIDTH) ===== */
.tm-hero{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  position: relative;
  max-width: none;

  background: #fff;
  padding: 0 0 clamp(24px, 3vw, 42px);

  /* cegah horizontal scroll akibat 100vw */
  overflow-x: clip;
}
@supports not (overflow: clip){
  .tm-hero{ overflow-x: hidden; }
}

/* Inner container: tetap rapi dengan gutter */
.tm-hero__container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: var(--hero-gutter);
  padding-right: var(--hero-gutter);
  position: relative;
}

/* track container */
.tm-hero__track{
  position: relative; /* anchor controls */
  width: 100%;
  max-width: none;
}

/* ===== SLIDE WRAP (CARD) ===== */
.tm-hero__wrap{
  position: relative;
  overflow: hidden;
  border-radius: 18px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: stretch;

  min-height: clamp(420px, 52vw, 520px);

  background: linear-gradient(90deg, #041a3b 0%, var(--hero-blue-2) 55%, var(--hero-sky) 120%);
  border: 1px solid var(--hero-border);

  box-shadow:
    0 34px 84px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.10);

  isolation: isolate;

  width: 100%;
  max-width: none;
}

/* Layer A: background blur dari foto */
.tm-hero__wrap::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;

  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transform: scale(1.16);
  filter: blur(32px) saturate(1.05);
  opacity: .52;
}

/* Layer B: overlay navy + glow */
.tm-hero__wrap::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;

  background:
    radial-gradient(820px 460px at 86% 12%, rgba(255,170,70,.14), transparent 66%),
    radial-gradient(980px 560px at 18% 42%, rgba(45,156,255,.20), transparent 68%),
    radial-gradient(900px 640px at 38% 52%, rgba(3,12,30,.72), rgba(3,12,30,0) 72%),
    linear-gradient(
      90deg,
      rgba(3,12,30,.96) 0%,
      rgba(5,20,48,.88) 32%,
      rgba(8,44,102,.58) 62%,
      rgba(0,0,0,0) 100%
    );
}

/* ===== CONTENT (KIRI) ===== */
.tm-hero__content{
  position: relative;
  z-index: 3;
  color: #fff;

  padding: clamp(22px, 4.6vw, 62px) clamp(18px, 4.2vw, 54px);
  padding-top: clamp(18px, 3.2vw, 44px);
  padding-bottom: clamp(22px, 4vw, 56px);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  min-width: 0;
}

.tm-hero__badge{
  display:inline-flex;
  align-items:center;
  gap:10px;

  font-weight:800;
  font-size:13px;
  letter-spacing:.02em;

  padding:8px 12px;
  border-radius:999px;

  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);

  margin:0 0 12px;
  max-width:100%;
  flex-wrap:wrap;
}

.tm-hero__title{
  margin:0 0 12px;
  font-weight:950;
  line-height:1.06;
  font-size: clamp(28px, 4vw, 54px);
  max-width:26ch;
  text-shadow: 0 14px 30px rgba(0,0,0,.42);
}

.tm-hero__desc{
  margin:0 0 18px;
  max-width:64ch;
  line-height:1.7;
  color: rgba(255,255,255,.88);
  text-shadow: 0 12px 26px rgba(0,0,0,.25);
  font-size: clamp(14px, 1.4vw, 18px);
}

.tm-hero__cta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:6px;
}

.tm-hero__meta{ margin-top:16px; }
.tm-hero__chip{
  display:inline-flex;
  align-items:center;
  gap:10px;

  padding:10px 12px;
  border-radius:14px;

  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);

  font-size:13px;
  color: rgba(255,255,255,.86);
}

/* ===== BUTTONS ===== */
.tm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height:44px;
  padding:0 16px;
  border-radius:14px;

  font-weight:900;
  font-size:14px;
  text-decoration:none;

  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 12px 26px rgba(0,0,0,.22);

  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.tm-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.14); }
.tm-btn:active{ transform: translateY(0); }

.tm-btn--primary{
  background: linear-gradient(180deg, rgba(45,156,255,.95), rgba(45,156,255,.72));
  border-color: rgba(45,156,255,.60);
  color:#fff;
}
.tm-btn--primary:hover{
  background: linear-gradient(180deg, rgba(45,156,255,1), rgba(45,156,255,.78));
}

.tm-btn--ghost{
  background: rgba(3,12,30,.22);
  border-color: rgba(255,255,255,.18);
}

/* ===== MEDIA (KANAN) ===== */
.tm-hero__media{
  position:relative;
  z-index:2;
  display:flex;
  justify-content:flex-end;
  align-items:stretch;
  min-width:0;
  padding: 0;
}

.tm-hero__media img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:right center;
  display:block;
  padding:0;

  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.20) 14%, rgba(0,0,0,.92) 32%, rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.20) 14%, rgba(0,0,0,.92) 32%, rgba(0,0,0,1) 100%);

  filter: saturate(1.06) contrast(1.04);
}

.tm-hero__dummy{
  width:100%;
  height:100%;
  background: rgba(255,255,255,.06);
}

/* ===== SLIDER STATES (FALLBACK NON-JS) ===== */
.tm-hero__slide{
  display:none;
  opacity:0;
  transform: translateY(6px);
  transition: opacity .45s ease, transform .45s ease;
  will-change: opacity, transform;
}
.tm-hero__slide.is-active{
  display:block;
  opacity:1;
  transform: translateY(0);
}

/* ===== MODE JS (slides absolute) ===== */
.tm-hero.is-js .tm-hero__slide{
  position:absolute;
  inset:0;
  display:block;
  pointer-events:none;
}
.tm-hero.is-js .tm-hero__slide.is-active{ pointer-events:auto; }
.tm-hero.is-js .tm-hero__track{ min-height: clamp(420px, 52vw, 520px); }

/* =========================================================
   CONTROLS CENTER (prev + dots + next)
   - gunakan wrapper: .tm-hero__controls di dalam .tm-hero__track
   ========================================================= */
.tm-hero__controls{
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 2vw, 20px);
  transform: translateX(-50%);
  z-index: 20;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 999px;

  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 14px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.10);
}

/* Panah */
.tm-hero__nav{
  width: 40px;
  height: 40px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.16);
  color: #fff;

  cursor: pointer;
  user-select: none;

  transition: transform .12s ease, background .12s ease;
}
.tm-hero__nav:hover{ transform: translateY(-1px); background: rgba(255,255,255,.22); }
.tm-hero__nav:active{ transform: translateY(0); }

/* Dots container */
.tm-hero__dots{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin: 0;
  padding: 0 4px;

  /* aman kalau dots banyak */
  max-width: min(560px, calc(100vw - 180px));
  overflow-x: auto;
  scrollbar-width: none;
}
.tm-hero__dots::-webkit-scrollbar{ display:none; }

/* Dot */
.tm-hero__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;

  background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.28);

  cursor: pointer;
  transition: transform .12s ease, background .12s ease, width .18s ease;
}
.tm-hero__dot.is-active{
  width: 26px;
  background: rgba(255,255,255,.92);
}

/* Focus a11y */
.tm-hero__nav:focus-visible,
.tm-hero__dot:focus-visible,
.tm-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px){
  .tm-hero__wrap{
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .tm-hero__wrap::before{
    background:
      radial-gradient(700px 420px at 50% 12%, rgba(45,156,255,.16), transparent 64%),
      radial-gradient(700px 420px at 50% 60%, rgba(255,170,70,.10), transparent 66%),
      linear-gradient(180deg, rgba(3,12,30,.96) 0%, rgba(5,20,48,.78) 55%, rgba(8,44,102,.18) 100%);
  }

  .tm-hero__content{
    text-align:center;
    align-items:center;
    padding: 22px 20px 18px;
    justify-content:flex-start;
  }

  .tm-hero__title{ max-width: 22ch; }
  .tm-hero__desc{ max-width: 62ch; }
  .tm-hero__cta{ justify-content:center; }

  .tm-hero__media{
    height: clamp(220px, 44vw, 320px);
  }

  .tm-hero__media img{
    object-fit: cover;
    -webkit-mask-image: none;
    mask-image: none;
    filter: none;
  }

  /* mode JS: jaga tinggi track biar controls tidak “nabrak” */
  .tm-hero.is-js .tm-hero__track{
    min-height: clamp(520px, 120vw, 700px);
  }
}

@media (max-width: 520px){
  .tm-hero__container{
    padding-left: 14px;
    padding-right: 14px;
  }

  .tm-hero__controls{
    gap: 8px;
    padding: 7px 9px;
  }

  .tm-hero__nav{
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .tm-hero__dot{
    width: 9px;
    height: 9px;
  }
}

@media (max-width: 480px){
  .tm-hero{ padding: 18px 0 12px; }
  .tm-hero__wrap{ border-radius: 18px; }
  .tm-hero__content{ padding: 24px 16px 14px; }

  .tm-hero__title{
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.08;
  }

  .tm-hero__desc{ font-size: 14px; }
  .tm-hero__cta .tm-btn{ width: 100%; }

  /* dots lebih ringkas */
  .tm-hero__dots{
    gap: 6px;
    max-width: calc(100vw - 160px);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce){
  .tm-hero__slide,
  .tm-btn,
  .tm-hero__nav,
  .tm-hero__dot{
    transition: none !important;
  }
}
