/* =========================================================
   Visit Crickhowell — Styles
   Colour palette: Brecon Beacons greens, earth tones, Usk blue
   ========================================================= */

/* ── Design tokens ─────────────────────────────────────── */
:root {
  /* Brand */
  --forest:       #1a5c38;
  --forest-dark:  #124028;
  --forest-mid:   #2d6a4f;
  --forest-light: #52b788;
  --stone:        #8b7355;
  --stone-light:  #c4a882;
  --usk-blue:     #3a7ca5;
  --usk-light:    #64a8cc;
  --earth:        #8b4513;
  --heather:      #7b5ea7;

  /* UI */
  --bg:           #faf8f5;
  --card-bg:      #ffffff;
  --border:       #e8e2da;
  --border-light: #f0ece6;
  --text:         #2c2416;
  --text-muted:   #7a6e62;
  --text-light:   #a89e92;
  --header-bg:    #1a5c38;
  --header-h:     68px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(26,92,56,.10);
  --shadow-card:  0 3px 16px rgba(26,92,56,.09);

  /* Category colours */
  --c-walk:       #2d8a47;
  --c-historic:   #7c3d11;
  --c-food:       #c2410c;
  --c-pub:        #92400e;
  --c-attraction: #1e6fa3;
  --c-nature:     #065f46;
  --c-nearby:     #5b21b6;
  --c-culture:    #9d174d;
  --c-activity:   #0369a1;
  --c-quirky:     #0d9488;
}

/* ── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  height: var(--header-h);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}
.site-logo {
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.2);
  padding: 7px 14px;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  color: inherit;
  transition: background .15s, border-color .15s;
}
.site-logo:hover {
  background: rgba(0,0,0,.4);
  border-color: rgba(255,255,255,.32);
}
.site-logo:active {
  background: rgba(0,0,0,.52);
}
.site-logo:focus-visible {
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}
.site-logo h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  line-height: 1.1;
}
.site-logo .tagline {
  font-size: 0.72rem;
  color: rgba(255,255,255,.7);
  display: block;
}
.header-weather-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-weather-pill:hover { background: rgba(255,255,255,.24); }
.header-updated {
  font-size: 0.72rem;
  color: rgba(255,255,255,.60);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}
.header-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.tab-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.78);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tab-btn:hover  { background: rgba(255,255,255,.15); color: #fff; }
.tab-btn.active { background: rgba(255,255,255,.22); color: #fff; }

/* ── Tabs ───────────────────────────────────────────────── */
.main-content { min-height: calc(100vh - var(--header-h)); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg,
      #0d3320 0%,
      #1a5c38 35%,
      #2d6a4f 60%,
      #1e6fa3 100%);
}
/* Mountain silhouette using clip-path layers */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 460' preserveAspectRatio='xMidYMax slice'%3E%3Cpolygon points='0,460 0,320 120,220 240,260 320,180 420,240 500,140 590,200 680,100 760,160 860,80 940,150 1040,60 1120,130 1200,90 1290,160 1360,110 1440,170 1440,460' fill='rgba(0,0,0,0.18)'/%3E%3Cpolygon points='0,460 0,360 100,300 200,340 280,280 360,310 440,240 540,290 620,200 700,250 780,180 860,230 940,160 1040,220 1120,170 1200,210 1280,160 1360,200 1440,180 1440,460' fill='rgba(0,0,0,0.12)'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(26,92,56,.35));
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 24px 48px;
  color: #fff;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.75);
  margin-bottom: 14px;
}
.hero-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.13;
  margin-bottom: 18px;
}
.hero-headline span { display: block; }
.hero-purpose {
  font-size: 1.05rem;
  max-width: 540px;
  color: rgba(255,255,255,.88);
  margin-bottom: 28px;
  line-height: 1.65;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.btn-primary {
  background: #fff;
  color: var(--forest-dark);
  border: none;
  font-size: .9rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.btn-ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.45);
  font-size: .9rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.25); }
.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; }
.hero-stat-label { display: block; font-size: .72rem; color: rgba(255,255,255,.7); margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }


/* ── Category pills ─────────────────────────────────────── */
.explore-top {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.category-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 4px;
  scrollbar-width: none;
  max-width: 1280px;
  margin: 0 auto;
}
.category-pills::-webkit-scrollbar { display: none; }
.category-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.category-pill:hover  { border-color: var(--forest-light); color: var(--forest); }
.category-pill.active { background: var(--forest); border-color: var(--forest); color: #fff; }
.pill-icon { font-size: 1rem; }
.pill-label { font-size: .78rem; }

/* ── Search bar ─────────────────────────────────────────── */
.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px 10px;
}
.filter-bar-top {
  display: flex;
  gap: 10px;
  align-items: center;
}
.filter-search {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-search:focus { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(82,183,136,.2); }
.filter-count {
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
  background: var(--border-light);
  padding: 5px 10px;
  border-radius: 14px;
}

/* ── Section headers ────────────────────────────────────── */
.section-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--forest-dark); }
.section-header .section-count {
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* ── Location grid ──────────────────────────────────────── */
.locations-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.location-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,92,56,.14);
}
/* Persistent shared-card state — applied when a card is opened via a deep-link.
   Stays visible so the user always knows which card was linked to them,
   both when the detail panel is open and after they close it. */
