/*
 * Modern Nav Widget — External Stylesheet
 * Version: 3.3.0
 * Requires: WordPress 6.9+, PHP 8.1+
 */

/* ====================================================================
 * BASE
 * ==================================================================== */
.mnw-container,
.mnw-container * { box-sizing: border-box; }

.mnw-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
  visibility: visible;
}

/* ====================================================================
 * ANTI-CLS
 * Reserve height before JS initialises.
 * The value matches the default container padding set by the widget.
 * ==================================================================== */
.mnw-container {
  /* contain: layout style; — REMOVED v3.0.2: breaks position:fixed on .mnw-mobile-drawer */
  min-height: var(--mnw-min-height, 64px);
}

/* ====================================================================
 * DESKTOP PERFORMANCE — CSS containment (v3.1.0)
 *
 * `contain: layout style` lets the browser optimise paint and layout
 * recalculation by scoping them to the navbar subtree.
 *
 * SAFE on desktop because:
 *   • position:fixed on .mnw-mobile-drawer is irrelevant above 768 px
 *     (drawer is display:none via the responsive media query).
 *   • Absolute-positioned dropdowns are still positioned relative to
 *     their own .mnw-menu-item (position:relative) inside the container.
 *
 * NOT applied on mobile (see note on v3.0.2 removal above):
 *   • contain:layout would make .mnw-container a new containing block,
 *     causing position:fixed on the mobile drawer to be relative to
 *     the navbar instead of the viewport.
 * ==================================================================== */
@media screen and (min-width: 769px) {
  .mnw-container { contain: layout style; }
}

/*
 * Logo: pre-size so it never causes reflow.
 * img width/height attributes should also be set in the widget PHP.
 */
.mnw-logo img {
  width: auto;
  max-height: var(--mnw-logo-height, 48px);
  aspect-ratio: attr(width) / attr(height);  /* fallback width/height attrs */
}

/*
 * Desktop menu: show immediately (visibility:hidden → visible on reveal).
 * We override the default "opacity:0 + animation-delay" with an instant
 * show on the desktop wrapper so items are in-place on first paint.
 * The animation-delay only applies to the container's fallback.
 */
.mnw-desktop-wrapper { visibility: visible; }

/* ====================================================================
 * OVERFLOW — cegah horizontal scroll dari drawer
 * ==================================================================== */
body { overflow-x: hidden; }

/* ====================================================================
 * DRAWER OPEN — cegah body scroll saat sidebar mobile terbuka
 * ==================================================================== */
/* body scroll-lock via JS */

/* Overlay — dihapus: ::before pada body tidak bisa dibatasi z-index
   dengan benar lintas stacking context Elementor. Overlay kini ditangani
   via elemen JS (#mnw-overlay) yang di-append ke body. */

/* ====================================================================
 * STICKY
 * ==================================================================== */
.mnw-container.mnw-sticky-yes {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 9999;
}
body.admin-bar .mnw-container.mnw-sticky-yes { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .mnw-container.mnw-sticky-yes { top: 46px; }
}

.mnw-sticky-spacer { display: none; width: 100%; }
.mnw-sticky-spacer.is-visible { display: block; }

/* ====================================================================
 * LOGO
 * ==================================================================== */
.mnw-logo a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.mnw-logo img { height: auto; display: block; }
.mnw-logo-text { font-size: 1.2rem; font-weight: bold; color: inherit; }
/* v3.3.0: logo di desktop wrapper siap untuk align-self (vertical align) */
.mnw-desktop-wrapper .mnw-logo { display: inline-flex; align-items: center; align-self: center; box-sizing: border-box; }

/* ====================================================================
 * DESKTOP WRAPPER & NAV
 * ==================================================================== */
.mnw-desktop-wrapper { display: flex; align-items: center; width: 100%; }
.mnw-nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }

/* ====================================================================
 * LAYOUTS
 * ==================================================================== */
.mnw-container.layout-standard { justify-content: space-between; }
.mnw-container.layout-standard .mnw-desktop-wrapper { justify-content: flex-end; gap: 20px; }

