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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2b2b2b;
  background: #f6f6f2;
  line-height: 1.5;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  background: #1e3d2f;
  color: #fff;
}

.site-header h1 { font-size: 2rem; letter-spacing: 0.02em; }

.tagline {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #cde3d3;
  max-width: 46rem;
  margin-inline: auto;
}

main {
  max-width: 96rem;
  margin: 0 auto;
  padding: 1.5rem 0.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.route-filter {
  width: 100%;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  border: 1px solid #d0d0c8;
  border-radius: 8px;
  background: #fff;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.route-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.route-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.route-card.selected {
  outline: 3px solid #2e7d4f;
  outline-offset: 2px;
}

.route-card img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
  display: block;
}

.route-card .card-body { padding: 1rem 1.1rem 1.2rem; }

.route-card h2 { font-size: 1.2rem; margin-bottom: 0.35rem; }

.route-card .description {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.stat {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #e8f0ea;
  color: #1e3d2f;
}

.stat.difficulty-hard { background: #f8e1e1; color: #8f2f2f; }
.stat.difficulty-moderate { background: #fdf0d8; color: #8a6d1d; }

.btn-download {
  display: inline-block;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: #2e7d4f;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-download:hover { background: #256b42; }

.map-section { margin-top: 0; }

#map {
  height: 30rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  z-index: 0;
}

@media (min-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr) minmax(32rem, 46rem);
    align-items: start;
  }
  .map-section {
    position: sticky;minma
    top: 1rem;
  }
  #map {
    height: calc(100vh - 2rem);
    min-height: 40rem;
  }
}

.site-footer {
  text-align: center;
  padding: 1.25rem;
  color: #777;
  font-size: 0.85rem;
  border-top: 1px solid #e0e0da;
}

@media (max-width: 720px) {
  #map { height: 22rem; }
}