/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --paper:       #f7f4ee;
  --ink:         #18181b;
  --ink-light:   #3f3f46;
  --muted:       #78716c;
  --border:      #ddd8ce;
  --border-dark: #c8c2b6;
  --accent:      #d4460f;
  --summer:      #c25a0d;
  --winter:      #1d4282;
  --green:       #2c5f3f;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
  --mono:        'DM Mono', 'Courier New', monospace;
}

/* ─── BASE ──────────────────────────────────────────────────── */
html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  margin: 0;
}

/* ─── NAVBAR ────────────────────────────────────────────────── */
.wg-navbar {
  background: var(--ink) !important;
  border-bottom: none !important;
  padding: 0 !important;
  position: relative;
  overflow: hidden;
}

.wg-navbar .navbar-brand {
  font-family: var(--serif) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: white !important;
  letter-spacing: -0.02em;
  padding: 0.9rem 0 !important;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.wg-navbar .nav-link {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.65) !important;
  padding: 0.9rem 0 0.9rem 2rem !important;
  transition: color 0.12s;
  position: relative;
  z-index: 2;
}

.wg-navbar .nav-link:hover { color: white !important; }

.wg-navbar .navbar-collapse { position: relative; z-index: 2; }

.navbar-toggler {
  border: 2px solid rgba(255,255,255,0.4) !important;
  border-radius: 2px !important;
  margin: 0.75rem 0;
  position: relative;
  z-index: 2;
}


/* WhatsApp nav link */
.wg-whatsapp-link {
  color: #4ade80 !important;
  font-weight: 700 !important;
}
.wg-whatsapp-link:hover { color: #86efac !important; }
.wg-whatsapp-link .bi-whatsapp { font-size: 1.05em; }

/* ─── HERO ──────────────────────────────────────────────────── */
.wg-hero {
  position: relative;
  background: var(--ink);
  color: white;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}

.wg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/topo.svg') center / cover no-repeat;
  opacity: 1;
  pointer-events: none;
}

.wg-hero__inner {
  position: relative;
  z-index: 2;
}

/* Christopher Walken photo in hero */
.wg-hero__portrait {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: url('/images/walken-photo.webp') right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 45%);
  mask-image: linear-gradient(to right, transparent 0%, black 45%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}


.wg-hero__title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: white;
  margin: 0 0 0.9rem;
}

.wg-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
  font-style: italic;
}

/* ─── SECTION LABELS ────────────────────────────────────────── */
.wg-section-label {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 2.5rem;
  padding-bottom: 0.6rem;
}

.wg-section-label.mt-0 {
  border-top: none;
}

.wg-section-label__tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.wg-section-label__tag--summer { background: var(--summer); color: white; }
.wg-section-label__tag--winter { background: var(--winter); color: white; }

.wg-section-label__title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1;
}

.wg-section-label__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ─── WALK LIST ITEMS ───────────────────────────────────────── */
.wg-walks-list { display: flex; flex-direction: column; }

.wg-walk-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0 0.9rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: color 0.1s;
  align-items: center;
}

.wg-walk-item:last-child { border-bottom: none; }

.wg-walk-item:hover .wg-walk-item__name { color: var(--accent); }

.wg-walk-item__icon { grid-column: 1; display: flex; align-items: center; justify-content: center; }

.wg-walk-icon--summer {
  font-size: 1.5rem;
  color: var(--summer);
}

.wg-walk-icon--winter {
  font-size: 1.5rem;
  color: var(--winter);
}

.wg-walk-item__main { grid-column: 2; display: flex; flex-direction: column; gap: 0.2rem; }

.wg-walk-item__name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  transition: color 0.1s;
}

.wg-walk-item__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.wg-walk-item__location {
  font-size: 0.78rem;
  color: var(--muted);
}

.wg-walk-item__right {
  grid-column: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}


.wg-walk-item__dist {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  width: 5rem;
  flex-shrink: 0;
  text-align: right;
}

.wg-walk-item__dist-unit {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 1px;
}