.card-shared {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  background-color: rgba(52,107,78,.09);
}
.card-colour-bar {
  height: 5px;
  width: 100%;
  flex-shrink: 0;
}
.card-body { padding: 16px 18px 14px; flex: 1; display: flex; flex-direction: column; }
.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.card-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.card-title-block { flex: 1; min-width: 0; }
.card-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-area { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.card-share-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s, color .12s;
}
.card-share-btn:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.card-save-btn {
  flex-shrink: 0;
  margin-left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s, color .12s;
}
.card-save-btn:hover { background: #b45309; border-color: #b45309; color: #fff; }
.card-save-btn.saved { background: #d97706; border-color: #d97706; color: #fff; }
.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--forest);
  font-size: .65rem;
  font-weight: 700;
  padding: 0 3px;
  margin-left: 3px;
  line-height: 1;
}
.pill-badge:empty { display: none; }
.whats-new-note {
  margin-top: 10px;
  font-size: .72rem;
  opacity: .55;
  letter-spacing: .02em;
}
.whats-new-note strong { opacity: .8; }
.card-desc {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-bottom: 12px;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}
.card-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-free       { background: #dcfce7; color: #166534; }
.badge-cadw       { background: #fef3c7; color: #92400e; }
.badge-nationaltrust { background: #ede9fe; color: #4c1d95; }
.badge-reviewed   { background: #fff7ed; color: #c2410c; }
.badge-michelin   { background: #fef2f2; color: #991b1b; }
.badge-official   { background: #eff6ff; color: #1e40af; }
.card-walk-info {
  font-size: .72rem;
  color: var(--usk-blue);
  background: #eff8ff;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.card-tag {
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--border-light);
  color: var(--text-muted);
  font-weight: 600;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.card-action {
  flex: 1;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 7px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.card-action:hover { background: var(--forest); border-color: var(--forest); color: #fff; text-decoration: none; }
.card-action--primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.card-action--primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); }

/* ── Card image ─────────────────────────────────────────── */
.card-image-wrap {
  overflow: hidden;
  height: 160px;
  flex-shrink: 0;
}
.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.location-card:hover .card-image {
  transform: scale(1.04);
}

/* ── Card award chip ────────────────────────────────────── */
.card-award {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  white-space: nowrap;
  cursor: help;
}

/* ── Detail panel image ─────────────────────────────────── */
.detail-image-wrap {
  margin: 0 -24px 4px;
  overflow: hidden;
  height: 220px;
}
.detail-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.detail-image-credit {
  font-size: .68rem;
  color: var(--text-light);
  margin-bottom: 16px;
  font-style: italic;
}

/* ── Events section titles ──────────────────────────────── */
.events-section-title {
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 16px 20px 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--forest-dark);
}
.events-grid--upcoming .event-card {
  border-color: var(--forest-light);
  background: #f0fdf4;
}

/* ── Category colour bars ───────────────────────────────── */
.type-walk        { background: var(--c-walk); }
.type-historic    { background: var(--c-historic); }
.type-food        { background: var(--c-food); }
.type-pub         { background: var(--c-pub); }
.type-attraction  { background: var(--c-attraction); }
.type-nature      { background: var(--c-nature); }
.type-nearby      { background: var(--c-nearby); }
.type-culture     { background: var(--c-culture); }
.type-accommodation { background: var(--stone); }
.type-activity    { background: var(--c-activity); }
.type-quirky      { background: var(--c-quirky); }

/* ── No results ─────────────────────────────────────────── */
.no-results {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}
.no-results-icon { font-size: 3rem; margin-bottom: 14px; }
.no-results h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.no-results p  { font-size: .88rem; color: var(--text-muted); }

/* ── Detail panel ───────────────────────────────────────── */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.detail-overlay.open { display: block; }
.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(500px, 100vw);
  background: var(--card-bg);
  z-index: 201;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
  box-shadow: -4px 0 32px rgba(0,0,0,.18);
}
.detail-panel.open { transform: translateX(0); }
.detail-panel-header-bar {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.detail-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
  transition: all .12s;
}
.detail-share:hover { background: var(--forest); border-color: var(--forest); color: #fff; }
.detail-close {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.detail-close:hover { background: var(--border); }
#detail-panel-content { padding: 0 24px 32px; }
.detail-emoji {
  font-size: 3rem;
  display: block;
  margin: 20px 0 12px;
}
.detail-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--forest-dark);
  margin-bottom: 4px;
}
.detail-area { font-size: .82rem; color: var(--text-muted); margin-bottom: 16px; }
.detail-desc {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
}
.detail-walk-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail-walk-item { font-size: .82rem; }
.detail-walk-label { color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.detail-walk-value { font-weight: 700; color: var(--forest-dark); }
.detail-hours {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.detail-hours h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; }
.hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  font-size: .83rem;
}
.hours-day { color: var(--text-muted); font-weight: 600; }
.hours-time { color: var(--text); }
.hours-note { font-size: .78rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.detail-address {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.detail-address strong { color: var(--text); }
.detail-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--bg);
  transition: all .12s;
  text-decoration: none;
}
.detail-link:hover { background: var(--forest); border-color: var(--forest); color: #fff; text-decoration: none; }
.detail-link--primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.detail-link--primary:hover { background: var(--forest-dark); }
.detail-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.detail-tag {
  font-size: .73rem;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--border-light);
  color: var(--text-muted);
  font-weight: 600;
}
.detail-review-note {
  font-size: .78rem;
  color: var(--text-muted);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 16px;
}

/* ── Events tab ─────────────────────────────────────────── */
.events-page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 16px;
}
.events-page-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--forest-dark); margin-bottom: 8px; }
.events-page-header p  { color: var(--text-muted); font-size: .9rem; }
.events-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-emoji { font-size: 1.8rem; }
.event-name { font-size: 1rem; font-weight: 700; color: var(--forest-dark); }
.event-dates { font-size: .78rem; font-weight: 600; color: var(--usk-blue); background: #eff8ff; padding: 3px 9px; border-radius: 10px; align-self: flex-start; }
.event-area { font-size: .75rem; color: var(--text-muted); }
.event-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.event-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  border: 1.5px solid var(--forest-light);
  padding: 6px 12px;
  border-radius: 7px;
  align-self: flex-start;
  margin-top: 4px;
  transition: all .12s;
}
.event-link:hover { background: var(--forest); color: #fff; text-decoration: none; }
.events-more {
  max-width: 1280px;
  margin: 0 auto 32px;
  padding: 0 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.events-more h3 { font-size: .95rem; color: var(--forest-dark); margin-bottom: 8px; }
.events-more p  { font-size: .83rem; color: var(--text-muted); margin-bottom: 12px; }
.events-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Weather tab ────────────────────────────────────────── */
.wx-page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 16px;
}
.wx-page-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--forest-dark); margin-bottom: 8px; }
.wx-page-header p  { color: var(--text-muted); font-size: .9rem; }
.wx-page-header a  { color: var(--forest); }
.wx-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .wx-grid { grid-template-columns: 1fr; } }
.wx-section-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--forest);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.wx-current {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.weather-icon-large { font-size: 2rem; }
.weather-temp { font-size: 2rem; font-weight: 800; }
.weather-desc { font-size: .9rem; opacity: .85; }
.wx-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wx-day {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
}
.wx-day--today { border-color: var(--forest-light); background: #f0fdf4; }
.wx-day-label { font-size: .7rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.wx-day-icon  { font-size: 1.5rem; margin-bottom: 4px; }
.wx-day-desc  { font-size: .65rem; color: var(--text-muted); margin-bottom: 5px; line-height: 1.3; }
.wx-day-temps { display: flex; justify-content: center; gap: 4px; margin-bottom: 5px; }
.wx-temp-high { font-size: .82rem; font-weight: 700; color: var(--text); }
.wx-temp-low  { font-size: .82rem; color: var(--text-muted); }
.wx-day-meta  { font-size: .62rem; color: var(--text-light); display: flex; flex-direction: column; gap: 2px; }
.wx-attribution { font-size: .73rem; color: var(--text-muted); margin-top: 8px; }
.wx-attribution a { color: var(--forest); }

/* Walking conditions panel */
.wx-walk-intro { font-size: .82rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.wx-walk-day {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.wx-walk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wx-walk-label { font-size: .85rem; font-weight: 700; color: var(--text); }
.wx-walk-rating {
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wx-walk-advice { font-size: .8rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 6px; }
.wx-walk-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .72rem;
  color: var(--text-light);
}
.wx-error { font-size: .88rem; color: var(--text-muted); padding: 20px; }
.weather-loading, .walking-loading { font-size: .85rem; color: var(--text-muted); padding: 20px; }

/* ── About tab ──────────────────────────────────────────── */
.about-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}
.about-content h2 { font-size: 1.7rem; font-weight: 800; color: var(--forest-dark); margin-bottom: 16px; }
.about-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--forest-dark); margin: 24px 0 10px; }
.about-content p  { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.about-content ul { padding-left: 20px; margin-bottom: 10px; }
.about-content li { font-size: .88rem; color: var(--text-muted); line-height: 1.7; }
.about-content a  { color: var(--forest); }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--card-bg);
  transition: all .12s;
}
.about-link:hover { background: var(--forest); border-color: var(--forest); color: #fff; text-decoration: none; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.badge-official  { background: #eff6ff; color: #1e40af; }
.badge-reviewed  { background: #fff7ed; color: #c2410c; }

/* ── Practical info grid (About tab) ───────────────────── */
.practical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 14px 0 28px;
}
.practical-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.practical-icon { font-size: 1.4rem; margin-bottom: 8px; }
.practical-card h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--forest-dark);
  margin-bottom: 6px;
}
.practical-card p { font-size: .82rem; color: var(--text-muted); line-height: 1.65; margin: 0; }
.practical-card a { color: var(--forest); }
.inline-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--forest);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover { color: var(--forest-dark); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 24px 20px;
  font-size: .78rem;
}
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }

