/**
 * SR-118 — Tour image display presets (card / hero / gallery) + tourism layouts.
 * Applied via body classes: sr-img-card--*, sr-img-hero--*, sr-img-gallery--*
 * Does not restyle .sr-tour-facts (owned by SR-112b).
 */

/* ——— Card media (sitewide .sr-card__media) ——— */
body.sr-has-image-presets.sr-img-card--cover-16-10 .sr-card__media,
body.sr-has-image-presets.sr-img-card--cover-16-10 .sr-card__media img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}
body.sr-has-image-presets.sr-img-card--cover-4-3 .sr-card__media,
body.sr-has-image-presets.sr-img-card--cover-4-3 .sr-card__media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}
body.sr-has-image-presets.sr-img-card--square .sr-card__media,
body.sr-has-image-presets.sr-img-card--square .sr-card__media img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}
body.sr-has-image-presets.sr-img-card--cinematic-21-9 .sr-card__media,
body.sr-has-image-presets.sr-img-card--cinematic-21-9 .sr-card__media img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 40%;
}
body.sr-has-image-presets.sr-img-card--portrait-4-5 .sr-card__media,
body.sr-has-image-presets.sr-img-card--portrait-4-5 .sr-card__media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}
body.sr-has-image-presets.sr-img-card--soft-contain .sr-card__media {
  aspect-ratio: 16 / 10;
  background: #f0f2f4;
}
body.sr-has-image-presets.sr-img-card--soft-contain .sr-card__media img {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ——— Tour hero / featured (classic crops) ——— */
body.sr-is-tour.sr-img-hero--cover-16-9 .sr-tour-featured {
  aspect-ratio: 16 / 9;
}
body.sr-is-tour.sr-img-hero--cover-16-9 .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--cover-16-9 .sr-tour-featured img {
  object-fit: cover;
  object-position: center;
}
body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-featured {
  aspect-ratio: 21 / 9;
  max-height: min(52vh, 560px);
}
body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-featured img {
  object-fit: cover;
  object-position: center 35%;
}
body.sr-is-tour.sr-img-hero--cover-3-2 .sr-tour-featured {
  aspect-ratio: 3 / 2;
}
body.sr-is-tour.sr-img-hero--cover-3-2 .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--cover-3-2 .sr-tour-featured img {
  object-fit: cover;
}
body.sr-is-tour.sr-img-hero--tall-4-5 .sr-tour-featured {
  aspect-ratio: 4 / 5;
  max-height: min(70vh, 720px);
  max-width: 640px;
  margin-inline: auto;
}
body.sr-is-tour.sr-img-hero--tall-4-5 .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--tall-4-5 .sr-tour-featured img {
  object-fit: cover;
  object-position: center top;
}
body.sr-is-tour.sr-img-hero--immersive-full .sr-tour-featured {
  aspect-ratio: auto;
  min-height: min(58vh, 640px);
  max-height: 72vh;
}
body.sr-is-tour.sr-img-hero--immersive-full .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--immersive-full .sr-tour-featured img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center 35%;
}
body.sr-is-tour.sr-img-hero--soft-contain .sr-tour-featured {
  aspect-ratio: 16 / 9;
  background: #eef1f3;
}
body.sr-is-tour.sr-img-hero--soft-contain .sr-tour-featured__img,
body.sr-is-tour.sr-img-hero--soft-contain .sr-tour-featured img {
  object-fit: contain;
  object-position: center;
}

