/* EBRA Group Ride Detail Page — matches local page design system */
:root {
  --bg: #f5f5f5;
  --bg2: #ffffff;
  --accent: #2e7d32;
  --accent-dark: #1b5e20;
  --accent-light: #c8e6c9;
  --text: #1a1a1a;
  --muted: #555;
  --border: #e8e8e8;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 4px rgba(0,0,0,0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 800px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.site-header {
  background: #fff;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.header-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.header-logo { height: 36px; width: auto; display: block; }
.header-nav { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.breadcrumb-link { color: var(--accent-dark); font-weight: 500; }
.breadcrumb-sep { color: #bbb; }
.breadcrumb-current { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-join {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 8px;
  transition: background 0.15s;
}
.btn-join:hover { background: var(--accent-dark); text-decoration: none; }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 55%, #388e3c 100%);
  color: #fff;
  padding: 32px 16px 28px;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; }
.hero-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 0.8rem; margin-bottom: 16px; opacity: 0.85; }
.hero-breadcrumb-link { color: #fff; font-weight: 500; text-decoration: none; }
.hero-breadcrumb-link:hover { text-decoration: underline; }
.hero-breadcrumb-sep { color: rgba(255,255,255,0.6); }
.hero-breadcrumb-current { color: rgba(255,255,255,0.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ride-meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.status-badge, .sport-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-badge { background: rgba(255,255,255,0.2); color: #fff; }
.status-live    { background: rgba(255,80,80,0.85); color: #fff; }
.status-upcoming { background: rgba(255,255,255,0.2); color: #fff; }
.status-ended   { background: rgba(0,0,0,0.25); color: rgba(255,255,255,0.7); }
.sport-tag { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.25); }

.ride-name {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}
.ride-intro {
  font-size: 1rem;
  opacity: 0.95;
  max-width: 560px;
  margin-bottom: 14px;
  white-space: pre-line;
  line-height: 1.6;
}

.ride-description {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 560px;
  margin-bottom: 20px;
  white-space: pre-line;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 20px;
  margin-bottom: 24px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; }
.meta-value { font-size: 0.97rem; font-weight: 600; }
#ride-date-display { white-space: pre-line; line-height: 1.5; }
.meta-value a { color: rgba(255,255,255,0.9); text-decoration: underline; text-underline-offset: 3px; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-primary { background: #fff; color: var(--accent-dark); }
.btn-primary:hover { background: #f0f0f0; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.25); text-decoration: none; }

#join-result { margin-top: 10px; font-size: 0.88rem; min-height: 1.2em; }

.ride-full-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}
.ride-full-badge {
  background: rgba(255,255,255,0.9);
  color: #1b5e20;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Layout ── */
.main { padding: 0; }
.content-col {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 22px 20px;
  margin-top: 20px;
}
.section-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.section-subtitle { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; margin-top: -10px; }

/* ── Start location map ── */
.location-name { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.location-address { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; }
.location-note {
  font-size: 0.85rem;
  color: var(--muted);
  background: #f0f7f0;
  border-left: 3px solid var(--accent);
  padding: 6px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}
.location-note:empty { display: none; }
.start-map {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Special note ── */
.special-note {
  font-size: 0.88rem;
  color: var(--muted);
  background: #f0f7f0;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Leaderboard ── */
.table-wrap { overflow-x: auto; }
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.leaderboard-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.leaderboard-table td { padding: 10px 10px; border-bottom: 1px solid #f0f0f0; }
.leaderboard-table .rank { font-weight: 700; color: var(--muted); width: 28px; }
.leaderboard-table .rider { font-weight: 600; }
.leaderboard-table .area, .leaderboard-table .shared { color: var(--accent-dark); }
.color-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.shared-credit { color: var(--accent); font-size: 0.83rem; }
.no-data { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 20px 0; }

/* ── Pricing ── */
.pricing-info.card { }
.pricing-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.pricing-row:last-child { border-bottom: none; }
.pricing-label { color: var(--muted); }
.pricing-value { font-weight: 600; }
.member-price { color: var(--accent-dark); }

/* ── Tip jar ── */
.tip-jar.card { }
.tip-description { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; margin-top: -10px; }
.tip-amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.tip-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--accent-light);
  background: var(--card-bg);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tip-btn:hover { background: var(--accent-light); border-color: var(--accent); }
#tip-result { margin-top: 12px; font-size: 0.88rem; color: var(--accent-dark); }

/* ── Join CTA ── */
.join-cta-section {
  background: #eef4ee;
  border-top: 1px solid #c8e6c9;
  margin-top: 28px;
}
.join-cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.join-cta-heading { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 700; }
.join-cta-sub { font-size: 0.92rem; color: var(--muted); max-width: 440px; }
.join-cta-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.join-cta-link:hover { color: var(--accent); }
.btn-cta-green { background: var(--accent); color: #fff; }
.btn-cta-green:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(46,125,50,0.25); text-decoration: none; }

/* ── Footer ── */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 16px;
}
.footer-logo-img { height: 60px; width: auto; display: block; margin: 0 auto 12px; }
.site-footer p { font-size: 0.8rem; color: #888; }
.site-footer a { color: var(--accent-dark); }


/* ── Spots availability banner ───────────────────────────────── */
.spots-banner {
  display: inline-block;
  margin: 10px 0 14px;
  padding: 7px 18px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.spots-open {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.spots-full {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(255,255,255,0.3);
}

/* ── Inline CTA below intro ──────────────────────────────────── */
.ride-cta-text {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  margin: 10px 0 14px;
  line-height: 1.5;
}
.btn-reserve-inline {
  margin-bottom: 20px;
  display: inline-flex;
}

/* ── Rider limit note in pricing ─────────────────────────────── */
.rider-limit {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  padding: 0 4px;
}
