/* ==========================================================================
   WSDC Mobile UI V95 — drawer kanan + poster responsif + tap cepat
   Scope: homepage only. No Bootstrap offcanvas is used for the hamburger menu.
   ========================================================================== */

body.wsdc-home-page.wsdc-menu-open,
body.wsdc-home-page.wsdc-popup-open {
  overflow: hidden !important;
}

/* Freeze decorative infinite animations while an overlay is active.
   This frees compositor/GPU time for the menu/poster open-close motion. */
html body.wsdc-home-page:is(.wsdc-menu-open, .wsdc-popup-open) .wsdc-css-cloud,
html body.wsdc-home-page:is(.wsdc-menu-open, .wsdc-popup-open) .testimoni-track,
html body.wsdc-home-page:is(.wsdc-menu-open, .wsdc-popup-open) .wsdc-hero-media::after,
html body.wsdc-home-page:is(.wsdc-menu-open, .wsdc-popup-open) #flashdata > .relative::after {
  animation-play-state: paused !important;
}

body.wsdc-home-page .wsdc-home-menu-button,
body.wsdc-home-page [data-wsdc-menu-close],
body.wsdc-home-page [data-wsdc-popup-close] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ----------------------------- Mobile drawer ----------------------------- */
body.wsdc-home-page .wsdc-mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19990;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(1, 5, 10, .72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s linear, visibility 0s linear .16s;
}

body.wsdc-home-page .wsdc-mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.wsdc-home-page .wsdc-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 20000;
  width: min(88vw, 350px);
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(0, 229, 255, .30);
  background: #0a111c;
  box-shadow: -18px 0 46px rgba(0, 0, 0, .42);
  color: #f4f8ff;
  transform: translate3d(102%, 0, 0);
  visibility: hidden;
  pointer-events: none;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), visibility 0s linear .18s;
  contain: layout paint style;
  will-change: transform;
}

body.wsdc-home-page .wsdc-mobile-drawer.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.wsdc-home-page .wsdc-mobile-drawer__body,
body.wsdc-home-page .wsdc-mobile-drawer__viewport,
body.wsdc-home-page .wsdc-mobile-drawer__inner,
body.wsdc-home-page .wsdc-mobile-drawer__scroll {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

body.wsdc-home-page .wsdc-mobile-drawer__scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #0d1928 0%, #08101a 100%);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

body.wsdc-home-page .wsdc-mobile-drawer__scroll > div:first-child {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 66px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: #0d1928;
  border-bottom-color: rgba(0, 229, 255, .16) !important;
}

body.wsdc-home-page .wsdc-mobile-drawer__scroll > div:first-child button {
  width: 42px;
  height: 42px;
  margin: -4px 0 -4px 0 !important;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #fff;
}

body.wsdc-home-page .wsdc-mobile-drawer__scroll > div:first-child button:active {
  transform: scale(.96);
}

body.wsdc-home-page .wsdc-mobile-drawer a {
  min-height: 42px;
}

body.wsdc-home-page.wsdc-menu-open .wsdc-wa-float {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ----------------------------- Marketing poster -------------------------- */
body.wsdc-home-page .wsdc-ad-modal {
  position: fixed;
  inset: 0;
  z-index: 20100;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s linear, visibility 0s linear .16s;
  contain: layout paint style;
}

body.wsdc-home-page .wsdc-ad-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.wsdc-home-page .wsdc-ad-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(1, 4, 9, .78);
}

body.wsdc-home-page .wsdc-ad-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 780px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, .34);
  border-radius: 20px;
  background: #08111c;
  box-shadow: 0 22px 64px rgba(0,0,0,.50);
  transform: translate3d(0, 8px, 0) scale(.985);
  transition: transform .18s cubic-bezier(.2,.8,.2,1);
}

body.wsdc-home-page .wsdc-ad-modal.is-open .wsdc-ad-modal__dialog {
  transform: translate3d(0, 0, 0) scale(1);
}

body.wsdc-home-page .wsdc-ad-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(2, 8, 15, .88);
  color: #fff;
}

body.wsdc-home-page .wsdc-ad-modal__close svg {
  width: 22px;
  height: 22px;
}

body.wsdc-home-page .wsdc-ad-modal__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #020306;
}

body.wsdc-home-page .wsdc-ad-modal__media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70dvh, 720px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

body.wsdc-home-page .wsdc-ad-modal__content {
  max-height: 22dvh;
  overflow-y: auto;
  padding: 12px 18px 16px;
  text-align: center;
  overscroll-behavior: contain;
}

body.wsdc-home-page .wsdc-ad-modal__counter {
  margin-bottom: 4px;
  color: #8ea4b9;
  font-size: 10px;
  font-weight: 700;
}

