/* ==============================================
   1. RESET & FONTS
   ============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}

@font-face {
  font-family: "MyFont";
  src: url("./Fonts/Beautique Display/BeautiqueDisplay-Medium.otf")
    format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("./Fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  background-color: #000;
  user-select: none;
  -webkit-user-select: none;
}

/* ==============================================
   2. BACKGROUND
   ============================================== */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #0d0d0d;
}

/* ==============================================
   3. SVG MAP CONTAINER (FULL SCREEN)
   ============================================== */
.svg-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background: #000;
  contain: strict;
}

.zoom-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.zoom-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

svg#masterplan-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  transform-origin: 0 0;
  transition: transform 0.1s ease-out;
}

svg#masterplan-svg.is-dragging {
  transition: none !important;
}

.imgbg {
  border-radius: 0px;
}

/* ==============================================
   4. INTERACTIVE HOTSPOTS (SVG GLOW & PULSE)
   ============================================== */
.hotspot-group {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  transform-box: fill-box;
}

/* Điểm tròn chính của Hotspot */
.hotspot-group circle,
.hotspot-group ellipse {
  transition: transform 0.25s ease, opacity 0.25s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Trạng thái Hover của Hotspot: Nháy sáng liên tục (Pulse Flash) cho đến khi hết hover */
.hotspot-group:hover,
.hotspot-group.is-hover {
  animation: ting-flash 0.8s ease-in-out infinite;
  z-index: 999;
}

@keyframes ting-flash {
  0%,
  100% {
    transform: scale(1.15);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.25);
    filter: brightness(1.5);
  }
}

/* Tăng nhẹ viền trắng để nổi bật hơn */
.hotspot-group:hover circle[stroke],
.hotspot-group:hover ellipse[stroke],
.hotspot-group.is-hover circle[stroke],
.hotspot-group.is-hover ellipse[stroke] {
  stroke-width: 3px !important;
  stroke: #ffffff !important;
}

/* Sóng lan tỏa xung quanh Hotspot */
.pulse-ring {
  display: none; /* Ẩn mặc định để tránh tỏa đồng thời toàn bộ các phân khu */
  fill: none;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none !important; /* Tránh đè lên sự kiện chuột/touch */
}

.pulse-ring-1 {
  animation: pulse-ring 2.5s ease-out infinite;
}

/* Chỉ hiển thị vòng tỏa khi hover vào hotspot hoặc phân khu tương ứng được kích hoạt */
.hotspot-group:hover .pulse-ring,
.hotspot-group.is-hover .pulse-ring {
  display: block !important;
}

.pulse-ring-2 {
  animation: pulse-ring 2.5s ease-out infinite 1.25s;
}

@keyframes pulse-ring {
  0% {
    opacity: 0.95;
    transform: scale(1);
  }
  75% {
    opacity: 0;
    transform: scale(1.95);
  }
  100% {
    opacity: 0;
    transform: scale(1.95);
  }
}

/* ==============================================
   6. MEDIA MODAL (POPUP)
   ============================================== */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.media-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.modal-content {
  position: relative;
  z-index: 10000;
  background: #111;
  width: min(1000px, 92vw);
  max-height: 90vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.media-modal.active .modal-content {
  transform: scale(1);
}

.modal-body {
  flex-grow: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 250px;
}

/* Ảnh hiển thị trong Modal */
#modal-img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  filter: blur(16px);
  transform: scale(1.03);
}

#modal-img.loaded {
  filter: blur(0);
  transform: scale(1);
  transition:
    filter 0.5s ease,
    transform 0.5s ease;
}

/* Video hiển thị trong Modal */
#modal-video {
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Nút điều hướng ảnh gallery */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.nav-btn:hover {
  background: #529781;
  border-color: #529781;
  color: #fff;
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
}

.nav-btn.hidden {
  display: none !important;
}

