/* ==========================================================================
   TobaVerse — Map Page Stylesheet
   Reuses tokens from style.css only (colors, radius, shadow, fonts, .btn,
   .reveal, .cta-band/.cta-inner, nav, footer). Everything below is
   page-specific to Map.

   Note on palette: the brief for this page specified #0B2E3D / #F4A340 /
   #2F8F6B / #F9F7F2 — these are the same navy/clay/emerald/paper family
   already established sitewide (--navy / --clay / --emerald / --paper in
   style.css), so this file reuses those existing tokens directly rather
   than introducing near-duplicate values, keeping every page consistent.
   ========================================================================== */

/* ---- 1. Hero (parallax) ---------------------------------------------------- */
.map-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
}
.map-hero .hero-bg {
  position: absolute;
  inset: -10% -5%;
  background: url("../assets/images/hero/map-hero.jpg") center center / cover no-repeat;
  will-change: transform;
  z-index: 0;
}
.map-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.6) 100%),
    linear-gradient(120deg, rgba(11,46,61,0.32), rgba(47,143,107,0.16));
  z-index: 1;
}
.map-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 180px clamp(20px, 5vw, 48px) 88px;
}
.map-hero .eyebrow { color: var(--clay-light); }
.map-hero h1 {
  color: var(--paper);
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 800;
  margin: 16px 0 18px;
  max-width: 780px;
}
.map-hero p.lede { max-width: 580px; color: rgba(251,249,244,0.82); font-size: 1.02rem; }
.map-hero .hero-actions { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Section shell shared by this page ------------------------------------- */
.m-section { padding: 100px 0; position: relative; }
.m-section.tint { background: var(--paper-dim); }

/* ---- Floating decorative blobs (subtle, ambient) --------------------------- */
.float-deco {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
  animation: deco-float 7s ease-in-out infinite;
  z-index: 0;
}
@keyframes deco-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-16px) translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .float-deco { animation: none; }
}

/* ---- 2. Interactive map ----------------------------------------------------- */
.map-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}
.map-chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(11,46,61,0.14);
  background: #fff;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.25s ease;
}
.map-chip:hover { border-color: var(--emerald); color: var(--emerald); }
.map-chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--paper); }

.map-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 34px;
  align-items: flex-start;
}
.map-illustration-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0F3A4C 0%, #0B2E3D 60%, #071A24 100%);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  overflow: hidden;
}
.map-illustration-wrap svg { width: 100%; height: auto; display: block; }

