/* racingnear.me — Light consumer theme, mobile-first */

/* Self-hosted Inter v4 (variable). Eliminates fonts.googleapis.com +
   fonts.gstatic.com requests, keeps full 100-900 weight range. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable-Italic.woff2") format("woff2-variations");
}

:root {
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --primary: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-bg: #eff6ff;
  --focus-rgb: 29, 78, 216;

  --red: #dc2626;
  --red-bg: #fef2f2;
  --green: #059669;
  --green-bg: #ecfdf5;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --yellow: #d97706;
  --yellow-bg: #fffbeb;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --cyan: #06b6d4;
  --cyan-bg: #ecfeff;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
}

/* Responsive images */
img { max-width: 100%; height: auto; }

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ HEADER / NAV ============ */

.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
}

.logo-img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--gray-900);
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  transition: background 0.15s !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--gray-700);
}

/* ============ HERO ============ */

.hero {
  background: linear-gradient(135deg, var(--gray-900) 0%, #1a1a2e 50%, var(--gray-900) 100%);
  color: white;
  padding: 80px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(29, 78, 216, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--primary-light);
}

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ============ SEARCH BAR ============ */

.search-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-bar input {
  flex: 1;
  padding: 18px 24px;
  border: none;
  font-size: 16px;
  font-family: var(--font);
  color: var(--gray-800);
  outline: none;
  min-width: 0;
}

.search-bar input::placeholder {
  color: var(--gray-400);
}

.search-bar button {
  padding: 18px 28px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.search-bar button:hover {
  background: var(--primary-dark);
}

.search-hint {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.search-hint button {
  background: none;
  border: none;
  color: var(--primary-light);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  text-decoration: underline;
  padding: 0;
}

.search-hint button:hover {
  color: white;
}

/* ============ FILTERS ============ */

.filters-section {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 20px;
}

.filters-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 10px 18px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: 14px;
  font-family: var(--font);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.results-count {
  margin-left: auto;
  font-size: 14px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* ============ MAIN CONTENT ============ */

.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  min-height: 60vh;
}

/* ============ TRACK CARDS ============ */

.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.track-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.track-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.track-image {
  width: 160px;
  height: 120px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 32px;
  overflow: hidden;
}

.track-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.track-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.track-type {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.track-type.road_course {
  background: var(--blue-bg);
  color: var(--blue);
}

.track-type.oval {
  background: var(--red-bg);
  color: var(--red);
}

.track-type.drag_strip {
  background: var(--orange-bg);
  color: var(--orange);
}

.track-type.experience {
  background: var(--purple-bg);
  color: var(--purple);
}

.track-type.drift {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.track-type.multi_use {
  background: var(--green-bg);
  color: var(--green);
}

.venue-badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  vertical-align: middle; margin-left: 6px;
}
.venue-badge.new { background: #dcfce7; color: #15803d; }
.venue-badge.popular { background: #fef3c7; color: #b45309; }
.venue-badge.featured { background: var(--primary-bg); color: var(--primary); }

.track-location {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.track-location svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.track-description {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.track-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--yellow);
}

.track-rating svg {
  width: 16px;
  height: 16px;
}

.track-features {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feature-tag {
  padding: 2px 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-600);
  white-space: nowrap;
}

.track-distance {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ============ MAP PANEL ============ */

.map-panel {
  position: sticky;
  top: 88px;
  height: calc(100vh - 112px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}

#map {
  width: 100%;
  height: 100%;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.map-placeholder svg {
  width: 48px;
  height: 48px;
}

.map-placeholder p {
  font-size: 14px;
}

/* ============ MAP MARKERS ============ */

.track-marker {
  background: none !important;
  border: none !important;
  position: relative;
}

.track-marker .marker-dot {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 2;
}

.track-marker:hover .marker-dot {
  transform: scale(1.3);
}

.track-marker.highlighted .marker-dot {
  transform: scale(1.6);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.track-marker .marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(29, 78, 216, 0.2);
  animation: marker-ripple 2.5s ease-out infinite;
  pointer-events: none;
  z-index: 1;
}

.track-marker.road_course .marker-dot { background: var(--blue); }
.track-marker.road_course .marker-pulse { background: rgba(37, 99, 235, 0.2); }

.track-marker.oval .marker-dot { background: var(--red); }
.track-marker.oval .marker-pulse { background: rgba(220, 38, 38, 0.2); }

.track-marker.drag_strip .marker-dot { background: var(--orange); }
.track-marker.drag_strip .marker-pulse { background: rgba(234, 88, 12, 0.2); }

.track-marker.drift .marker-dot { background: #f97316; }
.track-marker.drift .marker-pulse { background: rgba(249, 115, 22, 0.2); }

.track-marker.experience .marker-dot { background: var(--purple); }
.track-marker.experience .marker-pulse { background: rgba(124, 58, 237, 0.2); }

.track-marker.multi_use .marker-dot { background: var(--green); }
.track-marker.multi_use .marker-pulse { background: rgba(5, 150, 105, 0.2); }

@keyframes marker-ripple {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.user-marker {
  background: none;
  border: none;
}

.user-dot {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: relative;
}

.user-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* ============ MAP POPUPS ============ */

.track-popup .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0;
}

.track-popup .leaflet-popup-content {
  margin: 0;
  font-family: var(--font);
}

.track-popup .leaflet-popup-tip {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Leaflet uses inline margin-left/margin-top for icon anchoring — override the global reset */
.leaflet-marker-icon {
  margin: initial;
}

.popup-inner {
  padding: 14px 16px;
  max-width: 280px;
}

.popup-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1.3;
}

.popup-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.popup-type.road_course {
  background: var(--blue-bg);
  color: var(--blue);
}

.popup-type.oval {
  background: var(--red-bg);
  color: var(--red);
}

.popup-type.drag_strip {
  background: var(--orange-bg);
  color: var(--orange);
}

.popup-type.drift {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.popup-type.experience {
  background: var(--purple-bg);
  color: var(--purple);
}

.popup-type.multi_use {
  background: var(--green-bg);
  color: var(--green);
}

.popup-location {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.popup-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 8px;
}

.popup-rating {
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 4px;
}

.popup-distance {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.popup-link {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.popup-link:hover {
  text-decoration: underline;
}

.popup-phone {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  margin-top: 4px;
}

.popup-phone:hover {
  color: var(--primary);
}

/* ============ ACTIVE TRACK CARD ============ */

.track-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
}

/* ============ LOADING STATE ============ */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  color: var(--gray-500);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ EMPTY STATE ============ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--gray-300);
}

.empty-state h3 {
  font-size: 18px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* ============ STATS BAR ============ */

.stats-bar {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px;
}

.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 48px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ============ FOOTER ============ */

.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo-text {
  color: white;
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .map-panel {
    position: relative;
    top: 0;
    height: 300px;
    order: -1;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero {
    padding: 60px 20px 80px;
  }

  .track-card {
    flex-direction: column;
  }

  .track-image {
    width: 100%;
    height: 180px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stats-inner {
    gap: 24px;
  }

  .stat-number {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 56px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 28px;
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 16px;
  }

  .search-bar {
    flex-direction: column;
    border-radius: var(--radius);
  }

  .search-bar input {
    padding: 16px 20px;
  }

  .search-bar button {
    padding: 16px 20px;
    border-radius: 0;
  }

  .filters-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .results-count {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .track-meta {
    gap: 8px;
  }

  .track-distance {
    margin-left: 0;
  }
}

/* ============ CITY PAGE ============ */

.city-hero {
  padding: 48px 20px 56px;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::before {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-guides {
  background-image: url('/images/hero-guides.webp');
}

.hero-gear {
  background-image: url('/images/hero-gear.webp');
}

.city-hero h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

.city-hero p {
  font-size: 16px;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 13px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.5);
}

.breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: white;
}

.nearby-cities {
  padding: 48px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.nearby-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.nearby-inner h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.city-card {
  display: block;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.city-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.city-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.city-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ============ CITIES INDEX PAGE ============ */

.cities-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.cities-page-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cities-search {
  margin-bottom: 32px;
}

.cities-search input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
}

.cities-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.state-group {
  margin-bottom: 32px;
}

.state-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.state-cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.city-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s;
}

.city-link:hover {
  background: var(--primary-bg);
}

.city-link-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
}

.city-link-count {
  font-size: 12px;
  color: var(--gray-500);
}

@media (max-width: 640px) {
  .city-hero h1 {
    font-size: 26px;
  }

  .cities-grid {
    grid-template-columns: 1fr;
  }

  .state-cities {
    grid-template-columns: 1fr;
  }
}


/* ============ ABOUT PAGE ============ */

.about-page { max-width: var(--max-w); margin: 0 auto; }
.about-inner { max-width: 800px; margin: 0 auto; padding: 48px 20px 60px; }
.about-section { margin-bottom: 48px; }
.about-section h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.about-section p { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 12px; }
.about-section a { color: var(--primary); font-weight: 600; }
.about-list { list-style: none; padding: 0; }
.about-list li { padding: 8px 0; font-size: 16px; color: var(--gray-600); line-height: 1.6; }
.about-list li strong { color: var(--gray-800); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
.about-card { background: var(--gray-50); border-radius: var(--radius); padding: 20px; text-align: center; }
.about-card-icon { margin-bottom: 8px; }
.about-card h3 { font-size: 15px; font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.about-card strong { font-size: 15px; color: var(--gray-900); display: block; margin-bottom: 4px; }
.about-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin: 0; }
.about-stats { display: flex; justify-content: center; gap: 48px; padding: 32px; background: var(--gray-50); border-radius: var(--radius-lg); }
.about-stat-number { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.about-stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.about-cta { text-align: center; padding: 48px 20px; background: var(--gray-50); border-radius: var(--radius-lg); margin-top: 16px; }
.about-cta h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.about-cta p { font-size: 16px; color: var(--gray-600); margin-bottom: 20px; }
.network-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.network-card { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 16px 20px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.network-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.network-logo { width: 44px; height: 44px; max-width: 44px; max-height: 44px; min-width: 44px; object-fit: contain; flex-shrink: 0; border-radius: 8px; }
.network-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.network-info strong { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.network-info span { font-size: 12px; color: var(--gray-500); line-height: 1.3; }
@media (max-width: 768px) { .network-grid { grid-template-columns: 1fr; } }
.btn { display: inline-block; padding: 14px 32px; background: var(--primary); color: white; border-radius: var(--radius-full); text-decoration: none; font-weight: 600; font-size: 16px; transition: background 0.15s; }
.btn:hover { background: var(--primary-dark); }

/* ============ GEAR PICK HIGHLIGHT ============ */
.gear-row.pick { border-left: 3px solid var(--primary); background: var(--primary-bg); }

/* ============ RACEGEARLAB CROSS-SELL BANNER ============ */
.rgl-banner { margin: 2rem 0; padding: 1.25rem 1.5rem; background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%); border: 1px solid #fecaca; border-left: 4px solid #ff3e3e; border-radius: var(--radius); display: flex; align-items: center; gap: 1.25rem; }
.rgl-banner .rgl-text { flex: 1; min-width: 0; }
.rgl-banner .rgl-text strong { font-size: 0.95rem; color: var(--gray-900); display: block; margin-bottom: 2px; }
.rgl-banner .rgl-text p { font-size: 0.82rem; color: var(--gray-600); margin: 0; line-height: 1.4; }
.rgl-btn { flex-shrink: 0; padding: 8px 20px; background: #ff3e3e; color: white; font-weight: 700; font-size: 0.82rem; border-radius: var(--radius-full); text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.rgl-btn:hover { background: #e63535; }
@media (max-width: 640px) { .rgl-banner { flex-direction: column; text-align: center; } }

/* ============ FOOTER NAV LINKS ============ */
.footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-links a { color: var(--gray-400); font-size: 0.85rem; text-decoration: none; }
.footer-links a:hover { color: var(--primary-light); }

/* ============ INLINE NEWSLETTER ============ */
.inline-newsletter { max-width: 500px; margin: 2rem auto; padding: 1.5rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); text-align: center; }
.inline-newsletter h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.25rem; }
.inline-newsletter p { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.inline-newsletter form { display: flex; gap: 8px; }
.inline-newsletter input[type="email"] { flex: 1; padding: 8px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius-full); font-size: 0.82rem; font-family: var(--font); outline: none; }
.inline-newsletter input[type="email"]:focus { border-color: var(--primary); }
.inline-newsletter button { padding: 8px 18px; background: var(--primary); color: white; border: none; border-radius: var(--radius-full); font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.inline-newsletter button:hover { background: var(--primary-dark); }
@media (max-width: 480px) { .inline-newsletter form { flex-direction: column; } }

/* ============ VENUE PLACEHOLDER UPGRADE ============ */
.venue-hero-img.img-placeholder { background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%); display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: var(--radius); border: 2px dashed var(--gray-200); }
.venue-hero-img.img-placeholder svg { opacity: 0.3; }

/* ============ SUBMIT PAGE ============ */

.submit-page { max-width: var(--max-w); margin: 0 auto; }
.submit-inner { max-width: 600px; margin: 0 auto; padding: 48px 20px 60px; }
.submit-form { }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group .req { color: var(--primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 15px; font-family: var(--font); color: var(--gray-800); outline: none; transition: border-color 0.15s; background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--focus-rgb, 0,0,0), 0.1); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-group.error input, .form-group.error select, .form-group.error textarea { border-color: #dc2626; }
.submit-btn { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s; margin-top: 8px; }
.submit-btn:hover { background: var(--primary-dark); }
.submit-success { text-align: center; padding: 60px 20px; display: none; }
.submit-success.show { display: block; }
.submit-success svg { width: 64px; height: 64px; color: var(--green, #059669); margin-bottom: 16px; }
.submit-success h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.submit-success p { font-size: 16px; color: var(--gray-600); margin-bottom: 24px; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; gap: 24px; align-items: center; }
  .about-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============ SECTION TITLES (fancy-title pattern) ============ */

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

/* ============ META-ITEM COMPONENT ============ */

.meta-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.meta-item + .meta-item { border-top: 1px solid var(--gray-100); }
.meta-item-icon { width: 36px; height: 36px; background: var(--primary-bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meta-item-icon svg { width: 18px; height: 18px; color: var(--primary); }
.meta-item-text { flex: 1; min-width: 0; }
.meta-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-400); font-weight: 600; line-height: 1.2; }
.meta-value { display: block; font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.4; }
.meta-value a { color: var(--primary); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }

/* ============ TYPE BADGES ============ */

.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.type-badge.road_course { background: var(--blue-bg); color: var(--blue); }
.type-badge.oval { background: var(--green-bg); color: var(--green); }
.type-badge.drag_strip { background: var(--red-bg); color: var(--red); }
.type-badge.drift { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.type-badge.experience { background: var(--purple-bg); color: var(--purple); }
.type-badge.multi_use { background: var(--orange-bg); color: var(--orange); }

/* ============ LISTING CONTROLS ============ */

.listing-controls { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.listing-controls .results-text { font-size: 15px; font-weight: 600; color: var(--gray-700); }
.listing-controls .controls-right { display: flex; align-items: center; gap: 10px; }
.listing-controls select { padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font); color: var(--gray-700); background: var(--white); cursor: pointer; outline: none; }
.listing-controls select:focus { border-color: var(--primary); }

/* ============ TRACK CARD V2 ============ */

.track-card-v2 { display: block; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; text-decoration: none; transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s; }
.track-card-v2:hover { box-shadow: var(--shadow-md); border-color: var(--gray-300); transform: translateY(-2px); }
.track-card-v2 .card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.track-card-v2 .card-name { font-size: 16px; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.track-card-v2 .card-location { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.track-card-v2 .card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--yellow); margin-bottom: 10px; }
.track-card-v2 .card-features { display: flex; flex-wrap: wrap; gap: 4px; }
.track-card-v2 .card-features .feature-tag { padding: 2px 8px; background: var(--gray-50); border-radius: var(--radius-sm); font-size: 11px; color: var(--gray-600); }

/* ============ RELATED TRACKS GRID ============ */

.related-section { padding: 48px 20px; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.related-inner { max-width: var(--max-w); margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }

/* ============ SPECS GRID ============ */

.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 16px 0; }
.specs-grid dt { font-size: 13px; color: var(--gray-500); font-weight: 500; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--gray-100); }
.specs-grid dd { font-size: 14px; font-weight: 600; color: var(--gray-800); padding: 10px 0 10px 12px; border-bottom: 1px solid var(--gray-100); margin: 0; }

/* ============ CATEGORY CARDS ============ */

.category-section { padding: 48px 20px; background: var(--white); }
.category-inner { max-width: var(--max-w); margin: 0 auto; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.category-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); text-decoration: none; text-align: center; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-card .cat-icon { width: 48px; height: 48px; background: var(--primary-bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.category-card .cat-icon svg { width: 24px; height: 24px; color: var(--primary); }
.category-card .cat-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.category-card .cat-count { font-size: 12px; color: var(--gray-500); }

/* ============ FEATURED / TRACK OF THE WEEK ============ */

.featured-section { padding: 48px 20px; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.featured-inner { max-width: var(--max-w); margin: 0 auto; }
.featured-card { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px; margin-top: 20px; }
.featured-card .featured-image { background: var(--gray-100); border-radius: var(--radius); min-height: 200px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 48px; }
.featured-card .featured-content h3 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.featured-card .featured-content .featured-location { font-size: 14px; color: var(--gray-500); margin-bottom: 12px; }
.featured-card .featured-content p { font-size: 15px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }
.featured-card .featured-content .btn-sm { display: inline-block; padding: 10px 20px; background: var(--primary); color: white; border-radius: var(--radius-full); text-decoration: none; font-size: 14px; font-weight: 600; transition: background 0.15s; }
.featured-card .featured-content .btn-sm:hover { background: var(--primary-dark); }

/* ============ GEAR CARDS (Affiliate) ============ */

.gear-section { padding: 48px 20px; background: var(--white); border-top: 1px solid var(--gray-200); }
.gear-inner { max-width: var(--max-w); margin: 0 auto; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.gear-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; text-align: center; transition: box-shadow 0.2s, transform 0.2s; }
.gear-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gear-card .gear-icon { width: 64px; height: 64px; background: var(--primary-bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.gear-card .gear-icon svg { width: 32px; height: 32px; color: var(--primary); }
.gear-card h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.gear-card .gear-price { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.gear-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin-bottom: 16px; }
.gear-card .gear-link { display: inline-block; padding: 8px 20px; background: var(--primary); color: white; border-radius: var(--radius-full); text-decoration: none; font-size: 13px; font-weight: 600; transition: background 0.15s; }
.gear-card .gear-link:hover { background: var(--primary-dark); }

/* ============ NEWSLETTER SECTION ============ */

.newsletter-section { padding: 60px 20px; background: var(--gray-900); color: white; text-align: center; }
.newsletter-inner { max-width: 500px; margin: 0 auto; }
.newsletter-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.newsletter-section p { font-size: 15px; color: var(--gray-400); margin-bottom: 24px; line-height: 1.6; }
.newsletter-form { display: flex; gap: 0; max-width: 420px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 14px 18px; border: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 15px; font-family: var(--font); outline: none; min-width: 0; }
.newsletter-form button { padding: 14px 24px; background: var(--primary); color: white; border: none; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; font-weight: 600; font-family: var(--font); cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.newsletter-form button:hover { background: var(--primary-light); }

/* ============ PLAN YOUR VISIT ============ */

.visit-section { margin: 32px 0; }
.visit-checklist { list-style: none; padding: 0; margin: 12px 0; }
.visit-checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
.visit-checklist li svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }
.directions-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--primary); color: white; border-radius: var(--radius-full); text-decoration: none; font-size: 14px; font-weight: 600; margin-top: 12px; transition: background 0.15s; }
.directions-btn:hover { background: var(--primary-dark); }
.directions-btn svg { width: 16px; height: 16px; }

/* ============ SOCIAL SHARING ============ */

.share-row { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.share-row span { font-size: 13px; font-weight: 600; color: var(--gray-500); }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); text-decoration: none; transition: opacity 0.15s; }
.share-btn:hover { opacity: 0.8; }
.share-btn.twitter { background: #1da1f2; color: white; }
.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.copy { background: var(--gray-200); color: var(--gray-600); }
.share-btn svg { width: 16px; height: 16px; }

/* ============ GUIDES TEASER ============ */

.guides-teaser { padding: 48px 20px; background: var(--white); border-top: 1px solid var(--gray-200); }
.guides-teaser-inner { max-width: var(--max-w); margin: 0 auto; }
.guides-teaser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.guide-teaser-card { display: block; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; text-decoration: none; transition: box-shadow 0.2s, transform 0.2s; }
.guide-teaser-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide-teaser-card h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.guide-teaser-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin: 0; }
.guide-teaser-card .guide-badge { display: inline-block; padding: 2px 8px; background: var(--primary-bg); color: var(--primary); border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; margin-bottom: 8px; }

/* ============ MOBILE NAV OVERLAY ============ */

.mobile-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--white); z-index: 200; padding: 20px; flex-direction: column; }
.mobile-nav.open { display: flex; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.mobile-nav-close { background: none; border: none; cursor: pointer; padding: 8px; color: var(--gray-700); }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 0; }
.mobile-nav-links a { display: block; padding: 16px 0; font-size: 18px; font-weight: 600; color: var(--gray-800); text-decoration: none; border-bottom: 1px solid var(--gray-100); }
.mobile-nav-links a:hover { color: var(--primary); }

/* ============ RESPONSIVE (new components) ============ */

@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .featured-image { min-height: 160px; }
}

@media (max-width: 640px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .gear-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { border-radius: var(--radius); }
  .newsletter-form button { border-radius: var(--radius); }
  .related-grid { grid-template-columns: 1fr; }
  .guides-teaser-grid { grid-template-columns: 1fr; }
  .listing-controls { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 20px; }
}


/* ============ ARTICLE / SPOTLIGHT PAGES ============ */

.article-page { max-width: var(--max-w); margin: 0 auto; }
.article-inner { max-width: 1100px; margin: 0 auto; padding: 48px 20px 60px; display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.article-inner.full-width { grid-template-columns: 1fr; max-width: 1200px; }
.article-content h2 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin: 32px 0 12px; }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin: 24px 0 8px; }
.article-content p { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 16px; }
.article-content strong { color: var(--gray-800); }
.article-content a { color: var(--primary); font-weight: 500; }

.track-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { background: var(--gray-50); border-radius: var(--radius-lg); padding: 24px; }
.sidebar-card h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.sidebar-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.sidebar-row:last-child { border-bottom: none; }
.sidebar-row strong { color: var(--gray-600); font-weight: 500; }
.sidebar-row span { color: var(--gray-900); font-weight: 600; text-align: right; max-width: 60%; word-break: break-word; }
.sidebar-row .stars { color: var(--primary); }
.sidebar-row a { color: var(--primary); text-decoration: none; }
.sidebar-row a:hover { text-decoration: underline; }

.features-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tag { display: inline-block; padding: 4px 10px; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: 12px; color: var(--gray-700); font-weight: 500; }

.sidebar-cta { text-align: center; }
.sidebar-cta p { font-size: 14px; color: var(--gray-500); line-height: 1.5; margin-bottom: 12px; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.guide-tracks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.guide-track-card { display: block; background: var(--gray-50); border-radius: var(--radius-lg); padding: 20px; text-decoration: none; transition: box-shadow 0.15s, transform 0.15s; }
.guide-track-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }
.guide-track-card h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.guide-track-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin: 0; }
.guide-track-type { display: inline-block; font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }

@media (max-width: 768px) {
  .article-inner { grid-template-columns: 1fr; gap: 24px; }
  .track-sidebar { order: -1; }
}

/* ============ VENUE DETAIL PAGE ============ */

.venue-detail { max-width: var(--max-w); margin: 0 auto; }
.venue-detail-inner {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  max-width: 1100px; margin: 0 auto; padding: 32px 20px 48px;
}

.venue-hero-img {
  position: relative;
  width: 100%; height: 280px; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--gray-100); margin-bottom: 24px;
  margin-inline: 0;  /* override <figure> default */
}
.venue-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.venue-hero-img.img-error img { display: none; }
.venue-hero-img.img-placeholder,
.venue-hero-img.img-error {
  display: flex; align-items: center; justify-content: center; color: var(--gray-300);
}
.venue-hero-attrib {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 14px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  color: white;
  font-size: 0.72rem; opacity: 0.95; line-height: 1.3;
  pointer-events: none;
}
.venue-hero-attrib a { color: white; text-decoration: underline; pointer-events: auto; }
.venue-hero-img-satellite { background: #0f172a; }

/* Photo gallery — Wikimedia-sourced CC photos with attribution */
.venue-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
  max-height: 480px;
}
.venue-gallery .gal-rest {
  display: grid;
  grid-template-rows: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}
.venue-gallery .gal-photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
  min-height: 0;
}
.venue-gallery .gal-photo-large {
  grid-row: span 1;
  height: 480px;
}
.venue-gallery .gal-rest .gal-photo {
  height: 100%;
}
.gal-photo-btn {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent;
  cursor: zoom-in; position: relative;
}
.gal-photo-btn img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.gal-photo-btn:hover img { transform: scale(1.04); }
.gal-zoom {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); color: white;
  border-radius: 50%;
  font-size: 16px; font-weight: 700;
  opacity: 0; transition: opacity 0.18s ease;
  pointer-events: none;
}
.gal-photo-btn:hover .gal-zoom { opacity: 1; }
.gal-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 100%);
  color: white; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
}
.gal-caption-text {
  font-size: 0.82rem; line-height: 1.3; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gal-attrib {
  font-size: 0.66rem; opacity: 0.78; line-height: 1.3;
}
.gal-attrib a { color: white; text-decoration: underline; pointer-events: auto; }
@media (max-width: 720px) {
  .venue-gallery {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .venue-gallery .gal-photo-large { height: 240px; }
  .venue-gallery .gal-rest {
    grid-template-rows: none;
    grid-template-columns: repeat(2, 1fr);
  }
  .venue-gallery .gal-rest .gal-photo { height: 160px; }
}

/* Lightbox overlay */
.gal-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.gal-lightbox.is-open { display: flex; }
.gal-lightbox-inner {
  max-width: 1400px; max-height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  cursor: default;
}
.gal-lightbox img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  background: #111;
}
.gal-lightbox-meta {
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem; line-height: 1.45;
  max-width: 880px;
}
.gal-lightbox-meta strong { color: white; font-weight: 600; }
.gal-lightbox-meta a { color: #93c5fd; }
.gal-lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.12); border: 0;
  color: white; font-size: 22px; cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.gal-lightbox-close:hover { background: rgba(255,255,255,0.22); }

.venue-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.venue-stars { font-size: 18px; color: #f59e0b; }
.venue-rating-num { font-size: 14px; color: var(--gray-600); font-weight: 600; }

.venue-description { margin-bottom: 24px; }
.venue-description p { font-size: 16px; line-height: 1.7; color: var(--gray-700); }

.venue-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.venue-feat {
  padding: 5px 14px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500;
  background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-700);
}

/* Video poster — click-to-play YouTube, no iframe until user clicks */
.venue-video {
  margin: 24px 0 32px;
}
.venue-video h2 {
  font-size: 20px; font-weight: 700; color: var(--gray-900);
  margin: 0 0 12px;
}
.yt-poster {
  display: block; position: relative;
  width: 100%; padding: 0; margin: 0;
  border: 0; cursor: pointer;
  background: #000; border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.yt-poster img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}
.yt-poster:hover img { transform: scale(1.03); opacity: 0.85; }
.yt-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.yt-play svg {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
  transition: transform 0.2s ease;
}
.yt-poster:hover .yt-play svg { transform: scale(1.1); }
.yt-meta {
  font-size: 0.78rem; color: var(--gray-500);
  margin: 6px 2px 0;
}
.yt-meta a { color: var(--gray-700); text-decoration: none; }
.yt-meta a:hover { text-decoration: underline; }

/* Know Before You Go — type-driven practical info block on every venue page */
.venue-kbygo {
  margin: 24px 0 32px;
  padding: 22px 24px;
  background: linear-gradient(180deg, #fafbfc 0%, #f3f5f8 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}
.venue-kbygo h2 {
  font-size: 20px; font-weight: 700; color: var(--gray-900);
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 8px;
}
.venue-kbygo h2::before {
  content: ""; display: inline-block;
  width: 4px; height: 18px; border-radius: 2px;
  background: var(--primary);
}
.venue-kbygo dl {
  margin: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.venue-kbygo .kb-item { margin: 0; }
.venue-kbygo dt {
  font-size: 14px; font-weight: 700; color: var(--gray-900);
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.venue-kbygo dd {
  margin: 0; font-size: 14px; line-height: 1.55; color: var(--gray-700);
}
@media (max-width: 720px) {
  .venue-kbygo { padding: 18px 18px; }
  .venue-kbygo dl { grid-template-columns: 1fr; gap: 12px; }
}

.venue-map-section { margin-bottom: 32px; }
.venue-map-section h2 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.venue-map-embed { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 12px; }

.venue-directions-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: var(--primary); color: white; border-radius: var(--radius-full);
  text-decoration: none; font-size: 14px; font-weight: 600; transition: opacity 0.15s;
}
.venue-directions-btn:hover { opacity: 0.9; }

/* Venue sidebar */
.venue-sidebar { display: flex; flex-direction: column; gap: 20px; }
.venue-info-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 24px;
}
.venue-info-card h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.venue-meta-list { display: flex; flex-direction: column; gap: 12px; }
.venue-meta-item { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.meta-icon { flex-shrink: 0; font-size: 16px; }
.meta-label { color: var(--gray-500); flex-shrink: 0; }
.meta-value { color: var(--gray-800); font-weight: 500; word-break: break-all; }
.meta-value a { color: var(--primary); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }

.venue-visit-btn {
  display: block; text-align: center; margin-top: 20px; padding: 12px;
  background: var(--primary); color: white; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: 14px; transition: opacity 0.15s;
}
.venue-visit-btn:hover { opacity: 0.9; }

.gear-cta-card { background: var(--gray-50); border-color: var(--gray-200); }
.gear-cta-card p { font-size: 14px; color: var(--gray-600); line-height: 1.5; margin-bottom: 16px; }
.venue-gear-btn {
  display: inline-block; padding: 10px 20px; border: 2px solid var(--primary); color: var(--primary);
  border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: all 0.15s;
}
.venue-gear-btn:hover { background: var(--primary); color: white; }

/* Nearby venues */
.venue-nearby { max-width: 1100px; margin: 0 auto; padding: 0 20px 48px; }
.venue-nearby h2 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 20px; }
.nearby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.nearby-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 20px; text-decoration: none; color: inherit; transition: all 0.15s;
}
.nearby-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.nearby-card .track-type { margin-bottom: 8px; }
.nearby-card h3 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin: 4px 0; }
.nearby-card p { font-size: 13px; color: var(--gray-500); margin: 0; }

/* Venue Index Page */
.venue-index-state { margin-bottom: 40px; }
.venue-index-state h2 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; border-bottom: 2px solid var(--gray-200); padding-bottom: 8px; }
.venue-index-state .state-count { font-size: 16px; font-weight: 500; color: var(--gray-400); }
.venue-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.venue-index-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit;
  transition: all 0.15s;
}
.venue-index-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.venue-index-img { height: 140px; overflow: hidden; background: var(--gray-100); }
.venue-index-img img { width: 100%; height: 100%; object-fit: cover; }
.venue-index-info { padding: 16px; }
.venue-index-info .track-type { margin-bottom: 6px; }
.venue-index-info h3 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin: 4px 0; }
.venue-index-info p { font-size: 13px; color: var(--gray-500); margin: 0; }

@media (max-width: 768px) {
  .venue-detail-inner { grid-template-columns: 1fr; }
  .venue-sidebar { order: -1; }
  .venue-hero-img { height: 200px; }
  .nearby-grid { grid-template-columns: 1fr; }
}

/* ── Gear callout (city guides) ── */
.gear-callout { background: var(--primary-bg); border-radius: var(--radius); padding: 1.25rem; margin: 2rem 0; }
.gear-callout h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.gear-callout-items { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.gear-callout-item { display: flex; justify-content: space-between; width: 100%; padding: 8px 12px; background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); text-decoration: none; color: inherit; transition: border-color 0.15s; }
.gear-callout-item:hover { border-color: var(--primary); }
.gc-name { font-weight: 600; font-size: 0.85rem; }
.gc-price { font-weight: 700; color: var(--primary); font-size: 0.85rem; }
.gear-callout-link { font-size: 0.85rem; font-weight: 600; color: var(--primary); }

/* ── Gear sidebar links (venue pages) ── */
.sidebar-gear-link { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--gray-100); }
.sidebar-gear-link:last-of-type { border-bottom: none; }
.sidebar-gear-link:hover { color: var(--primary); }

/* ── Gear featured cards (homepage) ── */
.gear-featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; max-width: 700px; margin: 0 auto; }
.gear-feat-card { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 1.25rem 1rem; background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.gear-feat-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.gf-tier { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; }
.gf-tier.budget { background: #ecfdf5; color: #059669; }
.gf-tier.value { background: #eff6ff; color: #2563eb; }
.gf-tier.pro { background: #fffbeb; color: #d97706; }
.gf-name { font-weight: 600; font-size: 0.9rem; text-align: center; }
.gf-price { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.gf-cta { font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-top: 0.25rem; }

/* ── Gear Best Value highlight (gear page) ── */
.gear-row.pick { background: var(--primary-bg); border-left: 3px solid var(--primary); }
.gear-row.pick .g-name::after { content: " \2605 Best Value"; font-size: 0.65rem; color: var(--primary); font-weight: 700; margin-left: 6px; }

/* ── Network Bar (footer) ── */
.network-bar { text-align: center; padding: 14px 16px 10px; font-size: 10px; color: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.05); margin-top: 12px; line-height: 2; }
.network-bar a { color: rgba(255,255,255,0.3); text-decoration: none; margin: 0 2px; }
.network-bar a:hover { color: rgba(255,255,255,0.6); }

/* ── Canonical simplified footer ── */
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-top {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  font: inherit; font-size: 0.85rem; font-weight: 500;
  padding: 10px 22px; border-radius: 999px;
  cursor: pointer; min-height: 44px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.footer-top:hover, .footer-top:focus-visible {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); color: white; outline: none;
}
.footer .footer-links { border-bottom: none; padding-bottom: 0; margin-bottom: 0; gap: 24px; }
.footer .footer-links a { color: rgba(255,255,255,0.55); }
.footer .footer-links a:hover { color: white; }
.footer .footer-bottom { border-top: none; padding-top: 0; font-size: 0.78rem; color: rgba(255,255,255,0.35); justify-content: center; }

/* ── "Add to compare" button + floating compare pill ── */
.venue-compare-btn { display: block; width: 100%; margin-top: 10px; padding: 10px 16px; background: white; color: var(--gray-700); border: 1.5px solid var(--gray-200); border-radius: 10px; font-weight: 600; font-size: 0.92rem; cursor: pointer; min-height: 44px; transition: all 0.15s; font-family: inherit; }
.venue-compare-btn:hover { border-color: var(--primary); color: var(--primary); }
.venue-compare-btn.is-added { background: var(--gray-900); color: white; border-color: var(--gray-900); }
.venue-compare-btn.is-added::before { content: "✓ "; }
.compare-pill { position: fixed; bottom: 18px; right: 18px; z-index: 100; padding: 12px 22px; background: var(--gray-900); color: white; border-radius: 999px; font-weight: 700; font-size: 0.9rem; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,0.25); display: none; min-height: 44px; align-items: center; gap: 8px; }
.compare-pill.is-visible { display: inline-flex; }
.compare-pill:hover { background: var(--primary); }

/* ── Venue "Explore More" related links section ── */
.venue-related { margin: 32px 0 20px; padding: 20px 24px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 14px; }
.venue-related h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; color: var(--gray-900); }
.related-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.related-row:last-child { margin-bottom: 0; }
.related-label { font-size: 0.78rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.4px; margin-right: 4px; }
.related-chip { display: inline-flex; align-items: center; padding: 6px 14px; background: white; border: 1px solid var(--gray-200); border-radius: 999px; font-size: 0.85rem; color: var(--gray-700); text-decoration: none; transition: all 0.15s; min-height: 32px; }
.related-chip:hover { background: var(--primary); color: white; border-color: var(--primary); }
.related-chip-glossary { border-style: dashed; color: var(--gray-600); }
.related-chip-glossary:hover { background: var(--gray-800); border-color: var(--gray-800); }

/* ── Animated video banner (for /guides, /news, /cities) ── */
.hero.has-video { position: relative; overflow: hidden; min-height: 320px; }
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0; pointer-events: none;
}
.hero.has-video .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.40) 50%,
    rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
.hero.has-video > *:not(.hero-video):not(.hero-overlay) { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