/* Bộ đếm ảnh */
.img-counter {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(13, 13, 13, 0.65);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  z-index: 10;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.img-counter.hidden {
  display: none !important;
}

/* Nút đóng Modal */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(13, 13, 13, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
  z-index: 10002;
  backdrop-filter: blur(6px);
}

.modal-close:hover {
  background: #ff4d4f;
  border-color: #ff4d4f;
  transform: rotate(90deg);
}

/* Disclaimer chữ mờ dưới chân modal */
.media-watermark {
  display: block;
  padding: 10px 16px;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  background: #0d0d0d;
  pointer-events: none;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Ẩn audio controls vì phát ngầm tự động */
#modal-audio {
  display: none;
}

/* ==============================================
   7. RESPONSIVE FOR MOBILE
   ============================================== */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
  }

  #modal-video {
    max-height: 50vh;
  }

  #modal-img {
    max-height: 50vh;
  }

  .nav-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* ==============================================
   8. HTML OVERLAY CONTAINER & GLASSMORPHIC CARDS
   ============================================== */
.html-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 4000px;
  height: 2422px;
  pointer-events: none; /* Rất quan trọng: Cho phép click/drag xuyên qua phần trống */
  z-index: 10;
  transform-origin: 0 0;
}

.subdivision-card {
  position: absolute;
  /* Nền trong suốt với gradient màu sẫm nhẹ ở dưới để hỗ trợ tương phản */
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 0.18) 100%
  ) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 18px !important;
  color: #ffffff;
  pointer-events: auto; /* Cho phép nhận click, hover vào card */
  min-width: 360px;
  opacity: 0;
  animation: slideDownFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--anim-order) * 0.3s);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 8px;
}

/* Định dạng màu nhận diện phân khu (Vinhomes/Ecopark style) */
/* Định dạng màu nhận diện phân khu (Vinhomes/Ecopark style) */
.subdivision-card[data-target-group="group-lahaye"] {
  border-left: 4px solid #ffb9b0 !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(255, 185, 176, 0.1) 100%
  ) !important;
}
.subdivision-card[data-target-group="group-zeeland"] {
  border-left: 4px solid #ffac39 !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(255, 172, 57, 0.1) 100%
  ) !important;
}
.subdivision-card[data-target-group="group-rotterdam"] {
  border-left: 4px solid #00beff !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 190, 255, 0.1) 100%
  ) !important;
}
.subdivision-card[data-target-group="group-breda"] {
  border-left: 4px solid #b29bee !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(178, 155, 238, 0.1) 100%
  ) !important;
}
.subdivision-card[data-target-group="group-amsterdam"] {
  border-left: 4px solid #ee7cb7 !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(238, 124, 183, 0.1) 100%
  ) !important;
}
.subdivision-card[data-target-group="group-baibien"] {
  border-left: 4px solid #aedc5f !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(174, 220, 95, 0.12)
  ) !important;
}
.subdivision-card[data-target-group="group-chung"] {
  border-left: 4px solid #fff0ae !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(255, 240, 174, 0.1)
  ) !important;
}

.pk-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pk-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  background: var(--pk-color);
  color: #111111;
  cursor: pointer;
  font-family: "MyFont", "Montserrat", sans-serif;
  font-size: 25px;
  font-weight: normal;
  line-height: 1;
  opacity: 0;
  padding: 0 20px;
  pointer-events: auto;
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
  /* Chỉ dùng filter để animate glow — filter chạy trên GPU compositor,
     không gây repaint như box-shadow, tránh jitter khi scale màn hình nhỏ */
  animation:
    slideDownFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    pkLabelGlow 3s ease-in-out infinite;
  animation-delay:
    calc(var(--anim-order) * 0.3s), calc((var(--anim-order) * 0.3s) + 0.9s);
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.32s ease;
  /* box-shadow tĩnh — không animate để tránh repaint */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  /* GPU layer — transform chạy riêng biệt với filter glow */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
  will-change: transform, filter;
}