.map-lake { fill: #1D6F8C; opacity: 0.9; }
.map-island { fill: #1F7A5C; opacity: 0.85; }
.map-contour-ring { fill: none; stroke: rgba(251,249,244,0.14); stroke-width: 1.2; }

.map-marker { cursor: pointer; transition: transform 0.25s ease; transform-origin: center; }
.map-marker:hover, .map-marker:focus { transform: scale(1.18); outline: none; }
.map-marker .pin-pulse {
  fill: var(--clay);
  opacity: 0.35;
  animation: pin-pulse 2.4s ease-out infinite;
  transform-origin: center;
}
.map-marker .pin-dot { fill: var(--clay); stroke: var(--paper); stroke-width: 1.4; }
.map-marker.is-active .pin-dot { fill: var(--emerald-light); }
.map-marker.is-dimmed { opacity: 0.28; }
.map-marker.is-dimmed .pin-pulse { animation: none; opacity: 0; }
@keyframes pin-pulse {
  0% { transform: scale(1); opacity: 0.45; }
  100% { transform: scale(2.6); opacity: 0; }
}
.map-marker text {
  font-family: var(--font-mono);
  font-size: 7px;
  fill: rgba(251,249,244,0.9);
  pointer-events: none;
}

.map-legend {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(251,249,244,0.7);
  position: relative;
  z-index: 1;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--clay); display: inline-block; }

/* Info card (shown when a marker is clicked) */
.map-info-card {
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.map-info-card .mi-empty {
  padding: 48px 32px;
  text-align: center;
  color: #5B6E75;
  margin: auto;
}
.map-info-card .mi-empty svg { width: 40px; height: 40px; color: var(--lake); margin: 0 auto 14px; }
.map-info-card .mi-photo {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper-dim);
}
.map-info-card .mi-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-info-card .mi-photo .mi-badge {
  position: absolute;
  top: 16px; left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11,46,61,0.6);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.map-info-card .mi-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.map-info-card h3 { font-size: 1.2rem; color: var(--navy); }
.map-info-card .mi-loc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--emerald);
}
.map-info-card p.mi-desc { color: #4B6067; font-size: 0.9rem; }
.map-info-card .mi-meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid rgba(11,46,61,0.08); border-bottom: 1px solid rgba(11,46,61,0.08); }
.map-info-card .mi-meta .row { display: flex; gap: 8px; font-size: 0.86rem; color: #3E5359; }
.map-info-card .mi-meta .row b { color: var(--navy); font-weight: 600; min-width: 92px; }
.map-info-card .mi-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.map-info-card .mi-actions .btn { padding: 10px 16px; font-size: 0.82rem; }

/* ---- 3. Destination cards --------------------------------------------------- */
.dest-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.map-dest-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
  display: flex;
  flex-direction: column;
}
.map-dest-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lift); }
.map-dest-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-dim); }
.map-dest-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.map-dest-card:hover .thumb img { transform: scale(1.08); }
.map-dest-card .thumb .badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(11,46,61,0.55); color: var(--paper);
  font-size: 0.7rem; font-weight: 600; backdrop-filter: blur(6px);
}
.map-dest-card .thumb .rating {
  position: absolute; top: 14px; right: 14px;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(251,249,244,0.92); color: var(--navy);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
}
.map-dest-card .thumb .rating svg { width: 11px; height: 11px; color: var(--clay); }
.map-dest-card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.map-dest-card .district {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lake);
}
.map-dest-card h4 { font-size: 1.04rem; color: var(--navy); }
.map-dest-card p.desc { color: #4B6067; font-size: 0.86rem; flex: 1; }
.map-dest-card .travel-time {
  display: inline-flex; align-self: flex-start;
  gap: 6px; align-items: center;
  font-size: 0.78rem; color: var(--emerald); font-weight: 600;
  margin-top: 4px;
}
.map-dest-card .travel-time svg { width: 13px; height: 13px; }

/* ---- 4. Transportation route timeline --------------------------------------- */
.route-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}
.route-flow .route-node {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}
.route-flow .route-node .node-icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-soft);
}
.route-flow .route-node .node-body h4 { font-size: 1rem; color: var(--navy); }
.route-flow .route-node .node-body p { font-size: 0.84rem; color: #4B6067; margin-top: 2px; }
.route-flow .route-connector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 26px;
  margin-left: 26px;
  border-left: 2px dashed rgba(11,46,61,0.2);
  min-height: 34px;
}
.route-flow .route-connector .duration-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--emerald);
  background: var(--paper-dim);
  padding: 4px 11px;
  border-radius: 999px;
}
.route-flow .route-connector .via {
  font-size: 0.78rem;
  color: #4B6067;
}

/* ---- 5. Distance & travel time table ----------------------------------------- */
.distance-card {
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  padding: 8px;
}
.distance-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.distance-table thead th {
  text-align: left;
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--paper-dim);
}
.distance-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.distance-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }
.distance-table tbody td { padding: 16px 22px; font-size: 0.9rem; color: #3E5359; border-bottom: 1px solid rgba(11,46,61,0.06); }
.distance-table tbody tr:last-child td { border-bottom: none; }
.distance-table td.route-from { font-weight: 600; color: var(--navy); }

/* ---- 6. Visitor information -------------------------------------------------- */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.info-card {
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(11,46,61,0.06);
  box-shadow: var(--shadow-soft);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.info-card .info-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--paper-dim); color: var(--lake); display: grid; place-items: center; }
.info-card .info-icon svg { width: 21px; height: 21px; }
.info-card h4 { font-size: 0.96rem; color: var(--navy); }
.info-card p { color: #4B6067; font-size: 0.84rem; }

/* ---- 7. Safety tips ----------------------------------------------------------- */
.safety-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.safety-card {
  border-radius: var(--radius-md);
  background: var(--paper-dim);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: none;
}
.safety-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.safety-card .safety-icon { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--clay); display: grid; place-items: center; }
.safety-card .safety-icon svg { width: 19px; height: 19px; }
.safety-card h4 { font-size: 0.9rem; color: var(--navy); }

/* ---- 8. CTA (reuses global .cta-band / .cta-inner) --------------------------- */
.cta-inner.map-cta {
  background: none;
  isolation: isolate;
}
.cta-inner.map-cta::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: url("../assets/images/hero/map-hero.jpg") center center / cover no-repeat;
  filter: blur(16px) brightness(0.55) saturate(110%);
  transform: scale(1.06);
  z-index: -2;
}
.cta-inner.map-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11,46,61,0.78), rgba(7,20,27,0.86));
  z-index: -1;
}

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .map-stage { grid-template-columns: 1fr; }
  .dest-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .safety-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dest-cards-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .map-hero-inner { padding-top: 130px; }
  .route-flow .route-node { gap: 14px; }
  .distance-table thead th, .distance-table tbody td { padding: 12px 14px; }
}

/* ---- Destination card highlight (triggered by "View Destination" in info card) */
.map-dest-card.is-highlighted {
  box-shadow: 0 0 0 3px var(--clay), var(--shadow-lift);
}