/* ===== PETA STYLE ===== */

.worldmap *,
.peta-wrapper * {
  box-sizing: border-box;
}

.worldmap {
  width: 100%;
  max-width: 1280px;
  margin: auto;
  overflow: hidden;
}

@media (max-width: 1920px) {
  svg {
    width: 100%;
    height: 100%;
  }
  .worldmap img:not(.peta-card-img),
  .peta-section img:not(.peta-card-img) {
    display: block;
    width: 100%;
    height: 300px;
  }
}

@media (min-width: 650px) and (max-width: 1000px) {
  svg { width: 100%; height: 100%; }
}

@media (min-width: 320px) and (max-width: 480px) {
  .worldmap svg {
    position: relative;
    left: 35%;
    top: 0;
    height: 450px;
    width: auto;
    transform: translate(-40%, 0);
  }
}

/* ===== MODAL OVERLAY ===== */
.modal1,.modal2,.modal3,.modal4,.modal5,.modal6,.modal7,.modal8,.modal9,.modal10,
.modal11,.modal12,.modal13,.modal14,.modal15,.modal16,.modal17,.modal18,.modal19,.modal20,
.modal21,.modal22,.modal23,.modal24,.modal25,.modal26,.modal27,.modal28,.modal29,.modal30,
.modal31,.modal32,.modal33,.modal34 {
  display: none;
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* Flexbox untuk centering sempurna */
  align-items: center;
  justify-content: center;
}

/* Saat ditampilkan gunakan flex */
.modal1[style*="display: block"],
.modal2[style*="display: block"],
.modal3[style*="display: block"],
.modal4[style*="display: block"],
.modal5[style*="display: block"],
.modal6[style*="display: block"],
.modal7[style*="display: block"],
.modal8[style*="display: block"],
.modal9[style*="display: block"],
.modal10[style*="display: block"],
.modal11[style*="display: block"],
.modal12[style*="display: block"],
.modal13[style*="display: block"],
.modal14[style*="display: block"],
.modal15[style*="display: block"],
.modal16[style*="display: block"],
.modal17[style*="display: block"],
.modal18[style*="display: block"],
.modal19[style*="display: block"],
.modal20[style*="display: block"],
.modal21[style*="display: block"],
.modal22[style*="display: block"],
.modal23[style*="display: block"],
.modal24[style*="display: block"],
.modal25[style*="display: block"],
.modal26[style*="display: block"],
.modal27[style*="display: block"],
.modal28[style*="display: block"],
.modal29[style*="display: block"],
.modal30[style*="display: block"],
.modal31[style*="display: block"],
.modal32[style*="display: block"],
.modal33[style*="display: block"],
.modal34[style*="display: block"] {
  display: flex !important;
}

/* ===== ANIMASI ===== */
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.88) translateY(20px); }
  60%  { opacity: 1; transform: scale(1.02) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes gelatine {
  0%,100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  75% { transform: scale(0.95); }
}

/* ===== POPUP CARD ===== */
.modal-content2 {
  position: relative;
  background: #ffffff;
  padding: 0;
  margin: 0 auto;
  width: calc(100vw - 40px);
  max-width: 560px;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.35),
    0 12px 30px rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.08);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  /* Tidak pakai left/top/transform positioning lagi — diatur oleh flex parent */
}

/* ===== GAMBAR ===== */
.modal-content2 .peta-card-img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.modal-content2:hover .peta-card-img {
  transform: scale(1.03);
}

/* Gradient overlay di atas gambar */
.modal-content2 .peta-card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 260px;
}

.modal-content2 .peta-card-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(22,36,80,0.85), transparent);
  pointer-events: none;
}

/* ===== HEADER ===== */
.modal-content2 .peta-card-header {
  background: linear-gradient(135deg, #1a2a5e 0%, #2d4299 55%, #3d5abf 100%);
  padding: 14px 52px 12px 20px;
  position: relative;
}

/* Header khusus: class peta-header-gold — ditambahkan via JS berdasarkan nama daerah */
/* Untuk semua daerah yang headernya mau emas, tambahkan class ini di blade */

.modal-content2 .peta-card-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e07b1a, #f7c948, #e07b1a);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.modal-content2 .peta-card-header h1 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  height: auto;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== BODY (SCROLLABLE) ===== */
.modal-content2 .peta-card-body {
  padding: 18px 22px 20px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4a830 #f0f0f0;
}

.modal-content2 .peta-card-body::-webkit-scrollbar {
  width: 5px;
}
.modal-content2 .peta-card-body::-webkit-scrollbar-track {
  background: #f4f4f4;
  border-radius: 10px;
}
.modal-content2 .peta-card-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e07b1a, #f7c948);
  border-radius: 10px;
}