.pk-label:hover,
.pk-label.is-hover-active {
  transform: translateY(-18px) translateZ(0);
  box-shadow: 0 8px 24px var(--pk-color), 0 8px 16px rgba(0, 0, 0, 0.4);
  border-color: var(--pk-color) !important;
}

@keyframes pkLabelGlow {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
  50% {
    border-color: var(--pk-color);
    box-shadow: 0 4px 20px var(--pk-color);
  }
}

@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-25px) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.subdivision-card .card-header {
  font-family: "MyFont", "Montserrat", sans-serif;
  font-weight: normal;
  font-size: 36px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border-bottom: none !important;
  cursor: pointer;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.utility-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.utility-list.col-2 {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr);
  grid-auto-flow: column;
  grid-template-rows: repeat(5, auto);
  gap: 10px 24px;
}

.utility-list.col-1 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-bullets {
  padding-left: 36px;
  font-weight: 500;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.7);
}

.utility-list li {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.7);
}

.utility-list li .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #ffffff;
  font-size: 11px;
  font-weight: 800;
  color: #000000 !important;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Gán màu nền của hình tròn số trùng với màu đặc trưng phân khu */
[data-target-group="group-baibien"] li .num {
  background-color: #aedc5f !important; /* Xanh lá */
}
[data-target-group="group-chung"] li .num {
  background-color: #fff0ae !important; /* Vàng kem */
}
[data-target-group="group-lahaye"] li .num {
  background-color: #ffb9b0 !important; /* Hồng nhạt */
}
[data-target-group="group-zeeland"] li .num {
  background-color: #ffac39 !important; /* Cam */
}
[data-target-group="group-rotterdam"] li .num {
  background-color: #00beff !important; /* Xanh dương */
}
[data-target-group="group-breda"] li .num {
  background-color: #b29bee !important; /* Tím */
}
[data-target-group="group-amsterdam"] li .num {
  background-color: #ee7cb7 !important; /* Hồng sen */
}

.utility-list li:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.utility-list li:hover .num {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 10px #ffffff;
}

/* Highlight item khi hover từ bản đồ */
.utility-list li.is-hover-active {
  color: #ffffff;
  transform: translateX(4px);
}
.utility-list li.is-hover-active .num {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 10px #ffffff;
}

/* Custom themed hover & active glows for each subdivision card */

/* Phân khu 1: La Haye */
[data-target-group="group-lahaye"] li:hover,
[data-target-group="group-lahaye"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(255, 185, 176, 1),
    0 0 12px rgba(255, 185, 176, 0.85),
    0 0 20px rgba(255, 185, 176, 0.55);
}
[data-target-group="group-lahaye"] li:hover .num,
[data-target-group="group-lahaye"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #ffb9b0,
    0 0 20px rgba(255, 185, 176, 0.9) !important;
  border-color: #ffb9b0 !important;
}

/* Phân khu 2: Zeeland */
[data-target-group="group-zeeland"] li:hover,
[data-target-group="group-zeeland"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(255, 172, 57, 1),
    0 0 12px rgba(255, 172, 57, 0.85),
    0 0 20px rgba(255, 172, 57, 0.55);
}
[data-target-group="group-zeeland"] li:hover .num,
[data-target-group="group-zeeland"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #ffac39,
    0 0 20px rgba(255, 172, 57, 0.9) !important;
  border-color: #ffac39 !important;
}

/* Phân khu 3: Rotterdam */
[data-target-group="group-rotterdam"] li:hover,
[data-target-group="group-rotterdam"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(0, 190, 255, 1),
    0 0 12px rgba(0, 190, 255, 0.85),
    0 0 20px rgba(0, 190, 255, 0.55);
}
[data-target-group="group-rotterdam"] li:hover .num,
[data-target-group="group-rotterdam"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #00beff,
    0 0 20px rgba(0, 190, 255, 0.9) !important;
}

