/* ==========================================================================
   Campus Map — Page-specific styles (extends main.css Terminal Noir theme)
   ========================================================================== */

/* ---------- Map Hero gradient ---------- */
.hero--map .hero__bg {
  background:
    radial-gradient(ellipse 65% 50% at 50% -5%, rgba(0,228,255,.12) 0%, transparent 50%),
    radial-gradient(ellipse 45% 40% at 80% 100%, rgba(200,16,46,.08) 0%, transparent 50%);
  animation: heroBreathe 12s ease-in-out infinite;
}

/* ---------- Dark mode tile filter ---------- */
.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) saturate(.12) brightness(1.1) contrast(.85);
}
/* Fix tile seams */
.leaflet-tile {
  outline: 1px solid transparent;
  backface-visibility: hidden;
  margin: -0.5px;
}
/* Undo filter on markers so colours stay correct */
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-overlay-pane {
  filter: none;
}
/* Light mode: no filter needed */
html.light .leaflet-tile-pane {
  filter: none;
}
html.light .leaflet-tile {
  margin: 0;
}

/* ---------- Map Embeds ---------- */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.03);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: none;
}

.map-embed--large {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(200,16,46,.12);
  box-shadow: 0 8px 40px rgba(0,0,0,.4), 0 0 60px rgba(200,16,46,.06);
}
.map-embed--large iframe,
.map-embed--large #overviewMap {
  height: 420px;
}

/* ---------- Leaflet Map Pins ---------- */
.map-pin {
  background: none !important;
  border: none !important;
}
.map-pin__dot {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform .2s ease;
}
.map-pin__dot:hover {
  transform: scale(1.15);
}

.map-pin__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  z-index: 1;
  animation: mapPulse 2.5s ease-out infinite;
}

@keyframes mapPulse {
  0%   { transform: scale(.6); opacity: .7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map-pin__label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(8,8,10,.85);
  backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 4px;
  border-left: 2px solid;
  z-index: 3;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
  background: rgba(8,8,10,.92) !important;
  backdrop-filter: blur(12px);
  color: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
  border: 1px solid rgba(255,255,255,.08);
}
.leaflet-popup-tip {
  background: rgba(8,8,10,.92) !important;
}
.leaflet-popup-close-button {
  color: rgba(255,255,255,.5) !important;
}
.leaflet-popup-close-button:hover {
  color: #fff !important;
}

/* Leaflet controls */
.leaflet-control-zoom a {
  background: rgba(8,8,10,.85) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.1) !important;
}
.leaflet-control-zoom a:hover {
  background: rgba(8,8,10,.95) !important;
}
.leaflet-control-attribution {
  background: rgba(8,8,10,.6) !important;
  color: rgba(255,255,255,.4) !important;
  font-size: .65rem !important;
}
.leaflet-control-attribution a {
  color: rgba(255,255,255,.5) !important;
}

/* ---------- Venue Cards ---------- */
.venue {
  display: flex;
  gap: 40px;
  margin-bottom: 64px;
  align-items: stretch;
}
.venue:last-child {
  margin-bottom: 0;
}

.venue--reverse {
  flex-direction: row-reverse;
}

.venue__info {
  flex: 1;
  display: flex;
  gap: 20px;
}

.venue__map {
  flex: 0 0 400px;
}

.venue__marker {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 12px;
  transition: all .3s;
}

.venue__marker--accent {
  color: var(--accent);
  background: rgba(200,16,46,.1);
  border: 1px solid rgba(200,16,46,.2);
}
.venue:hover .venue__marker--accent {
  background: rgba(200,16,46,.15);
  box-shadow: 0 0 20px rgba(200,16,46,.1);
}

.venue__marker--gold {
  color: #ffd700;
  background: rgba(255,215,0,.08);
  border: 1px solid rgba(255,215,0,.2);
}
.venue:hover .venue__marker--gold {
  background: rgba(255,215,0,.12);
  box-shadow: 0 0 20px rgba(255,215,0,.08);
}

.venue__marker--cyan {
  color: var(--cyan);
  background: rgba(0,228,255,.06);
  border: 1px solid rgba(0,228,255,.15);
}
.venue:hover .venue__marker--cyan {
  background: rgba(0,228,255,.1);
  box-shadow: 0 0 20px rgba(0,228,255,.06);
}

.venue__details {
  flex: 1;
}

.venue__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(200,16,46,.08);
  border: 1px solid rgba(200,16,46,.12);
  border-radius: 5px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

.venue__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.venue__address {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.venue__notes {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venue__notes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .84rem;
  color: var(--text-muted);
}

.venue__notes li i {
  width: 16px;
  text-align: center;
  color: var(--accent);
  font-size: .8rem;
  flex-shrink: 0;
}

/* ---------- Scroll reveal ---------- */
.venue,
.map-overview {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.venue.is-visible,
.map-overview.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .venue,
  .venue--reverse {
    flex-direction: column;
  }
  .venue__map {
    flex: none;
    width: 100%;
  }
  .map-embed iframe {
    height: 260px;
  }
  .map-embed--large iframe,
  .map-embed--large #overviewMap {
    height: 320px;
  }
  .venue-leaflet {
    height: 260px !important;
  }
}

@media (max-width: 480px) {
  .venue__info {
    flex-direction: column;
    gap: 16px;
  }
  .venue__marker {
    width: 40px;
    height: 40px;
    font-size: .95rem;
  }
  .map-embed iframe,
  .venue-leaflet {
    height: 220px !important;
  }
  .map-embed--large #overviewMap {
    height: 280px !important;
  }
}