/* ===== TOMBOL TELUSURI ===== */
.modal-content2 .peta-card-body a.button2 {
  position: static !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  padding: 8px 20px 8px 14px;
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, #d96e12 0%, #f0a020 50%, #f7c84a 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: 8px;
  color: #ffffff !important;
  font-size: 11.5px;
  font-weight: 800;
  font-family: "Inconsolata", "Courier New", monospace;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-position 0.4s ease, box-shadow 0.25s ease, transform 0.15s ease;
  box-shadow: 0 3px 12px rgba(224, 123, 26, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  line-height: 1.2;
  white-space: nowrap;
}

/* Icon buku putih SVG via background */
.modal-content2 .peta-card-body a.button2::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6H6zm0 2h7v5h5v11H6V4zm2 8v2h8v-2H8zm0 4v2h5v-2H8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.modal-content2 .peta-card-body a.button2:hover {
  background-position: right center;
  box-shadow: 0 7px 20px rgba(224, 123, 26, 0.55);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.modal-content2 .peta-card-body a.button2:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(224, 123, 26, 0.3);
}

/* ===== DIVIDER ===== */
.modal-content2 .peta-card-body .peta-divider {
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, #e07b1a, #f0a025);
  border-radius: 2px;
  margin: 0 0 12px 0;
}

/* ===== TEKS DESKRIPSI ===== */
.modal-content2 .peta-card-body p {
  color: #3a3a3a;
  letter-spacing: 0.1px;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
  font-size: 13.5px;
  font-weight: 400;
  text-transform: none;
}

/* ===== TOMBOL CLOSE ===== */
span.close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  background: linear-gradient(135deg, #e07b1a, #f0a025);
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.4);
  font-size: 22px;
  font-weight: 300;
  height: 34px;
  width: 34px;
  border-radius: 50%;
  top: 14px;
  right: 14px;
  z-index: 10;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1;
}

span.close:hover {
  animation: gelatine 0.45s ease;
  background: linear-gradient(135deg, #c96b10, #e09018);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

span.close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(224,123,26,0.45);
}

/* ===== FALLBACK BUTTON2 (luar modal) ===== */
a.button2 {
  width: 12em;
  height: 0.8em;
  padding: 0.8em;
  margin: 0;
  color: #eed604;
  background-color: transparent;
  border: 0.01rem solid #f0b81f;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  text-align: center;
  font-family: "Inconsolata", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: 200% 100%;
  background-image: linear-gradient(to right, transparent 0%, #df972c 40%);
  transition: background-position .3s cubic-bezier(0.19, 1, 0.22, 1) .1s,
    color .5s ease, transform 0.3s ease, box-shadow 0.3s ease;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45px);
}

a.button2:hover, a.button2:active {
  color: white;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255,0.5);
}

/* ===== LAND MAP ===== */
.land {
  fill: #bbbbbb;
  fill-opacity: 1;
  stroke: #fff;
  stroke-opacity: 0.9;
  stroke-width: 0.5;
}

.marker {
  fill: rgb(235, 160, 0) !important;
  fill-rule: nonzero;
  stroke: white;
  stroke-width: 1px;
}

.langkat path { fill: #F6CE4B; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; transition: all 0.3s ease; }
.langkat:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.binjai path { fill: #EA973D; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.binjai:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.medan path { fill: #FFD56C; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.medan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.deliserdang path { fill: #F4A925; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.deliserdang:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.karo path { fill: #e4ad49; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.karo:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.samosir path { fill: #FFAF2E; cursor: pointer; stroke: #f3f1dc; stroke-width: 2.5px; }
.samosir:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.danautoba path { fill: #3062be; cursor: pointer; stroke: #f3f1dc; stroke-width: 0px; }
.danautoba:hover path { fill: #2088ff; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.simalungun path { fill: #f59517; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.simalungun:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.pematangsiantar path { fill: #F4A925; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.pematangsiantar:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.serdangbedagai path { fill: #F2BF2F; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.serdangbedagai:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tebingtinggi path { fill: #E28427; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tebingtinggi:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.batubara path { fill: #eea154; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.batubara:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.dairi path { fill: #FFCC66; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.dairi:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.pakpakbharat path { fill: #F4A925; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.pakpakbharat:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.asahan path { fill: #F9B23E; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.asahan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.humbanghasundutan path { fill: #F6CE4B; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.humbanghasundutan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tobasamosir path { fill: #F6CE4B; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tobasamosir:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.labuhanbatuutara path { fill: #eeb54c; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.labuhanbatuutara:hover path { fill: #e27f2d; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.labuhanbatu path { fill: #FFCC66; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.labuhanbatu:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tanjungbalai path { fill: #FFDE52; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tanjungbalai:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.labuhanbatuselatan path { fill: #F2BF2F; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.labuhanbatuselatan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.padanglawasutara path { fill: #ebaf41; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.padanglawasutara:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tapanuliselatan path { fill: #FFD56C; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tapanuliselatan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tapanuliutara path { fill: #FFAF2E; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tapanuliutara:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.sibolga path { fill: #cc871f; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.sibolga:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.tapanulitengah path { fill: #e7be4d; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.tapanulitengah:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.mandailingnatal path { fill: #f3a047; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.mandailingnatal:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.padangsidimpuan path { fill: #F4A925; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.padangsidimpuan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.padanglawas path { fill: #fdb557; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.padanglawas:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.niasutara path { fill: #F29D20; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.niasutara:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.gunungsitoli path { fill: #FFD56C; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.gunungsitoli:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.niasbarat path { fill: #F4C458; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.niasbarat:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.niasselatan path { fill: #E0982F; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.niasselatan:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }
.nias path { fill: #F2BF2F; cursor: pointer; stroke: #f3f1dc; stroke-width: 1.5px; }
.nias:hover path { fill: #ec6a00; filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.2)); }

.hide { display: none; }
.content-wrapper { padding-bottom: 0; }

/* ===== HEADER EMAS — untuk daerah tertentu ===== */
.modal-content2 .peta-card-header.header-gold {
  background: linear-gradient(135deg, #b8860b 0%, #d4a820 45%, #f0c840 80%, #c8960e 100%);
}

.modal-content2 .peta-card-header.header-gold h1 {
  color: #1a1200;
  text-shadow: 0 1px 3px rgba(255,255,255,0.3);
}

.modal-content2 .peta-card-header.header-gold::before {
  background: linear-gradient(90deg, #5c3d00, #f0c840, #5c3d00);
  background-size: 200% 100%;
}