/* Phân khu 4: Breda */
[data-target-group="group-breda"] li:hover,
[data-target-group="group-breda"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(178, 155, 238, 1),
    0 0 12px rgba(178, 155, 238, 0.85),
    0 0 20px rgba(178, 155, 238, 0.55);
}
[data-target-group="group-breda"] li:hover .num,
[data-target-group="group-breda"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #b29bee,
    0 0 20px rgba(178, 155, 238, 0.9) !important;
  border-color: #b29bee !important;
}

/* Phân khu 5: Amsterdam */
[data-target-group="group-amsterdam"] li:hover,
[data-target-group="group-amsterdam"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(238, 124, 183, 1),
    0 0 12px rgba(238, 124, 183, 0.85),
    0 0 20px rgba(238, 124, 183, 0.55);
}
[data-target-group="group-amsterdam"] li:hover .num,
[data-target-group="group-amsterdam"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #ee7cb7,
    0 0 20px rgba(238, 124, 183, 0.9) !important;
  border-color: #ee7cb7 !important;
}

/* Trục chung */
[data-target-group="group-chung"] li:hover,
[data-target-group="group-chung"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(255, 240, 174, 1),
    0 0 12px rgba(255, 240, 174, 0.85),
    0 0 20px rgba(255, 240, 174, 0.55);
}
[data-target-group="group-chung"] li:hover .num,
[data-target-group="group-chung"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #fff0ae,
    0 0 20px rgba(255, 240, 174, 0.9) !important;
  border-color: #fff0ae !important;
}

/* Tiện ích dọc bãi biển */
[data-target-group="group-baibien"] li:hover,
[data-target-group="group-baibien"] li.is-hover-active {
  color: #ffffff !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px rgba(174, 220, 95, 1),
    0 0 12px rgba(174, 220, 95, 0.85),
    0 0 20px rgba(174, 220, 95, 0.55);
}
[data-target-group="group-baibien"] li:hover .num,
[data-target-group="group-baibien"] li.is-hover-active .num {
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #aedc5f,
    0 0 20px rgba(174, 220, 95, 0.9) !important;
  border-color: #aedc5f !important;
}

/* ==============================================
   12. SUBDIVISION BOUNDARY OVERLAY (OPTION B)
   ============================================== */
.pk-boundaries-layer {
  pointer-events: none;
}

.pk-boundary {
  stroke: currentColor;
  fill: currentColor;
  fill-opacity: 0.03;
  opacity: 0.9;
  stroke-width: 8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 0.35s ease,
    fill-opacity 0.35s ease,
    filter 0.35s ease,
    stroke-width 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all; /* Trigger mouse events on both fill and stroke */
  cursor: pointer;
}

/* Hovering boundary directly or active state synced from card header hover */
.pk-boundary:hover,
.pk-boundary.active-highlight {
  opacity: 1;
  fill-opacity: 0.12;
  stroke-width: 7px;
}

/* Subdivision specific boundary theme colors */
#boundary-lahaye {
  color: #ffb9b0; /* Light pink for La Haye */
}
#boundary-zeeland {
  color: #ffac39; /* Orange for Zeeland */
}
#boundary-rotterdam {
  color: #00beff; /* Blue for Rotterdam */
}
#boundary-breda {
  color: #b29bee; /* Purple for Breda */
}
#boundary-amsterdam {
  color: #ee7cb7; /* Pink/rose for Amsterdam */
}

/* Styling for missing pin circles (dots) ghim phân khu */
.pk-pin-circle {
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transform-origin: center;
  transform-box: fill-box;
  transition:
    r 0.35s ease,
    stroke-width 0.35s ease,
    filter 0.35s ease;
}

/* Khi hover vào group phân khu (hoặc đồng bộ từ card) thì chấm tròn ghim nổi bật thêm */
.subdivision-group.is-hover-active .pk-pin-circle {
  r: 8px;
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 8px currentColor)
    drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