/* ── Share toast ────────────────────────────────────────── */
.share-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1a2e24;
  color: #fff;
  font-size: .83rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 400;
  white-space: nowrap;
}
.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Header — two-row layout prevents horizontal overflow on small viewports.
     Logo + nav both have flex-shrink:0 at desktop, which overflows ~375px screens.
     Wrapping to two rows fixes this without hiding any navigation. */
  :root { --header-h: 100px; }
  .site-header { height: auto; }
  .header-inner { flex-wrap: wrap; align-items: center; height: auto; gap: 0 8px; padding: 10px 14px 8px; }
  .site-logo h1 { font-size: 1rem; }
  .header-weather-pill { display: none; }
  .header-updated { display: none; }
  .header-nav { width: 100%; gap: 2px; margin-top: 4px; }
  .tab-btn { flex: 1; text-align: center; font-size: .78rem; padding: 5px 2px; }

  /* Hero — compact on mobile so cards are visible sooner */
  .hero { min-height: auto; }
  .hero-content { padding: 28px 16px 24px; }
  .hero-headline { font-size: 1.6rem; line-height: 1.2; }
  .hero-purpose { display: none; }
  .hero-eyebrow { margin-bottom: 10px; }
  .hero-cta-row { gap: 8px; margin-bottom: 20px; }
  .btn-primary, .btn-ghost { font-size: .84rem; padding: 10px 18px; }
  .hero-stats { gap: 12px; }
  .hero-stat-num { font-size: 1.3rem; }

  /* Explore bar */
  .filter-bar { padding: 10px 12px 6px; }
  .explore-top { padding: 0 10px; }
  .section-header { padding: 16px 12px 8px; }

  /* Card grid */
  .locations-grid { grid-template-columns: 1fr; padding: 4px 12px 24px; }
  .events-grid { grid-template-columns: 1fr; padding: 0 12px 24px; }

  /* Cards: tighter body, bigger tap targets on actions */
  .card-image-wrap { height: 130px; }
  .card-image { height: 130px; }
  .card-body { padding: 13px 14px 11px; }
  .card-action { padding: 9px 6px; font-size: .78rem; }
  .card-desc { -webkit-line-clamp: 2; }

  /* Detail panel: full-height, safe-area aware */
  .detail-panel { width: 100vw; }
  #detail-panel-content { padding: 0 18px calc(28px + env(safe-area-inset-bottom)); }
  .detail-image-wrap { margin: 0 -18px 4px; }
}

@media (min-width: 1024px) {
  .locations-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1440px) {
  .locations-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Seasonal context strip ─────────────────────────────── */
.seasonal-strip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 1280px;
  margin: 4px auto 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5ee 100%);
  border: 1px solid #b7dfc8;
  border-radius: var(--radius);
}
.seasonal-strip__emoji {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.seasonal-strip__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.seasonal-strip__body strong {
  font-size: .9rem;
  font-weight: 700;
  color: var(--forest-dark);
}
.seasonal-strip__body em {
  font-style: normal;
  font-size: .78rem;
  color: var(--forest-mid);
  font-weight: 600;
}
@media (max-width: 639px) {
  .seasonal-strip { margin: 4px 12px 0; padding: 12px 14px; gap: 10px; }
  .seasonal-strip__emoji { font-size: 1.3rem; }
}

/* ── Scroll-based animation ─────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .location-card, .event-card {
    animation: fadeup .3s ease both;
    animation-delay: calc(var(--card-i, 0) * 40ms);
  }
  @keyframes fadeup {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
