.post-place-filler {
  background: none !important;
  pointer-events: none;
  user-select: none;
  color: transparent;
}

/* Clean styling for Parks Peaks & Paths */
:root {
  --primary-green: #2d5016;
  --accent-green: #4a7c2c;
  --border-green: #6b9b37;
  --text-dark: #1f3d1f;
  --text-light: #666;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);

  /* Aliases for detail pages */
  --primary-color: #2d5016;
  --accent-color: #4a7c2c;
  --light-green: #81a16d;
  --text-color: #333;
  --bg-color: #f8f9fa;
  --border-color: #dee2e6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: #f8f9fa;
}

body.home {
  background: #f8f9fa;
}

/* Hero Header */
.hero {
  background: linear-gradient(to right, var(--primary-green), var(--accent-green));
  padding: .8rem 1.3rem;
  color: var(--white);
  border-bottom: 3px solid var(--border-green);
}

@media (max-width: 640px) {
  .hero {
    padding: 0.45rem 1rem 0.65rem;
  }
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-title-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.hero-title-link:hover h1 {
  opacity: 0.8;
}

.hero h1 {
  font-size: clamp(2.5rem, 2vw, 3rem);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.subtitle {
  font-size: 1.7rem;
  max-width: 700px;
  line-height: 1;
  opacity: 0.9;
  margin-top: 0;
  margin-bottom: 0.75rem;
  position: relative;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.subtitle a {
  color: inherit;
  text-decoration: none;
}

.subtitle a:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* Intro Section (mobile only) */
.intro-section {
  width: 100%;
  margin: 0 auto 2rem auto;
  display: block;
}

@media (min-width: 768px) {
  .intro-section { display: none; }
}

.intro-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.intro-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}

.intro-content p:last-child {
  margin-bottom: 0;
}

/* Home full-bleed */
.home-fullbleed {
  width: 100%;
  position: relative;
  background: var(--primary-green);
}

.home-fullbleed__img {
  width: 100%;
  height: auto;
  display: block;
}

.home-fullbleed__overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1.25rem;
}

.home-fullbleed__overlay-inner {
  width: 65%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  bottom: 2dvh;
  position: absolute;
}

.home-fullbleed__overlay-inner p:first-child {
  font-weight: 600;
}

.home-fullbleed__overlay-inner p {
  color: var(--text-dark);
  font-size: clamp(0.9rem, 1.1vw, 1.5rem);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .home-fullbleed__overlay {
    bottom: clamp(1.25rem, 5vh, 5rem);
    padding-left: clamp(0.75rem, 2vw, 1.25rem);
    padding-right: clamp(0.75rem, 2vw, 1.25rem);
  }

  .home-fullbleed__overlay-inner {
    padding: clamp(0.85rem, 2vw, 1.25rem);
    position: static;
  }
}

@media (max-width: 768px) {
  .nav-word {
    display: none;
  }
}

@media (min-width: 1800px) {
  .home-fullbleed__overlay {
    bottom: clamp(6rem, 12vh, 14rem);
  }
}

@media (max-width: 640px) {
  .home-fullbleed__overlay {
    bottom: 0.75rem;
    padding: 0 0.75rem;
  }

  .home-fullbleed__overlay-inner {
    width: 95%;
    padding: 0.9rem 1rem;
  }

  .home-fullbleed__overlay-inner p {
    font-size: clamp(0.85rem, 3.2vw, 0.98rem);
    line-height: 1.5;
    margin-bottom: 0.6rem;
  }
}

.home-fullbleed__overlay-inner p:last-child {
  margin-bottom: 0;
}

/* Below-image intro (used on mobile) */
#home-intro-below {
  background: var(--primary-green);
  margin: 0;
  padding: 1rem 0 1.5rem;
}

#home-intro-below .intro-content {
  padding: 0 1.25rem;
}

#home-intro-below .intro-content p {
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
  .home-fullbleed__overlay { display: none; }

  #home-intro-below {
    background: #fff;
    padding: 1.25rem 0 1.5rem;
  }

  #home-intro-below .intro-content p {
    color: var(--text-dark);
  }
}

/* Map Section */
.map-section {
  position: relative;
  height: 80vh;
  max-height: 800px;
  min-height: 600px;
  padding: 0.5rem 0;
  background: transparent;
}

#map {
  max-width: 1400px;
  width: calc(100% - 3rem);
  height: 80vh;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.65);
}

@media (max-width: 768px) {
  .map-section {
    padding: 0.75rem 0;
    background: #fff;
  }

  #map {
    width: calc(100% - 1.25rem);
    max-width: none;
    border-radius: 12px;
    height: 60vh;
    max-height: 600px;
  }
}

