/* Bagian "Lokasi Kami" di Home */
.l4l-loc, .l4l-loc * { box-sizing: border-box; }
.l4l-loc { padding: clamp(56px, 7vw, 104px) 0; background: #eef5f2; color: var(--l4l-ink); scroll-margin-top: var(--l4l-head-tight); }
.l4l-loc__inner { max-width: calc(var(--l4l-max) + 2 * var(--l4l-gutter)); margin: 0 auto; padding: 0 var(--l4l-gutter); }

.l4l-loc__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 40px; align-items: start; margin-bottom: clamp(28px, 3.5vw, 48px); }
.l4l-loc .l4l-loc__title { margin: 0; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; word-spacing: .08em; color: var(--l4l-green); text-wrap: balance; }
.l4l-loc .l4l-loc__intro { margin: 0; max-width: 62ch; font-size: 1.0625rem; line-height: 1.7; color: #3c4b47; text-wrap: pretty; }
.l4l-loc__intro strong { font-weight: 700; color: var(--l4l-ink); }

.l4l-loc__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }

/* Daftar provinsi */
.l4l-place { border-top: 1px solid #c6d8d1; }
.l4l-place:last-child { border-bottom: 1px solid #c6d8d1; }
.l4l-place summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 84px; padding: 16px 4px; cursor: pointer; list-style: none;
}
.l4l-place summary::-webkit-details-marker { display: none; }
.l4l-place__label { display: block; }
.l4l-place__name { display: block; font-size: 1.375rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; transition: color .2s; }
.l4l-place__area { display: block; margin-top: 4px; font-size: .9375rem; color: var(--l4l-ink-soft); }
.l4l-place summary:hover .l4l-place__name, .l4l-place[open] .l4l-place__name { color: var(--l4l-green); }
.l4l-place__icon {
  flex: none; width: 40px; height: 40px; padding: 10px; border-radius: 50%;
  background: #fff; color: var(--l4l-green); transition: background-color .2s, color .2s;
}
.l4l-place__icon .v { transform-origin: center; transition: transform .25s var(--l4l-ease); }
.l4l-place[open] .l4l-place__icon { background: var(--l4l-green); color: #fff; }
.l4l-place[open] .l4l-place__icon .v { transform: scaleY(0); }

.l4l-place__body { padding: 2px 4px 28px; }
.l4l-loc .l4l-place__photo { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 16px; }
.l4l-loc .l4l-place__body p { margin: 18px 0 0; font-size: 1rem; line-height: 1.65; color: #3c4b47; }
.l4l-loc .l4l-place__link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 16px; padding: 0 22px;
  border-radius: 999px; background: var(--l4l-green); color: #fff; font-size: .9375rem; font-weight: 700; text-decoration: none;
  transition: background-color .2s;
}
.l4l-loc .l4l-place__link:hover { background: #064d43; color: #fff; }
.l4l-place__link svg { transition: transform .25s var(--l4l-ease); }
.l4l-place__link:hover svg { transform: translateX(4px); }
.l4l-place summary:focus-visible, .l4l-place__link:focus-visible, .l4l-loc__all:focus-visible { outline: 3px solid var(--l4l-orange); outline-offset: 3px; border-radius: 12px; }
.l4l-place__link:focus-visible, .l4l-loc__all:focus-visible { border-radius: 999px; }

/* Buka-tutup halus di browser yang mendukung */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .l4l-place { interpolate-size: allow-keywords; }
    .l4l-place::details-content { height: 0; overflow: clip; transition: height .4s var(--l4l-ease), content-visibility .4s allow-discrete; }
    .l4l-place[open]::details-content { height: auto; }
  }
}

/* Peta */
.l4l-loc__mapwrap { position: sticky; top: calc(var(--l4l-head-gap) + 20px); isolation: isolate; height: clamp(460px, calc(100vh - var(--l4l-head-tight) - 48px), 660px); border-radius: 28px; overflow: hidden; background: #14413c; }
.l4l-loc .l4l-loc__map { position: absolute; inset: 0; background: #14413c; }
.l4l-loc__map:focus-visible { outline: 3px solid var(--l4l-orange); outline-offset: -3px; }
/* Citra sedikit digelapkan agar pin dan label menonjol */
.l4l-loc__map .l4l-tiles { filter: saturate(.85) brightness(.86); }
.l4l-loc__map .leaflet-control-attribution { font-size: 11px; background: rgba(255, 255, 255, .82); }
.l4l-loc__map .leaflet-control-zoom { border: 0; margin: 18px 18px 0 0; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(5, 28, 24, .3); }
.l4l-loc__map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; font-size: 20px; color: var(--l4l-green); }

.l4l-loc__all {
  position: absolute; left: 18px; top: 18px; z-index: 500; min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px; background: #fff; color: var(--l4l-green); font-size: .9375rem; font-weight: 700;
  box-shadow: 0 6px 20px rgba(5, 28, 24, .3); cursor: pointer;
}
.l4l-loc__all[hidden] { display: none; }
.l4l-loc__all:hover { background: var(--l4l-green-tint); }

/* Pin foto */
.l4l-pin { display: block; }
.l4l-pin__dot {
  position: absolute; left: 50%; bottom: 9px; width: 58px; height: 58px; margin-left: -29px;
  border: 3px solid #fff; border-radius: 50%; background: var(--l4l-green) center / cover;
  box-shadow: 0 6px 18px rgba(5, 28, 24, .45); transform-origin: 50% 110%;
  transition: transform .3s var(--l4l-ease), border-color .2s;
}
.l4l-pin__dot::after { content: ""; position: absolute; left: 50%; bottom: -11px; margin-left: -7px; border: 7px solid transparent; border-bottom-width: 0; border-top-color: #fff; transition: border-color .2s; }
.l4l-pin__name {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 6px; padding: 4px 11px;
  border-radius: 999px; background: rgba(5, 28, 24, .82); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
.l4l-pin:hover .l4l-pin__dot { transform: scale(1.1); }
.l4l-pin.is-active { z-index: 900 !important; }
.l4l-pin.is-active .l4l-pin__dot { transform: scale(1.28); border-color: var(--l4l-orange); }
.l4l-pin.is-active .l4l-pin__dot::after { border-top-color: var(--l4l-orange); }
.l4l-pin.is-active .l4l-pin__name { background: var(--l4l-orange-strong); }
.l4l-pin:focus-visible { outline: 0; }
.l4l-pin:focus-visible .l4l-pin__dot { box-shadow: 0 0 0 4px var(--l4l-orange); }

@media (max-width: 1099.98px) {
  .l4l-loc__head, .l4l-loc__grid { grid-template-columns: minmax(0, 1fr); }
  .l4l-loc__grid { gap: 24px; }
  .l4l-loc__mapwrap { position: relative; top: auto; order: -1; height: clamp(300px, 56vw, 460px); border-radius: 22px; }
}
@media (max-width: 600px) {
  .l4l-loc__mapwrap { height: 320px; }
  .l4l-pin__dot { width: 46px; height: 46px; margin-left: -23px; }
  .is-overview .l4l-pin__name, .l4l-pin:not(.is-active) .l4l-pin__name { display: none; }
  .l4l-loc__all { left: 12px; top: 12px; min-height: 40px; padding: 0 16px; }
  .l4l-loc__map .leaflet-control-zoom { display: none; }
  .l4l-loc .l4l-place__link { width: 100%; justify-content: center; }
}
.l4l-pin__box { position: absolute; inset: 0; display: block; }
.l4l-loc__title > span { display: block; }

/* ------------------------------------------------------------------
   Animasi. Keadaan awal hanya berlaku bila JS memasang .l4l-motion.
------------------------------------------------------------------- */
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes l4l-loc-rise { from { transform: translateY(115%); } to { transform: none; } }
  @keyframes l4l-loc-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  @keyframes l4l-loc-open { from { clip-path: inset(14% 9% 14% 9% round 28px); opacity: 0; } to { clip-path: inset(0 round 28px); opacity: 1; } }
  @keyframes l4l-loc-settle { from { transform: scale(1.12); } to { transform: none; } }
  @keyframes l4l-loc-drop { 0% { opacity: 0; transform: translateY(-46px) scale(.7); } 60% { opacity: 1; transform: translateY(5px) scale(1.03); } 100% { opacity: 1; transform: none; } }
  @keyframes l4l-loc-ring { from { opacity: .75; transform: scale(1); } to { opacity: 0; transform: scale(1.75); } }
  @keyframes l4l-loc-photo { from { clip-path: inset(0 100% 0 0 round 16px); } to { clip-path: inset(0 round 16px); } }

  /* Sebelum terlihat */
  .l4l-motion .l4l-loc__title { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
  .l4l-motion .l4l-loc__head:not(.is-in) .l4l-loc__title > span { transform: translateY(115%); }
  .l4l-motion .l4l-loc__head:not(.is-in) .l4l-loc__intro,
  .l4l-motion .l4l-loc__grid:not(.is-in) .l4l-place,
  .l4l-motion .l4l-loc__grid:not(.is-in) .l4l-loc__mapwrap,
  .l4l-motion .l4l-loc__grid:not(.is-in) .l4l-pin__box { opacity: 0; }

  /* Kepala bagian */
  .l4l-motion .l4l-loc__head.is-in .l4l-loc__title > span { animation: l4l-loc-rise .95s cubic-bezier(.16, 1, .3, 1) both; }
  .l4l-motion .l4l-loc__head.is-in .l4l-loc__intro { animation: l4l-loc-up .8s var(--l4l-ease) .2s backwards; }

  /* Daftar dan peta */
  .l4l-motion .l4l-loc__grid.is-in .l4l-place { animation: l4l-loc-up .7s var(--l4l-ease) backwards; }
  .l4l-motion .l4l-loc__grid.is-in .l4l-place:nth-child(2) { animation-delay: .12s; }
  .l4l-motion .l4l-loc__grid.is-in .l4l-place:nth-child(3) { animation-delay: .24s; }
  .l4l-motion .l4l-loc__grid.is-in .l4l-loc__mapwrap { animation: l4l-loc-open 1.1s cubic-bezier(.2, .8, .2, 1) .1s backwards; }
  .l4l-motion .l4l-loc__grid.is-in .l4l-loc__map { animation: l4l-loc-settle 1.5s cubic-bezier(.16, .8, .24, 1) .1s backwards; }

  /* Pin jatuh bergantian setelah peta terbuka */
  .l4l-motion .l4l-loc__grid.is-in .l4l-pin__box { animation: l4l-loc-drop .65s cubic-bezier(.3, .7, .3, 1) calc(.75s + var(--i, 0) * .18s) backwards; }
  .l4l-motion .l4l-loc__grid.is-done .l4l-place,
  .l4l-motion .l4l-loc__grid.is-done .l4l-loc__mapwrap,
  .l4l-motion .l4l-loc__grid.is-done .l4l-loc__map,
  .l4l-motion .l4l-loc__grid.is-done .l4l-pin__box,
  .l4l-motion .l4l-loc__head.is-done .l4l-loc__title > span,
  .l4l-motion .l4l-loc__head.is-done .l4l-loc__intro { animation: none; }

  /* Pin terpilih: cincin berdenyut tiga kali, lalu diam */
  .l4l-motion .l4l-pin.is-active .l4l-pin__dot::before {
    content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--l4l-orange);
    opacity: 0; pointer-events: none; animation: l4l-loc-ring 1.3s ease-out .5s 3;
  }

  /* Isi provinsi saat dibuka */
  .l4l-motion .l4l-place.just-opened .l4l-place__photo { animation: l4l-loc-photo .75s cubic-bezier(.65, 0, .2, 1) backwards; }
  .l4l-motion .l4l-place.just-opened .l4l-place__body p { animation: l4l-loc-up .55s var(--l4l-ease) .15s backwards; }
  .l4l-motion .l4l-place.just-opened .l4l-place__link { animation: l4l-loc-up .55s var(--l4l-ease) .25s backwards; }
}

@media (prefers-reduced-motion: reduce) { .l4l-loc * { transition-duration: .01ms !important; } }