.mnw-container.layout-centered .mnw-logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); z-index: 10; white-space: nowrap;
}
.mnw-container.layout-centered .mnw-desktop-wrapper { justify-content: center; width: 100%; gap: 0; }
.mnw-container.layout-centered .mnw-zone-left  { flex-basis: 50%; display: flex; justify-content: flex-end; }
.mnw-container.layout-centered .mnw-zone-right { flex-basis: 50%; display: flex; justify-content: flex-start; }
.mnw-container.layout-centered .mnw-cta-wrapper { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* ====================================================================
 * MENU ITEMS — Desktop top-level
 * Google touch-target standard: minimum 48×48 CSS px
 * padding-block: ensures hit area is >= 48px tall.
 * padding-inline: adds comfortable horizontal spacing + widens target.
 * ==================================================================== */
.mnw-menu-item { position: relative; }
.mnw-menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  /* Touch target: min 48px tall (Google/WCAG 2.5.5 guideline) */
  min-height: 48px;
  padding-block: 0;          /* height is provided by min-height + flex align */
  padding-inline: 8px;       /* widens clickable area; override per theme */
  position: relative;
  transition: color .3s ease, background-color .3s ease;
}

/* ====================================================================
 * ARROW (chevron) — selalu tampil, rotate saat aktif
 *
 * FIX: display:inline-flex eksplisit + SVG sizing terpusat di sini.
 * FIX: Rotate via :hover/:focus-within (desktop) DAN .is-open (mobile).
 * ==================================================================== */
.mnw-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 3px;
  line-height: 1;
  opacity: .72;
  transition: transform .3s ease, opacity .2s ease;
  /* v2.5.2: explicit min-size prevents 0x0 collapse when SVG not yet loaded */
  min-width: 1em;
  min-height: 1em;
}
.mnw-arrow-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1em;
  color: currentColor;
  /* v2.5.2: guarantee icon has size even before SVG renders */
  width: 1em;
  height: 1em;
}
.mnw-arrow-icon .e-font-icon-svg,
.mnw-arrow-icon > svg,
.mnw-arrow-icon svg {
  width: 1em !important;
  height: 1em !important;
  display: block !important;
  fill: currentColor;
  overflow: visible;
}
/* Inline SVG chevron fallback — uses stroke not fill */
.mnw-arrow-icon .mnw-chevron-svg,
.mnw-chevron-svg {
  width: 1em !important;
  height: 1em !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  overflow: visible;
  flex-shrink: 0;
}
/* Eicons font icon (<i> tag) support */
.mnw-arrow-icon > i,
.mnw-arrow-icon i {
  display: inline-flex !important;
  font-size: 1em !important;
  line-height: 1 !important;
  width: 1em !important;
  height: 1em !important;
  align-items: center;
  justify-content: center;
  color: currentColor;
}
/* Desktop: hover/focus rotate */
.mnw-menu-item:hover > a .mnw-arrow,
.mnw-menu-item:focus-within > a .mnw-arrow { transform: rotate(90deg); opacity: 1; }
/* Mobile: is-open rotate — ditangani via JS toggle class */
.mnw-has-children.is-open > a .mnw-arrow { transform: rotate(90deg); opacity: 1; }

/* ====================================================================
 * HOVER EFFECTS — top-level desktop
 * ==================================================================== */
.effect-underline .mnw-menu-item > a::after,
.effect-underline_slide .mnw-menu-item > a::after {
  content: ''; position: absolute; bottom: 0; left: 0; height: 2px;
  background-color: currentColor;
}
.effect-underline .mnw-menu-item > a::after { width: 0; transition: width .3s ease; }
.effect-underline .mnw-menu-item > a:hover::after,
.effect-underline .mnw-menu-item.current-menu-item > a::after { width: 100%; }

.effect-underline_slide .mnw-menu-item > a::after {
  width: 100%; transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.effect-underline_slide .mnw-menu-item > a:hover::after,
.effect-underline_slide .mnw-menu-item.current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }

.effect-background_slide .mnw-menu-item > a { overflow: hidden; z-index: 1; }
.effect-background_slide .mnw-menu-item > a::before {
  content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%; z-index: -1;
  background-color: currentColor; opacity: .12; transition: width .3s cubic-bezier(.25,1,.5,1);
}
.effect-background_slide .mnw-menu-item > a:hover::before { width: 100%; }
.effect-scale .mnw-menu-item > a:hover { transform: scale(1.1); }

