/* ============================================================
   NORDISK INDIEN TUR - JOURNEY MAP PAGE
   Only loaded on map.html. Uses the same brand tokens as style.css
   (which is loaded first) - colours/fonts here should stay in sync
   with :root in style.css if that ever changes.
   ============================================================ */

.map-page-hero{
  background:linear-gradient(135deg,var(--green-dark),var(--green));
  color:var(--cream);
  text-align:center;
  padding:60px 6% 44px;
  position:relative;
  overflow:hidden;
}
.map-page-hero::before{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 20% 30%,rgba(184,147,91,.1) 0%,transparent 50%),
             radial-gradient(circle at 80% 70%,rgba(184,147,91,.08) 0%,transparent 50%);
}
.map-page-hero > *{position:relative;z-index:1}
.map-page-hero .section-eyebrow{color:var(--gold-light)}
.map-page-hero h1{
  font-family:var(--serif);
  font-size:44px;
  font-weight:500;
  color:var(--cream);
  margin:6px 0 14px;
  letter-spacing:-.3px;
}
.map-page-hero h1 em{color:var(--gold-light);font-style:italic;font-weight:400}
.map-page-hero p{
  max-width:600px;
  margin:0 auto;
  color:rgba(246,240,228,.85);
  font-size:16px;
  line-height:1.75;
}

/* ---------- explorer shell ---------- */
.map-explorer{
  display:grid;
  grid-template-columns:380px 1fr;
  height:80vh;
  min-height:560px;
  max-height:860px;
  border-top:1px solid var(--line);
}

.map-sidebar{
  background:var(--white);
  border-right:1px solid var(--line);
  overflow-y:auto;
  padding:20px 18px 32px;
}
.map-sidebar-head{
  padding:6px 4px 16px;
  border-bottom:1px solid var(--line);
  margin-bottom:16px;
}
.map-sidebar-head .count{
  font-family:var(--serif);
  font-size:28px;
  color:var(--green);
  font-weight:500;
  line-height:1;
}
.map-sidebar-head .label{
  font-size:11px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--muted);
  margin-top:4px;
}

.map-list-item{
  position:relative;
  padding:18px 16px;
  border:1px solid var(--line);
  border-radius:6px;
  margin-bottom:12px;
  cursor:pointer;
  background:var(--white);
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.map-list-item:hover{
  border-color:var(--gold);
  box-shadow:0 8px 20px rgba(184,147,91,.14);
  transform:translateY(-1px);
}
.map-list-item.is-selected{
  border-color:var(--gold);
  background:var(--cream);
  box-shadow:0 10px 28px rgba(184,147,91,.22);
}
.map-list-item:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

.map-list-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--white);
  font-size:9.5px;
  letter-spacing:1.2px;
  text-transform:uppercase;
  font-weight:700;
  padding:5px 10px;
  border-radius:999px;
  margin-bottom:10px;
}
.map-list-badge svg{width:10px;height:10px;flex-shrink:0}

.map-list-dest{
  font-size:10.5px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold);
  font-weight:600;
  margin-bottom:5px;
}
.map-list-item h3{
  font-family:var(--serif);
  font-size:19px;
  color:var(--green);
  font-weight:600;
  margin:0 0 4px;
  line-height:1.2;
}
.map-list-meta{
  font-size:11px;
  color:var(--muted);
  letter-spacing:.4px;
  margin-bottom:12px;
}
.map-list-route{
  font-size:12.5px;
  color:var(--ink);
  line-height:1.7;
  margin:0 0 12px;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.map-list-highlights{list-style:none;padding:0;margin:0 0 14px}
.map-list-highlights li{
  font-size:12.5px;
  color:var(--muted);
  line-height:1.6;
  padding-left:14px;
  position:relative;
  margin-bottom:5px;
}
.map-list-highlights li::before{
  content:'';
  position:absolute;
  left:0;top:7px;
  width:4px;height:4px;
  border-radius:50%;
  background:var(--gold);
}
.map-list-cta{
  display:inline-block;
  font-size:11px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--green);
  font-weight:600;
  transition:color .2s;
}
.map-list-cta:hover{color:var(--gold)}

/* ---------- map canvas ---------- */
/* isolation:isolate contains Leaflet's own internal stacking (panes up
   to z-index 700, controls at 1000) inside this box so those values
   never get compared against the site header's dropdown menus (see
   ".header{z-index:200}" in style.css) - without it, hovering
   "Destinations" or "Travel Styles" while on this page showed the
   dropdown panel underneath the map instead of over it. */
