/* ==========================================================================
   Locations page — guide to shooting venues across Toronto & the GTA
   ========================================================================== */

.locations-hero {
  text-align: center;
  padding-top: calc(var(--header-h) + var(--space-2xl));
  padding-bottom: var(--space-xl);
}

.locations-hero h1 em { font-style: italic; color: var(--accent); }

.locations-hero .lede {
  margin-inline: auto;
  margin-top: var(--space-md);
  max-width: 52ch;
}

.locations-credit {
  text-align: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: var(--space-xl);
}

.locations-credit a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---- Map ---- */

.locations-map-wrap {
  padding-bottom: var(--space-lg);
}

#locations-map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  z-index: 1;
}

@media (min-width: 768px) { #locations-map { height: 520px; } }
@media (min-width: 1024px) { #locations-map { height: 600px; } }

.locations-map__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.locations-map__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.locations-map__swatch--downtown { background: #285846; }
.locations-map__swatch--east { background: #b4804a; }

/* Leaflet popup: match site typography */
.leaflet-popup-content {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  line-height: 1.4;
  margin: 10px 14px;
}
.leaflet-popup-content strong {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--ink-primary);
  display: block;
  margin-bottom: 4px;
}
.leaflet-popup-content button {
  background: var(--accent);
  color: var(--ink-on-dark);
  border: 0;
  padding: 5px 10px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--ff-sans);
}
.leaflet-popup-content button:hover {
  filter: brightness(1.1);
}

/* Highlight flash when jumping from map to a card */
.location--highlight {
  animation: locationFlash 1.4s var(--ease-out);
}
@keyframes locationFlash {
  0%   { background: rgba(40, 88, 70, 0.18); }
  100% { background: transparent; }
}

/* ---- Floating "back to map" button ---- */

.back-to-map {
  position: fixed;
  right: var(--space-lg);
  bottom: var(--space-lg);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--ink-on-dark);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-fast) var(--ease-out),
              filter var(--dur-fast) var(--ease-out),
              opacity var(--dur-med) var(--ease-out);
  animation: backToMapIn var(--dur-med) var(--ease-out);
}

.back-to-map[hidden] {
  display: none;
}

.back-to-map:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.back-to-map svg { display: block; }

@keyframes backToMapIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Region nav (sticky below header) ---- */

.region-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  border-block: 1px solid var(--border-subtle);
  padding-block: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.region-nav__inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .region-nav__inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
  }
}

.region-nav__label { color: var(--ink-muted); }

.region-nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px var(--space-sm);
}

.region-nav__sep {
  color: var(--ink-muted);
  opacity: 0.5;
}

.region-nav__link {
  color: var(--ink-primary);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.region-nav__link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Region section ---- */

.region {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--border-subtle);
}
.region:first-of-type { border-top: 0; }

.region__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.region__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.region__title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.region__count {
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---- Location card ---- */

.location {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.location__name {
  font-family: var(--ff-serif);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.location__meta {
  display: grid;
  gap: 4px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-md);
}

.location__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: baseline;
}

.location__meta-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-primary);
  min-width: 5.5rem;
}

.location__meta-value { color: var(--ink-muted); }

.location__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.location__tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-primary);
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 2px;
}

.location__tag--setting {
  background: rgba(40, 88, 70, 0.1);
  color: var(--accent);
}

.location__website {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  margin-top: var(--space-xs);
}

/* ---- Image strip per location ---- */

.location__gallery {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}

.location__gallery::-webkit-scrollbar { height: 6px; }
.location__gallery::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
.location__gallery::-webkit-scrollbar-track { background: transparent; }

.location__thumb {
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  scroll-snap-align: start;
  overflow: hidden;
  display: block;
}

.location__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-med) var(--ease-out),
              filter var(--dur-med) var(--ease-out);
}

.location__thumb:hover img {
  transform: scale(1.04);
  filter: brightness(0.95);
}

@media (min-width: 768px) {
  .location__thumb { width: 280px; }
}

.location__gallery--empty {
  padding: var(--space-md);
  background: var(--bg-secondary);
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--ff-serif);
  text-align: center;
  border-radius: 2px;
}

/* ---- Empty state / loading ---- */

.locations-status {
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--ink-muted);
}
