/* Page background / layout for this section */
.trail-main {
  min-height: 60vh;
  padding: clamp(3rem, 8vh, 5rem) 5vw;
  background:
    radial-gradient(circle at top left,
      rgba(255,255,255,.06),
      transparent 55%)
    , var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card container (matches “Your stay includes” look) */
.trail-card {
  background: rgba(25, 32, 39, .96);
  color: var(--text);
  max-width: 940px;
  width: 100%;
  padding: clamp(2.5rem, 4vw, 3.5rem);
  border-radius: 24px;
  box-shadow: 0 26px 60px var(--shadow);
  position: relative;
}

/* Heading */
.trail-card h2 {
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

.trail-card h2::after {
  content: "";
  display: block;
  width: 85%;
  height: 3px;
  margin-top: .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
}

/* Body copy */
.trail-card p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 60rem;
}

/* Inline paragraph links (one spot after each paragraph) */
.trail-text-link {
  display: inline-block;
  margin-top: .4rem;
  font-size: .9rem;
  color:#0ea5e9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trail-text-link:hover {
  opacity: .8;
}

/* CTA area */
.trail-card-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Pill button styled like “Enquire Today” */
.trail-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 2.8rem;
  border-radius: 999px;
  background: #ffffff;
  color: #333333;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  border: 0;
  cursor: pointer;
  transition:
    transform var(--speed) ease,
    box-shadow var(--speed) ease,
    background var(--speed) ease;
}

.trail-map-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.45);
}

.trail-map-button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 12px rgba(0,0,0,.35);
}

/* Small-screen tweak */
@media (max-width: 600px) {
  .trail-card {
    padding: 2rem 1.5rem;
  }
}
/* ===== Uniform-height, expandable gallery (images + videos) ===== */

.gallery-grid{ display: grid;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--row);  /* every tile same height */
  grid-auto-flow: dense;       /* packs items tightly */
  gap: var(--gap);
  max-width: 1240px;
  margin: clamp(8px,1vw,16px) auto;
  padding: 0 clamp(14px,2vw,24px);
}

/* Mobile: single column & shorter rows */
@media (max-width: 699px){
  .gallery-grid{
    grid-template-columns: 1fr;
    grid-auto-rows: 350px;     /* tweak mobile tile height here */
  }
}

/* Base tile */
.gallery-grid .tile{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;            /* good backdrop for videos */
  grid-row: span 1;
  min-width: 0;                /* prevent overflow in grid */
  cursor: zoom-in;
}

/* Media in tiles: images + videos share layout rules */
.gallery-grid .tile > img{
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fills tile, cropping when needed */
  object-position: center center;
  display: block;
  transform: scale(1.001);
  transition: transform .35s ease;
}
.gallery-grid .tile > video{
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fills tile, cropping when needed */
  object-position: center center;
  display: block;
  transform: scale(1.75);
  transition: transform .35s ease;
}

/* Hover zoom (desktop) */
.gallery-grid .tile:hover > img,
.gallery-grid .tile:hover > video{
  transform: scale(1.03);
}

/* Caption bar */
.gallery-grid .tile figcaption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(12px,1.2vw,20px) clamp(14px,1.6vw,24px);
  color: #fff;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  font-size: clamp(1rem, .45vw + 1rem, 1.125rem);
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
  pointer-events: none; /* don’t block clicks on tile */
}

/* Width utilities (desktop/tablet) */
@media (min-width: 700px){
  .gallery-grid .w-12{ grid-column: span 12; }
  .gallery-grid .w-8 { grid-column: span 8;  }
  .gallery-grid .w-7 { grid-column: span 7;  }
  .gallery-grid .w-6 { grid-column: span 6;  }
  .gallery-grid .w-5 { grid-column: span 5;  }
  .gallery-grid .w-4 { grid-column: span 4;  }
}

/* Mobile: all tiles full width */
@media (max-width: 699px){
  .gallery-grid .tile{ grid-column: 1 / -1; }
}

/* Optional: make the whole tile a link if you use .tile-link */
.gallery-grid .tile .tile-link{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

/* Keyboard focus ring for accessibility */
.gallery-grid .tile .tile-link:focus-visible{
  outline: 3px solid #5aa9ff;
  outline-offset: 3px;
  border-radius: inherit;
}

/* ===== Expanded / fullscreen view ===== */

.gallery-grid .tile.is-expanded{
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(0,0,0,.95);
  display: block;
  cursor: zoom-out;
}

/* Media when expanded: show full image/video (no cropping) */
.gallery-grid .tile.is-expanded > img,
.gallery-grid .tile.is-expanded > video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  transition: none;
}

/* Caption in expanded view */
.gallery-grid .tile.is-expanded figcaption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
  padding: clamp(12px,1.2vw,20px) clamp(14px,1.6vw,24px);
  text-align: center;
  color: #fff;
  pointer-events: none;
}

/* Disable body scroll while an item is expanded */
body.no-scroll{
  overflow: hidden;
}

/* Respect reduced motion users */
@media (prefers-reduced-motion: reduce){
  .gallery-grid .tile > img,
  .gallery-grid .tile:hover > img,
  .gallery-grid .tile > video,
  .gallery-grid .tile:hover > video{
    transition: none;
  }
}