/* ——— SR-118 tourism hero: Hero Slider ——— */
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider {
  position: relative;
  margin: 0 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #0f2a2e;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 640px);
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #123;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__nav--prev { left: 0.65rem; }
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__nav--next { right: 0.65rem; }
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.7rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider__dot.is-active {
  background: #fff;
  width: 18px;
}
/* Hide classic featured/gallery when slider owns the media */
body.sr-is-tour.sr-img-hero--hero-slider article > .sr-tour-featured:not(.sr-tour-hero-slider__slide),
body.sr-is-tour.sr-img-hero--hero-slider article > .sr-tour-gallery {
  display: none;
}

/* ——— SR-122 tourism hero: Featured+Thumbs → full-width carousel (sharp, no gutter) ——— */
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
  box-sizing: border-box;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__stage,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__stage,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__main,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__main {
  position: relative;
  margin: 0;
  width: var(--sr-hero-main-w, 100%) !important;
  max-width: 100%;
  /* Desktop: standard 16:9 box so cover crops less of typical tour photos */
  aspect-ratio: var(--sr-hero-main-aspect, 16 / 9);
  height: var(--sr-hero-main-h, auto);
  max-height: var(--sr-hero-main-max-h, none);
  border-radius: 12px 12px 4px 4px;
  overflow: hidden;
  background: #1a5a64;
  box-sizing: border-box;
}
@media (min-width: 782px) {
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__main,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__main {
    /* Prefer aspect-driven height on PC; ignore short clamp heights that over-crop */
    height: auto !important;
    aspect-ratio: var(--sr-hero-main-aspect, 16 / 9);
    max-height: min(620px, 56vw);
  }
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide img,
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__main img,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__main img,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__slide img {
    object-fit: cover;
    object-position: center center;
  }
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important; /* beat .sr-tour-featured 16/9 so the stage is not 60vh+photo */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 0;
  background: transparent;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide img,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__main img,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__main img,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  /* Egypt landmarks sit mid-frame — bias off pure sky */
  object-position: center 35%;
  display: block;
  filter: none !important;
  -webkit-filter: none !important;
  transform: none !important;
  opacity: 1 !important;
}
/* SR-153 — premium frosted/brand full-circle carousel chevrons */
.sr-tour-carousel__nav,
body.sr-is-tour .sr-tour-carousel__nav,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  box-sizing: border-box !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1.5px solid rgba(26, 90, 100, 0.48) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  color: #1a5a64 !important;
  cursor: pointer;
  font-size: 1.55rem !important;
  font-weight: 700;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(15, 28, 34, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
body.sr-is-tour .sr-tour-carousel__nav--prev,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav--prev,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav--prev { left: 0.85rem; }
body.sr-is-tour .sr-tour-carousel__nav--next,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav--next,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav--next { right: 0.85rem; }
body.sr-is-tour .sr-tour-carousel__nav:hover,
body.sr-is-tour .sr-tour-carousel__nav:focus-visible,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav:hover,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav:focus-visible,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav:hover,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav:focus-visible {
  background: #1a5a64 !important;
  color: #ffffff !important;
  border-color: #36d2d3 !important;
  box-shadow: 0 10px 28px rgba(26, 90, 100, 0.42), 0 0 0 1px rgba(54, 210, 211, 0.35);
  transform: translateY(-50%) scale(1.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Full-width equal thumbs — no empty gutter beside strip */
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumbs,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__strip,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumbs,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  margin: 0;
  max-height: none !important;
  justify-content: stretch;
  align-items: stretch;
  box-sizing: border-box;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumb,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__thumb,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumb,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__thumb {
  margin: 0;
  padding: 0;
  border-style: solid !important;
  border-width: 2px !important;
  border-color: rgba(26, 90, 100, 0.22) !important;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: clamp(56px, 9vw, 78px);
  flex: 1 1 0;
  aspect-ratio: auto;
  cursor: pointer;
  background: #e8f0ef;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumb:focus-visible,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__thumb:focus-visible,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumb:focus-visible,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__thumb:focus-visible {
  outline: 2px solid #1a5a64;
  outline-offset: 2px;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumb.is-active,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__thumb.is-active,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumb.is-active,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__thumb.is-active {
  border-color: #0c7a7b !important;
  border-top-color: #0c7a7b !important;
  border-right-color: #0c7a7b !important;
  border-bottom-color: #0c7a7b !important;
  border-left-color: #0c7a7b !important;
  outline: 2px solid #0c7a7b;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px #1a5a64;
}
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumb img,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__thumb img,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumb img,
body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__thumb img {
  width: 100%;
  height: 100%;
  max-height: none !important;
  object-fit: cover;
  display: block;
  filter: none !important;
}
/* Hide classic featured/gallery siblings when tourism head owns media */
body.sr-is-tour.sr-img-hero--featured-thumbs article > .sr-tour-featured:not(.sr-tour-featured-thumbs__main):not(.sr-tour-carousel__slide),
body.sr-is-tour.sr-img-hero--featured-thumbs article > .sr-tour-gallery,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-hero-unit > .sr-tour-featured:not(.sr-tour-featured-thumbs__main):not(.sr-tour-carousel__slide),
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-hero-unit > .sr-tour-gallery {
  display: none;
}
/* SR-120 — absorbed tourism images marked in body (progressive; PHP also skips leftover restore) */
body.sr-is-tour.sr-img-hero--featured-thumbs .entry-content > figure[data-sr-absorbed-hero],
body.sr-is-tour.sr-img-hero--hero-slider .entry-content > figure[data-sr-absorbed-hero],
body.sr-is-tour.sr-img-hero--mosaic .entry-content > figure[data-sr-absorbed-hero] {
  display: none !important;
}
@media (max-width: 781px) {
  /* Cap tall CSF heroes (e.g. 90vh) on phones — tour-gallery-mobile.png was over-tall */
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__main,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__main {
    width: 100% !important;
    height: min(42vh, 300px) !important;
    max-height: 300px !important;
    aspect-ratio: 4 / 3;
    border-radius: 10px 10px 2px 2px;
  }
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__thumb,
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-featured-thumbs__thumb,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__thumb,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-featured-thumbs__thumb {
    height: clamp(48px, 14vw, 64px);
  }
  body.sr-is-tour .sr-tour-carousel__nav,
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__nav,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__nav {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 1.35rem !important;
  }
}

/* ——— SR-118 / SR-128c tourism hero: Mosaic (explicit hero wins over Auto row) ——— */
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic,
body.sr-is-tour [data-sr-tour-hero-mosaic] {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  grid-auto-rows: minmax(120px, 17vw);
  gap: 0.45rem;
  margin: 0 0 1rem;
  width: 100%;
  max-width: 100%;
}
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic > figure,
body.sr-is-tour [data-sr-tour-hero-mosaic] > figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
  min-height: 110px;
  width: 100%;
  max-width: 100%;
  position: relative;
}
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic > figure:first-child,
body.sr-is-tour [data-sr-tour-hero-mosaic] > figure:first-child {
  grid-row: span 2;
  min-height: 240px;
}
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic img,
body.sr-is-tour [data-sr-tour-hero-mosaic] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
/* Main mosaic cell — stronger subject bias (landmarks, not sky-only) */
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic > figure:first-child img,
body.sr-is-tour [data-sr-tour-hero-mosaic] > figure:first-child img {
  object-position: center 35%;
}
/* gallery_display skins gap only — never flatten hero mosaic to equal-row */
body.sr-is-tour.sr-img-hero--mosaic.sr-img-gallery--grid-even .sr-tour-hero-mosaic,
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic--preset-grid-even {
  gap: 4px;
}
body.sr-is-tour.sr-img-hero--mosaic.sr-img-gallery--mosaic-dense .sr-tour-hero-mosaic,
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic--preset-mosaic-dense {
  gap: 2px;
}
body.sr-is-tour.sr-img-hero--mosaic article > .sr-tour-featured:not(.sr-tour-hero-mosaic figure),
body.sr-is-tour.sr-img-hero--mosaic article > .sr-tour-gallery:not(.sr-tour-hero-mosaic),
body.sr-is-tour:has([data-sr-tour-hero-mosaic]) article > .sr-tour-featured:not(.sr-tour-hero-mosaic figure),
body.sr-is-tour:has([data-sr-tour-hero-mosaic]) article > .sr-tour-gallery:not([data-sr-tour-hero-mosaic]) {
  display: none;
}

/* ——— Gallery layouts ——— */
body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.55rem;
}
body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-gallery figure:first-child {
  grid-row: span 2;
}
body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(110px, 18vw);
  gap: 0.45rem;
}
body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-gallery figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-gallery figure {
  flex: 0 0 min(72vw, 280px);
  scroll-snap-align: start;
  margin: 0;
  aspect-ratio: 4 / 3;
}
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-gallery figure:first-child {
  grid-row: auto;
  flex-basis: min(85vw, 360px);
}
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
/* Filmstreifen lead frame — landmark bias */
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-gallery figure:first-child img {
  object-position: center 35%;
}

body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-gallery figure {
  margin: 0;
  aspect-ratio: 1 / 1;
}
body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-gallery figure:first-child {
  grid-row: auto;
  grid-column: span 2;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  justify-self: center;
  width: 100%;
}
body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.sr-is-tour.sr-img-gallery--cinematic-row .sr-tour-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
body.sr-is-tour.sr-img-gallery--cinematic-row .sr-tour-gallery figure {
  margin: 0;
  aspect-ratio: 21 / 9;
}
body.sr-is-tour.sr-img-gallery--cinematic-row .sr-tour-gallery figure:first-child {
  grid-row: auto;
  aspect-ratio: 21 / 9;
}
body.sr-is-tour.sr-img-gallery--cinematic-row .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-gallery figure {
  margin: 0;
  aspect-ratio: 4 / 3;
}
body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-gallery figure:first-child {
  grid-row: auto;
  grid-column: auto;
}
body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery-only featured-thumbs: restyle classic featured+gallery pair */
body.sr-is-tour.sr-img-gallery--featured-thumbs:not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider):not(.sr-img-hero--mosaic) article > .sr-tour-featured {
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
body.sr-is-tour.sr-img-gallery--featured-thumbs:not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider):not(.sr-img-hero--mosaic) article > .sr-tour-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0.45rem;
}
body.sr-is-tour.sr-img-gallery--featured-thumbs:not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider):not(.sr-img-hero--mosaic) article > .sr-tour-gallery figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
}
body.sr-is-tour.sr-img-gallery--featured-thumbs:not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider):not(.sr-img-hero--mosaic) article > .sr-tour-gallery figure:first-child {
  grid-row: auto;
  grid-column: auto;
}
body.sr-is-tour.sr-img-gallery--featured-thumbs:not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider):not(.sr-img-hero--mosaic) article > .sr-tour-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-gallery,
  body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-gallery,
  body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic,
  body.sr-is-tour [data-sr-tour-hero-mosaic] {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(96px, 28vw);
  }
  body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-gallery figure:first-child,
  body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-gallery figure:first-child,
  body.sr-is-tour.sr-img-hero--mosaic .sr-tour-hero-mosaic > figure:first-child,
  body.sr-is-tour [data-sr-tour-hero-mosaic] > figure:first-child {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 10;
    min-height: 160px;
  }
  body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-featured {
    aspect-ratio: 16 / 9;
    max-height: none;
  }
  body.sr-is-tour.sr-img-hero--tall-4-5 .sr-tour-featured {
    max-width: none;
  }
  body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-gallery figure:first-child {
    max-width: none;
  }
  body.sr-is-tour.sr-img-hero--hero-slider .sr-tour-hero-slider {
    aspect-ratio: 16 / 10;
    max-height: none;
  }
}

