/* S6 Responsive Stability — v1, 15 Nov 2026.
   Layout-only overrides. Preserves the master header, booking interactions,
   pricing, carousel behavior, branding, colors and image source paths. */
:root { --s6-card-rail-width: clamp(232px, 22vw, 280px); }
html { max-width: 100%; overflow-x: clip; }
body { max-width: 100%; min-width: 0; }
[hidden] { display: none !important; }
:where(main, section, article, aside, header, footer, .container, .section, .section-head,
  .footer-inner, .s6-footer-inner, .footer-grid, .s6-master-header, .s6m-inner,
  .activity-grid, .results-grid, .blog-grid, .related-grid, .gallery-grid,
  .detail-layout, .detail-main, .detail-side, .layout, .stack, .summary,
  .hero-photo, .hero-search-wrap, .search-bar-wrap, .s6-category-links) {
  min-width: 0;
  box-sizing: border-box;
}
:where(img, video, iframe, svg) { max-width: 100%; }
:where(input, select, textarea) { min-width: 0; }
:where(h1, h2, h3, h4, p, .uae-card-title, .blog-card-body, .article-body, .detail-section) { overflow-wrap: break-word; }

/* CRITICAL: an activity rail may never allow its image's intrinsic size to
   determine the width/height of a card. This is the large-image regression. */
.marquee { display: block; position: relative; max-width: calc(100% + 40px); min-width: 0; }
.marquee-track { display: flex !important; flex-wrap: nowrap !important; align-items: stretch;
  width: max-content; max-width: none; min-width: 0; gap: clamp(12px, 1.5vw, 24px); }
.marquee-track > .uae-card,
.marquee-track > .s6-whole-activity-card,
.marquee-track > .card {
  display: flex; flex-direction: column; flex: 0 0 var(--s6-card-rail-width) !important;
  width: var(--s6-card-rail-width) !important; min-width: 0 !important;
  max-width: var(--s6-card-rail-width) !important;
  height: auto; align-self: stretch;
}
/* In case old HTML temporarily renders a raw image in the rail, bound it too. */
.marquee-track > img { width: var(--s6-card-rail-width) !important;
  max-width: var(--s6-card-rail-width) !important; height: auto;
  max-height: 210px; object-fit: cover; flex: none; }
.uae-card, .card, .activity-authority-card { min-width: 0; max-width: 100%; }
.uae-card-media, .card-media {
  display: block; flex: 0 0 auto; position: relative; width: 100%;
  min-width: 0; max-width: 100%; height: auto; aspect-ratio: 4 / 3;
  overflow: hidden; contain: layout paint;
}
.uae-card-media > img, .card-media > img {
  display: block; position: absolute; inset: 0;
  width: 100% !important; height: 100% !important; max-width: 100%;
  object-fit: cover; object-position: center;
}
.uae-card-body, .card-body, .uae-card-actions { min-width: 0; }
.uae-card-body { flex: 1 1 auto; }
.uae-card-actions { display: flex; }
.uae-card-actions > * { min-width: 0; }
.s6cc-ready > .s6cc-controls { width: 100%; max-width: 100%; }

/* Width containment without changing content order or section visibility. */
.container { width: 100%; max-width: var(--container, 1128px); margin-inline: auto; }
.section-head { min-width: 0; }
.activity-grid, .results-grid, .similar-grid, .guides-grid, .cat-grid,
.musttodo-grid, .blog-grid, .related-grid, .s6-category-links {
  min-width: 0; max-width: 100%;
}
/* Fallback sizing for dynamic catalog results, including first-paint cards. */
.results-grid { display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 280px));
  justify-content: center; }
.activity-grid > *, .results-grid > *, .similar-grid > *,
.blog-grid > *, .related-grid > *, .s6-category-links > * { min-width: 0; }
.hero-photo { width: 100%; max-width: 100%; }
.hero-photo .hero-slide, .hero-slideshow .hero-slide {
  object-fit: cover; object-position: center;
}
.chip-row, .theme-tabs, .review-filter-row { max-width: 100%; overflow-x: auto; }
.gallery-grid, .gallery-wrap, .gallery-main, .gallery-side, .detail-layout { max-width: 100%; }
.gallery-main img, .gallery-side img, .blog-card-media img, .article-image img {
  max-width: 100%; object-fit: cover;
}
.article-body img, .article-body video, .article-body iframe { height: auto; max-width: 100%; }
.article-body pre, .article-body table { max-width: 100%; overflow-x: auto; }
.article-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.s6-master-header { width: 100%; max-width: 100%; }
.s6m-inner { width: 100%; max-width: min(1480px, 100%); }
.s6m-search-shell, .s6m-search-form, .s6m-search-form input { min-width: 0; }
.s6m-mobile-nav { max-width: 100vw; }

/* Checkout safely stacks form and summary on tablets and phones. */
@media (max-width: 999px) {
  .detail-layout, .layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .detail-side, .summary { position: static !important; }
  .blog-grid, .related-grid, .s6-category-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner, .s6-footer-inner, .footer-grid { max-width: 100%; }
}
@media (max-width: 767px) {
  :root { --s6-card-rail-width: min(78vw, 282px); }
  .container { max-width: 100%; padding-inline: 16px; }
  .marquee { max-width: calc(100% + 32px); }
  .marquee-track { gap: 12px; }
  .activity-grid, .results-grid, .similar-grid, .guides-grid,
  .blog-grid, .related-grid, .s6-category-links,
  .cat-grid, .musttodo-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .footer-inner, .s6-footer-inner, .footer-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .uae-card-actions { gap: 8px; }
  .uae-card-actions .btn { min-width: 0; white-space: normal; }
  .hero-search-wrap, .search-bar-wrap { width: 100%; max-width: 100%; }
  .hero-search, .search-bar, .hero-search input, .search-bar input { min-width: 0; }
  .mobile-book-bar { box-sizing: border-box; max-width: 100vw; }
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .ticket-row > *, .payment-option > *, .card-body > * { min-width: 0; }
  .blog-hero h1, .article-head h1, .detail-title-wrap h1 { overflow-wrap: anywhere; }
}
@media (max-width: 390px) {
  .container { padding-inline: 12px; }
  .marquee { max-width: calc(100% + 24px); }
  .uae-card-actions .btn { padding-inline: 7px; font-size: .82rem; }
  .s6m-search-form { max-width: 100%; }
}
@media (min-width: 1600px) {
  .container { max-width: min(var(--container, 1320px), calc(100% - 48px)); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .s6cc-controls, .s6m-search-shell { scroll-behavior: auto; }
}
