/* ==========================================================================
   MOTORCYCLE-TOURING.CA - Modern Professional Theme
   Dominant Palette: Asphalt Charcoal, Road Slate, Adventure Ember Orange,
   Highway Gold, Alpine Emerald, Crisp Crisp White
   ========================================================================== */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c222b;
  --bg-card-hover: #262f3c;
  --border-color: #30363d;
  --border-focus: #ff6b00;
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  
  --accent-orange: #ff6b00;
  --accent-orange-hover: #e05e00;
  --accent-orange-glow: rgba(255, 107, 0, 0.25);
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-blue: #38bdf8;
  --accent-red: #ef4444;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.35);

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

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-orange), #ff9800);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-domain {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-domain span {
  color: var(--accent-orange);
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background-color: var(--bg-tertiary);
}

.nav-link.active {
  color: var(--accent-orange);
  background-color: rgba(255, 107, 0, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), #ea580c);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff7b1a, #f97316);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.45);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.btn-outline:hover {
  background-color: var(--accent-orange-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-admin {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  position: relative;
}

.btn-admin:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
}

.badge-counter {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--accent-red);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.6) 0%, var(--bg-primary) 100%), 
              url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1600&auto=format&fit=crop&q=80') center/cover no-repeat;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(13, 17, 23, 0.7) 0%, rgba(13, 17, 23, 0.95) 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: var(--radius-full);
  color: var(--accent-orange);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subheading {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.75rem;
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 800px;
  margin: 0 auto;
}

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

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quick Search Bar */
.hero-search-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  display: flex;
  gap: 0.75rem;
  max-width: 780px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-lg);
}

.search-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
}

.search-input-group input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: var(--text-main);
}

.search-input-group input::placeholder {
  color: var(--text-dim);
}

.search-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Section Header */
.section-header {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap {
  max-width: 650px;
}

.section-tag {
  color: var(--accent-orange);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.35rem;
}

/* Interactive Map Preview Section */
.map-preview-section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.map-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map-controls-bar {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.map-filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.35rem 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

#north-america-map {
  width: 100%;
  height: 520px;
  background: #111827;
  z-index: 10;
}

/* Route Cards Grid */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.route-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow: var(--shadow-md), 0 0 15px rgba(255, 107, 0, 0.15);
}

.route-image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.route-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.route-card:hover .route-image {
  transform: scale(1.05);
}

.route-badge-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.badge-bucket {
  background: rgba(255, 107, 0, 0.9);
  color: white;
}

.badge-difficulty-easy {
  background: rgba(16, 185, 129, 0.85);
  color: white;
}
.badge-difficulty-moderate {
  background: rgba(245, 158, 11, 0.85);
  color: white;
}
.badge-difficulty-advanced {
  background: rgba(239, 68, 68, 0.85);
  color: white;
}

.route-rating-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.route-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.route-location-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--accent-orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.route-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.route-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.route-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}

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

.spec-title {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.route-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-orange);
}

.author-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Why Use This Site */
.why-site-section {
  padding: 5rem 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 1.25rem;
}

.feature-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feature-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.feature-card-link:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px;
}

.feature-card-cta {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Featured Destinations Grid */
.destinations-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.destination-card {
  position: relative;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.destination-card:hover {
  transform: scale(1.02);
  border-color: var(--accent-orange);
}

.destination-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.destination-card:hover .destination-card-img {
  transform: scale(1.1);
}

.destination-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(13, 17, 23, 0.92) 85%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.destination-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.25rem;
}

.destination-card-count {
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-weight: 600;
}

/* Route Directory Filtering */
.directory-section {
  padding: 3rem 0 5rem;
}

.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.filter-select, .filter-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: var(--transition);
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--accent-orange);
}

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Route Detail Page View */
.route-detail-page {
  padding: 2.5rem 0 5rem;
}

.route-detail-header {
  margin-bottom: 2rem;
}

.route-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.route-breadcrumbs a:hover {
  color: var(--accent-orange);
}

.route-detail-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.route-detail-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.detail-specs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.detail-spec-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-spec-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.detail-spec-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.route-detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

