/* ============================================
   PETA — style tambahan untuk peta.html (Peta Hidden Gem)
   Dimuat SETELAH style.css dan wisata.css.
   Memakai variabel palet wisata (--bg, --surface, --text, --muted, --border,
   --accent, --accent-dark, --accent-warm) jadi tema terang/gelap ikut otomatis.
   Semua kelas berawalan k- supaya tidak bentrok dengan CSS lain.
   ============================================ */

.page-peta .wisata-section { padding: 44px 0 72px; border-top: 0; }

.k-back {
  display: inline-block; margin-bottom: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-dark); text-decoration: none;
}
.k-back:hover { text-decoration: underline; }
.page-peta .wisata-section .section-title { max-width: 640px; }
.page-peta .section-note { margin-bottom: 24px; }

/* Layout: HP satu kolom; desktop peta menempel di kiri, daftar di kanan */
.k-layout { display: grid; gap: 22px; }
.k-mapcol { min-width: 0; }
.k-listcol { min-width: 0; }

@media (min-width: 960px) {
  .k-layout { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 36px; align-items: start; }
  .k-mapcol { position: sticky; top: 92px; }
}

/* Pilihan wilayah (memakai gaya .filter-chip dari wisata.css) */
.k-views { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.k-views .filter-chip { white-space: nowrap; }

/* Legenda */
[hidden] { display: none !important; }

.k-legend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.k-leg {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  padding: 4px 10px 4px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.k-leg:hover { border-color: var(--accent); }
.k-leg[aria-pressed="false"] { opacity: .45; }
.k-leg[aria-pressed="false"] .k-ic { filter: grayscale(1); }
.k-leg:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 2px; }
.k-legend-mitra { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px; }

/* Ikon bentuk (SVG) */
.k-ic { display: block; overflow: visible; flex: 0 0 auto; }
.k-ic-l { width: 18px; height: 18px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .35)); }
.k-ic-h { width: 18px; height: 18px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .35)); }

/* Peta: satu gambar statis + titik HTML di atasnya */
.k-map {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface);
}
.k-map img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-theme="dark"] .k-map img { filter: brightness(0.88); }

.k-fail {
  display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  padding: 20px; text-align: center; font-size: 14px; color: var(--muted);
}
.k-map.err .k-fail { display: flex; }
.k-map.err img, .k-map.err .k-dot, .k-map.err .k-tip { display: none !important; }

