/* ===================================================
   TheCuzzorts — National Parks Page
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kreon:wght@400;700&family=Roboto+Condensed:wght@400;700&display=swap');

/* --- Reset & Base ---------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  background: #f0f2f5;
  color: #222;
  min-height: 100vh;
}

/* --- Header + footer styling now lives in ../../css/site-chrome.css --- */

/* --- Main Content ---------------------------------- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* --- Section labels now styled by ../../css/section-labels.css --- */

/* --- Combined Card --------------------------------- */
.combined-card {
  --accent: #8B5E3C;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.5rem;
  border-top: 5px solid var(--accent);
}

.combined-card h2 {
  font-family: 'Kreon', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}

.combined-card .count {
  font-size: 0.85rem;
  color: #5d6b79;
  margin-bottom: 0.85rem;
}

/* --- Person Grid ----------------------------------- */
.person-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.person-grid.grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

.person-grid.grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 800px) {
  .person-grid.grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .person-grid.grid-2col,
  .person-grid.grid-3col {
    grid-template-columns: 1fr;
  }
}

/* --- Person Card ----------------------------------- */
.person-card {
  --accent: #ccc;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 1.25rem 1.25rem 1rem;
  border-top: 5px solid var(--accent);
}

.person-card[data-person="josh"]  { --accent: #008C3D; }
.person-card[data-person="sam"]   { --accent: #662684; }
.person-card[data-person="ellie"] { --accent: #3E8F8F; }
.person-card[data-person="tilly"] { --accent: #0B7AD0; }
.person-card[data-person="poppy"] { --accent: #d9259a; }

.person-card h2 {
  font-family: 'Kreon', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}

.person-card .count {
  font-size: 0.85rem;
  color: #5d6b79;
  margin-bottom: 0.85rem;
}

/* Stat cards: name + count share one line; count number as a colourful
   pill. Photos/Map combined cards (no .count-num) keep block headers. */
.person-card h2,
.person-card .count,
.combined-card:has(.count-num) h2,
.combined-card:has(.count-num) .count {
  display: inline-block;
  vertical-align: middle;
}

.person-card h2,
.combined-card:has(.count-num) h2 {
  margin: 0 0.7em 0.85rem 0;
}

.person-card .count,
.combined-card:has(.count-num) .count {
  margin: 0 0 0.85rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.count-num {
  display: inline-block;
  background: var(--accent, #1a2e3b);
  color: #fff;
  font-family: 'Kreon', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.08em 0.45em;
  border-radius: 9px;
  margin-right: 0.5em;
  vertical-align: middle;
}

/* --- Visit Lists ----------------------------------- */
.list-toggle {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.35rem 0 0;
  background: none;
  border: none;
  border-top: 1px solid #eee;
  color: #aaa;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
}

.list-toggle:hover {
  color: #555;
}

.visit-list {
  display: none;
  margin-top: 0.5rem;
}

.visit-list.open {
  display: block;
}

.region-group {
  margin-bottom: 0.55rem;
}

.region-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d8a97;
  margin-bottom: 0.35rem;
}

.visit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.visit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.92rem;
  background: #eaeef2;
  border: 1px solid #c6cfd7;
  color: #28333d;
  white-space: nowrap;
}

/* Unvisited / bucket-list chip */
.visit-chip--unvisited {
  font-style: italic;
  color: #56636f;
  background: #f4f6f8;
  border-style: dashed;
  border-color: #b9c2cb;
}

/* Chip tooltip (date + notes) */
.visit-chip[data-tooltip] {
  position: relative;
  cursor: default;
}

.visit-chip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2e3b;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.3rem 0.55rem;
  border-radius: 5px;
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.visit-chip[data-tooltip]:hover::after {
  opacity: 1;
}

/* Person dot in family chip */
.person-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.no-visits {
  font-size: 0.8rem;
  color: #bbb;
  font-style: italic;
}

#whole-family-card {
  border-top-color: #FF8200;
}

/* --- Map Card -------------------------------------- */
#parksMap {
  height: 480px;
  border-radius: 6px;
  margin: 12px 0 8px;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.map-filter-btn {
  padding: 5px 14px;
  border: 2px solid #ccc;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}

.map-filter-btn.active[data-filter="anyone"]       { border-color: #E8A020; color: #E8A020; }
.map-filter-btn.active[data-filter="whole-family"] { border-color: #FF8200; color: #FF8200; }
.map-filter-btn.active[data-filter="josh"]   { border-color: #00AC4B; color: #00AC4B; }
.map-filter-btn.active[data-filter="sam"]    { border-color: #662684; color: #662684; }
.map-filter-btn.active[data-filter="ellie"]  { border-color: #66b2b2; color: #66b2b2; }
.map-filter-btn.active[data-filter="tilly"]  { border-color: #0898ff; color: #0898ff; }
.map-filter-btn.active[data-filter="poppy"]  { border-color: #d9259a; color: #d9259a; }

.map-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #777;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px #aaa;
  flex-shrink: 0;
}

.legend-dot.visited   { background: #E8A020; }
.legend-dot.unvisited { background: #aaaaaa; }

.legend-sep {
  color: #ccc;
  margin: 0 4px;
}

@media (max-width: 640px) {
  #parksMap { height: 320px; }
}

/* --- Photos + Map row ------------------------------ */
.photos-map-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;   /* equal-height columns */
}

.pm-col { min-width: 0; }   /* let the slideshow + map shrink inside their tracks */

/* Desktop: photo + map cards fill their column so they match height.
   The map grows to match the photo's natural height. */
@media (min-width: 769px) {
  .pm-col { display: flex; flex-direction: column; }

  .pm-col .combined-card { flex: 1 1 auto; }

  .pm-map .combined-card {
    display: flex;
    flex-direction: column;
  }
  .pm-map #parksMap {
    flex: 1 1 auto;
    min-height: 320px;
    height: auto;
  }
}

@media (max-width: 768px) {
  .photos-map-row { grid-template-columns: 1fr; }
}

/* --- Photos / Slideshow ---------------------------- */
.slideshow-wrap {
  background: #3a2a1c;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  overflow: hidden;
  margin: 12px 0 4px;
}

.parks-slideshow {
  position: relative;
  background: #4a3625;
}

.parks-slideshow img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Only the active slide is shown */
.parks-slideshow img:not(.is-active) {
  display: none;
}

.slideshow-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem 0.6rem;
  background: #3a2a1c;
}

.slideshow-controls a {
  flex: 0 0 auto;
  font-family: 'Kreon', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.25rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.slideshow-controls a:hover {
  color: #E8A020;
  border-color: #E8A020;
}

.cycle-caption {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  color: #fff;
  font-family: 'Kreon', serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Photo lightbox (full-screen) ------------------ */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,12,8,0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lb-overlay.is-open { display: flex; }

.lb-figure {
  margin: 0;
  max-width: 92vw;
  text-align: center;
}
.lb-img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.5);
}
.lb-cap {
  margin-top: 0.6rem;
  font-family: 'Kreon', serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e8eef2;
}

.lb-overlay button {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  font-family: 'Kreon', serif;
  line-height: 1;
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.lb-overlay button:hover { background: rgba(232,160,32,0.2); border-color: #E8A020; }

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 1.6rem;
}
.lb-prev { left: 2vw; }
.lb-next { right: 2vw; }

.lb-close {
  top: 2vh;
  right: 2vw;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

@media (max-width: 640px) {
  .lb-prev, .lb-next { width: 38px; height: 52px; font-size: 1.3rem; }
}

/* --- Footer styling now lives in ../../css/site-chrome.css --- */