/* ====================================================================
 * HOVER EFFECTS — mega menu items
 * ==================================================================== */
.mega-effect-underline .mnw-mega-item > a::after,
.mega-effect-underline_slide .mnw-mega-item > a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px;
  background-color: currentColor;
}
.mega-effect-underline .mnw-mega-item > a::after { width: 0; transition: width .3s ease; }
.mega-effect-underline .mnw-mega-item > a:hover::after,
.mega-effect-underline .mnw-mega-item > a:focus-visible::after,
.mega-effect-underline .mnw-mega-item.current-menu-item > a::after { width: 100%; }

.mega-effect-underline_slide .mnw-mega-item > a::after {
  width: 100%; transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.mega-effect-underline_slide .mnw-mega-item > a:hover::after,
.mega-effect-underline_slide .mnw-mega-item > a:focus-visible::after,
.mega-effect-underline_slide .mnw-mega-item.current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }

.mega-effect-background .mnw-mega-item > a:hover,
.mega-effect-background .mnw-mega-item > a:focus-visible,
.mega-effect-background_slide .mnw-mega-item > a:hover,
.mega-effect-background_slide .mnw-mega-item > a:focus-visible { background-color: rgba(0,0,0,.06); }

.mega-effect-background_slide .mnw-mega-item > a { overflow: hidden; z-index: 1; }
.mega-effect-background_slide .mnw-mega-item > a::before {
  content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%; z-index: -1;
  background-color: currentColor; opacity: .12; transition: width .3s cubic-bezier(.25,1,.5,1);
}
.mega-effect-background_slide .mnw-mega-item > a:hover::before,
.mega-effect-background_slide .mnw-mega-item > a:focus-visible::before { width: 100%; }

.mega-effect-scale .mnw-mega-item > a:hover,
.mega-effect-scale .mnw-mega-item > a:focus-visible { transform: scale(1.06); }

/* ====================================================================
 * HOVER EFFECTS — submenu dropdown normal
 * ==================================================================== */
.effect-underline .mnw-submenu li > a::after,
.effect-underline_slide .mnw-submenu li > a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px;
}
.effect-underline .mnw-submenu li > a::after { width: 0; transition: width .3s ease; }
.effect-underline .mnw-submenu li > a:hover::after,
.effect-underline .mnw-submenu li.current-menu-item > a::after { width: 100%; }

.effect-underline_slide .mnw-submenu li > a::after {
  width: 100%; transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.effect-underline_slide .mnw-submenu li > a:hover::after,
.effect-underline_slide .mnw-submenu li.current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }

.effect-background_slide .mnw-submenu li > a { overflow: hidden; z-index: 1; }
.effect-background_slide .mnw-submenu li > a::before {
  content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%; z-index: -1; transition: width .3s cubic-bezier(.25,1,.5,1);
}
.effect-background_slide .mnw-submenu li > a:hover::before { width: 100%; }
.effect-scale .mnw-submenu li > a:hover { transform: scale(1.06); }

/* ====================================================================
 * DESKTOP DROPDOWN / SUBMENU
 * ==================================================================== */
.mnw-submenu {
  list-style: none; margin: 0;
  position: absolute; top: 100%; left: 0; z-index: 999;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, top .25s ease;
  border-radius: 4px;
}
.mnw-menu-item:hover > .mnw-submenu,
.mnw-menu-item:focus-within > .mnw-submenu,
.mnw-menu-item.mnw-hover-open > .mnw-submenu { opacity: 1; visibility: visible; transform: translateY(0); }

/* v3.3.0: Bridge transparan — mengisi gap antara nav item dan submenu
 * agar cursor tidak "terputus" saat bergerak ke bawah menuju dropdown.
 * Tinggi 12px = cukup menutupi gap translateY + border-radius + shadow. */