/* Custom Leaflet Marker Styles */
.custom-marker {
  background: none;
  border: none;
}

.marker-pin {
  width: 20px;
  height: 28px;
  background: var(--accent-green);
  border-radius: 50% 50% 50% 0;
  position: relative;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.marker-pin::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--white);
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
}

/* Tooltips */
.leaflet-tooltip {
  background-color: var(--primary-green) !important;
  color: var(--white) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  box-shadow: var(--shadow) !important;
  border: none !important;
}

.leaflet-tooltip-top::before {
  border-top-color: var(--primary-green) !important;
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.leaflet-popup-content h3 {
  color: var(--primary-green);
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.leaflet-popup-content h3 a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.2s;
}

.leaflet-popup-content h3 a:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

.leaflet-popup-content p {
  color: var(--text-dark);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 8px 0;
}

.leaflet-popup-content .post-count {
  color: var(--text-light);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 8px;
}

.post-count a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
}

.post-count a:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero { padding: 1rem 1rem; }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .subtitle { 
    font-size: 1.3rem; 
    margin-bottom:0;
  }

  .meta {
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .map-section {
    height: 40vh;
    min-height: 260px;
  }
}

/* Destination Detail Pages */
.detail-header {
  background: linear-gradient(to right, var(--primary-green), var(--accent-green));
  padding: 1.5rem;
  color: var(--white);
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Scope this so it doesn't get overridden by the generic .back-link later */
.detail-header .back-link {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  align-self: flex-start;
}

.detail-header .back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.detail-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: var(--white);
  text-align: center;
}

.location-meta {
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: center;
  color: var(--white);
}

/* Destination Splash Pages (tile grid) */
.destination-splash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem 0;
}

.splash-card-link {
  text-decoration: none;
  color: inherit;
}

.splash-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 120ms ease, box-shadow 120ms ease;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem;
}

.splash-card-left .splash-card-date{
  display:none;
}

.splash-card-link:hover .splash-card {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}

.splash-card-media {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
}

.splash-card-thumb {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: #f1f3f5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.splash-card-thumb--empty {
  background: repeating-linear-gradient(
    45deg,
    #f1f3f5,
    #f1f3f5 10px,
    #e9ecef 10px,
    #e9ecef 20px
  );
}

.splash-card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.1rem 0.1rem 0.1rem 0;
}

.splash-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
}

.splash-card-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

.splash-card-index {
  color: var(--text-light);
  font-size: 0.85rem;
  white-space: nowrap;
}

.splash-card-place {
  color: var(--text-dark);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
}

.splash-card-preview {
  color: var(--text-dark);
  font-size: 0.98rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  /* one tile per row */
  .destination-splash-grid {
    grid-template-columns: 1fr !important;
  }

  .splash-card-left .splash-card-date{
    display:block !important;
 }
  .splash-card-date--right{
    display:none !important;
  }

  /* Keep the card as a row (image left, content right) */
  .splash-card {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.9rem;
  }

  /* Left column: image only */
  .splash-card-media {
    flex: 0 0 auto;
    margin: 0;
  }

  .splash-card-thumb {
    width: 105px;
    height: 105px;
    display: block;
  }

  /* Right column: date + title on one line, then preview */
  .splash-card-place {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
  }

  .splash-card-date {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    margin: 0;
  }

  /* Make date + title sit inline */
  .splash-card-date,
  .splash-card-place {
    display: inline;
  }


  /* preview drops below that line */
  .splash-card-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
  }

  .splash-card-preview {
    display: block;
    margin-top: 0.35rem;
  }
}

/* Detail Page Layout */
.detail-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: .8rem 0rem;
}