#route-map-container {
  width: 100%;
  height: 480px;
  background: #111827;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
}

/* Tabs System */
.detail-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Narrative Grid */
.narrative-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.narrative-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.narrative-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.narrative-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.narrative-card-title svg {
  color: var(--accent-orange);
}

.narrative-card-body {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.7;
}

/* Recommended Stops Tabs & Cards */
.stops-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stop-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.stop-item-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.stop-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.stop-badge {
  padding: 0.2rem 0.6rem;
  background: rgba(255, 107, 0, 0.15);
  color: var(--accent-orange);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.stop-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.stop-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stop-notes {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Turn by Turn */
.turn-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.turn-step {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  align-items: center;
}

.turn-km {
  min-width: 65px;
  padding: 0.35rem 0.6rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-orange);
  text-align: center;
}

.turn-text {
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Forms (Route Submission, Contact, Review) */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-col-span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-label span.req {
  color: var(--accent-orange);
}

.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--accent-orange-glow);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-helper {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.admin-notice-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  color: #fcd34d;
}

.banned-notice-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #fca5a5;
  margin-bottom: 1.5rem;
  display: none;
}

/* Resources & Checklists */
.resource-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.75rem;
}

.resource-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.interactive-checklist {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.checklist-row:hover {
  background: var(--bg-card-hover);
}

.checklist-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-orange);
  cursor: pointer;
}

.checklist-row.checked {
  opacity: 0.6;
  text-decoration: line-through;
}

/* Admin Dashboard */
.admin-panel-container {
  padding: 3rem 0 5rem;
}

.admin-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  padding: 0.9rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.admin-table tr:hover {
  background: var(--bg-secondary);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 4px solid var(--accent-green);
}

.toast-error {
  border-left: 4px solid var(--accent-red);
}

.toast-warning {
  border-left: 4px solid var(--accent-gold);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

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

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-orange);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .narrative-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-col-span-2 {
    grid-column: span 1;
  }
  .hero-search-box {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Pared-down layout additions
   ========================================================================== */

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.header-inner { justify-content: flex-start; }

.page-section { padding: 3rem 0 5rem; }
.container.narrow { max-width: 920px; }
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.back-link:hover { color: var(--accent-orange); }

.section-header-center { justify-content: center; text-align: center; }
.section-header-center .section-title-wrap { max-width: 750px; }
.subsection-title { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 1rem; }
.empty-state {
  grid-column: 1 / -1;
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}
.empty-state a, .link-button {
  color: var(--accent-orange);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Hero image CTAs */
.hero-section {
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.55) 0%, var(--bg-primary) 100%),
              url('https://images.unsplash.com/photo-1494783367193-149034c05e8f?w=1800&auto=format&fit=crop&q=75') center/cover no-repeat;
}
.cta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0 auto 2.5rem;
  max-width: 920px;
}
.cta-card {
  position: relative;
  display: block;
  height: 190px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.cta-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}