.map-canvas-wrap{position:relative;background:#eef0ea;isolation:isolate}
#journeyMap{height:100%;width:100%;background:#eef0ea;font-family:var(--sans)}

.map-reset-btn{
  position:absolute;
  top:16px;
  right:16px;
  z-index:500;
  background:var(--white);
  border:1px solid var(--line);
  color:var(--green);
  font-family:var(--sans);
  font-size:12px;
  font-weight:600;
  letter-spacing:.5px;
  padding:10px 16px;
  border-radius:999px;
  box-shadow:0 6px 18px rgba(14,47,36,.12);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:7px;
  transition:border-color .2s, color .2s;
}
.map-reset-btn:hover{border-color:var(--gold);color:var(--gold)}
.map-reset-btn svg{width:14px;height:14px}

.map-hint{
  position:absolute;
  bottom:16px;
  left:16px;
  z-index:500;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(4px);
  border:1px solid var(--line);
  border-radius:6px;
  padding:9px 14px;
  font-size:11.5px;
  color:var(--muted);
  box-shadow:0 6px 18px rgba(14,47,36,.08);
  max-width:260px;
  line-height:1.5;
}
.map-hint strong{color:var(--green)}

/* ---------- Leaflet control restyle ---------- */
.leaflet-control-zoom{
  border:1px solid var(--line) !important;
  border-radius:8px !important;
  box-shadow:0 6px 18px rgba(14,47,36,.12) !important;
  overflow:hidden;
}
.leaflet-control-zoom a{
  color:var(--green) !important;
  background:var(--white) !important;
  width:32px !important;
  height:32px !important;
  line-height:32px !important;
}
.leaflet-control-zoom a:hover{background:var(--cream) !important}
.leaflet-control-attribution{
  font-size:10px !important;
  background:rgba(255,255,255,.85) !important;
  color:var(--muted) !important;
}

/* ---------- custom pins ---------- */
.map-pin{
  display:block;
  width:20px;
  height:20px;
  background:var(--green);
  border:2px solid var(--white);
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  box-shadow:0 3px 8px rgba(14,47,36,.4);
  position:relative;
  transition:transform .18s ease, background .18s ease, opacity .18s ease;
  cursor:pointer;
}
.map-pin::after{
  content:'';
  position:absolute;
  top:50%;left:50%;
  width:6px;height:6px;
  background:var(--white);
  border-radius:50%;
  transform:translate(-50%,-50%) rotate(45deg);
}
.map-pin-featured{background:var(--gold)}
.map-pin.is-active{
  background:var(--gold);
  transform:rotate(-45deg) scale(1.35);
}
.map-pin.is-dim{opacity:.28}
.leaflet-marker-icon:hover .map-pin{transform:rotate(-45deg) scale(1.2)}

.map-badge{
  display:flex;
  align-items:center;
  justify-content:center;
  width:17px;
  height:17px;
  background:var(--green);
  color:var(--cream);
  font-family:var(--sans);
  font-size:9.5px;
  font-weight:700;
  border-radius:50%;
  border:1.5px solid var(--white);
  box-shadow:0 2px 5px rgba(14,47,36,.35);
  pointer-events:none;
}

/* ---------- animated routes ---------- */
path.map-route{
  stroke-linecap:round;
  stroke-dasharray:1 9;
}
@media (prefers-reduced-motion: no-preference){
  path.map-route{
    animation:mapRouteFlow 1.1s linear infinite;
  }
}
@keyframes mapRouteFlow{
  to{stroke-dashoffset:-20}
}

/* ---------- popups ---------- */
.map-popup-wrap .leaflet-popup-content-wrapper{
  background:var(--white);
  border-radius:8px;
  box-shadow:0 16px 40px rgba(14,47,36,.22);
  padding:0;
}
.map-popup-wrap .leaflet-popup-content{margin:0 !important;width:auto !important;line-height:normal}
.map-popup-wrap .leaflet-popup-tip{background:var(--white)}
.map-popup-wrap .leaflet-popup-close-button{
  color:var(--muted) !important;
  top:10px !important;
  right:10px !important;
  font-size:18px !important;
}
.map-popup{padding:18px 20px}
.map-popup-place{
  font-family:var(--serif);
  font-size:20px;
  font-weight:600;
  color:var(--green);
  margin-bottom:3px;
}
.map-popup-label{
  font-size:10px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--gold);
  font-weight:600;
  margin-bottom:10px;
}
.map-popup-pkg{
  display:block;
  padding:9px 0;
  border-top:1px solid var(--line);
  text-decoration:none;
}
.map-popup-pkg:first-of-type{border-top:none;padding-top:2px}
.map-popup-pkg-dest{
  display:block;
  font-size:10px;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:2px;
}
.map-popup-pkg-title{
  display:block;
  font-family:var(--serif);
  font-size:15px;
  font-weight:600;
  color:var(--green);
  transition:color .15s;
}
.map-popup-pkg:hover .map-popup-pkg-title{color:var(--gold)}

/* ---------- responsive ---------- */
@media(max-width:900px){
  .map-explorer{
    grid-template-columns:1fr;
    height:auto;
    max-height:none;
  }
  .map-canvas-wrap{order:1}
  #journeyMap{height:56vh;min-height:400px}
  .map-sidebar{
    order:2;
    border-right:none;
    border-top:1px solid var(--line);
    max-height:640px;
  }
  .map-page-hero h1{font-size:32px}
  .map-page-hero p{font-size:15px}
}
@media(max-width:480px){
  .map-hint{display:none}
  .map-reset-btn{padding:9px 13px;font-size:11px}
}