/* Destination Navigation (centered using spacers) */
.destination-navigation {
  max-width: 1250px;                 /* match your detail-container vibe */
  margin: 0 auto 1rem;
  padding: 0 1.25rem;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.nav-spacer {
  display: block;
}

.prev-destination,
.back-to-map,
.next-destination {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.prev-destination { justify-self: start; }
.back-to-map      { justify-self: center; opacity: 0.9; }
.next-destination { justify-self: end; }

/* Hover: no underline, just subtle “button” affordance */
.prev-destination:hover,
.back-to-map:hover,
.next-destination:hover {
  background: rgba(45, 80, 22, 0.08);
  opacity: 1;
}

/* Back to Destination link */
.back-to-map {
  display: inline-block;
  color: var(--primary-green);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s;
  text-align: center;
  opacity: 0.85;
}

.back-to-map:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Post Navigator */
.post-navigator {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem 1.25rem;
}

@media (max-width: 768px) {
  .post-navigator {
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    padding: 0.7rem;
    margin: 0;
  }
}

.nav-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.nav-prev { justify-self: start; }
.nav-back { justify-self: center; }
.nav-next { justify-self: end; }

.nav-controls > :first-child { justify-self: start; }
.nav-controls > :nth-child(2) { justify-self: center; }
.nav-controls > :last-child { justify-self: end; }

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover:not(.disabled) {
  color: var(--accent-color);
  text-decoration: underline;
}

.nav-link.disabled {
  color: var(--border-color);
  cursor: not-allowed;
  pointer-events: none;
}

.post-counter {
  display: block;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  text-align: right;
  min-width: 120px;
}

.post-date,
.post-counter {
  opacity: 0.85;
}

.post-view {
  display: flex;
  flex-direction: column;
}

/* Post intro above photos */
.post-intro {
  margin-bottom: 1rem;
  order: 3;
}

.post-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  width: 100%;
  position: relative;
}

.post-place-name {
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
  text-align: center;
  display: block;
}

.post-date {
  display: block;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  text-align: left;
  min-width: 120px;

  position: static; /* IMPORTANT: removes your old absolute positioning */
}

.post-text-intro {
  color: var(--text-color);
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-wrap;
  order: 3;
}

.post-content-section {
  color: var(--text-color);
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-wrap;
  order: 5;
  padding-top: 0;
  margin-top: 0;
}


/* Photo Gallery - Main viewer with arrows */
.photo-gallery-main {
  order: 4;
  position: relative;
  margin-bottom: 2rem;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

@media (max-width: 768px) {
  .photo-gallery-main {
    order: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1rem;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .post-intro { order: 2; }
}

.photo-viewer {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-slide {
  display: block;
  max-width: 100%;
  padding: 0.5rem;
  text-align: center;
}

.photo-image-container {
  position: relative;
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  line-height: 0;
}

.photo-slide img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}

.photo-caption {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 1rem;
  background: #81a16d;
  color: #fff;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  border-radius: 8px 8px 0 0;
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 80, 22, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.photo-nav:hover {
  background: rgba(45, 80, 22, 0.8);
  transform: translateY(-50%) scale(1.06);
}

.photo-prev { left: 10px; }
.photo-next { right: 10px; }

.photo-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(45, 80, 22, 0.70);
  color: rgba(255,255,255,0.95);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* ===== Mobile fixes for post page ===== */
@media (max-width: 640px) {

  /* Make the post nav use 2 rows:
     Row 1: Prev | Next
     Row 2: Back to Destination centered */

  .photo-nav{
    background: none; 
    width: 25px;
    height: 25px;
  }

  .nav-link {
    font-size: 0.9rem;
    line-height: 1.15;
    white-space: normal; /* allow wrap naturally */
  }

  /* Post header: put date & counter on one row, place name full width below */
  .post-header {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "place place"
      "date counter";
    gap: 0.25rem 0.75rem;
    margin-bottom: 0;
  }

  .post-date {
    grid-area: date;
    min-width: 0;
    font-size: 0.95rem;
  }

  .post-counter {
    grid-area: counter;
    min-width: 0;
    font-size: 0.95rem;
    text-align: right;
  }

  .post-place-name {
    grid-area: place;
    font-size: 1.15rem;   /* down from 1.3rem */
    line-height: 1.2;
    margin-top: 0.25rem;
    padding: 0 0.25rem;
    text-wrap: balance;   /* nicer multi-line titles (supported in modern browsers) */
  }

  /* Slightly tighten padding so content breathes on small screens */
  .post-navigator {
    padding: 0.8rem;
  }

  /* Keep the photo counter from drifting too low on very short screens */
  .photo-counter {
    bottom: 0.75rem;
    background: none;
  }
}

/* Old/legacy post page styles (kept in case used elsewhere) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  box-shadow: var(--shadow);
}

header h1 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 2px;
}

/* Generic back-link (non-detail-header contexts) */
.back-link {
  display: inline-block;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  margin-top: 8px;
}

.back-link:hover {
  text-decoration: underline;
}

.post-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.post-meta {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 16px;
}

.post-message {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.photo-item:hover {
  transform: scale(1.02);
}

.photo-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.lightbox-close:hover {
  color: #bbb;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 20px;
  user-select: none;
}

.lightbox-nav:hover {
  color: #bbb;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .photo-gallery { grid-template-columns: 1fr; }
  .container { padding: 12px; }
  .post-card { padding: 16px; }
}