/* Admin CSF image_select: slightly larger thumbs for readability */
.csf-field-image_select .csf--image-group .csf--image figure {
  max-width: 160px;
}
.csf-field-image_select .csf--image-group .csf--image img {
  width: 140px;
  height: auto;
  border-radius: 6px;
}


/* ——— SR-122 count-based Auto | Mosaic | Carousel ——— */
/* SR-122b — contain cells in tracks (aspect-ratio+min-height was
   expanding width past grid columns → 3rd image overlapped H1/meta). */

/* SR-125c — gallery fills hero unit width (no inset gutter) */
body.sr-is-tour .sr-tour-hero-unit[data-sr-tour-hero-unit] {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}
body.sr-is-tour .sr-tour-hero-unit > .sr-tour-count-gallery {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
}
body.sr-is-tour .sr-tour-hero-unit > .sr-tour-count-gallery .sr-tour-count-gallery__cell {
  border-radius: 4px;
}
body.sr-is-tour .sr-tour-hero-unit > .entry-header {
  padding: 0.85rem 1rem 0.55rem; /* SR-126 title first */
}
body.sr-is-tour .sr-tour-meta[data-sr-tour-meta] {
  margin-top: 0.85rem;
}

body.sr-is-tour .sr-tour-count-gallery {
  --sr-gal-gap: 3px; /* SR-126 tight collage */
  --sr-gal-radius: 6px; /* SR-126 unified collage */
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 1rem;
  overflow: hidden;
}
body.sr-is-tour .sr-tour-count-gallery__grid {
  display: grid;
  gap: var(--sr-gal-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
body.sr-is-tour .sr-tour-count-gallery__cell {
  position: relative;
  z-index: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--sr-gal-radius);
  background: #0f1c22;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
/* Neutralize legacy .sr-tour-featured / layout hero rules on gallery cells */
body.sr-is-tour .sr-tour-count-gallery__cell.sr-tour-featured,
body.sr-is-tour.sr-tour-layout .sr-tour-count-gallery__cell.sr-tour-featured,
body.sr-is-tour.sr-tour-layout .sr-tour-count-gallery__cell[data-sr-tour-featured],
body.sr-is-tour .sr-tour-hero-unit .sr-tour-count-gallery__cell.sr-tour-featured {
  max-height: none;
  max-width: 100%;
  width: 100%;
  margin: 0;
}
/* Beat .sr-tour-layout .sr-tour-featured { aspect-ratio:auto } (tour-page) */
/* SR-125c — landscape row cells (2-up); trio uses its own grid (no aspect-ratio width fight) */
body.sr-is-tour.sr-tour-layout .sr-tour-count-gallery--row .sr-tour-count-gallery__cell.sr-tour-featured,
body.sr-is-tour .sr-tour-count-gallery--row .sr-tour-count-gallery__cell.sr-tour-featured {
  aspect-ratio: 16 / 10 !important;
  max-height: none !important;
}
body.sr-is-tour.sr-tour-layout .sr-tour-count-gallery--single .sr-tour-count-gallery__cell.sr-tour-featured,
body.sr-is-tour .sr-tour-count-gallery--single .sr-tour-count-gallery__cell.sr-tour-featured {
  aspect-ratio: 16 / 9 !important;
  max-height: none !important;
}
body.sr-is-tour .sr-tour-count-gallery__cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  filter: none !important;
}
body.sr-is-tour .sr-tour-count-gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #fff;
  background: linear-gradient(transparent, rgba(8, 18, 22, 0.72));
}
body.sr-is-tour .sr-tour-count-gallery__more {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(8, 18, 22, 0.48);
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
}

