/* =========================================
   SINGLE HIKE PAGE
   ========================================= */

/* Hero actions */
.hero-wrap .lh-favorite-btn,
.hero-wrap .lh-compare-btn{
  position: absolute;
  top: 14px;
  z-index: 5;
}

.hero-wrap .lh-favorite-btn{ right: 14px; }
.hero-wrap .lh-compare-btn{ right: 60px; }

.hero-wrap .lh-favorite-btn,
.hero-wrap .lh-compare-btn{
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(17,24,39,.35);
  color: #fff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  font-size: 18px;
  line-height: 1;
}

.hero-wrap .lh-favorite-btn:hover,
.hero-wrap .lh-compare-btn:hover{
  background: rgba(17,24,39,.55);
}

.hero-wrap .lh-favorite-btn.is-favorited{
  background: rgba(239,68,68,.9);
  border-color: rgba(239,68,68,.9);
}

.rating-summary{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.write-review-link{
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
}

.write-review-link:hover{
  text-decoration: none;
}

/* Main article sections */
.anchor-block + .anchor-block{
  margin-top: 22px;
}

/* Sidebar TOC */
.toc-list li + li{
  margin-top: 2px;
}

.toc-list a{
  display: block;
  padding: 6px 0;
  line-height: 1.35;
}

/* Widgets on hike pages */
.sidebar .widget + .widget{
  margin-top: 16px;
}

/* Stay section */
#stay.card{
  padding: 18px;
}

/* Gallery */
.lh-gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lh-gallery-item{
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  aspect-ratio: 1 / 1;
}

.lh-gallery-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.lh-gallery-item:hover .lh-gallery-thumb{
  transform: scale(1.03);
}

/* Lightbox */
.lh-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lh-lightbox[hidden]{
  display: none;
}

.lh-lightbox__figure{
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: 92vw;
}

.lh-lightbox__img{
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lh-lightbox__caption{
  color: rgba(255,255,255,.85);
  font-size: 14px;
  text-align: center;
}

.lh-lightbox__close{
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 36px;
  line-height: 1;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.lh-lightbox__close:hover{
  opacity: .8;
}

.lh-lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(17,24,39,.35);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lh-lightbox__nav:hover{
  background: rgba(17,24,39,.55);
}

.lh-lightbox__nav--prev{ left: 14px; }
.lh-lightbox__nav--next{ right: 14px; }

/* GPX card */
.gpx-card{
  padding: 16px;
}

.gpx-card .gpx-title{
  font-weight: 800;
  font-size: 1.15rem;
}

/* Carousel */
.lh-carousel{
  position: relative;
  overflow: hidden;
}

.lh-carousel__track{
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}

.lh-carousel__slide{
  min-width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.lh-carousel__slide figure{
  margin: 0;
}

.lh-carousel__slide img{
  display: block;
}

.lh-carousel .hero-img{
  width: 100%;
  height: 50vh;
  object-fit: cover;
}

.lh-carousel__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(17,24,39,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lh-carousel__btn:hover{
  background: rgba(17,24,39,.55);
}

.lh-carousel__btn--prev{ left: 12px; }
.lh-carousel__btn--next{ right: 12px; }

.lh-carousel__dots{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.lh-carousel__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.35);
  cursor: pointer;
}

.lh-carousel__dot[aria-selected="true"]{
  background: #fff;
}

/* Reviews tweak */
.glsr-summary-rating,
.glsr-summary-average{
  display: none !important;
}

@media (max-width: 980px){
  .lh-gallery-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 640px){
  .hero-wrap .lh-favorite-btn{
    right: 12px;
    top: 12px;
  }

  .hero-wrap .lh-compare-btn{
    right: 56px;
    top: 12px;
  }

  .hero-wrap .lh-favorite-btn,
  .hero-wrap .lh-compare-btn{
    width: 36px;
    height: 36px;
  }

  .rating-summary{
    gap: 8px;
  }

  .lh-gallery-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .lh-lightbox__nav{
    width: 42px;
    height: 42px;
  }
}

/* Keep single hike hero below fixed header */
body.single-hike .hero-wrap{
  margin-top: 24px;
}

@media (max-width: 640px){
  body.single-hike .hero-wrap{
    margin-top: 12px;
  }
}