.mnw-menu-item.mnw-has-children > a { position: relative; }
.mnw-menu-item.mnw-has-children > a::before {
  content: '';
  position: absolute;
  bottom: -12px; left: 0; right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
  z-index: 1000;
}
.mnw-submenu li > a {
  display: flex; align-items: center; gap: 8px;
  justify-content: space-between;
  /* Touch target: min 48px (Google standard) */
  min-height: 48px;
  padding: 0 15px; text-decoration: none; white-space: nowrap; position: relative;
  transition: color .2s, background-color .2s, transform .2s ease;
}
/* v2.5.2: chevron di leaf node (tidak punya anak) — tampil kecil, tidak rotate */
.mnw-submenu li:not(.mnw-has-children) > a .mnw-arrow { opacity: .4; }
/* Rotate hanya jika punya anak */
.mnw-submenu li.mnw-has-children:hover > a .mnw-arrow,
.mnw-submenu li.mnw-has-children:focus-within > a .mnw-arrow { transform: rotate(90deg); opacity: 1; }
.mnw-submenu .mnw-submenu { top: 0; left: 100%; }

.mnw-list-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 14px; }
.mnw-submenu-item-icon { flex: 0 0 auto; }

/* ====================================================================
 * MEGA ARROW — chevron di dalam item mega menu
 *
 * FIX: display:inline-flex + SVG sizing eksplisit.
 * ==================================================================== */
.mnw-mega-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 6px;
  line-height: 1;
  opacity: .72;
  transition: transform .25s ease, opacity .25s ease;
}
.mnw-mega-arrow .mnw-arrow-icon {
  display: inline-flex !important; align-items: center; justify-content: center;
  line-height: 1; font-size: 1em; color: currentColor;
}
.mnw-mega-arrow .mnw-arrow-icon .e-font-icon-svg,
.mnw-mega-arrow .mnw-arrow-icon > svg,
.mnw-mega-arrow .mnw-arrow-icon svg { width: 1em !important; height: 1em !important; display: block !important; fill: currentColor; overflow: visible; }
.mnw-mega-arrow .mnw-arrow-icon .mnw-chevron-svg { fill: none !important; stroke: currentColor !important; }
.mnw-mega-arrow .mnw-arrow-icon > i,
.mnw-mega-arrow .mnw-arrow-icon i { display: inline-flex !important; font-size: 1em !important; line-height: 1 !important; width: 1em !important; height: 1em !important; align-items: center; justify-content: center; color: currentColor; }
.mnw-mega-item > a:hover .mnw-mega-arrow,
.mnw-mega-item > a:focus-visible .mnw-mega-arrow { transform: translateX(3px); opacity: 1; }

/* ====================================================================
 * CTA BUTTON
 * ==================================================================== */
.mnw-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, transform .2s ease, box-shadow .3s ease, border-color .3s ease;
  font-weight: 600;
  font-size: 14px;
  border-style: solid;
  border-width: 0;
  cursor: pointer;
  line-height: 1;
}

.mnw-cta-btn:hover { transform: translateY(-1px); }
.mnw-cta-btn .mnw-auth-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
}
.mnw-cta-btn .mnw-auth-btn__icon svg {
  width: 1em;
  height: 1em;
  display: block;
}
.mnw-cta-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-inline-start: 0;
}



/* ====================================================================
 * AUTH BUTTON BASICS
 * ==================================================================== */
.mnw-auth-btn {
  position: relative;
}

.mnw-auth-btn__text {
  display: inline-flex;
  align-items: center;
}

.mnw-auth-btn.is-guest,
.mnw-auth-btn.is-logged-in {
  text-decoration: none;
}

/* ====================================================================
 * AUTH BUTTON STATES
 * ==================================================================== */
/* ====================================================================
 * MOBILE HAMBURGER TOGGLE
 * ==================================================================== */
