/* Final visual contract: stable natural ratios and centered mobile hero */
@media (max-width: 699px) {
  .hero__content { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
  .hero__english, .hero__arabic { width: 100%; align-self: center; justify-self: center; text-align: center; }
  .hero h1 { margin-inline: auto; text-align: center; }
  .hero__location { display: flex; width: fit-content; margin-inline: auto; }
  .hero__location::before { display: none; }
  .hero__subtitle { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  :is(.facts, .pool, .family, .booking-scene) h2 { max-width: 12ch; font-size: clamp(2.25rem, 10vw, 3.2rem); line-height: 1.12; }
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] { grid-auto-columns: 100%; gap: 0; padding-inline: 0; scroll-padding-inline: 0; }
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure { border-radius: 0; }
}

:is(.interior, .bedrooms, .bathrooms) { min-height: auto; overflow: hidden; }
.interior { padding: calc(var(--header-h) + 1.5rem) 0 calc(5.5rem + var(--safe-bottom)); background: var(--paper); color: var(--ink); }
.bedrooms { padding: calc(var(--header-h) + 1.5rem) 0 calc(5.5rem + var(--safe-bottom)); background: #121512; color: white; }
.bathrooms { padding: calc(var(--header-h) + 1.5rem) 0 calc(5.5rem + var(--safe-bottom)); background: var(--ivory); color: var(--ink); }
.interior .section-shell, .bathrooms .section-shell { position: relative; width: 100%; max-width: none; padding: 0; }
.interior .section-intro, .bedrooms > .section-shell--header, .bathrooms .section-intro { position: static; inset: auto; z-index: auto; width: min(100%, var(--shell)); max-width: none; margin-inline: auto; padding: 0 1.25rem 2rem; color: inherit; pointer-events: auto; }
.interior .section-intro > p:last-child, .bedrooms .section-intro > p:last-child, .bathrooms .section-intro > p:last-child { color: currentColor; opacity: .62; }
:is(.interior, .bedrooms, .bathrooms) h2 { max-width: 12ch; font-size: clamp(2.3rem, 10vw, 4.5rem); }
:is(.interior, .bedrooms, .bathrooms) [data-snap-rail] { width: 100%; height: auto; display: grid; grid-template-columns: none; grid-template-rows: auto; grid-auto-flow: column; grid-auto-columns: calc(100% - 2.5rem); gap: .75rem; margin: 0; padding: 0 1.25rem; overflow-x: auto; overflow-y: hidden; scroll-padding-inline: 1.25rem; scroll-snap-type: x mandatory; direction: rtl; overflow-anchor: none; }
:is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure { position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 3; margin: 0; border-radius: 1.1rem; overflow: hidden; background: #222722; transform: none; scroll-snap-align: start; scroll-snap-stop: always; }
:is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure::before, :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure::after { display: none; }
:is(.interior, .bedrooms, .bathrooms) [data-snap-rail] img { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: inherit; background: #222722; }
:is(.bedrooms, .bathrooms) figcaption { display: none; }
:is(.interior, .bathrooms) .section-shell > .rail-controls, .bedrooms > .rail-controls { position: static; inset: auto; width: fit-content; margin: 1rem auto 0; }
:is(.interior, .bathrooms) .rail-controls button { border-color: var(--line); background: white; color: var(--ink); }
:is(.interior, .bathrooms) .rail-controls span { color: var(--muted); }
.bedrooms .rail-controls button { background: rgba(255,255,255,.06); }

.kitchen { min-height: auto; display: flex; flex-direction: column; align-items: stretch; padding: calc(var(--header-h) + 1.5rem) 0 calc(5.5rem + var(--safe-bottom)); background: #121512; }
.kitchen__copy { position: relative; inset: auto; order: 1; width: min(100%, var(--shell)); min-height: 0; margin-inline: auto; padding: 0 1.25rem 2rem; text-shadow: none; }
.kitchen__media { position: relative; inset: auto; order: 2; width: calc(100% - 2.5rem); min-height: 0; margin-inline: auto; aspect-ratio: 4 / 3; border-radius: 1.1rem; overflow: hidden; }
.kitchen__media img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: inherit; }
.kitchen > .scene__shade { display: none; }
.kitchen-gallery { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 0; margin: 0; padding: 0; overflow-x: auto; overflow-y: hidden; direction: rtl; scroll-snap-type: x mandatory; scroll-padding-inline: 0; scrollbar-width: none; }
.kitchen-gallery::-webkit-scrollbar { display: none; }
.kitchen-gallery figure { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; background: #222722; scroll-snap-align: start; scroll-snap-stop: always; }
.kitchen-gallery img { width: 100%; height: 100%; display: block; object-fit: cover; }

@media (min-width: 700px) {
  .interior .section-intro, .bedrooms > .section-shell--header, .bathrooms .section-intro, .kitchen__copy { padding-inline: 2.5rem; }
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] { grid-auto-columns: min(72vw, 58rem); padding-inline: 2.5rem; scroll-padding-inline: 2.5rem; }
  :is(.interior, .bathrooms) .section-shell > .rail-controls, .bedrooms > .rail-controls { margin-inline: 2.5rem; }
  .kitchen__media { width: calc(100% - 5rem); }
  .kitchen-gallery { grid-auto-columns: min(72vw, 58rem); gap: .75rem; padding-inline: 2.5rem; scroll-padding-inline: 2.5rem; }
}

/* Only the opening hero is centered on mobile; every following section reads RTL from the top */
main > section:not(.hero) :is(.section-intro, .scene-copy, .kitchen__copy, .booking-scene__inner) {
  direction: rtl;
  text-align: right;
  align-items: flex-start;
}

main > section:not(.hero) :is(.section-intro, .scene-copy, .kitchen__copy, .booking-scene__inner) > :is(h2, p, strong) {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

:is(.pool, .family) .scene-copy {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc(var(--header-h) + 1rem);
  padding-bottom: calc(7rem + var(--safe-bottom));
}

.family .scene-copy strong { margin-top: 1.4rem; font-size: .82rem; font-weight: 550; }
.family .scene__shade { background: linear-gradient(180deg, rgba(5,7,5,.4) 0%, rgba(5,7,5,.14) 48%, rgba(5,7,5,.54) 100%); }
.family :is(h2, strong) { color: white; }
.family .scene-copy > p:not(.chapter) { color: rgba(255,255,255,.88); }

.booking-scene__inner {
  justify-content: flex-start;
  padding-top: calc(var(--header-h) + 1rem);
  padding-bottom: calc(7rem + var(--safe-bottom));
}

.scene-copy__notes { justify-content: flex-start; }

.facts { align-items: flex-start; }
.facts .section-shell { padding-top: calc(var(--header-h) + 1rem); }

:is(.facts, .pool, .family, .booking-scene) .scene__shade {
  background: linear-gradient(180deg, rgba(5,7,5,.58) 0%, rgba(5,7,5,.32) 46%, rgba(5,7,5,.68) 100%);
}

.location { background: #1d2a21; }
.location__layout { gap: 2rem; }
.location .section-intro > p:last-child { color: rgba(255,255,255,.82); }
.location__card { display: flex; flex-direction: column; gap: 0; padding-block: 0; }
.location__card .location-link { min-height: 4.2rem; flex: 0 0 4.2rem; grid-column: auto; }

.site-footer { padding-bottom: calc(8.5rem + var(--safe-bottom)); text-align: center; }
.site-footer .brand--footer { width: fit-content; margin-inline: auto; }
.site-footer > p { margin-inline: auto; }
.site-footer .footer-links { justify-content: center; }

.rail-controls { display: flex; justify-content: center; width: fit-content; }
.rail-controls [data-snap-count] { display: block; min-width: 5.5rem; text-align: center; }

.interior [data-snap-rail] > figure, .kitchen__media { aspect-ratio: 3 / 2; }

.booking-calendar__days {
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-flow: row;
  gap: .35rem;
  overflow-x: hidden;
}
.booking-calendar__days button { min-width: 0; height: 4.35rem; }
.booking-calendar__days button small { color: #6a5220; font-size: .68rem; font-weight: 650; }
.booking-calendar__days button.is-selected small { color: rgba(255,255,255,.86); }

.booking-scene .scene__shade { background: linear-gradient(180deg, rgba(5,7,5,.48), rgba(5,7,5,.18) 46%, rgba(5,7,5,.62)); }
.booking-scene :is(h2, p) { color: white; }

@media (max-width: 699px) {
  .pool h2 { width: 100%; max-width: 100%; font-size: clamp(2rem, 9vw, 2.6rem); }
  .amenities .section-intro h2, .faq .section-intro h2 { color: #171b17; }
}

/* Center the minimal opening composition at every viewport size */
.hero__content { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero__english { width: 100%; align-self: center; justify-self: center; text-align: center; }
.hero h1 { margin-inline: auto; text-align: center; }

.family .scene__shade { background: linear-gradient(180deg, rgba(5,7,5,.4) 0%, rgba(5,7,5,.14) 48%, rgba(5,7,5,.54) 100%); }
.site-footer small { direction: ltr; display: inline-block; color: rgba(255,255,255,.55); }
main > section[id] { scroll-margin-top: var(--header-h); }
:is(.interior, .bathrooms, .amenities, .faq) .chapter { color: #6a5220; }
.app-dock :is(.sticky-booking__quick, .sticky-booking__main) { min-height: 3.75rem; }
.app-dock :is(.sticky-booking__quick, .sticky-booking__main) span { font-size: .7rem; line-height: 1.25; }
.site-footer :is(a, button) { min-height: 2.75rem; display: inline-flex; align-items: center; }
.site-footer .developer-credit {
  width: fit-content;
  min-height: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .45rem;
  margin: 1.1rem auto 0;
  color: rgba(255,255,255,.62);
  font-size: .66rem;
  letter-spacing: .02em;
  transition: color var(--fast) ease;
}
.site-footer .developer-credit strong { color: var(--gold); font-weight: 600; direction: ltr; }
.site-footer .developer-credit:hover { color: white; }

@media (min-width: 700px) {
  .sticky-booking.app-dock { left: 50%; right: auto; transform: translateX(-50%); }
  :is(.interior, .bathrooms) .section-shell > .rail-controls, .bedrooms > .rail-controls { margin-inline: auto; }
}

/* Compact section rhythm: no artificial blank panels between image stories */
:is(.interior, .bedrooms, .bathrooms, .kitchen) { padding-block: 2.25rem 1.75rem; }
.interior .section-intro, .bedrooms > .section-shell--header, .bathrooms .section-intro, .kitchen__copy { padding-bottom: 1.25rem; }
.rail-controls {
  position: relative !important;
  z-index: 8;
  inset: auto !important;
  display: flex !important;
  width: fit-content !important;
  height: 0;
  margin: -1.4rem auto 0 !important;
  padding: 0 !important;
  transform: translateY(-.1rem);
  pointer-events: none;
}
.rail-controls [data-snap-count] {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: .3rem .45rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(7,9,7,.38);
  box-shadow: 0 .2rem .8rem rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
}
.rail-controls [data-snap-count] i {
  width: .3rem;
  height: .3rem;
  display: block;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  transition: width .25s ease, background .25s ease;
}
.rail-controls [data-snap-count] i.is-active { width: .9rem; background: white; }
:is(.amenities, .location, .faq) .section-shell { padding-block: 4rem; }

@media (max-width: 699px) {
  .kitchen__media { width: 100%; border-radius: 0; }
  .kitchen__media img { border-radius: 0; }
}

@media (min-width: 700px) {
  :is(.interior, .bedrooms, .bathrooms, .kitchen) { padding-block: 4rem 3rem; }
  :is(.amenities, .location, .faq) .section-shell { padding-block: 6rem; }
}

@media (max-width: 699px) {
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] {
    grid-auto-columns: 100% !important;
    gap: 0 !important;
    padding-inline: 0 !important;
    scroll-padding-inline: 0 !important;
  }
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure { border-radius: 0 !important; }
}

.facts .fact {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: .5rem;
}
.facts .fact > span { flex: 0 0 auto; }
.facts .fact > strong { flex: 0 1 auto; }
.pricing-glass strong { direction: ltr; unicode-bidi: isolate; justify-self: start; }
.booking-policy { margin: .65rem 0 1rem; padding: .8rem 1rem; border-radius: .85rem; background: rgba(29,42,32,.08); color: var(--olive); font-size: .72rem; font-weight: 550; line-height: 1.7; }
#booking-title:focus, .booking-step h2:focus { outline: none; }

@media (max-width: 699px) {
  :is(.interior, .bedrooms, .bathrooms, .kitchen) { padding-bottom: 0 !important; }
}

@media (max-width: 699px) {
  :is(.interior, .bedrooms, .bathrooms, .kitchen) { padding-top: 1.5rem !important; }
  .kitchen { gap: 0; }
  .kitchen__copy { padding-bottom: 1.75rem; }
  .kitchen__media { margin-bottom: 0 !important; }
  :is(.amenities, .location, .faq) .section-shell { padding-block: 2rem; }
  .amenities__layout, .faq__layout { gap: 2rem; }
  .location__layout { gap: 1.5rem; }
}

.amenities .section-intro {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center !important;
  text-align: center !important;
}
.amenities .section-intro :is(.chapter, h2) { margin-inline: auto !important; text-align: center !important; }
.amenities__grid > div {
  align-items: center;
  justify-content: center;
  gap: .75rem;
  text-align: center;
}
.amenities__grid svg { flex: 0 0 auto; margin-inline: auto; }
.amenities__grid span { width: 100%; text-align: center; }

.facts .section-intro, .pool .scene-copy {
  align-items: center !important;
  text-align: center !important;
}
.facts .section-intro :is(.chapter, h2), .pool .scene-copy > :is(.chapter, h2, p) {
  margin-inline: auto !important;
  text-align: center !important;
}
.facts .fact { justify-content: center; text-align: center; }
.pricing-glass > div { justify-items: center; text-align: center; }
.pricing-glass strong { justify-self: center; }
.pool .scene-copy__notes { width: 100%; justify-content: center; }

main > section:not(.hero) :is(.section-intro, .scene-copy, .kitchen__copy) {
  align-items: center !important;
  text-align: center !important;
}
main > section:not(.hero) :is(.section-intro, .scene-copy, .kitchen__copy) > :is(.chapter, h2, p, strong) {
  margin-inline: auto !important;
  text-align: center !important;
}
.location-link { justify-content: center; text-align: center; }
.faq summary { position: relative; justify-content: center; padding-inline: 2rem; text-align: center; }
.faq summary::after { position: absolute; inset-inline-end: .25rem; }
.faq details p { text-align: center; }

.rail-controls { margin: -1.8rem auto 0 !important; }
.rail-controls [data-snap-count] {
  gap: .35rem;
  direction: rtl;
  padding: .25rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.rail-controls [data-snap-count] i {
  width: .32rem;
  height: .32rem;
  background: rgba(255,255,255,.58);
  box-shadow: 0 1px 5px rgba(0,0,0,.65);
}
.rail-controls [data-snap-count] i.is-active { width: .38rem; height: .38rem; background: white; }

.faq .section-intro {
  align-items: flex-start !important;
  text-align: right !important;
}
.faq .section-intro :is(.chapter, h2) { margin-inline: 0 !important; text-align: right !important; }
.faq summary { justify-content: space-between; padding-inline: 0; text-align: right; }
.faq summary::after { position: static; }
.faq details p { text-align: right; }

/* Art-directed Arabic titles: a wider first line and a shorter closing line */
.title-pyramid { display: grid; justify-items: center; width: fit-content; max-width: min(100%, 16ch) !important; margin-inline: auto !important; text-align: center !important; text-wrap: nowrap; }
.title-pyramid > span { display: block; white-space: nowrap; }
.title-pyramid__wide { word-spacing: .12em; transform: scaleX(1.035); transform-origin: center; }

/* Prices keep their visual order inside an RTL page */
.pricing-glass strong, [data-booking-price] { direction: ltr !important; unicode-bidi: isolate; }
.pricing-glass strong {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: .35rem;
}
.pricing-glass strong > b { order: 1; }
.pricing-glass strong > small { order: 2; }
[data-booking-price] { display: flex; flex-direction: row; align-items: baseline; gap: .35rem; }
[data-booking-price] > b { order: 1; font: inherit; }
[data-booking-price] > span { order: 2; color: var(--gold); font-size: .72rem; }

/* Dots live fully inside the image edge and never create a dark spacer */
.rail-controls { margin: -3rem auto 0 !important; transform: none !important; }
.rail-controls [data-snap-count] { height: 1.1rem; padding: .25rem !important; }

/* Consistent breathing room between stories without empty color panels */
@media (max-width: 699px) {
  :is(.interior, .bedrooms, .bathrooms, .kitchen) { padding-top: 2.5rem !important; }
  .interior .section-intro,
  .bedrooms > .section-shell--header,
  .bathrooms .section-intro,
  .kitchen__copy { padding-bottom: 2.25rem !important; }
  :is(.amenities, .location) .section-shell { padding-block: 3rem !important; }
  .faq .section-shell { padding-block: 3rem !important; }
  .title-pyramid { font-size: clamp(2.1rem, 9.2vw, 3rem) !important; line-height: 1.16; row-gap: .08em; }
  .facts .section-shell,
  :is(.pool, .family) .scene-copy { padding-top: calc(var(--header-h) + 2.25rem) !important; }
  .facts__layout { gap: 1.75rem; }
  :is(.interior, .bedrooms, .bathrooms) [data-snap-rail] > figure,
  .kitchen-gallery figure { aspect-ratio: 5 / 4 !important; }
}

/* Overlay indicators without shortening a section or overlapping the next one */
:is(.interior, .bathrooms) .section-shell > .rail-controls,
.bedrooms > .rail-controls,
.kitchen > .rail-controls {
  position: absolute !important;
  inset: auto auto 1rem 50% !important;
  width: fit-content !important;
  height: auto !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
}
.bedrooms, .kitchen { position: relative; }
.kitchen__copy { order: 0; }
.kitchen-gallery { order: 1; }
.kitchen > .rail-controls { order: 2; }

@media (max-width: 699px) {
  :is(.interior, .bathrooms) .section-shell > .rail-controls,
  .bedrooms > .rail-controls,
  .kitchen > .rail-controls { bottom: 8px !important; }

  /* Keep the longest Arabic heading inside narrow and extra-wide Galaxy screens */
  .interior .title-pyramid {
    width: calc(100% - 2rem);
    max-width: calc(100vw - 2rem) !important;
    font-size: clamp(1.75rem, 7.6vw, 2.35rem) !important;
  }
  .interior .title-pyramid__wide {
    max-width: 100%;
    transform: none;
    word-spacing: .06em;
  }
}

/* Section 11 is the only editorial exception: Arabic text stays right-aligned */
main > section.faq .section-intro { align-items: flex-start !important; text-align: right !important; }
main > section.faq .section-intro > :is(.chapter, h2) { margin-inline: 0 !important; text-align: right !important; }
main > section.faq summary { justify-content: space-between !important; padding-inline: 0 !important; text-align: right !important; }
main > section.faq details p { text-align: right !important; }

/* Desktop is art-directed separately; mobile rules above remain untouched */
@media (min-width: 1024px) {
  .site-header {
    direction: ltr;
    min-height: 5rem;
    padding-block: .85rem;
  }
  .site-header .brand { flex: 0 0 auto; gap: .9rem; }
  .site-header .brand__logo { width: 3.35rem; height: 3rem; }
  .site-header .brand__name { font-size: .76rem; letter-spacing: .21em; white-space: nowrap; }
  .site-header .site-menu {
    order: 2;
    margin-left: auto !important;
    margin-right: 0 !important;
    gap: clamp(1.75rem, 2.4vw, 3rem);
    direction: rtl;
  }
  .site-header .site-menu :is(a, .link-button) {
    min-height: 2.75rem;
    font-size: .78rem;
    white-space: nowrap;
  }
  .hero__content {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 7rem;
    padding-bottom: 5rem;
  }
  .hero__english { width: 100%; text-align: center; }
  .hero h1 {
    width: auto;
    max-width: none;
    margin-inline: auto;
    font-size: clamp(4.7rem, 7vw, 7.6rem);
    line-height: .92;
    letter-spacing: -.055em;
    text-align: center;
    white-space: nowrap;
  }
  .hero__english span { margin-top: 1.15rem; font-size: .68rem; letter-spacing: .32em; }
  .sticky-booking.app-dock { display: none !important; }

  /* Desktop stories use complete grids instead of phone-sized horizontal rails */
  :is(.interior, .bedrooms, .bathrooms, .kitchen) {
    min-height: auto;
    padding-block: 6.5rem 7rem;
  }
  .interior .section-intro,
  .bedrooms > .section-shell--header,
  .bathrooms .section-intro,
  .kitchen__copy {
    position: static;
    width: min(100%, var(--shell));
    margin-inline: auto;
    padding: 0 max(4rem, calc((100vw - var(--shell))/2)) 3rem;
  }
  :is(.interior, .bedrooms, .bathrooms, .kitchen) [data-snap-rail] {
    width: min(calc(100% - 8rem), var(--shell));
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    margin-inline: auto;
    padding: 0;
    gap: 1rem;
    overflow: visible;
    scroll-snap-type: none;
  }
  :is(.interior, .kitchen) [data-snap-rail] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: auto !important; }
  .bedrooms [data-snap-rail] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: auto !important; }
  .bathrooms [data-snap-rail] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: auto !important; }
  :is(.interior, .bedrooms, .bathrooms, .kitchen) [data-snap-rail] > figure {
    width: 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    grid-column: auto !important;
    grid-row: auto !important;
    scroll-snap-align: none;
  }
  :is(.interior, .bedrooms, .bathrooms, .kitchen) [data-snap-rail] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  :is(.interior, .bathrooms) .section-shell > .rail-controls,
  .bedrooms > .rail-controls,
  .kitchen > .rail-controls { display: none !important; }
}