.cta-card:hover img, .cta-card:focus-visible img { transform: scale(1.06); }
.cta-card:hover, .cta-card:focus-visible { border-color: var(--accent-orange); box-shadow: var(--shadow-glow); }
.cta-card-body {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.9rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.cta-card-title { font-size: 1.2rem; font-weight: 800; color: #fff; }
.cta-card-title::after { content: " \2192"; color: var(--accent-orange); }
.cta-card-text { font-size: 0.85rem; color: #cbd5e1; }

/* Hero search */
.hero-search-wrap { position: relative; max-width: 780px; margin: 0 auto; }
.hero-search-wrap .hero-search-box { margin: 0 auto; }
.search-input-group input[type="search"]::-webkit-search-cancel-button { filter: invert(1); }
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0; right: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.search-result {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.search-result:last-child { border-bottom: none; }
a.search-result:hover { background: var(--bg-card-hover); }
.search-result-title { font-weight: 700; }
.search-result-meta { font-size: 0.8rem; color: var(--text-muted); }
.search-result-all { color: var(--accent-orange); font-weight: 700; font-size: 0.9rem; }
.search-empty { color: var(--text-muted); }
.search-empty a { color: var(--accent-orange); font-weight: 700; }

/* Founder */
.founder-section { padding: 5rem 0; border-bottom: 1px solid var(--border-color); }
.founder-grid {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: 3rem;
  align-items: start;
}
.founder-rig { position: sticky; top: 96px; }
.founder-rig-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
}
.founder-rig-frame img { width: 100%; height: 100%; object-fit: cover; }
.founder-rig-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.founder-rig figcaption { margin-top: 1rem; }
.founder-rig figcaption strong { font-size: 1.05rem; }
.founder-story .section-title { margin-bottom: 1.25rem; }
.founder-story p { color: #cbd5e1; line-height: 1.8; margin-bottom: 1.1rem; }

/* Map link card */
.map-link-card {
  position: relative;
  display: block;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.map-link-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.map-link-card:hover img { transform: scale(1.04); }
.map-link-card:hover { border-color: var(--accent-orange); }
.map-link-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,17,23,0.92) 0%, rgba(13,17,23,0.55) 55%, rgba(13,17,23,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 2.5rem;
}
.map-link-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; }
.map-link-text { color: #cbd5e1; max-width: 460px; }

/* Full map page */
.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.full-map { display: block; width: 100%; height: 560px; border: 0; background: #111827; }
.map-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  min-height: 60px;
}
.map-selected-info { display: flex; flex-direction: column; min-width: 0; }
.map-selected-title { font-weight: 800; font-size: 1rem; }
.map-selected-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.map-list {
  max-height: 620px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.map-list-item {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.map-list-item:hover { border-color: var(--accent-orange); }
.map-list-item.active { border-color: var(--accent-orange); background: var(--bg-card-hover); box-shadow: 0 0 0 1px var(--accent-orange); }
.map-list-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.map-list-item > span { display: flex; flex-direction: column; min-width: 0; }
.map-list-title { font-weight: 700; font-size: 0.92rem; line-height: 1.3; }
.map-list-meta { font-size: 0.78rem; color: var(--text-muted); }

/* Tour info (Tour Name / Province-State / General Location) */
.tour-info { display: grid; gap: 0.35rem; margin: 0; }
.tour-info > div { display: flex; gap: 0.5rem; font-size: 0.9rem; }
.tour-info dt {
  flex: 0 0 8.5rem;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 0.15rem;
}
.tour-info dd { margin: 0; color: var(--text-main); font-weight: 600; }
.route-card-body .tour-info dd:first-of-type { }
.route-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.route-card-link { color: var(--accent-orange); font-weight: 700; }
.badge-rider { background: rgba(56, 189, 248, 0.9); color: #0d1117; }

/* Route post */
.route-post-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
#route-detail > .tour-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-orange);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
#route-detail > .tour-info > div { font-size: 1.05rem; }
#route-detail .map-card-wrapper { margin: 1.5rem 0 2rem; }
.route-post-photo { width: 100%; border-radius: var(--radius-lg); margin-bottom: 1rem; border: 1px solid var(--border-color); }
.rider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.rider-card p { color: var(--text-muted); font-size: 0.9rem; }
.rider-name { font-size: 1.2rem; font-weight: 800; }
.rider-bike { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.contact-reveal {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  word-break: break-all;
}
.contact-reveal a { color: var(--accent-orange); font-weight: 700; }
.mini-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.mini-gallery .gallery-item { height: 120px; }
.mini-gallery .gallery-item-caption { display: none; }

/* Forms */
.form-section-title { font-size: 1.1rem; font-weight: 800; margin: 2rem 0 1rem; }
.form-card > .form-section-title:first-of-type { margin-top: 0; }
.gmaps-link-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 1.25rem;
  margin-top: 0.75rem;
}
.gmaps-steps { margin: 0 0 1rem 1.25rem; padding: 0; color: #cbd5e1; font-size: 0.92rem; line-height: 1.7; }
.gmaps-steps a { color: var(--accent-orange); }
.gmaps-link-card .form-group { margin-bottom: 0.9rem; }
.form-helper.gmaps-ok { color: var(--accent-green); }
.form-helper.gmaps-ok a { color: var(--accent-green); text-decoration: underline; }
.form-helper.gmaps-bad { color: var(--accent-gold); }

.route-post-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gmaps-route-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.gmaps-route-card:hover { border-color: var(--accent-orange); background: var(--bg-card-hover); }
.gmaps-route-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-orange-glow);
  color: var(--accent-orange);
}
.gmaps-route-text { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.gmaps-route-title { font-weight: 800; font-size: 1.1rem; }
.gmaps-route-meta { color: var(--text-muted); font-size: 0.9rem; }
.admin-gmaps { margin-bottom: 0.75rem; }
@media (max-width: 640px) {
  .gmaps-route-card { flex-wrap: wrap; }
  .gmaps-route-card .btn { width: 100%; text-align: center; }
}
.check-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: #cbd5e1; cursor: pointer; }
.check-row input { margin-top: 0.25rem; accent-color: var(--accent-orange); }
.form-actions { display: flex; justify-content: flex-end; margin-top: 2rem; }
.success-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.btn-danger { background: transparent; border: 1px solid rgba(239, 68, 68, 0.6); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Subscribe */
.subscribe-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 1px solid var(--border-color);
}
.subscribe-inner { max-width: 780px; text-align: center; }
.subscribe-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.subscribe-text { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; }
.subscribe-form { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.subscribe-input {
  flex: 1;
  min-width: 260px;
  padding: 0.85rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: white;
}
.subscribe-input:focus { border-color: var(--accent-orange); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.gallery-item {
  position: relative;
  height: 240px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  background: var(--bg-card);
  text-align: left;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  display: flex;
  flex-direction: column;
}
.gallery-item-title { font-weight: 700; color: #fff; }
.gallery-item-meta { font-size: 0.78rem; color: #cbd5e1; }
.lightbox-window { max-width: 960px; background: #000; border: none; }
.lightbox-window img { width: 100%; max-height: 72vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 0.5rem; right: 0.75rem; z-index: 10; color: #fff; }
.lightbox-caption { padding: 1rem 1.25rem; color: #e2e8f0; font-size: 0.92rem; background: #0d1117; display: grid; gap: 0.3rem; }
.lightbox-caption a { color: var(--accent-orange); font-weight: 700; }
.lightbox-contact { margin-top: 0.5rem; }

/* Community */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.step-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; }
.step-card h3 { font-size: 1.1rem; margin: 0.5rem 0 0.25rem; }
.step-card p { color: var(--text-muted); font-size: 0.92rem; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent-orange); color: #fff; font-weight: 800;
}
.community-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.member-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; }
.member-avatar {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 107, 0, 0.15); color: var(--accent-orange);
  font-weight: 900; font-size: 1.25rem; margin-bottom: 0.75rem;
}
.member-name { font-weight: 800; font-size: 1.1rem; }
.member-bike, .member-stats { color: var(--text-muted); font-size: 0.85rem; }
.member-routes { list-style: none; margin: 0.75rem 0; display: grid; gap: 0.25rem; font-size: 0.9rem; }
.member-routes a { color: var(--accent-orange); }

/* Admin */
.admin-login { max-width: 460px; margin: 2rem auto; text-align: center; }
.admin-login form { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.badge-counter-inline {
  display: inline-block; min-width: 1.4rem; padding: 0 0.35rem; margin-left: 0.25rem;
  border-radius: var(--radius-full); background: var(--accent-orange); color: #fff;
  font-size: 0.75rem; text-align: center;
}
#admin-list { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.admin-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; }
.admin-item-head { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-item-type { font-weight: 800; }
.admin-item-date { color: var(--text-dim); font-size: 0.82rem; margin-left: auto; }
.admin-item-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
.admin-item-title { font-size: 1.15rem; font-weight: 800; }
.admin-meta { color: var(--text-muted); font-size: 0.85rem; margin: 0.6rem 0; }
.admin-meta a { color: var(--accent-orange); }
.admin-text { font-size: 0.92rem; color: #cbd5e1; margin-top: 0.5rem; }
.admin-text p { margin-bottom: 0.5rem; }
.admin-thumb { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius-md); margin-top: 0.75rem; }
.admin-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
#admin-founder { margin-top: 1.5rem; }
#admin-founder form { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.admin-founder-preview { max-width: 360px; border-radius: var(--radius-md); margin-top: 1rem; }

/* Footer image tiles */
.footer-grid-images { grid-template-columns: 1fr 2fr 1fr; }
.resource-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.footer-image-link { display: flex; flex-direction: column; gap: 0.4rem; color: var(--text-main); font-weight: 700; font-size: 0.9rem; }
.footer-image-link img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
a.footer-image-link:hover img { border-color: var(--accent-orange); }
a.footer-image-link:hover span { color: var(--accent-orange); }
.footer-image-link small { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.footer-image-link.is-placeholder img { filter: grayscale(0.4); opacity: 0.8; }
.footer-note { margin-top: 1.25rem; font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }
.footer-admin-link { color: var(--text-dim); font-size: 0.8rem; }
.footer-admin-link:hover { color: var(--accent-orange); }

@media (max-width: 1024px) {
  .founder-grid { grid-template-columns: 1fr; }
  .founder-rig { position: static; max-width: 560px; }
  .map-layout { grid-template-columns: 1fr; }
  .map-list { max-height: none; }
  .footer-grid-images { grid-template-columns: 1fr; }
  .admin-item-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .cta-cards { grid-template-columns: 1fr; }
  .cta-card { height: 150px; }
  .steps-grid { grid-template-columns: 1fr; }
  .resource-tiles { grid-template-columns: 1fr 1fr; }
  .full-map { height: 420px; }
  .map-link-card { height: 280px; }
  .map-link-overlay { padding: 1.5rem; }
  .routes-grid { grid-template-columns: 1fr; }
  .tour-info dt { flex-basis: 7rem; }
  .form-card { padding: 1.5rem; }
}

.admin-note {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #d97706;
  background: rgba(217, 119, 6, 0.1);
  border-radius: 6px;
  line-height: 1.5;
}

/* ==========================================================================
   Search pages: routes by province / state (/motorcycle-routes/...)
   ========================================================================== */
.seo-header { justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.seo-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; font-weight: 600; }
.seo-nav a { color: var(--text-muted); }
.seo-nav a:hover { color: var(--accent-orange); }
.seo-page .route-breadcrumbs { flex-wrap: wrap; }
.seo-lead { max-width: 900px; margin-bottom: 1rem; }
.seo-block { margin-top: 2.5rem; }
.seo-block.narrative-card { padding: 1.5rem; }
.seo-block.narrative-card p + p { margin-top: 0.75rem; }
.seo-block a:not(.route-card):not(.btn), .seo-route a:not(.btn), .seo-lead a { color: var(--accent-orange); }
.subsection-title a { color: inherit !important; }
.subsection-title a:hover { color: var(--accent-orange) !important; }
.seo-region-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.6rem;
}
.seo-region-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}
.seo-region-list a:hover, .seo-region-list a[aria-current="page"] { border-color: var(--accent-orange); background: var(--bg-card-hover); }
.seo-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-orange);
  color: #0d1117;
  border-radius: var(--radius-full);
  padding: 0.05rem 0.5rem;
}
.seo-card-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.seo-empty { padding: 1.5rem; background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: var(--radius-lg); }
.seo-route .narrative-card { margin-bottom: 1.25rem; }
.seo-hero-img { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 1.5rem; border: 1px solid var(--border-color); }
.seo-stops { padding-left: 1.2rem; display: grid; gap: 0.6rem; color: var(--text-muted); }
.seo-stops strong { color: var(--text-main); }
.seo-rider, .seo-more { margin-top: 1rem; color: var(--text-muted); }
.seo-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
}
.seo-cta h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.seo-cta p { color: var(--text-muted); max-width: 700px; margin: 0 auto 1.25rem; }
.seo-cta .btn { margin: 0.25rem; }
.seo-footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-bottom: 2rem; font-size: 0.9rem; }
.seo-footer-links a { color: var(--text-muted); }
.seo-footer-links a:hover { color: var(--accent-orange); }

/* Home page: routes by province / state links */
.regions-section { padding: 4rem 0; }
.regions-section .seo-region-list { margin-bottom: 2rem; }
.regions-country-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.9rem; }
.regions-country-title a { color: var(--text-main); }
.regions-country-title a:hover { color: var(--accent-orange); }

/* ==========================================================================
   Share Your Ride: step-by-step guide (Submit a Route page)
   ========================================================================== */
.howto-guide {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  overflow: hidden;
  scroll-margin-top: 1rem;
}
.howto-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.12), transparent 70%);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.howto-summary::-webkit-details-marker { display: none; }
.howto-summary:hover { background-color: var(--bg-card-hover); }
.howto-summary:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: -2px; }
.howto-guide[open] > .howto-summary { border-bottom-color: var(--border-color); }
.howto-summary-icon {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md);
  background: var(--accent-orange-glow); color: var(--accent-orange);
}
.howto-summary-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.howto-summary-title { font-size: 1.15rem; font-weight: 800; }
.howto-summary-sub { color: var(--text-muted); font-size: 0.9rem; }
.howto-summary-toggle {
  flex: none;
  width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin: 0 0.25rem 0.3rem;
}
.howto-guide[open] .howto-summary-toggle { transform: rotate(-135deg); margin-bottom: -0.2rem; }

.howto-steps { list-style: none; margin: 0; padding: 0.5rem 1.5rem 1.5rem; counter-reset: none; }
.howto-step {
  position: relative;
  padding: 1.5rem 0 1.5rem 3.25rem;
  border-bottom: 1px dashed var(--border-color);
}
.howto-step:last-child { border-bottom: 0; padding-bottom: 0.5rem; }
/* vertical "road" connecting the step numbers */
.howto-step::before {
  content: "";
  position: absolute;
  left: 0.95rem; top: 3.75rem; bottom: -1.5rem;
  border-left: 2px dashed rgba(255, 107, 0, 0.35);
}
.howto-step:last-child::before { display: none; }
.howto-step-head { display: flex; align-items: center; gap: 0.75rem; margin-left: -3.25rem; margin-bottom: 0.6rem; }
.howto-step-head .step-num { flex: none; box-shadow: 0 0 0 4px var(--bg-card), var(--shadow-glow); }
.howto-step-title { font-size: 1.1rem; font-weight: 800; margin: 0; }
.howto-list { margin: 0 0 1rem 1.1rem; padding: 0; color: #cbd5e1; font-size: 0.95rem; line-height: 1.75; }
.howto-list a { color: var(--accent-orange); text-decoration: underline; text-underline-offset: 2px; }
.howto-list strong { color: var(--text-main); }
.howto-checklist { list-style: none; margin: 0.35rem 0 0.5rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 1rem; }
.howto-checklist li { position: relative; padding-left: 1.5rem; }
.howto-checklist li::before {
  content: "";
  position: absolute; left: 0.2rem; top: 0.45rem;
  width: 0.4rem; height: 0.75rem;
  border-right: 2px solid var(--accent-green);
  border-bottom: 2px solid var(--accent-green);
  transform: rotate(45deg);
}
.howto-tip {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  color: #fcd34d;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  margin: 0 0 1rem;
}
.howto-shot {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.howto-shot:hover { border-color: var(--accent-orange); transform: translateY(-2px); }
.howto-shot img { width: 100%; height: auto; }
.howto-shot-narrow { max-width: 340px; }
.howto-inline-link { margin: -0.4rem 0 1rem; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-orange); font-size: 0.85rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-gold); }
#route-form { scroll-margin-top: 1rem; }

@media (max-width: 640px) {
  .howto-summary { padding: 1rem; gap: 0.75rem; }
  .howto-steps { padding: 0.25rem 1rem 1rem; }
  .howto-step { padding-left: 0; }
  .howto-step::before { display: none; }
  .howto-step-head { margin-left: 0; }
  .howto-checklist { grid-template-columns: 1fr; }
  .howto-shot-narrow { max-width: 100%; }
}
.admin-subscriber .admin-item-head { margin-bottom: 0; }
.admin-subscriber .admin-item-title { font-size: 1rem; word-break: break-all; }
.admin-subscriber .btn { margin-left: auto; }