.mnw-mobile-toggle {
  display: none;
  /* Fixed touch-target size — never changes regardless of "Icon Size" setting.
     Elementor "Icon Size" control now targets span width, not this box. */
  width: 44px; height: 44px;
  cursor: pointer; position: relative; z-index: 10050; touch-action: manipulation;
  justify-content: center; align-items: center;
  background: transparent !important; border: none !important; padding: 0;
  /* Hard-coded outline removal — cannot be overridden by any external stylesheet.
     JS also re-applies these on every interaction (v3.2.6). */
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
  appearance: none;
  -webkit-appearance: none;
}
/* All interactive states */
.mnw-mobile-toggle:hover,
.mnw-mobile-toggle:active,
.mnw-mobile-toggle:focus,
.mnw-mobile-toggle:focus:not(:focus-visible),
.mnw-container .mnw-mobile-toggle:focus,
.mnw-container .mnw-mobile-toggle:active,
.elementor-widget-container .mnw-mobile-toggle:focus,
.elementor-widget-container .mnw-mobile-toggle:active {
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.mnw-mobile-toggle span {
  display: block;
  /* width is set by Elementor "Icon Size" → {{WRAPPER}} .mnw-mobile-toggle span { width: Xpx }
     Default fallback: use CSS var set by Elementor, or 22px. */
  width: var(--mnw-toggle-icon-size, 22px);
  height: 2px;
  border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%);
  transition: all .3s ease-in-out; transform-origin: center;
}
/* Span vertical positions — centered horizontally via left:50%+translateX(-50%) in base rule */
.mnw-mobile-toggle span:nth-child(1) { top: 22%; }
.mnw-mobile-toggle span:nth-child(2) { top: 50%; transform: translateX(-50%) translateY(-50%); }
.mnw-mobile-toggle span:nth-child(3) { bottom: 22%; }
.mnw-mobile-toggle[aria-expanded="true"] span:nth-child(1) { top: 50%; transform: translateX(-50%) translateY(-50%) rotate(45deg); }
.mnw-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: translateX(-50%) scaleX(0); }
.mnw-mobile-toggle[aria-expanded="true"] span:nth-child(3) { top: 50%; bottom: auto; transform: translateX(-50%) translateY(-50%) rotate(-45deg); }

/*
 * FIX v3.0.2: .mnw-mobile-toggle.is-drawer-open TIDAK lagi position:fixed.
 * Versi sebelumnya memindahkan toggle button ke fixed position menggunakan
 * getBoundingClientRect() → menyebabkan icon X "melompat" ke posisi berbeda
 * dari icon hamburger, terutama saat halaman sudah di-scroll.
 *
 * Solusi: Toggle tetap di posisi aslinya di navbar (position:relative/static).
 * Animasi hamburger → X dihandle murni via CSS: aria-expanded="true".
 * Class is-drawer-open masih ada tapi hanya untuk styling opsional (warna, dll).
 */
.mnw-mobile-toggle.is-drawer-open {
  /* Tetap di posisi asli di navbar */
  position: relative;
  /* z-index di atas drawer (9991) dan overlay (9989) */
  z-index: 10050;
}
/* Pastikan navbar dan toggle selalu di atas overlay */
.mnw-container { isolation: isolate; }
/* Untuk navbar NON-sticky, naikkan z-index saat drawer aktif via class */
.mnw-container.mnw-nav-active {
  position: relative;
  z-index: 10002;
}

/* ====================================================================
 * MOBILE DRAWER — position:fixed, tidak ikut scroll
 * ==================================================================== */
.mnw-mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;
  /* Full tinggi device — dvh untuk mobile browser modern, vh fallback */
  height: 100vh;
  height: 100dvh;
  /* Lebar sidebar — 80% layar, max 320px */
  width: 80%;
  max-width: 320px;
  /* Background putih eksplisit */
  background: #ffffff !important;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.77,0,.175,1), visibility 0s linear .4s;
  /* z-index lebih tinggi dari overlay */
  z-index: 10002;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -5px 0 30px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.mnw-mobile-drawer.is-active {
  transform: translateX(0); visibility: visible; pointer-events: auto;
  transition: transform .4s cubic-bezier(.77,0,.175,1), visibility 0s linear 0s;
}
.mnw-mobile-drawer.mnw-no-transition { transition: none !important; }

/* ====================================================================
 * MOBILE NAV LIST — top level
 * ==================================================================== */
