/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #fafafa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1a252f;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
}

a {
  color: #2c5530;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1e3d23;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
.header {
  background: linear-gradient(135deg, #2c5530 0%, #3e7b3e 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Mobile Navigation */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 3px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: #2c5530;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }
  
  .dropdown-menu {
    display: none;
  }
}

/* Dropdown Navigation */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2c5530;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Home hero: full-width photo with the headline in a card */
.home-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.home-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.home-hero-card {
  max-width: 480px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #1a252f;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #5a6c7d;
  line-height: 1.5;
}

.home-hero-credit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.home-hero-credit a {
  color: inherit;
}

@media (max-width: 768px) {
  .home-hero {
    min-height: 0;
    display: block;
  }

  .home-hero-photo {
    position: static;
    height: 45vh;
  }

  .home-hero-inner {
    padding: 0 1rem;
    margin-top: -3rem;
  }

  .home-hero-card {
    max-width: none;
    background: white;
    padding: 1.5rem;
    text-align: center;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .home-hero-credit {
    top: 0.5rem;
    bottom: auto;
  }
}

/* Buttons */
.cta-button, .secondary-button {
  display: inline-block;
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.cta-button {
  background: linear-gradient(135deg, #2c5530 0%, #3e7b3e 100%);
  color: white;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(44, 85, 48, 0.3);
  color: white;
}

.secondary-button {
  background: white;
  color: #2c5530;
  border: 2px solid #2c5530;
}

.secondary-button:hover {
  background: #2c5530;
  color: white;
}

/* Location Cards */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.location-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.location-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

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

.location-image {
  height: 200px;
  overflow: hidden;
}

.location-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.location-content {
  padding: 1.5rem;
}

.location-content h3 {
  margin-bottom: 0.5rem;
  color: #1a252f;
}

.location-summary {
  color: #5a6c7d;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.location-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.location-type, .location-state, .location-city, .location-difficulty {
  background: #f1f3f4;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Card layout (partials/location-card.njk). Scoped to .location-card so the
   location page's .location-meta / .location-content styles don't apply. */
.location-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.location-card .location-image {
  height: 180px;
}

.location-card .location-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem 1.25rem 1.1rem;
  line-height: 1.45;
}

.location-card .location-content h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #1a252f;
}

.location-card .location-link {
  display: inline;
  color: inherit;
  text-decoration: none;
}

/* Make the whole card clickable through the title link */
.location-card .location-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.location-card .location-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: 0.85rem;
  color: #5a6c7d;
}

.location-card .location-meta span {
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: inherit;
  font-weight: 400;
}

.location-card .location-meta .location-rating {
  color: #a0611a;
  font-weight: 600;
}

/* Mixed-surface trails get a highlight so riders notice the gravel */
.location-card .location-meta .location-surface.is-mixed,
.location-facts .fact-mixed {
  background: #fdf1e6;
  color: #8a4510;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}

.location-card .location-tip {
  margin: 0;
  padding-left: 0.75rem;
  border-left: 3px solid #c8d6ca;
  color: #3d4a55;
  font-size: 0.9rem;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.location-card .location-official {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c5530;
  text-decoration: none;
}

.location-card .location-official:hover {
  text-decoration: underline;
}

.location-difficulty.difficulty-easy {
  background: #d4edda;
  color: #155724;
}

.location-difficulty.difficulty-moderate {
  background: #fff3cd;
  color: #856404;
}

.location-difficulty.difficulty-difficult, .location-difficulty.difficulty-extreme {
  background: #f8d7da;
  color: #721c24;
}

.location-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag {
  background: #e8f5e8;
  color: #2c5530;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Sections */
.featured-locations, .minnesota-highlights {
  padding: 4rem 0;
}

.featured-locations h2, .minnesota-highlights h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.section-cta {
  text-align: center;
  margin-top: 3rem;
}

/* Page Headers */
.page-header {
  background: linear-gradient(135deg, #2c5530 0%, #3e7b3e 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Category Hero with Background Image */
.category-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.category-hero .container {
  position: relative;
  z-index: 2;
}

.category-hero .hero-content h1 {
  color: white;
  margin-bottom: 1rem;
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.category-hero .hero-content p {
  font-size: 1.3rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  max-width: 600px;
  margin: 0 auto;
}

.category-hero .hero-credit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  z-index: 2;
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.category-hero .hero-credit a {
  color: inherit;
}

.minnesota-header {
  background: linear-gradient(135deg, #1a4d5c 0%, #2c5530 50%, #3e7b3e 100%);
}

/* Location Post Styles */
.location-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.location-header {
  margin-bottom: 3rem;
}

.location-hero-image {
  width: 100%;
  height: 400px;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

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

.location-header-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.location-summary {
  font-size: 1.2rem;
  color: #5a6c7d;
  margin-bottom: 2rem;
}

.location-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.meta-group {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-weight: 600;
  color: #2c5530;
  margin-bottom: 0.25rem;
}

.meta-value {
  color: #5a6c7d;
}

.location-date {
  color: #5a6c7d;
  font-size: 0.9rem;
}

.location-content {
  margin-bottom: 3rem;
  line-height: 1.8;
}

.location-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2c5530;
}

.location-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2c5530;
}

/* Gallery */
.location-gallery {
  margin: 3rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-credit {
  margin: -1.5rem 0 1.5rem;
  font-size: 0.75rem;
  color: #7a8a99;
  text-align: right;
}

.gallery-item .photo-credit {
  margin: 0.25rem 0 0;
  text-align: center;
}

.photo-credit a {
  color: inherit;
}

.photo-credits-list .photo-credit {
  margin: 0;
  text-align: left;
}

.photo-credits-list td {
  padding: 0.4rem 0.75rem 0.4rem 0;
  vertical-align: top;
  font-size: 0.9rem;
}

.gallery-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #5a6c7d;
  text-align: center;
}

/* Tips and Gear */
.location-tips, .location-gear {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.tips-list, .gear-list {
  list-style: none;
  margin-top: 1rem;
}

.tips-list li, .gear-list li {
  padding: 0.5rem 0;
  padding-left: 2rem;
  position: relative;
}

.tips-list li::before {
  content: "💡";
  position: absolute;
  left: 0;
}

.gear-list li::before {
  content: "🎒";
  position: absolute;
  left: 0;
}

/* Filters */
.location-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
  background: #2c5530;
  color: white;
  border-color: #2c5530;
}

/* Minnesota Page Specific */
.minnesota-intro {
  text-align: center;
  margin: 3rem 0;
}

.minnesota-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat {
  text-align: center;
  padding: 2rem 1rem;
  min-width: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat h3 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  white-space: nowrap;
  color: #2c5530;
  margin-bottom: 0.5rem;
}

.stat p {
  color: #5a6c7d;
  margin: 0;
  font-weight: 500;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.region-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.region-card h3 {
  color: #2c5530;
  margin-bottom: 1rem;
}

.region-card ul {
  list-style: none;
  margin-top: 1rem;
}

.region-card li {
  padding: 0.25rem 0;
  color: #5a6c7d;
}

/* About Page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-section {
  margin: 3rem 0;
}

.about-photo {
  float: left;
  width: 280px;
  max-width: 45%;
  height: auto;
  margin: 0.25rem 1.5rem 1rem 0;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.about-bio a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-bio::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 600px) {
  .about-photo {
    float: none;
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1.5rem;
  }
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.coverage-item {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.coverage-item h3 {
  color: #2c5530;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.ethics-list, .safety-list {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.ethics-list li, .safety-list li {
  margin: 0.5rem 0;
  padding-left: 1rem;
  position: relative;
}

.ethics-list li::before {
  content: "🌿";
  position: absolute;
  left: 0;
}

.safety-list li::before {
  content: "⚠️";
  position: absolute;
  left: 0;
}

.contact-info {
  background: #e8f5e8;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

/* Footer */
.footer {
  background: #1a252f;
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  color: #adb5bd;
  transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .location-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .location-post {
    padding: 1rem;
  }
  
  .location-header-content h1 {
    font-size: 2rem;
  }
  
  .location-meta {
    grid-template-columns: 1fr;
  }
  
  .minnesota-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .minnesota-stats {
    grid-template-columns: 1fr;
  }
  
  .location-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Category Pages */
.category-overview {
  margin: 3rem 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.category-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h2 {
  color: #2c5530;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.category-card p {
  color: #5a6c7d;
  margin-bottom: 1rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.tip-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #2c5530;
}

.tip-card h3 {
  color: #2c5530;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.tip-card p {
  color: #5a6c7d;
  margin: 0;
  font-size: 0.95rem;
}

.park-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.no-content {
  text-align: center;
  padding: 3rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 2rem 0;
}

.no-content p {
  font-size: 1.1rem;
  color: #5a6c7d;
  margin-bottom: 2rem;
}

/* Map Search Page */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.map-search-content {
  margin: 0.75rem 0 1.5rem;
}

.search-controls {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 0.75rem;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
}

.search-form input, .search-form select {
  padding: 0.5rem 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
}

.search-form input:focus, .search-form select:focus {
  outline: none;
  border-color: #2c5530;
}

/* Sits on the map's top-left corner, styled like Google's own map buttons */
.map-panel {
  position: relative;
}

.map-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 2px;
  background: white;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: rgba(0, 0, 0, 0.3) 0 1px 4px -1px;
  cursor: pointer;
  white-space: nowrap;
}

.map-toggle:hover {
  background: #ebebeb;
  color: #000;
}

/* Map-only view: the list is hidden and the map takes the full width */
.map-layout.map-only {
  grid-template-columns: 1fr;
}

.map-layout.map-only .search-results {
  display: none;
}

.advanced-filters {
  margin-top: 0.6rem;
  border-top: 1px solid #e9ecef;
  padding-top: 0.5rem;
}

.advanced-filters summary {
  cursor: pointer;
  font-weight: 600;
  color: #2c5530;
}

.filter-count {
  font-weight: 400;
  color: #5a6c7d;
}

.filter-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 1.25rem;
}

.filter-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6c7d;
  margin-bottom: 0.5rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  cursor: pointer;
}

.filter-check input {
  accent-color: #2c5530;
  width: 1rem;
  height: 1rem;
}

.filter-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.filter-select select {
  padding: 0.35rem 0.5rem;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 7.5rem;
}

.filter-multi {
  border: 0;
  padding: 0;
  margin: 0 0 0.5rem;
}

.filter-multi legend {
  padding: 0;
  margin-bottom: 0.25rem;
}

.filter-note {
  margin-top: 1rem;
  color: #5a6c7d;
  font-style: italic;
}

.filter-actions {
  margin-top: 1.25rem;
}

.filter-actions .secondary-button {
  padding: 0.5rem 1rem;
}

.results-count {
  color: #5a6c7d;
  margin-bottom: 0.5rem;
}

.location-card[hidden],
.result-row[hidden] {
  display: none;
}

/* Map on the left, compact results on the right */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  height: max(480px, calc(100vh - 13rem));
}

.map-panel,
.results-map {
  height: 100%;
  min-height: 0;
}

.results-map {
  border-radius: 12px;
  overflow: hidden;
  background: #e9ecef;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-results {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.results-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.25rem 0.4rem 0.25rem 0.1rem;
}

.result-row {
  background: white;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.result-row.is-active,
.result-row:focus-within {
  border-color: #e07a1f;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.results-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  color: #5a6c7d;
}

.results-pager[hidden] {
  display: none;
}

.results-pager button {
  padding: 0.4rem 0.9rem;
  border: 2px solid #2c5530;
  border-radius: 8px;
  background: white;
  color: #2c5530;
  font-weight: 600;
  cursor: pointer;
}

.results-pager button:hover:not(:disabled) {
  background: #2c5530;
  color: white;
}

.results-pager button:disabled {
  border-color: #e9ecef;
  color: #adb5bd;
  cursor: default;
}

.result-row.is-flash {
  background: #fdf1e6;
}

.result-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.result-link {
  color: #1a252f;
}

/* Whole row is clickable */
.result-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.85rem;
  color: #5a6c7d;
}

.result-rating .stars {
  font-size: 0.85rem;
}

.map-info {
  width: 220px;
}

.map-info-photo {
  display: block;
  margin-bottom: 0.4rem;
}

.map-info-photo img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.map-info a {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c5530;
}

.map-info-team {
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.15rem;
}

.map-info-meta {
  font-size: 0.8rem;
  color: #5a6c7d;
  margin-top: 0.2rem;
}

.map-info-rating {
  color: #e0a800;
  margin-right: 0.4rem;
}

.no-results {
  text-align: center;
  color: #5a6c7d;
  padding: 2rem 0;
}

@media (max-width: 768px) {
  .search-controls {
    padding: 0.6rem 0.75rem;
  }

  .search-form {
    grid-template-columns: 1fr 1fr;
  }

  .search-form input {
    grid-column: 1 / -1;
  }

  .search-form select {
    min-width: 0;
    width: 100%;
  }

  .map-layout.map-only .results-map {
    height: 75vh;
  }

  .map-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .results-map {
    height: 55vh;
  }

  .results-list {
    overflow: visible;
  }
}

/* Suggest Page */
.suggest-content {
  max-width: 800px;
  margin: 0 auto;
}

.suggest-intro {
  text-align: center;
  margin: 2rem 0;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.suggestion-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.suggestion-card h3 {
  color: #2c5530;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.suggestion-card p {
  color: #5a6c7d;
  margin: 0;
  font-size: 0.9rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contact-method {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.contact-method h3 {
  color: #2c5530;
  margin-bottom: 1rem;
}

.contact-link {
  color: #2c5530;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid #2c5530;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: #2c5530;
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.social-link {
  color: #2c5530;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #2c5530;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #2c5530;
  color: white;
}

.suggestion-guidelines {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin: 3rem 0;
}

.guidelines-content h3 {
  color: #2c5530;
  margin: 1.5rem 0 1rem 0;
}

.guidelines-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.guidelines-list li {
  margin: 0.5rem 0;
  color: #5a6c7d;
}

.thank-you-section {
  text-align: center;
  margin: 3rem 0;
}

.contributor-recognition {
  background: #e8f5e8;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.contributor-recognition em {
  color: #2c5530;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Category Page Elements */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.info-card h3 {
  color: #2c5530;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.info-card p {
  color: #5a6c7d;
  margin: 0;
  font-size: 0.95rem;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.season-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #2c5530;
}

.season-card h3 {
  color: #2c5530;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.season-card p {
  color: #5a6c7d;
  margin: 0;
  font-size: 0.9rem;
}

.season-info {
  margin: 2rem 0;
}

.season-detail {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.season-detail h3 {
  color: #2c5530;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.season-detail p {
  color: #5a6c7d;
  margin: 0;
  line-height: 1.6;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.activity-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.activity-card h3 {
  color: #2c5530;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.activity-card p {
  color: #5a6c7d;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.gear-category {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid #2c5530;
}

.gear-category h3 {
  color: #2c5530;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.gear-category ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gear-category li {
  color: #5a6c7d;
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.gear-category li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2c5530;
  font-weight: bold;
}

/* Contact Page */
.contact-content {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-intro {
  text-align: center;
  margin: 2rem 0 3rem 0;
}

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

.contact-form-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Form Styling */
.suggestion-form {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c5530;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c5530;
}

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

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-group label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

/* Form Messages */
.form-message {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  text-align: center;
}

.form-message.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.form-message.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.form-message h3 {
  margin-bottom: 0.5rem;
  color: inherit;
}

.form-message p {
  margin: 0;
}

/* Contact Methods */
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contribution-info,
.response-info {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #2c5530;
}

.contribution-info h3,
.response-info h3 {
  color: #2c5530;
  margin-bottom: 1rem;
}

.contribution-info h4 {
  color: #2c5530;
  margin: 1rem 0 0.5rem 0;
  font-size: 1rem;
}

.contribution-list {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
}

.contribution-list li {
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #5a6c7d;
}

.contribution-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2c5530;
  font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .contact-form-section {
    padding: 1.5rem;
  }
}

/* Privacy Page */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.privacy-intro {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-left: 4px solid #2c5530;
}

.privacy-intro p:first-child {
  font-weight: 600;
  color: #2c5530;
  margin-bottom: 1rem;
}

.privacy-section {
  margin: 3rem 0;
}

.privacy-section h2 {
  color: #2c5530;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.privacy-section h3 {
  color: #2c5530;
  margin: 2rem 0 1rem 0;
  font-size: 1.2rem;
}

.privacy-section ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.privacy-section li {
  margin: 0.5rem 0;
  color: #5a6c7d;
}

.privacy-section li strong {
  color: #2c5530;
}

.privacy-section .contact-info {
  background: #e8f5e8;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.privacy-section .contact-info p {
  margin: 0.5rem 0;
}

.privacy-section .contact-info a {
  color: #2c5530;
  font-weight: 600;
}

/* Star Rating Styles */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.star {
  color: #ddd;
  font-size: 1.2rem;
}

.star.filled {
  color: #ffd700;
}

/* External Links Section */
.location-links {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #2c5530;
}

.location-links h2 {
  margin-bottom: 1rem;
  color: #2c5530;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.external-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  text-decoration: none;
  color: #495057;
  transition: all 0.2s ease;
  gap: 1rem;
}

.external-link:hover {
  background: #f8f9fa;
  border-color: #2c5530;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.link-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.link-text {
  flex-grow: 1;
  font-weight: 500;
}

.link-arrow {
  color: #6c757d;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.external-link:hover .link-arrow {
  transform: translateX(4px);
}

.alltrails-link:hover {
  border-color: #ff6b35;
}

.maps-link:hover {
  border-color: #4285f4;
}

/* Gear System Styles */
.location-gear {
  margin: 2rem 0;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.gear-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.gear-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.gear-header {
  margin-bottom: 1rem;
}

.gear-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #2c5530;
}

.gear-brand {
  color: #6c757d;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.gear-essential {
  background: #dc3545;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gear-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gear-category,
.gear-price,
.gear-weight {
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #495057;
}

.gear-price {
  background: #e7f3ff;
  color: #0056b3;
  font-weight: 600;
}

.gear-features {
  margin-bottom: 1rem;
}

.feature-tag {
  background: #e8f5e8;
  color: #2c5530;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  display: inline-block;
}

.gear-notes {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 4px solid #2c5530;
  border-radius: 4px;
}

.gear-notes p {
  margin: 0;
  font-style: italic;
  color: #495057;
}

.gear-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gear-details-btn,
.gear-buy-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  flex: 1;
  text-align: center;
  min-width: 120px;
}

.gear-details-btn {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.gear-details-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.gear-buy-btn {
  background: #ff6b35;
  color: white;
  border: 1px solid #ff6b35;
}

.gear-buy-btn:hover {
  background: #e55a2b;
  border-color: #e55a2b;
  color: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.modal-header h2 {
  margin: 0;
  color: #2c5530;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #6c757d;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #495057;
}

.modal-body {
  padding: 0;
}

.gear-modal-content {
  padding: 1.5rem;
}

.gear-modal-header {
  margin-bottom: 1.5rem;
}

.gear-brand-model {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.gear-modal-image {
  margin-bottom: 1.5rem;
  text-align: center;
}

.gear-modal-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gear-description,
.gear-features {
  margin-bottom: 1.5rem;
}

.gear-description h3,
.gear-features h3 {
  margin-bottom: 0.75rem;
  color: #2c5530;
  font-size: 1.1rem;
}

.gear-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gear-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f4;
  position: relative;
  padding-left: 1.5rem;
}

.gear-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.gear-features li:last-child {
  border-bottom: none;
}

.gear-modal-actions {
  border-top: 1px solid #e9ecef;
  padding-top: 1.5rem;
  text-align: center;
}

.affiliate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ff9500;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.affiliate-btn:hover {
  background: #e8890b;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.affiliate-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.affiliate-disclaimer {
  color: #6c757d;
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.loading,
.error {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.error {
  color: #dc3545;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .gear-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gear-card {
    padding: 1rem;
  }
  
  .gear-actions {
    flex-direction: column;
  }
  
  .gear-details-btn,
  .gear-buy-btn {
    min-width: auto;
  }
  
  .modal-content {
    margin: 0.5rem;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .gear-modal-content {
    padding: 1rem;
  }
}

/* Visit History Styles */
.visit-history {
  margin: 2rem 0;
}

.visit-history h2 {
  margin-bottom: 1.5rem;
  color: #2c5530;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visit-history h2:before {
  content: "🏔️";
  font-size: 1.2em;
}

.visits-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.visit-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.visit-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.visit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f3f4;
}

.visit-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #2c5530;
  font-size: 1.1rem;
}

.date-icon {
  font-size: 1.2em;
}

.visit-rating {
  display: flex;
  gap: 2px;
}

.visit-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.visit-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #495057;
}

.meta-icon {
  font-size: 1.1em;
}

.meta-text {
  font-weight: 500;
}

.visit-notes {
  background: #f0f8f0;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #2c5530;
}

.visit-notes p {
  margin: 0;
  color: #2c3e50;
  line-height: 1.6;
  font-style: italic;
}

/* Visit History - Mobile Responsive */
@media (max-width: 768px) {
  .visit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .visit-details {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .visit-meta {
    flex: 1;
  }
}

/* Visit Count Tag */
.tag.visit-count {
  background: #e8f5e8 !important;
  color: #2c5530 !important;
  border: 1px solid #2c5530;
  font-weight: 600;
}

.tag.visit-count:before {
  content: "🏔️ ";
  margin-right: 0.25rem;
}

/* Location page (location-pages.njk), single-column guide layout */
.location-post .location-header {
  margin-bottom: 1.75rem;
}

.location-post .location-hero {
  position: relative;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
}

.location-post .location-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-post .location-hero h1 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 3rem 1.5rem 1.25rem;
  font-size: 2.4rem;
  line-height: 1.15;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}

.location-post .location-header > h1 {
  font-size: 2.4rem;
  margin: 0 0 0.5rem;
}

/* Park photo mosaic: one big photo plus two stacked, like AllTrails */
.location-post .location-title {
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.photo-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
}

.mosaic-tile {
  display: block;
  padding: 0;
  border: 0;
  background: #e9ecef;
  cursor: zoom-in;
  overflow: hidden;
  min-height: 0;
}

.mosaic-main {
  grid-row: 1 / 3;
}

.mosaic-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.2s ease;
}

.mosaic-tile:hover img {
  transform: scale(1.03);
  filter: brightness(0.92);
}

.mosaic-count {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.mosaic-count:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* Two-photo pages: the hero opens the viewer; the count sits top-left, clear of the title */
.location-hero.has-viewer,
.gallery-item img[data-photo] {
  cursor: pointer;
}

.location-hero .hero-count {
  top: 1rem;
  bottom: auto;
}

.photo-mosaic + .photo-credit {
  margin: 0.35rem 0 0;
}

/* Full-screen photo viewer */
.photo-viewer {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 14, 18, 0.94);
  color: white;
}

.photo-viewer[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-viewer::backdrop {
  background: rgba(10, 14, 18, 0.94);
}

.photo-viewer figure {
  margin: 0;
  max-width: calc(100vw - 8rem);
  text-align: center;
}

.photo-viewer img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.photo-viewer figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #d5dbe0;
}

.photo-viewer .viewer-credit {
  font-size: 0.8rem;
  color: #9aa6b1;
}

.photo-viewer .viewer-credit a {
  color: inherit;
  text-decoration: underline;
}

.photo-viewer .viewer-count {
  color: #9aa6b1;
}

.viewer-close,
.viewer-prev,
.viewer-next {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
}

.viewer-close:hover,
.viewer-prev:hover,
.viewer-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.viewer-close {
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.2rem;
}

.viewer-prev,
.viewer-next {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
}

.viewer-prev { left: 1rem; }
.viewer-next { right: 1rem; }

@media (max-width: 600px) {
  .location-post .location-title {
    font-size: 1.8rem;
  }

  /* Phones: just the big photo, with the count button to see the rest */
  .photo-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 260px;
  }

  .mosaic-main {
    grid-row: auto;
  }

  .mosaic-tile:not(.mosaic-main) {
    display: none;
  }

  .photo-viewer figure {
    max-width: 100vw;
  }

  .viewer-prev,
  .viewer-next {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

.location-post .location-hero + .photo-credit {
  margin: 0.35rem 0 0;
}

.location-post .location-summary {
  margin: 1rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.5;
  color: #3d4a55;
}

.location-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
  border-top: 1px solid #e5e9ec;
  border-bottom: 1px solid #e5e9ec;
  font-size: 0.95rem;
  color: #5a6c7d;
}

.location-facts .fact-rating {
  color: #a0611a;
  font-weight: 600;
}

.location-facts a {
  color: #2c5530;
  font-weight: 600;
  text-decoration: none;
}

.location-facts a:hover {
  text-decoration: underline;
}

.location-post section {
  margin: 0 0 2.25rem;
}

.location-post section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  color: #2c5530;
}

.location-post .location-tips {
  padding: 1.25rem 1.5rem;
  background: #f1f6f1;
  border-left: 4px solid #2c5530;
  border-radius: 0 8px 8px 0;
}

.location-post .tips-list {
  margin: 0;
}

.location-post .tips-list li {
  padding: 0.3rem 0 0.3rem 1.75rem;
}

.location-post .location-description {
  line-height: 1.75;
  color: #2f3b45;
}

.location-post .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0;
}

.location-post .gallery-item {
  margin: 0;
}

.location-post .gallery-item img {
  height: 160px;
}

.location-post .visit-history h2:before {
  content: none;
}

.visit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.visit-item {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid #e5e9ec;
}

.visit-item:first-child {
  border-top: none;
  padding-top: 0;
}

.visit-item time {
  font-weight: 600;
  color: #2c5530;
}

.visit-body p {
  margin: 0 0 0.4rem;
  color: #2f3b45;
}

.visit-more summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: #5a6c7d;
}

.visit-more p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #5a6c7d;
}

.visit-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c5530;
}

.location-post .location-nav {
  padding-top: 1rem;
  border-top: 1px solid #e5e9ec;
}

@media (max-width: 600px) {
  .location-post {
    padding: 1rem;
  }

  .location-post .location-hero {
    height: 240px;
  }

  .location-post .location-hero h1,
  .location-post .location-header > h1 {
    font-size: 1.75rem;
  }

  .visit-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Five-star rating (partials/stars.njk) */
.stars {
  display: inline-flex;
  gap: 0.05em;
  font-size: 1.05em;
  line-height: 1;
  white-space: nowrap;
}

.stars .star {
  color: #d5d9dd;
}

.stars .star-full {
  color: #e0a526;
}

.stars .star-half {
  background: linear-gradient(90deg, #e0a526 50%, #d5d9dd 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stars .stars-number {
  margin-left: 0.35em;
  font-size: 0.9em;
  font-weight: 600;
  color: #a0611a;
}

.location-post .location-map-link {
  margin: 0.75rem 0 0;
}

.location-post .location-map-link a {
  font-weight: 600;
  color: #2c5530;
  text-decoration: none;
}

.location-post .location-map-link a:hover {
  text-decoration: underline;
}

/* Small "?" that reveals a note on hover, tap, or keyboard focus */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  color: #8a99a6;
  cursor: help;
}

.info-tip-icon {
  width: 100%;
  height: 100%;
}

.info-tip:hover,
.info-tip:focus {
  color: #2c5530;
  outline: none;
}

.info-tip:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(44, 85, 48, 0.35);
}

.info-tip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  background: #1f2a33;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.info-tip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #1f2a33;
}

.info-tip:hover .info-tip-text,
.info-tip:focus .info-tip-text,
.info-tip:focus-within .info-tip-text {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .info-tip-text {
    left: auto;
    right: -0.5rem;
    transform: none;
  }

  .info-tip-text::after {
    left: auto;
    right: 0.85rem;
  }
}

/* Ben's Take scores (location-pages.njk) */
.location-post .take-scores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  list-style: none;
  border-bottom: 1px solid #d4e2d5;
}

.location-post .take-scores li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-post .take-label {
  min-width: 6.25rem;
  font-weight: 600;
  color: #2c5530;
}

.location-post .take-scores .stars-number {
  color: #a0611a;
}

/* 404 page */
.not-found { padding: 2rem 1rem 4rem; text-align: center; }
.not-found > p { margin-bottom: 1.5rem; }
.not-found-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.5rem; }
.not-found-links a { font-weight: 600; }

/* Linked stat tiles and section counts */
.level-stat {
  color: inherit;
  text-decoration: none;
}

.level-stat:hover h3 {
  text-decoration: underline;
}

.level-count {
  font-size: 1rem;
  font-weight: 500;
  color: #5a6c7d;
  margin-left: 0.5rem;
}

.location-section[id] {
  scroll-margin-top: 5rem;
}

/* Pin color legend under maps that color pins by category */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: #495057;
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.map-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
}
