/* Reset main — no padding/margin, full viewport width, flex stretches it vertically */
main.community-page { padding: 0; margin: 0; max-width: none; width: 100%; flex: 1; }

/* Constrained title + content sections — 1100px to match /home */
.community-header,
.community-content {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
  width: 100%;
}
.community-header { padding-top: 32px; padding-bottom: 16px; }
.community-content { padding-top: 20px; padding-bottom: 4em; }
@media (max-width: 600px) {
  .community-header { padding-left: 12px; padding-right: 12px; padding-top: 20px; }
  .community-content { padding-left: 12px; padding-right: 12px; }
}

.sort-toggle, .sort-toggle-active {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.sort-toggle {
  background: transparent;
  color: var(--purple);
  border: 1px solid rgba(160,74,252,0.3);
}
.sort-toggle:hover { background: rgba(160,74,252,0.08); }
.sort-toggle-active {
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
}

.sort-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 16px;
  background: rgba(0,119,170,0.06);
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.sort-banner-toggles { display: flex; gap: 2px; flex-wrap: wrap; flex-shrink: 0; }
.sort-banner-explain { flex: 1; min-width: 0; }

.community-clear-filters { margin-bottom: 1.5rem; }
.community-link { color: var(--teal); font-weight: 500; }

.community-empty-state { text-align: center; padding: 3rem; color: var(--ink-soft); }
.community-empty-heading { font-size: 1.2rem; margin-bottom: 0.5rem; }

.rider-social-row { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.rider-social-icon { color: var(--ink-soft); }

.rider-proj-pill {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--purple);
  border-radius: 8px;
  padding: 3px 6px;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}

.community-hero {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0077AA 0%, #005580 100%);
  position: relative;
}
.hero-map-label {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 1000;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}
#community-map { height: 360px; width: 100%; }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 0;
  background: transparent;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}
.hero-stat-num {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.hero-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

.filter-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.82rem;
  margin: 3px;
  text-decoration: none;
  background: rgba(0,119,170,0.08);
  color: #0077AA;
  border: 1px solid rgba(0,119,170,0.25);
}
.filter-chip:hover { background: rgba(0,119,170,0.18); border-color: #0077AA; }
.filter-chip.active { background: #0077AA; color: #fff; border-color: #0077AA; }

.rider-card {
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.1s, box-shadow 0.15s;
  border-left: 4px solid transparent;
}
.rider-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.rider-card-body { flex: 1; min-width: 0; }
.rider-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: 0;
}
.rider-avatar-init {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #d0e8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #0077AA;
  flex-shrink: 0;
  margin-bottom: 0;
}
.rider-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.rider-spot {
  display: block;
  width: fit-content;
  background: #0077aa;
  color: #fff;
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 4px;
  text-decoration: none;
  cursor: pointer;
}
.rider-spot:hover { background: #005f8a; }
.rider-gear {
  display: inline-block;
  background: #e8f4fb;
  border: 1px solid #b3d9ee;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 2px 2px 0 0;
  color: #004f77;
  text-decoration: none;
  cursor: pointer;
}
.rider-gear:hover { background: #cce8f5; border-color: #0077aa; }

.gear-filter-row { margin-bottom: 1.5rem; }
.gear-filter-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.6rem;
}
.gear-filter-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.gear-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  width: 120px;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gear-chip:hover { border-color: var(--purple); box-shadow: 0 2px 8px rgba(160,74,252,0.2); }
.gear-chip-active { border-color: var(--purple); box-shadow: 0 2px 8px rgba(160,74,252,0.25); }
.gear-chip-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  padding: 4px 4px 2px;
  line-height: 1.2;
  max-width: 120px;
}
.gear-chip-active .gear-chip-name { color: var(--purple); }
.gear-chip-img-wrap {
  width: 120px;
  height: 90px;
  background: #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gear-chip-img { width: 100%; height: 100%; object-fit: contain; background: #f8f8f8; padding: 4px; }
.gear-chip-img-placeholder { font-size: 1rem; font-weight: 700; color: #999; }
.gear-chip-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  padding: 3px 0;
  width: 100%;
  text-align: center;
  background: #f8f8f8;
}
.gear-chip-active .gear-chip-count { color: var(--purple); }

/* --- Spot page header --- */
.spot-header-section { padding-bottom: 20px; }
.spot-back-link {
  display: inline-block;
  font: 500 14px/1 'Barlow', sans-serif;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 16px;
  min-height: 44px;
  line-height: 44px;
}
.spot-back-link:hover { text-decoration: underline; }
.spot-h1 {
  font: 900 40px/1.1 'Barlow', sans-serif;
  color: var(--charcoal);
  margin: 0 0 20px;
}
.spot-map {
  height: 200px;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 16px;
}


@media (max-width: 480px) {
  .spot-h1 { font-size: 32px; }
  .spot-map { height: 180px; }
}

@media (max-width: 640px) {
  #community-map { height: 260px; }
  .hero-stat { padding: 0 12px; }
  .hero-stat-num { font-size: 1.3rem; }
  .hero-stats { padding: 10px 0; }
  .hero-divider { height: 28px; }
  .gear-chip { width: 90px; }
  .gear-chip-img-wrap { width: 90px; height: 66px; }
  .gear-chip-name { max-width: 90px; font-size: 0.65rem; }
  .sort-banner-inner { flex-direction: column; gap: 6px; }
  .sort-banner-explain { flex: none; width: 100%; }
}