.wg-walk-item__elev-group {
  width: 3rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.wg-walk-item__elev-icon {
  font-size: 0.8rem;
  color: var(--muted);
}

.wg-walk-item__elev {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.wg-walk-item__elev-unit {
  font-size: 0.62rem;
  color: var(--muted);
}

/* Desk calendar widget */
.wg-cal {
  display: inline-flex;
  flex-direction: column;
  border: 1.5px solid var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
  text-align: center;
  line-height: 1;
}
.wg-cal__month {
  background: var(--ink);
  color: white;
  font-size: 0.58rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  padding: 3px 6px 2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.wg-cal__day {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 900;
  padding: 0.3rem 6px;
  background: white;
  color: #8b1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
}
.wg-walk-item__cal-wrap {
  width: 4.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wg-cal-stack {
  position: relative;
  display: inline-block;
}

.wg-cal-stack .wg-cal {
  position: relative;
  z-index: 4;
}

.wg-cal-page {
  position: absolute;
  border: 1.5px solid var(--border-dark);
  border-radius: 0 0 3px 3px;
  height: 8px;
}

.wg-cal-page--1 {
  top: calc(100% - 3px);
  left: 2px; right: 2px;
  background: var(--paper);
  z-index: 3;
}

.wg-cal-page--2 {
  top: calc(100% + 3px);
  left: 4px; right: 4px;
  background: #ece9e0;
  z-index: 2;
}

.wg-cal-page--3 {
  top: calc(100% + 9px);
  left: 6px; right: 6px;
  background: #e5e1d7;
  z-index: 1;
}

/* Filter / sort controls */
.wg-filter-btn, .wg-sort-btn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1.5px solid var(--border-dark);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.1s;
  white-space: nowrap;
}
.wg-filter-btn:hover, .wg-sort-btn:hover { border-color: var(--ink); color: var(--ink); }
.wg-filter-btn.active { background: var(--ink); border-color: var(--ink); color: white; }
.wg-sort-btn.active   { border-color: var(--ink); color: var(--ink); }
.wg-list-controls { padding: 0.75rem 0 0.25rem; }

/* Upcoming section box — extends into container gutters so content aligns with walk list */
.wg-upcoming {
  border: 2px solid var(--accent);
  border-radius: 5px;
  padding: 1.25rem 0.75rem;
  margin-top: 2.5rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.wg-upcoming .wg-section-label {
  border-top: none;
  padding-top: 0;
}

/* Upcoming items */
.wg-upcoming-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.wg-upcoming-item:last-child { border-bottom: none; }
.wg-upcoming-item__icon { grid-column: 1; }
.wg-upcoming-item__main { grid-column: 2; display: flex; flex-direction: column; gap: 0.15rem; }
.wg-upcoming-item__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.wg-upcoming-item__name:hover { color: var(--accent); }
.wg-upcoming-item__notes { font-size: 0.78rem; color: var(--muted); }
.wg-upcoming-item__year { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-align: center; margin-top: 2px; }
.wg-section-label__tag--walks { background: var(--ink); color: white; }

/* ─── WALK DETAIL HEADER ────────────────────────────────────── */
.wg-detail-header {
  padding: 2rem 0 1.75rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2.5rem;
}

.wg-detail-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.wg-detail-eyebrow--summer { color: var(--summer); }
.wg-detail-eyebrow--winter { color: var(--winter); }

.wg-detail-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 1.5rem;
}

/* ─── STATS ROW ─────────────────────────────────────────────── */
.wg-stats-row {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.wg-stat { display: flex; flex-direction: column; gap: 0.15rem; }

.wg-stat__val {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.wg-stat__unit {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 2px;
}

.wg-stat__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── SECTION HEADINGS (detail body) ───────────────────────── */
.wg-section-heading {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 0.45rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1rem;
  color: var(--ink);
}

/* ─── POI ITEMS ─────────────────────────────────────────────── */
.wg-poi-list { display: flex; flex-direction: column; gap: 0; }

.wg-poi-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  transition: background 0.1s;
}

.wg-poi-item:last-child { border-bottom: none; }
.wg-poi-item:hover { background: rgba(0,0,0,0.015); }

/* Icon + distance stacked as a column */
.wg-poi-item__icon-dist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  width: 2.6rem;
}

.wg-poi-icon {
  font-size: 1.05rem;
  line-height: 1;
}
.wg-poi-icon--pub      { color: var(--summer); }
.wg-poi-icon--cafe     { color: var(--green); }
.wg-poi-icon--landmark { color: var(--muted); }
.wg-poi-icon--summer   { color: var(--summer); }
.wg-poi-icon--winter   { color: var(--winter); }

/* Name + also-on stacked in body */
.wg-poi-item__body { flex: 1; min-width: 0; }

.wg-poi-item__name {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.wg-poi-item__name:hover { color: var(--accent); text-decoration: underline; }

.wg-poi-item__dist {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}

.wg-poi-item__also {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.wg-poi-also-link {
  color: var(--muted);
  text-decoration: underline;
  margin-left: 0.25rem;
}
.wg-poi-also-link:hover { color: var(--ink); }

.wg-poi-item__chevron {
  color: var(--border-dark);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── SIDEBAR CARDS ─────────────────────────────────────────── */
.wg-info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.25rem;
}

.wg-info-card__title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.wg-history-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.wg-history-item:last-child { border-bottom: none; }

.wg-history-item__date {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
}

.wg-history-item__notes {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.1rem 0 0;
}


.wg-start-name {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0.15rem 0 0;
  padding-left: 1.4rem;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.wg-footer {
  background: var(--ink);
  border-top: 3px solid var(--ink);
  color: rgba(255,255,255,0.35);
  margin-top: 5rem;
}

.wg-footer a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}

.wg-footer a:hover { color: rgba(255,255,255,0.75); }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  --bs-breadcrumb-color: var(--muted);
}

/* ─── WALK HISTORY ───────────────────────────────────────────── */
.wg-history-item__date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wg-kittysplit-logo {
  display: inline-flex;
  opacity: 0.75;
  transition: opacity 0.12s;
}
.wg-kittysplit-logo:hover { opacity: 1; }

/* ─── WALK HISTORY (full width) ──────────────────────────────── */
.wg-history-full { padding-top: 0.5rem; }

.wg-history-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.wg-history-row:last-child { border-bottom: none; }

.wg-history-row__cal { flex-shrink: 0; }

.wg-history-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wg-history-row__notes {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-light);
}

.wg-history-row__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ─── ADMIN EDIT LINK ────────────────────────────────────────── */
.wg-edit-link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.1s;
  flex-shrink: 0;
}
.wg-edit-link:hover { color: var(--ink); border-color: var(--ink); }

/* ─── ADMIN (keep Bootstrap defaults, minimal overrides) ─────── */
.wg-admin-wrap { background: white; min-height: 100vh; }

/* ─── ATTENDANCE ─────────────────────────────────────────────── */
.wg-history-attendance {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn-xs {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  line-height: 1.4;
  border-radius: 2px;
}

/* ─── WHAT3WORDS EMBED ───────────────────────────────────────── */
.wg-w3w-link {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
}
.wg-w3w-link:hover { text-decoration: underline; color: #e11d48; }

.w3w-address {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.w3w-logo-slashes {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.w3w-logo-slashes svg { width: 100%; height: 100%; }

/* ─── INNER PAGE HEADINGS ────────────────────────────────────── */
h1, h2 { font-family: var(--serif); }

/* ─── PLACES LIST ────────────────────────────────────────────── */
.wg-places-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.1s;
}
.wg-places-item:last-child { border-bottom: none; }
.wg-places-item:hover { background: rgba(0,0,0,0.015); }

.wg-places-item__name {
  flex: 1;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.wg-places-item__count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── W3W OVERLAY ────────────────────────────────────────────── */
.wg-w3w-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1055;
  background: rgba(0,0,0,0.55);
  align-items: center;
  justify-content: center;
}
.wg-w3w-overlay.open { display: flex; }
.wg-w3w-overlay__inner {
  position: relative;
  width: min(680px, 96vw);
  height: min(520px, 80vh);
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.wg-w3w-overlay__close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  z-index: 10;
  background: white;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
}
.wg-w3w-overlay__close:hover { background: #f0f0f0; }
.wg-w3w-overlay__frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── MAP PLACEHOLDER ────────────────────────────────────────── */
.wg-map-placeholder {
  height: 280px;
  background: #f4f4f2;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ─── MY WALKS ───────────────────────────────────────────────── */
.wg-mw-date {
  min-width: 6.5rem;
  flex-shrink: 0;
  display: inline-block;
  white-space: nowrap;
  font-size: 0.875rem;
}

/* ─── LEADERBOARD ────────────────────────────────────────────── */
.wg-lb-active-col {
  background-color: rgba(0,0,0,0.04);
}
th.wg-lb-active-col {
  color: var(--ink);
}