#masterplan-svg {
  will-change: transform;
  transform: translateZ(0);
}
svg#masterplan-svg.is-centering {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.is-dragging .pulse-ring {
  animation-play-state: paused;
}

/* ==============================================
   13. RESPONSIVE FOR MOBILE DRAWER & FAB
   ============================================== */
@media (max-width: 500px) {
  /* Ẩn các card tĩnh lồng trong SVG */
  .subdivision-card {
    display: none !important;
  }

  /* Hiển thị nút FAB di động */
  #mobile-list-trigger {
    display: flex !important;
  }
}

/* Nút FAB di động */
#mobile-list-trigger {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 12px 24px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease-in-out;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Montserrat", sans-serif;
}

#mobile-list-trigger:active {
  transform: translateX(-50%) scale(0.95);
  background: rgba(25, 25, 25, 0.9);
}

/* Bottom Sheet Drawer */
#mobile-list-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55vh;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#mobile-list-drawer.active {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.drawer-header h3 {
  color: white;
  font-family: "MyFont", "Montserrat", sans-serif;
  font-size: 17px;
  font-weight: normal;
  margin: 0;
  letter-spacing: 0.5px;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.drawer-close:active {
  background: rgba(255, 255, 255, 0.15);
}

/* Tabs trong Drawer */
.drawer-tabs {
  display: flex;
  overflow-x: auto;
  padding: 8px 12px;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.drawer-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.drawer-tabs .tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Montserrat", sans-serif;
}

/* Active tab style matching each subdivision color theme */
.drawer-tabs .tab-btn[data-target="group-baibien"].active {
  background: #aedc5f !important;
  color: #111111 !important;
  border-color: #aedc5f !important;
  box-shadow: 0 4px 12px rgba(174, 220, 95, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-chung"].active {
  background: #fff0ae !important;
  color: #111111 !important;
  border-color: #fff0ae !important;
  box-shadow: 0 4px 12px rgba(255, 240, 174, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-lahaye"].active {
  background: #ffb9b0 !important;
  color: #111111 !important;
  border-color: #ffb9b0 !important;
  box-shadow: 0 4px 12px rgba(255, 185, 176, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-zeeland"].active {
  background: #ffac39 !important;
  color: #111111 !important;
  border-color: #ffac39 !important;
  box-shadow: 0 4px 12px rgba(255, 172, 57, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-rotterdam"].active {
  background: #00beff !important;
  color: #111111 !important;
  border-color: #00beff !important;
  box-shadow: 0 4px 12px rgba(0, 190, 255, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-breda"].active {
  background: #b29bee !important;
  color: #111111 !important;
  border-color: #b29bee !important;
  box-shadow: 0 4px 12px rgba(178, 155, 238, 0.35);
}
.drawer-tabs .tab-btn[data-target="group-amsterdam"].active {
  background: #ee7cb7 !important;
  color: #111111 !important;
  border-color: #ee7cb7 !important;
  box-shadow: 0 4px 12px rgba(238, 124, 183, 0.35);
}

/* Nội dung Drawer */
.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.drawer-content .tab-pane {
  display: none;
}

.drawer-content .tab-pane.active {
  display: block;
}

/* Style ghi đè cho list tiện ích trong Drawer di động */
.drawer-content .utility-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-content .utility-list.col-2 {
  display: flex; 
  flex-direction: column;
  gap: 6px;
}

.drawer-content .utility-list li {
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 0px;
  text-shadow: none;
  display: block; /* Mở rộng dòng để sub-bullets nằm dưới */
}

.drawer-content .utility-list li:active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.drawer-content .utility-list li .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 9px;
  font-weight: 800;
  margin-right: 6px;
  box-shadow: none;
}

.drawer-content .sub-bullets {
  font-size: 11px;
  padding-left: 26px;
  margin-top: 4px;
  text-shadow: none;
  gap: 2px;
}
