/* ===================================================
   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 ---------------------------------------- */
header {
  background: #1a2e3b;
  color: #fff;
  padding: 1.25rem 1.5rem 1.25rem;
  text-align: center;
}

header h1 {
  font-family: 'Kreon', Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

header p {
  font-size: 0.85rem;
  color: #a8bfc9;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.home-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.35);
  transition: color 0.2s, border-color 0.2s;
}

.home-link:hover {
  color: #E8A020;
  border-bottom-color: #E8A020;
}

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

/* --- Section Heading ------------------------------- */
.section-heading {
  font-family: 'Kreon', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a9aaa;
  margin: 1.75rem 0 0.75rem;
}

/* --- Combined Card --------------------------------- */
.combined-card {
  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 #8B5E3C;
}

.combined-card h2 {
  font-family: 'Kreon', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a2e3b;
  margin-bottom: 0.2rem;
}

.combined-card .count {
  font-size: 0.9rem;
  color: #777;
  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;
  }

  .expand-btn {
    display: none;
  }
}

/* --- Person Card ----------------------------------- */
.person-card {
  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 #ccc;
  position: relative;
}

.person-card.expanded {
  grid-column: 1 / -1;
}

/* --- Expand Button --------------------------------- */
.expand-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  line-height: 1;
  color: #aaa;
  transition: color 0.15s, border-color 0.15s;
}

.expand-btn:hover {
  color: #444;
  border-color: #aaa;
}

.expand-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.person-card[data-person="josh"]  { border-top-color: #00AC4B; }
.person-card[data-person="sam"]   { border-top-color: #662684; }
.person-card[data-person="ellie"] { border-top-color: #66b2b2; }
.person-card[data-person="tilly"] { border-top-color: #0898ff; }
.person-card[data-person="poppy"] { border-top-color: #d9259a; }

.person-card h2 {
  font-family: 'Kreon', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2e3b;
  margin-bottom: 0.2rem;
}

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

/* --- 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.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 0.25rem;
}

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

.visit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  background: #f0f2f5;
  border: 1px solid #ddd;
  color: #444;
  white-space: nowrap;
}

/* 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;
}

/* --- Footer ---------------------------------------- */
footer {
  background: #1a2e3b;
  color: #a8bfc9;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
}

footer a {
  color: #E8A020;
  text-decoration: none;
}