/* 1 — single sharp hero */
body.sr-is-tour .sr-tour-count-gallery--single .sr-tour-count-gallery__grid {
  grid-template-columns: minmax(0, 1fr);
}
body.sr-is-tour .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
}

/* 2–3 — equal row: track width wins; height from aspect-ratio only
   (no min-height — that forced width = height×4/3 past the track) */
body.sr-is-tour .sr-tour-count-gallery--row .sr-tour-count-gallery__grid {
  grid-template-columns: repeat(var(--sr-gal-n, 3), minmax(0, 1fr));
  gap: 3px; /* SR-126b collage ≤4px */
  align-items: stretch;
  width: 100%;
}
body.sr-is-tour .sr-tour-count-gallery--row .sr-tour-count-gallery__cell {
  aspect-ratio: 4 / 3; /* equal cells — no sliver */
  min-height: 0;
  height: auto;
  width: 100%;
  max-width: 100%;
  border-radius: 4px;
}
body.sr-is-tour.sr-tour-layout .sr-tour-count-gallery--row .sr-tour-count-gallery__cell.sr-tour-featured,
body.sr-is-tour .sr-tour-count-gallery--row .sr-tour-count-gallery__cell.sr-tour-featured {
  aspect-ratio: 4 / 3 !important;
  max-height: none !important;
}