.k-dot {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.k-dot .k-ic {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); transition: transform .12s ease;
}
.k-dot.sel .k-ic { transform: scale(1.5); }
.k-dot.tight { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.k-dot:focus-visible { outline: none; }
.k-dot:focus-visible .k-ic { outline: 2px solid var(--accent-warm); outline-offset: 2px; border-radius: 6px; }

.k-tip {
  display: none; position: absolute; z-index: 5; max-width: 74%;
  padding: 7px 11px; border-radius: 9px; background: #14211a; color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1.3; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.k-tip small { opacity: .75; margin-left: 4px; }

.k-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

/* Daftar detail */
.k-group {
  display: flex; align-items: center; gap: 8px;
  margin: 26px 0 12px; font-size: 13px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark);
}
.k-listcol > .k-group:first-child { margin-top: 0; }
.k-warn {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 26px 0 -4px; padding: 13px 15px; border-radius: 12px;
  border: 2px dashed #D08A00; background: #FFF4CC; color: #3b2a00;
  font-size: 13px; line-height: 1.55;
}
.k-warn-t strong {
  display: block; margin-bottom: 2px; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: #B3261E;
}
.k-warn-ic { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px; }
.k-warn-tri { fill: #F5B400; stroke: #B3261E; stroke-width: 1.6; stroke-linejoin: round; }
.k-warn-ex { fill: none; stroke: #3b2a00; stroke-width: 2.4; stroke-linecap: round; }
[data-theme="dark"] .k-warn { background: rgba(255, 190, 40, .14); border-color: #F2B632; color: var(--text); }
[data-theme="dark"] .k-warn-t strong { color: #FF8F85; }
[data-theme="dark"] .k-warn-tri { stroke: #FF8F85; }
[data-theme="dark"] .k-warn-ex { stroke: #1b1300; }
.k-listcol > .k-warn:first-child { margin-top: 0; }

.k-card {
  display: flex; gap: 14px; padding: 14px; margin: 0 0 12px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  scroll-margin-top: 88px;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.k-card:hover { border-color: var(--accent); }
.k-card.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.k-card:has(.k-mitra) { border-color: color-mix(in srgb, var(--accent-warm) 70%, var(--border)); }
.k-card:has(.k-mitra).on { border-color: var(--c); }

.k-thumb {
  flex: 0 0 76px; width: 76px; height: 76px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: color-mix(in srgb, var(--c) 22%, var(--surface));
}
.k-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.k-body { min-width: 0; flex: 1; }
.k-badge {
  display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text);
}
.k-body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.k-row { margin: 2px 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.k-row b { font-weight: 700; color: var(--text); }
.k-soon { margin: 2px 0; font-size: 13px; font-style: italic; color: var(--muted); }
.k-go {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700;
  color: var(--accent-dark); text-decoration: none;
}
.k-go:hover { text-decoration: underline; }
.k-go:focus-visible, .k-back:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 2px; border-radius: 4px; }

/* Non-mitra: kotak ringkas (persegi panjang) dua kolom, bisa dibuka */
.k-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.k-tile {
  min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  scroll-margin-top: 88px; transition: border-color .18s ease, box-shadow .18s ease;
}
.k-tile:hover { border-color: var(--accent); }
.k-tile.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.k-tile.open { grid-column: 1 / -1; }
.k-tile-b {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px;
  padding: 10px 12px; border: 0; border-radius: 14px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.k-tile-b:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 2px; }
.k-tile-n {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.k-tile.open .k-tile-n { -webkit-line-clamp: unset; overflow: visible; }
.k-chev {
  flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: var(--muted);
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease;
}
.k-tile.open .k-chev { transform: rotate(180deg); }
.k-tile-d { padding: 0 14px 14px 40px; }
.k-tile-d .k-go { margin-top: 6px; }

/* Mitra: cincin emas di titik, badge di kartu, tombol WhatsApp */
.k-legend-mitra::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent-warm); box-sizing: content-box;
}
.k-mitra {
  display: inline-block; margin: 0 0 6px 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #1a1100; background: var(--accent-warm);
}
.k-checked { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.k-wa {
  display: inline-block; margin: 8px 0 0 12px; padding: 3px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; text-decoration: none;
  color: var(--accent-dark); border: 1px solid var(--accent-dark);
}
.k-wa:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.k-wa:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 2px; }

/* Penutup + atribusi */
.k-cta {
  margin-top: 28px; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
}
.k-cta p { margin: 0; font-size: 14px; font-weight: 600; max-width: 380px; }
.k-src { margin-top: 14px; font-size: 12px; color: var(--muted); }
.k-src a { color: inherit; text-decoration: underline; }

@media (max-width: 640px) {
  .page-peta .wisata-section { padding: 28px 0 56px; }
  .k-card { padding: 12px; gap: 12px; }
  .k-thumb { flex-basis: 64px; width: 64px; height: 64px; font-size: 24px; }
  .k-body h3 { font-size: 15px; }
  .k-tiles { gap: 7px; }
  .k-tile-b { gap: 8px; padding: 10px; }
  .k-tile-n { font-size: 13px; -webkit-line-clamp: 3; }
  .k-tile-d { padding-left: 14px; }
  .k-cta { flex-direction: column; align-items: stretch; }
  .k-cta .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .k-card, .k-tile, .k-chev, .k-dot .k-ic, .k-leg { transition: none; }
}