.mnw-nav-mobile {
  list-style: none;
  /* Padding horizontal agar item menu tidak menempel ke tepi drawer */
  padding: 0 24px;
  padding-inline: clamp(20px, 4vw, 28px);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  /* margin auto atas-bawah = center vertikal */
  margin-top: auto;
  margin-bottom: auto;
}
.mnw-nav-mobile > .mnw-menu-item { border-bottom: 1px solid rgba(0,0,0,.07); }
.mnw-nav-mobile > .mnw-menu-item > a {
  display: flex; justify-content: space-between; align-items: center;
  /* Touch target: min 48px (Google standard) */
  min-height: 48px;
  padding: 0; font-size: 1.05rem; text-decoration: none; color: inherit; position: relative;
}

/* Chevron top-level mobile — selalu tampil */
.mnw-nav-mobile > .mnw-menu-item > a .mnw-arrow {
  display: inline-flex !important;
  flex-shrink: 0;
  margin-left: auto;
}

/* ====================================================================
 * MOBILE ACCORDION SUBMENU
 * ==================================================================== */
.mnw-nav-mobile .mnw-submenu {
  /* Reset semua style desktop */
  position: static !important; opacity: 1 !important; visibility: visible !important;
  transform: none !important; box-shadow: none !important; border-radius: 0 !important;
  min-width: 0 !important; z-index: auto !important; border: none !important;
  padding: 0 !important; margin: 0 !important; background: transparent !important;
  /* Accordion */
  max-height: 0; overflow: hidden; transition: max-height .28s ease-in; list-style: none;
}
.mnw-nav-mobile .mnw-has-children.is-open > .mnw-submenu {
  max-height: 9999px; transition: max-height .4s ease-out;
}

/* Sub item mobile — FIX: indent lebih dalam + flex-wrap agar tidak overflow frame */
.mnw-nav-mobile .mnw-submenu > li { border-bottom: none !important; border-top: none !important; }
.mnw-nav-mobile .mnw-submenu > li > a {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  /* Touch target: min 48px (Google standard) */
  min-height: 48px;
  padding: 0 0 0 24px !important;
  font-size: 0.92rem;
  font-weight: 400; color: inherit; text-decoration: none;
  gap: 8px;
  white-space: normal !important;
  word-break: break-word;
}
/* v2.5.2: leaf node mobile — chevron redup */
.mnw-nav-mobile .mnw-submenu > li:not(.mnw-has-children) > a .mnw-arrow { opacity: .4; }
/* Nested sub-submenu — indent bertambah */
.mnw-nav-mobile .mnw-submenu .mnw-submenu > li > a { padding-left: 40px !important; }

/* Icons di mobile */
.mnw-nav-mobile .mnw-submenu .mnw-list-icon { display: none !important; }
.mnw-nav-mobile .mnw-submenu .mnw-arrow { display: inline-flex !important; flex-shrink: 0; margin-left: auto; min-width: 1em; min-height: 1em; }
.mnw-nav-mobile .mnw-arrow { display: inline-flex !important; min-width: 1em; min-height: 1em; }

/* Nonaktifkan transform & overflow di mobile */
.mnw-nav-mobile .mnw-menu-item > a { transform: none !important; overflow: visible !important; position: relative; }
.mnw-nav-mobile .mnw-menu-item > a::before { display: none !important; }

/* Underline effects tetap aktif di mobile (horizontal) */
.effect-underline .mnw-nav-mobile .mnw-menu-item > a::after {
  content: ''; display: block !important; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; transition: width .3s ease;
}
.effect-underline .mnw-nav-mobile .mnw-menu-item > a:hover::after,
.effect-underline .mnw-nav-mobile .mnw-menu-item.current-menu-item > a::after { width: 100%; }

.effect-underline_slide .mnw-nav-mobile .mnw-menu-item > a::after {
  content: ''; display: block !important; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px; transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.effect-underline_slide .mnw-nav-mobile .mnw-menu-item > a:hover::after,
.effect-underline_slide .mnw-nav-mobile .mnw-menu-item.current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }

/* ====================================================================
 * MOBILE CTA & LOGO
 * ==================================================================== */