/* SR-125c — 3 images: large left + 2 stacked right, full column width, no empty gutter */
body.sr-is-tour .sr-tour-count-gallery--trio {
  max-height: none;
}
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3px; /* SR-126 collage ≤4px */
  width: 100%;
  min-height: clamp(280px, 34vw, 400px);
  max-height: min(52vh, 440px);
  align-items: stretch;
}
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__cell {
  aspect-ratio: auto;
  min-height: 0;
  height: auto;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
}
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__cell--hero,
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__cell.sr-tour-featured {
  grid-column: 1;
  grid-row: 1 / span 2;
  aspect-ratio: auto !important;
  max-height: none !important;
}
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__cell--stack:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}
body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__cell--stack:nth-of-type(3) {
  grid-column: 2;
  grid-row: 2;
}

/* 4–6 — bento: large left + stack right + bottom row w/ captions */
body.sr-is-tour .sr-tour-count-gallery--bento .sr-tour-count-gallery__grid,
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__grid {
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: minmax(140px, 20vw) minmax(140px, 20vw) minmax(110px, 15vw);
}
body.sr-is-tour .sr-tour-count-gallery--bento .sr-tour-count-gallery__cell--hero,
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--hero {
  grid-column: 1;
  grid-row: 1 / span 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento .sr-tour-count-gallery__cell--stack:nth-of-type(2),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--stack:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}