body.wsdc-home-page .wsdc-ad-modal__content h2 {
  margin: 0;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

body.wsdc-home-page .wsdc-ad-modal__message {
  margin-top: 8px;
  color: #c4d0dc;
  font-size: 12px;
  line-height: 1.55;
}

/* Hero ads: never crop poster artwork on phones. */
@media (max-width: 767.98px) {
  body.wsdc-home-page .wsdc-hero-media {
    min-height: 0 !important;
    padding: 1px !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper,
  body.wsdc-home-page .wsdc-hero-media .swiper-wrapper,
  body.wsdc-home-page .wsdc-hero-media .swiper-slide {
    height: auto !important;
    min-height: 0 !important;
  }

  body.wsdc-home-page .wsdc-hero-media img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body.wsdc-home-page .wsdc-ad-modal {
    padding: 8px;
  }

  body.wsdc-home-page .wsdc-ad-modal__dialog {
    width: min(calc(100vw - 16px), 460px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  body.wsdc-home-page .wsdc-ad-modal__media img {
    width: 100%;
    max-height: 72dvh;
  }

  body.wsdc-home-page .wsdc-ad-modal[data-poster-orientation="portrait"] .wsdc-ad-modal__media img {
    width: auto;
    max-width: 100%;
    max-height: 76dvh;
  }

  body.wsdc-home-page .wsdc-ad-modal__content {
    max-height: 20dvh;
    padding: 10px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wsdc-home-page .wsdc-mobile-menu-backdrop,
  body.wsdc-home-page .wsdc-mobile-drawer,
  body.wsdc-home-page .wsdc-ad-modal,
  body.wsdc-home-page .wsdc-ad-modal__dialog {
    transition: none !important;
  }
}


/* V96.1 hard guard: never participate in normal document flow. */
body.wsdc-home-page #open-menu.wsdc-mobile-drawer:not(.is-open) {
  position: fixed !important;
  right: 0 !important;
  left: auto !important;
  transform: translate3d(101%,0,0) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.wsdc-home-page #open-menu.wsdc-mobile-drawer.is-open {
  position: fixed !important;
  right: 0 !important;
  left: auto !important;
  transform: translate3d(0,0,0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}


/* ==========================================================================
   WSDC V96.2 MOBILE FINAL — CLEAN OVERRIDE
   Fix screenshot iPhone:
   - hero banner selalu rasio asli 2:1, tidak jadi kotak / strip kiri
   - slide benar-benar 1 banner = 100% lebar
   - hero copy desktop tidak menyisakan ruang di HP
   - menu tertutup 100% sebelum tombol hamburger ditekan
   - drawer masuk/keluar hanya dari kanan
   ========================================================================== */

@media (max-width: 767.98px) {
  html,
  body.wsdc-home-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip !important;
  }

  body.wsdc-home-page .wsdc-home {
    width: 100%;
    overflow-x: clip !important;
  }

  /* Header HP */
  body.wsdc-home-page .wsdc-site-header {
    background: rgba(0, 0, 0, .96) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.wsdc-home-page .wsdc-site-header .container.flex.h-16 {
    height: 64px !important;
    min-height: 64px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body.wsdc-home-page .wsdc-site-header .container.flex.h-16 > div:first-child img {
    width: auto !important;
    height: 38px !important;
    max-width: 76px !important;
    object-fit: contain !important;
  }

  body.wsdc-home-page .wsdc-home-menu-button {
    display: inline-flex !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex: 0 0 40px !important;
  }

  /* Hero HP: copy desktop disembunyikan TANPA menyisakan kolom/tinggi. */
  body.wsdc-home-page .wsdc-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 18px 0 18px !important;
  }

  body.wsdc-home-page .wsdc-hero-grid {
    display: block !important;
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body.wsdc-home-page .wsdc-hero-copy {
    display: none !important;
  }

  /* Banner frame harus mengikuti banner asli 1280x640 = 2:1. */
  body.wsdc-home-page .wsdc-hero-media {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: #020306 !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper-slide img {
    display: block !important;
    position: static !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: 2 / 1 !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 15px !important;
    transform: none !important;
  }

  body.wsdc-home-page .wsdc-hero-media .swiper-pagination {
    left: 0 !important;
    right: 0 !important;
    bottom: 10px !important;
    width: 100% !important;
    transform: none !important;
  }

  /* Jarak section setelah hero jangan meninggalkan area kosong besar. */
  body.wsdc-home-page .wsdc-hero + .flex.flex-col {
    padding-top: 10px !important;
    gap: 22px !important;
  }

  body.wsdc-home-page #popular-cards-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.wsdc-home-page #popular-cards-container > li {
    min-width: 0 !important;
  }

  body.wsdc-home-page #popular-cards-container > li > a {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* DRAWER: closed state is completely outside viewport on RIGHT. */
  body.wsdc-home-page .wsdc-mobile-menu-backdrop:not(.is-open) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.wsdc-home-page #open-menu.wsdc-mobile-drawer {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(86vw, 340px) !important;
    max-width: 340px !important;
    height: 100dvh !important;
    transform: translate3d(105%, 0, 0) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.wsdc-home-page #open-menu.wsdc-mobile-drawer.is-open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* No heavy blur while menu is open. */
  body.wsdc-home-page.wsdc-menu-open .wsdc-css-cloud,
  body.wsdc-home-page.wsdc-menu-open .testimoni-track {
    animation-play-state: paused !important;
  }
}