.mnw-mobile-cta {
  margin-top: 0;
  padding: 20px 24px 24px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mnw-mobile-cta .mnw-cta-btn { width: 100%; justify-content: center; padding: 15px !important; }
.mnw-mobile-cta .mnw-auth-btn__icon { font-size: 1em; }
.mnw-mobile-cta .mnw-auth-btn__icon svg { width: 1em; height: 1em; }
.mnw-mobile-logo { display: none; }

/* ====================================================================
 * RESPONSIVE BREAKPOINT — 768px
 * ==================================================================== */
@media screen and (max-width: 768px) {
  .mnw-desktop-wrapper { display: none !important; }
  .mnw-container { justify-content: space-between !important; }
  .mnw-mobile-toggle { display: flex; }
  .mnw-container.layout-centered .mnw-logo { position: static; transform: none; }
  .mnw-container.layout-centered .mnw-cta-wrapper { display: none; }
  .mnw-mega-dropdown { display: none !important; }
}

/* ====================================================================
 * FOCUS STYLES — Accessibility
 * ==================================================================== */
.mnw-menu-item > a:focus-visible,
.mnw-cta-btn:focus-visible { outline: 3px solid #005fcc; outline-offset: 2px; border-radius: 2px; }
.mnw-mobile-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ====================================================================
 * MEGA DROPDOWN — BASE RULE (v3.2.1 — flash prevention)
 * Hidden by default so the panel never flashes as a visible block on
 * desktop before the external stylesheet finishes loading (e.g. after a
 * full Cloudflare / LiteSpeed cache purge). The desktop @media rule
 * below overrides this back to display:flex once the sheet is applied.
 * The critical inline CSS in build_critical_css() also emits this rule
 * scoped to the widget ID so it fires even earlier, at first paint.
 * ==================================================================== */
.mnw-mega-dropdown { display: none; }

/* ====================================================================
 * MEGA DROPDOWN — DESKTOP ONLY (min-width: 769px)
 *
 * v3.2.6 strategy: critical inline CSS already sets display:flex +
 * visibility:hidden + opacity:0 + pointer-events:none on ≥769px so the
 * panel is invisible but in the flex flow. This stylesheet takes over
 * once loaded and adds transitions + hover reveal.
 * ==================================================================== */
@media screen and (min-width: 769px) {

  .mnw-container.mnw-dropdown-mega .mnw-menu-item > .mnw-submenu { display: none; }
  .mnw-container.mnw-dropdown-mega .mnw-menu-item.mnw-mega-parent { position: static; }

  .mnw-container.mnw-dropdown-mega .mnw-mega-dropdown {
    position: absolute;
    top: calc(100% + var(--mnw-mega-offset-y, 0px));
    left: 0; right: 0; width: 100%;
    z-index: 999;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    box-sizing: border-box;
    padding-inline: clamp(12px, 1.6vw, 18px);
    background: #fff;
    display: flex; justify-content: center; align-items: stretch;
  }

  .mnw-container.mnw-dropdown-mega .mnw-menu-item:hover > .mnw-mega-dropdown,
  .mnw-container.mnw-dropdown-mega .mnw-menu-item:focus-within > .mnw-mega-dropdown,
  .mnw-container.mnw-dropdown-mega .mnw-menu-item.mnw-hover-open > .mnw-mega-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
    pointer-events: auto;
  }

  /* v3.3.0: Bridge transparan untuk mega dropdown
   * Menutupi gap antara nav item link dan tepi atas mega dropdown panel.
   * Ukuran bridge disesuaikan dengan --mnw-mega-offset-y (default 0) +
   * translateY(8px) awal + sedikit buffer = 20px total aman. */
  .mnw-container.mnw-dropdown-mega .mnw-mega-parent > a { position: relative; }
  .mnw-container.mnw-dropdown-mega .mnw-mega-parent > a::before {
    content: '';
    position: absolute;
    bottom: -20px; left: -24px; right: -24px;
    height: 20px;
    background: transparent;
    pointer-events: auto;
    z-index: 1000;
  }

  /* ---------------------------------------------------------------
   * MEGA INNER — FIX: align-items:center agar gambar & konten
   *              sejajar di tengah, bukan rata atas
   * --------------------------------------------------------------- */
  .mnw-mega-inner {
    --mnw-mega-preview-basis: 33.333%;
    display: flex;
    gap: clamp(28px, 3vw, 44px);
    align-items: center;          /* FIX utama: bukan flex-start */
    justify-content: center;
    width: 100%; max-width: 1400px;
    margin: 0 auto; padding: 18px 0;
    box-sizing: border-box; min-width: 0;
  }

  /* Box gambar — align-self:center agar tetap tengah walau konten lebih panjang */
  .mnw-mega-media {
    flex: 0 0 var(--mnw-mega-preview-basis);
    max-width: var(--mnw-mega-preview-basis);
    min-width: 220px;
    display: flex; flex-direction: column; gap: 12px;
    align-items: center;
    align-self: center;           /* FIX: paksa center meski konten lebih tinggi */
  }

  .mnw-mega-media-frame {
    width: min(100%, 340px); aspect-ratio: 1 / 1;
    overflow: hidden; border-radius: 18px;
    background: #fff; border: 1px solid rgba(0,0,0,.06);
    display: grid; place-items: center; padding: 12px;
    box-sizing: border-box; margin-inline: auto;
  }
  .mnw-mega-media-frame img {
    width: 100%; height: 100%; object-fit: contain; object-position: center; display: block;
  }
  .mnw-mega-media-caption { display: none; }

  /* Konten (daftar item) — align-self:center */
  .mnw-mega-content {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column; gap: 14px;
    padding-inline-start: clamp(12px, 1.4vw, 24px);
    padding-inline-end: 8px;
    align-items: flex-start;
    align-self: center;           /* FIX: rata tengah dengan gambar */
  }

  .mnw-mega-pages { min-width: 0; width: 100%; }
  .mnw-mega-page { display: none; }
  .mnw-mega-page.is-active { display: block; }

  .mnw-mega-links {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
    width: 100%; align-content: start;
  }

  /* Item link di mega */
  .mnw-mega-item > a {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 14px;
    text-decoration: none; white-space: normal; border-radius: 12px;
    line-height: 1.35; font: inherit; word-break: break-word;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
  }
  /* v2.5.2: leaf mega-item chevron — redup, tidak rotate */
  .mnw-mega-item:not(.mnw-has-children) > a .mnw-mega-arrow { opacity: .4; }
  /* Translate hanya jika punya anak */
  .mnw-mega-item.mnw-has-children > a:hover .mnw-mega-arrow,
  .mnw-mega-item.mnw-has-children > a:focus-visible .mnw-mega-arrow { transform: translateX(3px); opacity: 1; }

  /* Mega submenu (nested) */
  .mnw-mega-submenu {
    position: static !important; top: auto !important; left: auto !important; right: auto !important;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    box-shadow: none !important; border-radius: 0 !important; min-width: 0 !important;
    z-index: auto !important; background: transparent !important;
    list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; display: grid; gap: 8px; width: 100%;
  }
  .mnw-mega-submenu .mnw-mega-item > a { padding-top: 10px; padding-bottom: 10px; }
  .mnw-mega-submenu .mnw-mega-submenu { margin-top: 6px; padding-left: 16px; }

  /* Depth indent */
  .mnw-mega-item.mnw-depth-1 > a { padding-left: 18px; opacity: .95; }
  .mnw-mega-item.mnw-depth-2 > a { padding-left: 30px; opacity: .9; }
  .mnw-mega-item.mnw-depth-3 > a { padding-left: 42px; opacity: .84; }

  /* Pagination */
  .mnw-mega-pagination {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: 12px; padding-top: 2px;
  }
  .mnw-mega-page-status {
    font: inherit; font-size: .9rem; font-weight: 600; min-width: 56px; text-align: center;
  }
  .mnw-mega-page-nav {
    appearance: none; border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.95); color: inherit; cursor: pointer;
    font: inherit; font-weight: 600; min-width: 42px; min-height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
  }
  .mnw-mega-page-nav:hover:not(:disabled),
  .mnw-mega-page-nav:focus-visible:not(:disabled) { transform: translateY(-1px); }
  .mnw-mega-page-nav:disabled { opacity: .45; cursor: not-allowed; }

} /* end @media min-width: 769px */