body.sr-is-tour .sr-tour-count-gallery--bento .sr-tour-count-gallery__cell--stack:nth-of-type(3),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--stack:nth-of-type(3) {
  grid-column: 2;
  grid-row: 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento .sr-tour-count-gallery__cell--bottom,
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--bottom {
  grid-row: 3;
}
/* Bottom row fills full width evenly (3 cells → 3 cols via subgrid-like spans) */
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__grid,
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__grid {
  grid-template-columns: 1.55fr 0.72fr 0.72fr;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--hero,
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--hero {
  grid-column: 1;
  grid-row: 1 / span 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--stack:nth-of-type(2),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--stack:nth-of-type(2) {
  grid-column: 2 / span 2;
  grid-row: 1;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--stack:nth-of-type(3),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--stack:nth-of-type(3) {
  grid-column: 2 / span 2;
  grid-row: 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--bottom:nth-of-type(4),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--bottom:nth-of-type(4) {
  grid-column: 1; grid-row: 3;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--bottom:nth-of-type(5),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--bottom:nth-of-type(5) {
  grid-column: 2; grid-row: 3;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="6"] .sr-tour-count-gallery__cell--bottom:nth-of-type(6),
body.sr-is-tour .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell--bottom:nth-of-type(6) {
  grid-column: 3; grid-row: 3;
}

/* 4 images: hero + 1 stack + 2 bottom */
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="4"] .sr-tour-count-gallery__grid {
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: minmax(150px, 22vw) minmax(150px, 22vw) minmax(110px, 14vw);
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="4"] .sr-tour-count-gallery__cell--hero {
  grid-column: 1; grid-row: 1 / span 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="4"] .sr-tour-count-gallery__cell--stack {
  grid-column: 2; grid-row: 1 / span 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="4"] .sr-tour-count-gallery__cell--bottom:nth-of-type(3) {
  grid-column: 1; grid-row: 3;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="4"] .sr-tour-count-gallery__cell--bottom:nth-of-type(4) {
  grid-column: 2; grid-row: 3;
}

/* 5 images: hero + 2 stack + 2 bottom spanning */
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__grid {
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: minmax(140px, 20vw) minmax(140px, 20vw) minmax(110px, 14vw);
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__cell--hero {
  grid-column: 1; grid-row: 1 / span 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__cell--stack:nth-of-type(2) {
  grid-column: 2; grid-row: 1;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__cell--stack:nth-of-type(3) {
  grid-column: 2; grid-row: 2;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__cell--bottom:nth-of-type(4) {
  grid-column: 1; grid-row: 3;
}
body.sr-is-tour .sr-tour-count-gallery--bento[data-sr-gallery-count="5"] .sr-tour-count-gallery__cell--bottom:nth-of-type(5) {
  grid-column: 2; grid-row: 3;
}

/* Mobile: hide mosaic grid, show swipe carousel fallback */
body.sr-is-tour .sr-tour-count-gallery__mobile-carousel,
body.sr-is-tour .sr-tour-count-gallery > .sr-tour-carousel[data-sr-gallery-mobile-carousel] {
  display: none !important;
}
@media (max-width: 781px) {
  body.sr-is-tour .sr-tour-count-gallery:not(.sr-tour-count-gallery--carousel):not(.sr-tour-count-gallery--single) .sr-tour-count-gallery__grid {
    display: none;
  }
  body.sr-is-tour .sr-tour-count-gallery:not(.sr-tour-count-gallery--carousel):not(.sr-tour-count-gallery--single) .sr-tour-count-gallery__mobile-carousel,
  body.sr-is-tour .sr-tour-count-gallery:not(.sr-tour-count-gallery--carousel):not(.sr-tour-count-gallery--single) > .sr-tour-carousel[data-sr-gallery-mobile-carousel] {
    display: block !important;
  }
  body.sr-is-tour .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
    min-height: clamp(220px, 38vh, 340px);
    border-radius: 12px;
  }
  body.sr-is-tour .sr-tour-count-gallery--row .sr-tour-count-gallery__grid,
  body.sr-is-tour .sr-tour-count-gallery--trio .sr-tour-count-gallery__grid {
    display: none;
  }
}

/* Hide legacy always-carousel featured-thumbs twin when count gallery owns media */
body.sr-is-tour:has([data-sr-tour-count-gallery]) article > .sr-tour-featured:not(.sr-tour-count-gallery__cell):not(.sr-tour-carousel__slide),
body.sr-is-tour:has([data-sr-tour-count-gallery]) article > .sr-tour-gallery:not([data-sr-tour-count-gallery]) {
  display: none !important;
}

/* ——— SR-128 — CSF image display → count-gallery DOM styles (gallery_mode owns structure) ——— */
body.sr-is-tour [data-sr-tour-count-gallery][data-sr-gallery-preset],
body.sr-is-tour [data-sr-tour-hero-slider][data-sr-hero-display] {
  --sr-csf-wire: 128;
}

/* Hero mosaic body class also skins count-gallery when crop/mode paths use it. */
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-count-gallery--row .sr-tour-count-gallery__cell,
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-count-gallery--bento .sr-tour-count-gallery__cell,
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell {
  border-radius: 6px;
  overflow: hidden;
}
body.sr-is-tour.sr-img-hero--mosaic .sr-tour-count-gallery--row .sr-tour-count-gallery__grid {
  gap: 3px; /* unified collage 2–4px; equal cells — no trio sliver */
}

/* Crop heroes on single-image count gallery */
body.sr-is-tour.sr-img-hero--cover-16-9 .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 16 / 9 !important;
}
body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 21 / 9 !important;
  max-height: min(52vh, 560px);
}
body.sr-is-tour.sr-img-hero--cinematic-21-9 .sr-tour-count-gallery--single .sr-tour-count-gallery__cell img {
  object-position: center 35%;
}
body.sr-is-tour.sr-img-hero--cover-3-2 .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 3 / 2 !important;
}
body.sr-is-tour.sr-img-hero--tall-4-5 .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 4 / 5 !important;
  max-width: 640px;
  margin-inline: auto;
}
body.sr-is-tour.sr-img-hero--immersive-full .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: auto !important;
  min-height: min(58vh, 640px);
  max-height: 72vh;
}
body.sr-is-tour.sr-img-hero--soft-contain .sr-tour-count-gallery--single .sr-tour-count-gallery__cell {
  aspect-ratio: 16 / 9 !important;
  background: #eef1f3;
}
body.sr-is-tour.sr-img-hero--soft-contain .sr-tour-count-gallery--single .sr-tour-count-gallery__cell img {
  object-fit: contain;
}

/* gallery_display skins count-gallery without fighting gallery_mode structure */
body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-count-gallery--row .sr-tour-count-gallery__grid,
body.sr-is-tour .sr-tour-count-gallery--preset-grid-even.sr-tour-count-gallery--row .sr-tour-count-gallery__grid {
  gap: 4px; /* measurable vs default 3px */
}
body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-count-gallery--row .sr-tour-count-gallery__grid,
body.sr-is-tour.sr-img-gallery--mosaic-dense .sr-tour-count-gallery--bento .sr-tour-count-gallery__grid,
body.sr-is-tour .sr-tour-count-gallery--preset-mosaic-dense .sr-tour-count-gallery__grid {
  gap: 2px;
}
body.sr-is-tour.sr-img-gallery--mosaic .sr-tour-count-gallery--row .sr-tour-count-gallery__grid,
body.sr-is-tour .sr-tour-count-gallery--preset-mosaic.sr-tour-count-gallery--row .sr-tour-count-gallery__grid {
  gap: 3px;
}
body.sr-is-tour.sr-img-gallery--stacked-square .sr-tour-count-gallery--row .sr-tour-count-gallery__cell,
body.sr-is-tour .sr-tour-count-gallery--preset-stacked-square.sr-tour-count-gallery--row .sr-tour-count-gallery__cell {
  aspect-ratio: 1 / 1; /* still equal heights — no sliver */
}
body.sr-is-tour.sr-img-gallery--cinematic-row .sr-tour-count-gallery--row .sr-tour-count-gallery__cell img,
body.sr-is-tour .sr-tour-count-gallery--preset-cinematic-row .sr-tour-count-gallery__cell img {
  object-position: center 35%;
}
/* Filmstrip thumbs — fit strip width; NEVER show native horizontal scrollbar */
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-count-gallery--carousel .sr-tour-carousel__thumbs,
body.sr-is-tour .sr-tour-count-gallery--preset-filmstrip.sr-tour-count-gallery--carousel .sr-tour-carousel__thumbs,
body.sr-is-tour.sr-img-hero--featured-thumbs.sr-img-gallery--filmstrip .sr-tour-carousel__thumbs,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-count-gallery--preset-filmstrip .sr-tour-carousel__thumbs,
html body.sr-is-tour .sr-tour-carousel__thumbs {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: stretch !important;
  align-items: stretch;
  gap: 0.35rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scroll-snap-type: none !important;
  -webkit-overflow-scrolling: auto;
}
html body.sr-is-tour .sr-tour-carousel__thumbs::-webkit-scrollbar,
body.sr-is-tour .sr-tour-count-gallery--preset-filmstrip .sr-tour-carousel__thumbs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
body.sr-is-tour.sr-img-hero--featured-thumbs.sr-img-gallery--filmstrip .sr-tour-carousel__thumb,
body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-count-gallery--preset-filmstrip .sr-tour-carousel__thumb,
body.sr-is-tour.sr-img-gallery--filmstrip .sr-tour-count-gallery--carousel .sr-tour-carousel__thumb,
body.sr-is-tour .sr-tour-count-gallery--preset-filmstrip.sr-tour-count-gallery--carousel .sr-tour-carousel__thumb,
html body.sr-is-tour .sr-tour-carousel__thumbs .sr-tour-carousel__thumb {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  scroll-snap-align: none;
}

/* Also map legacy gallery_display rules onto classic .sr-tour-gallery when still present */
body.sr-is-tour.sr-img-gallery--grid-even .sr-tour-gallery {
  --sr-csf-gallery-display: grid-even;
}


/* SR-128c — gallery_display grid-even skins gap on mosaic-more ONLY when hero is NOT mosaic.
   Explicit hero mosaic uses .sr-tour-hero-mosaic; Auto equal-row / grid-even must not flatten it. */
body.sr-is-tour.sr-img-gallery--grid-even:not(.sr-img-hero--mosaic):not(.sr-img-hero--featured-thumbs):not(.sr-img-hero--hero-slider) .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__grid,
body.sr-is-tour:not(.sr-img-hero--mosaic) .sr-tour-count-gallery--preset-grid-even.sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__grid {
  gap: 4px;
}
body.sr-is-tour.sr-img-gallery--grid-even:not(.sr-img-hero--mosaic) .sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell,
body.sr-is-tour:not(.sr-img-hero--mosaic) .sr-tour-count-gallery--preset-grid-even.sr-tour-count-gallery--mosaic-more .sr-tour-count-gallery__cell {
  min-width: 0;
  min-height: 110px;
  width: 100%;
  max-width: 100%;
}


/* ——— SR-186 — Hub page featured (Astra) crop / Soft contain ———
 * Hubs use .ast-single-post-featured-section / .wp-post-image, not .sr-tour-featured.
 * Tourism layouts (slider / thumbs / mosaic) stay tour-only.
 */
body.sr-is-hub.sr-img-hero--cover-16-9 .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--cover-16-9 .post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
body.sr-is-hub.sr-img-hero--cover-16-9 .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--cover-16-9 .post-thumb img,
body.sr-is-hub.sr-img-hero--cover-16-9 .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
body.sr-is-hub.sr-img-hero--cinematic-21-9 .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--cinematic-21-9 .post-thumb {
  aspect-ratio: 21 / 9;
  max-height: min(52vh, 560px);
  overflow: hidden;
}
body.sr-is-hub.sr-img-hero--cinematic-21-9 .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--cinematic-21-9 .post-thumb img,
body.sr-is-hub.sr-img-hero--cinematic-21-9 .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
body.sr-is-hub.sr-img-hero--cover-3-2 .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--cover-3-2 .post-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
body.sr-is-hub.sr-img-hero--cover-3-2 .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--cover-3-2 .post-thumb img,
body.sr-is-hub.sr-img-hero--cover-3-2 .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.sr-is-hub.sr-img-hero--tall-4-5 .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--tall-4-5 .post-thumb {
  aspect-ratio: 4 / 5;
  max-height: min(70vh, 720px);
  max-width: 640px;
  margin-inline: auto;
  overflow: hidden;
}
body.sr-is-hub.sr-img-hero--tall-4-5 .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--tall-4-5 .post-thumb img,
body.sr-is-hub.sr-img-hero--tall-4-5 .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
body.sr-is-hub.sr-img-hero--immersive-full .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--immersive-full .post-thumb {
  aspect-ratio: auto;
  min-height: min(58vh, 640px);
  max-height: 72vh;
  overflow: hidden;
}
body.sr-is-hub.sr-img-hero--immersive-full .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--immersive-full .post-thumb img,
body.sr-is-hub.sr-img-hero--immersive-full .wp-post-image {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center 35%;
}
body.sr-is-hub.sr-img-hero--soft-contain .ast-single-post-featured-section,
body.sr-is-hub.sr-img-hero--soft-contain .post-thumb,
body.sr-is-hub.sr-img-hero--soft-contain .site-content .ast-single-post-featured-section {
  aspect-ratio: 16 / 9 !important;
  background: #eef1f3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
body.sr-is-hub.sr-img-hero--soft-contain .ast-single-post-featured-section img,
body.sr-is-hub.sr-img-hero--soft-contain .post-thumb img,
body.sr-is-hub.sr-img-hero--soft-contain .wp-post-image,
body.sr-is-hub.sr-img-hero--soft-contain .site-content .ast-single-post-featured-section img {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}


/* ——— SR-189 — mobile tour carousel: stage + filmstrip must not stack full-size ——— */
@media (max-width: 781px) {
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour.sr-img-gallery--featured-thumbs .sr-tour-carousel__stage,
  body.sr-is-tour .sr-tour-count-gallery--carousel .sr-tour-carousel__stage {
    position: relative !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: min(52vw, 280px) !important;
    overflow: hidden !important;
    border-radius: 12px 12px 4px 4px;
  }
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide,
  body.sr-is-tour .sr-tour-count-gallery--carousel .sr-tour-carousel__slide {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
  }
  body.sr-is-tour.sr-img-hero--featured-thumbs .sr-tour-carousel__slide:not(.is-active),
  body.sr-is-tour .sr-tour-count-gallery--carousel .sr-tour-carousel__slide:not(.is-active) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  html body.sr-is-tour .sr-tour-carousel__thumbs,
  body.sr-is-tour .sr-tour-count-gallery--preset-filmstrip .sr-tour-carousel__thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.35rem !important;
    width: 100% !important;
    max-height: 72px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    margin-top: 0.45rem !important;
  }
  html body.sr-is-tour .sr-tour-carousel__thumbs .sr-tour-carousel__thumb,
  body.sr-is-tour .sr-tour-count-gallery--preset-filmstrip .sr-tour-carousel__thumb {
    flex: 0 0 auto !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 88px !important;
    height: 56px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }
  html body.sr-is-tour .sr-tour-carousel__thumbs .sr-tour-carousel__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  body.sr-is-tour .sr-tour-carousel__nav {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 1.25rem !important;
  }
}
