/* ==========================================================================
   Interactive map page — Isle of Wight School Trip 2026
   Loaded alongside style.css. Uses Leaflet for the map.
   ========================================================================== */

.map-intro {
  text-align: center;
  padding: 2rem 1.25rem 1rem;
}
.map-intro h1 {
  font-family: var(--head);
  color: var(--navy);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  margin: 0 0 0.4rem;
}
.map-intro p {
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
}

#map {
  height: min(78vh, 820px);
  min-height: 460px;
  width: 100%;
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
  background: #aad3df;
  z-index: 0;
}

/* ---------- Custom teardrop pins -------------------------------------- */
.trip-pin { position: relative; }
.trip-pin .badge {
  width: 42px;
  height: 42px;
  background: var(--navy);
  border: 3px solid var(--gold);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trip-pin .num {
  transform: rotate(45deg);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--head);
}
.trip-pin:hover .badge { background: var(--blue); }

/* Leaflet tooltip (day label) */
.leaflet-tooltip.trip-label {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font);
  box-shadow: var(--shadow);
  padding: 0.35rem 0.6rem;
}
.leaflet-tooltip.trip-label::before { border-top-color: var(--navy); }
.trip-label .lbl-day { color: var(--gold); font-weight: 700; }
.trip-label .lbl-count { opacity: 0.8; font-weight: 400; font-size: 0.85em; }

/* ---------- Photo lightbox -------------------------------------------- */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(15, 11, 28, 0.94);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lb.open { display: flex; }

.lb-head {
  color: #fff;
  text-align: center;
  margin-bottom: 0.6rem;
}
.lb-title {
  font-family: var(--head);
  font-size: 1.25rem;
  margin: 0;
}
.lb-title .lb-day { color: var(--gold); }
.lb-counter { font-size: 0.9rem; opacity: 0.8; }

.lb-stage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 96vw;
}
.lb-img {
  max-width: min(90vw, 1200px);
  max-height: 70vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  background: #fff;
}
.lb-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  flex: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, background 0.12s ease;
}
.lb-btn:hover { transform: scale(1.08); background: #fff; }
.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}
.lb-close:hover { border-color: var(--gold); color: var(--gold); }

/* Thumbnail strip */
.lb-thumbs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.8rem;
  max-width: 92vw;
  overflow-x: auto;
  padding: 0.3rem;
}
.lb-thumbs img {
  height: 56px;
  width: 76px;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0.55;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.15s ease;
}
.lb-thumbs img:hover { opacity: 0.85; }
.lb-thumbs img.active { opacity: 1; border-color: var(--gold); }

@media (max-width: 600px) {
  .lb-btn { width: 40px; height: 40px; font-size: 1.2rem; }
  .lb-img { max-height: 62vh; }
}
