/* Serene Villas – سيرين ڤيلز (v2)
   Warm hospitality, light theme only. Ivory paper, deep walnut text,
   amber from the façade lighting, deep green from the gardens in the aerial photo. */

@font-face {
  font-family: "El Messiri";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/el-messiri-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("../fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("../fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ivory: #fbf7ef;
  --ivory-deep: #f4ecdd;
  --card: #fffdf9;
  --line: #dfd0b4;
  --edge: #9c8560;
  --walnut: #3a291d;
  --walnut-soft: #6a5545;
  --amber: #c48f37;
  --amber-deep: #8d5d16;
  --amber-wash: #f7ead0;
  --green: #2f4a36;
  --green-deep: #24392a;
  --green-wash: #e9efe6;
  --shadow: 0 1px 2px rgba(58, 41, 29, 0.05), 0 14px 38px rgba(58, 41, 29, 0.09);
  --shadow-lift: 0 2px 4px rgba(58, 41, 29, 0.06), 0 24px 60px rgba(58, 41, 29, 0.16);
  --wrap: 1200px;
  --gutter: 18px;
  --display: "El Messiri", "Readex Pro", "Geeza Pro", Tahoma, sans-serif;
  --text: "Readex Pro", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--walnut);
  font-family: var(--text);
  font-weight: 330;
  font-size: 1.0625rem;
  line-height: 1.95;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.nw { white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -70px; background: var(--card); color: var(--walnut); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; z-index: 60; }
.skip:focus { top: 12px; }

/* the two tapered strokes of the logo, redrawn as an ornament */
.orn { display: block; width: 92px; height: 8px; fill: var(--amber); }
.orn-wide { width: min(240px, 60%); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px; padding: 0.5em 1.5em;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 450; font-size: 1rem; line-height: 1.4;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-primary { background: var(--green); color: #fffdf9; }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--walnut); border-color: var(--edge); }
.btn-ghost:hover { background: var(--amber-wash); border-color: var(--amber); }
.btn:active { transform: translateY(1px); }

/* ---------- header ---------- */
.site-head { position: fixed; top: 0; inset-inline: 0; z-index: 40; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.site-head.is-solid, .site-head.always-solid { background: rgba(251, 247, 239, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { display: block; line-height: 0; }
.brand img { width: 150px; } /* 45px high: readable, and a 44px+ touch target */
.site-head .btn { display: none; min-height: 42px; font-size: 0.9375rem; padding-inline: 1.15em; }
.site-head.always-solid .btn { display: inline-flex; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-media { position: relative; height: clamp(320px, 48svh, 440px); overflow: hidden; background: var(--ivory-deep); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
/* ivory veil so the black logo stays readable while the header is transparent */
.hero-media::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 132px; background: linear-gradient(to bottom, rgba(251, 247, 239, 0.96), rgba(251, 247, 239, 0.7) 45%, rgba(251, 247, 239, 0)); z-index: 1; }
.hero-card {
  position: relative; z-index: 2; margin: -64px var(--gutter) 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 26px 22px 24px; box-shadow: var(--shadow-lift);
  display: grid; gap: 12px; justify-items: start;
}
.hero-place { font-size: 0.9375rem; color: var(--amber-deep); font-weight: 450; letter-spacing: 0; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 7.6vw, 2.9rem); line-height: 1.32; }
.hero-desc { color: var(--walnut-soft); font-size: 1.0625rem; }
.hero-actions { display: grid; gap: 10px; margin-top: 8px; width: 100%; }
/* phones: booking button on its own row, the two secondary buttons below at exactly equal widths;
   their text never wraps, so the type eases down a little on very narrow screens (13px at 320) */
.hero-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hero-actions .btn { white-space: nowrap; min-width: 0; }
.hero-actions .btn-primary { grid-column: 1 / -1; }
.hero-actions .btn-ghost { padding-inline: 0.5em; gap: 0.4em; font-size: clamp(0.8125rem, 3.9vw, 1rem); }

/* ---------- quick facts ---------- */
.facts { position: relative; z-index: 3; margin-top: 16px; }
.facts ul { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.facts li { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px 12px; font-size: 0.9375rem; font-weight: 420; line-height: 1.6; }
.facts li:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.facts li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.facts svg { width: 30px; height: 30px; color: var(--amber-deep); }

/* ---------- sections ---------- */
.band { padding-block: 68px 0; }
.band-last { padding-bottom: 76px; }
.band-head { display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: 34px; }
.band h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.65rem, 4.6vw, 2.15rem); line-height: 1.4; }
.band-head p { color: var(--walnut-soft); font-size: 0.9375rem; margin-top: -4px; }
.divider { padding-top: 68px; }
.divider + .band .band-head .orn { display: none; }

.icon-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 40px; }
.about-copy { display: grid; gap: 16px; align-content: start; justify-items: start; }
.about-copy h2 { margin-bottom: 0; }
.about-copy .orn { margin-bottom: 6px; }
.about-text { display: grid; gap: 16px; }
.about-text p { text-wrap: pretty; max-width: 36em; }
.about-text p:first-child { font-size: 1.1875rem; line-height: 1.9; font-weight: 380; }
.frame { position: relative; width: min(calc(100% - 28px), 380px); margin-inline: auto; --arch: 50% 50% 14px 14px / 40% 40% 14px 14px; }
.frame::before { content: ""; position: absolute; inset: -10px; border: 1px solid var(--amber); border-radius: var(--arch); }
.frame picture { position: relative; display: block; border-radius: var(--arch); overflow: hidden; background: var(--ivory-deep); box-shadow: var(--shadow); }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- video tour (portrait 608x1080, hosted here) ---------- */
/* The box reserves the 9:16 shape before the poster loads, and never grows taller than the screen. */
.tour { width: min(100%, 340px, calc((100svh - 150px) * 608 / 1080)); min-width: 220px; margin-inline: auto; aspect-ratio: 608 / 1080;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--ivory-deep); box-shadow: var(--shadow); }
.tour video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ivory-deep); }

/* ---------- suitable for ---------- */
/* occasions. Phones, tablets and narrow windows: compact cards, icon on the right, title and text always shown.
   Wide screens with a mouse: arched cards; the text shows on hover or keyboard focus (block at the end of this file). */
.fit-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fit-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: start; text-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; border-start-start-radius: 40px; border-end-start-radius: 40px; padding: 14px 18px 16px 16px; }
.fit-list li:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; }
.fit-list .ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-wash); color: var(--green); }
.fit-list svg { width: 28px; height: 28px; }
.occ-t { margin: 6px 0 0; font-family: var(--text); font-size: 1.0625rem; font-weight: 500; line-height: 1.6; color: var(--walnut); }
.occ-d { margin: 0; font-size: 1rem; line-height: 1.75; color: var(--walnut-soft); }

/* ---------- gallery ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1) 22px; padding: 2px var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0.3em 1.05em; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--walnut-soft); font: inherit; font-size: 0.9688rem; font-weight: 420; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.tab:hover { color: var(--walnut); border-color: var(--line); }
.tab[aria-pressed="true"] { background: var(--green); color: #fffdf9; border-color: var(--green); font-weight: 450; }
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; --cols: 2; }
/* "all" view: a mosaic of squares with two large tiles; filtered views keep the centred rows */
.gallery[data-filter="all"] { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; }
.gallery[data-filter="all"] .g-big { grid-column: span 2; aspect-ratio: 3 / 2; }
.g-item { display: block; position: relative; overflow: hidden; border-radius: 14px; background: var(--ivory-deep); cursor: zoom-in; aspect-ratio: 1 / 1; flex: 0 0 calc((100% - (var(--cols) - 1) * 10px) / var(--cols)); }
.g-item[hidden] { display: none; }
.g-item picture, .g-item img { display: block; width: 100%; height: 100%; }
.g-item img { object-fit: cover; object-position: var(--pos, center); transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.g-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(58, 41, 29, 0.08); pointer-events: none; }
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.045); }

/* ---------- villa components ---------- */
.parts { display: grid; gap: 18px; }
.part { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 28px; box-shadow: var(--shadow); }
.part h3 { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 500; font-size: 1.375rem; line-height: 1.4; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.part h3 .ic { display: grid; place-items: center; color: var(--amber-deep); flex: none; }
.part h3 svg { width: 32px; height: 32px; }
.part ul { display: grid; gap: 11px; }
.part li { position: relative; padding-inline-start: 1.35em; line-height: 1.8; font-size: 1rem; }
.part li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.78em; width: 6px; height: 6px; background: var(--amber); transform: rotate(45deg); }

/* ---------- check-in and check-out ---------- */
.times-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; margin-inline: auto; }
.times-list div { display: grid; gap: 4px; justify-items: center; align-content: start; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 12px 24px; }
.times-list svg { width: 30px; height: 30px; color: var(--amber-deep); margin-bottom: 6px; }
.times-list dt { color: var(--walnut-soft); font-size: 0.9375rem; }
.times-list dd { font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 4.6vw, 2.1rem); line-height: 1.5; }

/* ---------- contact ---------- */
.contact-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 44px 22px 40px; box-shadow: var(--shadow); display: grid; gap: 14px; justify-items: center; text-align: center; }
.contact-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--amber); border-radius: 18px; opacity: 0.55; pointer-events: none; }
.contact-card > * { position: relative; }
.contact-place { color: var(--walnut-soft); }
.contact-label { margin-top: 10px; font-size: 0.9375rem; color: var(--amber-deep); font-weight: 450; }
.contact-phone { font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 500; line-height: 1.3; letter-spacing: 0.02em; color: var(--walnut); text-decoration: none; direction: ltr; }
.contact-phone:hover { color: var(--green); }
.contact-actions { display: grid; gap: 10px; width: 100%; max-width: 340px; margin-top: 12px; }

/* ---------- footer ---------- */
.site-foot { padding-block: 0 44px; font-size: 0.9063rem; color: var(--walnut-soft); }
.site-foot .wrap { display: grid; gap: 14px; justify-items: center; text-align: center; }
.site-foot .orn { margin-bottom: 26px; }
.site-foot img { width: 170px; margin-bottom: 8px; }
.site-foot p { max-width: 78ch; line-height: 1.9; }
.site-foot [lang="en"] { direction: ltr; }

/* ---------- floating WhatsApp button (phones) ---------- */
.fab { position: fixed; z-index: 35; inset-inline: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 10px 30px rgba(36, 57, 42, 0.32); transform: translateY(140%); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s ease; }
.fab.is-on { transform: none; }
body.has-fab { padding-bottom: 82px; }
/* Back to top: a ghost circle in the inline-end corner. On phones it sits 14px above the WhatsApp bar (12 + 50 + 14).
   Hidden until the page has scrolled about one screen (site.js), and whenever the viewer or the section list is open. */
.totop {
  position: fixed; z-index: 34; inset-inline-end: 14px; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1px solid var(--edge); background: var(--card); color: var(--walnut);
  box-shadow: 0 1px 2px rgba(58, 41, 29, 0.06), 0 8px 22px rgba(58, 41, 29, 0.14); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background-color 0.2s ease, border-color 0.2s ease;
}
.totop svg { width: 22px; height: 22px; }
.totop.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.totop:hover { background: var(--amber-wash); border-color: var(--amber); }
.totop:focus-visible { outline-offset: 3px; border-radius: 50%; }
body:has(dialog[open]) .totop, body:has(.gnow-btn[aria-expanded="true"]) .totop { opacity: 0; visibility: hidden; }
/* room under the footer so the circle never sits on its last lines */
body.has-totop { padding-bottom: 64px; }
body.has-fab.has-totop { padding-bottom: 138px; }

/* ---------- lightbox ---------- */
.lb { border: 0; padding: 0; background: var(--ivory); color: var(--walnut); max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }
.lb::backdrop { background: var(--ivory); }
html:has(dialog[open]) { overflow: hidden; }
.lb-stage { width: 100%; height: 100%; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 64px 12px 78px; }
.lb-stage img { min-height: 0; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: var(--shadow-lift); }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--edge); background: var(--card); color: var(--walnut); cursor: pointer; padding: 0; }
.lb-btn:hover { background: var(--amber-wash); border-color: var(--amber); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 10px; inset-inline-end: 12px; }
.lb-prev, .lb-next { bottom: 14px; }
.lb-prev { inset-inline-start: calc(50% - 110px); }
.lb-next { inset-inline-end: calc(50% - 110px); }
.lb-count { position: absolute; bottom: 14px; inset-inline: 0; margin-inline: auto; width: max-content; line-height: 48px; color: var(--walnut-soft); font-size: 0.9375rem; direction: ltr; }

/* ---------- privacy page ---------- */
.doc { padding-block: 112px 20px; }
.doc .wrap { max-width: 860px; }
.doc-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px 22px 34px; box-shadow: var(--shadow); }
.doc-card + .doc-card { margin-top: 22px; }
.doc h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.4; }
.doc .orn { margin-block: 12px 14px; }
.doc .doc-meta { color: var(--walnut-soft); font-size: 0.9375rem; }
.doc h2 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.6; margin: 28px 0 4px; color: var(--green-deep); }
.doc ul { display: grid; gap: 4px; margin-top: 6px; }
.doc li { position: relative; padding-inline-start: 1.35em; }
.doc li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.85em; width: 6px; height: 6px; background: var(--amber); transform: rotate(45deg); }
.doc [lang="en"] { direction: ltr; text-align: left; line-height: 1.8; }
.doc [lang="en"] h1, .doc [lang="en"] h2 { font-family: var(--text); font-weight: 600; }
.doc [lang="en"] h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
.doc [lang="en"] h2 { font-size: 1.125rem; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- tablets ---------- */
@media (min-width: 700px) {
  :root { --gutter: 30px; }
  .brand img { width: 168px; }
  .site-head .wrap { min-height: 76px; }
  .site-head .btn { display: inline-flex; transition: opacity 0.3s ease, visibility 0.3s, background-color 0.2s ease; }
  /* the hero card already carries the booking button: the header one appears once the page scrolls */
  .site-head:not(.is-solid):not(.always-solid) .btn { opacity: 0; visibility: hidden; }
  .hero-media::before { height: 220px; background: radial-gradient(58% 100% at 100% 0, rgba(251, 247, 239, 0.96), rgba(251, 247, 239, 0.6) 45%, rgba(251, 247, 239, 0) 72%); }
  .about-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 36px; align-items: center; }
  .fab { display: none; }
  body.has-fab { padding-bottom: 0; }
  .totop { inset-inline-end: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; }
  body.has-totop, body.has-fab.has-totop { padding-bottom: 0; }

  .hero-media { height: clamp(380px, 52svh, 520px); }
  .hero-card { margin: -84px auto 0; width: min(620px, calc(100% - 2 * var(--gutter))); padding: 34px 36px 32px; justify-items: center; text-align: center; }
  .hero-card .orn { margin-inline: auto; }
  .hero-actions { display: flex; flex-wrap: wrap; width: auto; justify-content: center; }
  .hero-actions .btn-ghost { padding-inline: 1.5em; gap: 0.6em; font-size: 1rem; }
  .facts { margin-top: 22px; }
  .facts ul { grid-template-columns: repeat(4, 1fr); }
  .facts li { padding: 24px 14px; border-bottom: 0 !important; }
  .facts li:not(:last-child) { border-inline-end: 1px solid var(--line); }

  .band { padding-top: 92px; }
  .band-last { padding-bottom: 100px; }
  .divider { padding-top: 92px; }
  .band-head { margin-bottom: 42px; }

  .fit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .fit-list li:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
  .parts { grid-template-columns: 1fr 1fr; }
  .part:last-child { grid-column: 1 / -1; }
  .part:last-child ul { grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
  .gallery { --cols: 3; gap: 12px; }
  .gallery[data-filter="all"] { grid-template-columns: repeat(4, 1fr); }
  .gallery[data-filter="all"] .g-big { grid-row: span 2; aspect-ratio: auto; }
  .g-item { flex-basis: calc((100% - (var(--cols) - 1) * 12px) / var(--cols)); border-radius: 16px; }
  .tabs { justify-content: center; margin-bottom: 28px; }
  .part { padding: 30px 28px 32px; }
  .times-list { gap: 18px; }
  .times-list div { padding: 34px 16px 30px; }
  .contact-card { padding: 60px 40px 56px; }
  .contact-actions { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; gap: 12px; }
  .doc { padding-top: 132px; }
  .doc-card { padding: 44px 48px 48px; }

  .lb-stage { padding: 72px 76px; }
  .lb-prev, .lb-next { top: calc(50% - 24px); bottom: auto; }
  .lb-prev { inset-inline-start: 16px; }
  .lb-next { inset-inline-end: 16px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1000px) {
  .hero-media { height: clamp(560px, 78svh, 780px); }
  .hero-card {
    position: absolute; margin: 0; bottom: 104px;
    inset-inline-start: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
    width: min(400px, 34vw); padding: 24px 26px 22px; gap: 8px; justify-items: start; text-align: start;
  }
  .hero-card .orn { margin-inline: 0; }
  /* same arrangement as phones: booking button on its own row, video and tour below at equal widths */
  .hero-actions { display: grid; width: 100%; gap: 8px; margin-top: 6px; }
  .hero-actions .btn, .hero-actions .btn-ghost { min-height: 48px; font-size: 0.9375rem; padding-inline: 1.1em; }
  .hero h1 { font-size: clamp(1.9rem, 2.4vw, 2.2rem); }
  .hero-desc { font-size: 0.9375rem; }
  .facts { margin-top: -58px; }
  .facts li { grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 14px; text-align: start; padding: 30px 18px; font-size: 1rem; }

  .about-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 72px; }
  .orn { width: 112px; }
  .part:last-child ul { grid-template-columns: 1fr; }
  .frame { margin-inline: auto 14px; }
  .gallery { --cols: 4; }
  .parts { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .part:last-child { grid-column: auto; }
}

/* ---------- nearby landmarks ----------
   The base map is a picture; points, lines and cards are positioned over it in percentages taken from the
   map's own projection (map-preview/build-site.js). Narrow maps show numbered points and the list carries the
   details; from 1100px of map width the cards of the approved design appear, scaled with the map (--u). */
.near-wrap { max-width: 1760px; }
.near { container: near / inline-size; }
.near-map { position: relative; aspect-ratio: 1 / 1; --u: calc(100cqw / 1250); }
.near-map picture, .near-bg { display: block; width: 100%; height: 100%; }
.near-bg { object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: #f0e5cf; box-shadow: var(--shadow); }
.near-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.near-lines-wide { display: none; }
.near-ray { fill: none; stroke: var(--amber-deep); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.1 6; vector-effect: non-scaling-stroke; }
.near-ray.is-active { stroke-width: 3; stroke-dasharray: none; }
.near-lead { display: none; stroke: var(--walnut-soft); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.near-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.near-poi, .near-home { display: contents; }
.near-dot { position: absolute; left: var(--sx); top: var(--sy); width: 2px; height: 2px; margin: -1px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.near-dot::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--card); }
.near-num { position: absolute; left: calc(var(--nx) * 19px - 11px); top: calc(var(--ny) * 19px - 11px); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fffdf9; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(58, 41, 29, 0.3); font-size: 0.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.near-num::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.near-dot:focus-visible { outline: none; }
.near-dot:focus-visible .near-num { outline: 2px solid var(--amber-deep); outline-offset: 2px; }
.near-poi.is-active .near-num { background: var(--amber-deep); transform: scale(1.18); }
.near-poi.is-active .near-dot { z-index: 4; }
.near-card { display: none; }

.near-home-dot { position: absolute; left: var(--sx); top: var(--sy); width: 20px; height: 20px; margin: -10px; border-radius: 50%; background: var(--amber); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--amber-deep), 0 0 0 8px rgba(196, 143, 55, 0.22), 0 3px 10px rgba(58, 41, 29, 0.35); pointer-events: none; }
.near-home-name { position: absolute; left: var(--sx); top: var(--sy); transform: translate(-50%, 16px); padding: 3px 10px 4px; border-radius: 999px; background: var(--green); color: #fffdf9; font-family: var(--display); font-weight: 600; font-size: 0.8125rem; line-height: 1.4; white-space: nowrap; pointer-events: none; }
.near-home-inset .near-home-dot { width: 12px; height: 12px; margin: -6px; border-width: 2px; box-shadow: 0 0 0 1px var(--amber-deep), 0 2px 6px rgba(58, 41, 29, 0.35); }
.near-home-inset .near-home-name { display: none; }

/* phones: the inset is small, so its title sits as a tab on top of it and the credit line goes under the map */
.near-inset-title { position: absolute; right: var(--ts-r); top: var(--ts-t); transform: translateY(-100%); padding: 0 7px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; background: var(--card); font-family: var(--display); font-weight: 600; font-size: 0.6875rem; line-height: 1.6; color: var(--walnut); white-space: nowrap; pointer-events: none; }
.near-map { margin-bottom: 44px; }
.near-credit { position: absolute; left: 2px; right: 2px; top: calc(100% + 5px); color: var(--walnut-soft); font-size: 0.6875rem; line-height: 1.5; text-align: left; }

/* dim everything that is not the chosen landmark */
.near.has-active .near-poi:not(.is-active) .near-dot, .near.has-active .near-poi:not(.is-active) .near-card { opacity: 0.4; }
.near.has-active .near-ray:not(.is-active) { opacity: 0.16; }
.near.has-active .near-lead[data-poi]:not(.is-active) { opacity: 0.25; }

/* details of the chosen landmark under the map while the map shows numbers (added by site.js) */
.near-sheet { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; margin-top: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.near-sheet p { color: var(--walnut-soft); font-size: 0.9375rem; line-height: 1.6; }
.near-sheet b { display: block; font-weight: 600; line-height: 1.5; }
.near-sheet span { display: block; color: var(--amber-deep); font-size: 0.875rem; font-weight: 500; line-height: 1.5; }

.near-go { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 40px; padding: 0.25em 1.1em; border: 1px solid var(--edge); border-radius: 999px; color: var(--walnut); font-size: 0.875rem; font-weight: 500; line-height: 1.4; text-decoration: none; white-space: nowrap; background: var(--card); }
.near-go:hover { background: var(--amber-wash); border-color: var(--amber); }
.near-sheet .near-go, .near-card .near-go { background: var(--green); border-color: var(--green); color: #fffdf9; }
.near-sheet .near-go:hover, .near-card .near-go:hover { background: var(--green-deep); }

.near-list { display: grid; gap: 8px; margin-top: 14px; list-style: none; padding: 0; }
.near-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.near-list li.is-active { background: var(--amber-wash); border-color: var(--amber); }
.near-pick { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; min-height: 52px; padding: 4px 4px; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; border-radius: 10px; }
.near-n { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fffdf9; font-size: 0.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.near-list li.is-active .near-n { background: var(--amber-deep); }
.near-name { font-weight: 600; line-height: 1.5; }
.near-meta { color: var(--amber-deep); font-size: 0.875rem; font-weight: 500; line-height: 1.5; font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .near-map { aspect-ratio: 1600 / 1100; --u: calc(100cqw / 1600); }
  .near-lines-wide { display: block; }
  .near-lines-square { display: none; }
  .near-dot, .near-home-dot, .near-home-name { left: var(--x); top: var(--y); }
  .near-inset-title { right: var(--tw-r); top: var(--tw-t); transform: none; padding: 0; border: 0; border-radius: 0; background: none; font-size: max(0.6875rem, calc(20 * var(--u))); line-height: 1.4; }
  .near-map { margin-bottom: 0; }
  .near-credit { left: auto; top: auto; right: 8px; bottom: 7px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 253, 249, 0.88); white-space: nowrap; }
  .near-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
/* desktop: the map runs almost the full width of the screen, wider than the text column, so a 1280 laptop still gets the cards */
@media (min-width: 1000px) {
  .near-wrap { padding-inline: 16px; }
}
/* large screens: the whole map fits in one screen. Its height stops at 82% of the screen height, so its width
   follows (ratio 1600:1100) and the map sits centred. It never goes under 1180px wide, the width the cards need:
   on short laptops (1280x720, 1366x768) readable cards win over fitting in one screen. */
@media (min-width: 1200px) {
  .near { max-width: max(1180px, calc(82vh * 1600 / 1100)); margin-inline: auto; }
}

/* the approved card design, once the map is wide enough. Measured (n9_measure.js): with the minimum text sizes
   below, the cards are free of overlap from a map width of 1164px; narrower maps show numbers instead. */
@container near (min-width: 1170px) {
  .near-sheet { display: none; }
  .near-lead { display: inline; }
  .near-ray { stroke-width: 2.3; stroke-dasharray: 0.1 6.4; }
  .near-dot { width: calc(16 * var(--u)); height: calc(16 * var(--u)); margin: calc(-8 * var(--u)); border-radius: 50%; background: var(--green); border: calc(3 * var(--u)) solid var(--card); box-shadow: 0 0 0 calc(1 * var(--u)) var(--green), 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(58, 41, 29, 0.3); }
  .near-dot::before, .near-num { display: none; }
  .near-dot:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; }
  .near-poi.is-active .near-dot { background: var(--amber-deep); box-shadow: 0 0 0 calc(1 * var(--u)) var(--amber-deep), 0 0 0 calc(7 * var(--u)) rgba(196, 143, 55, 0.3); }
  .near-card { display: block; position: absolute; left: var(--cx); top: var(--cy); transform: translate(-50%, -50%); white-space: nowrap; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: calc(12 * var(--u)); padding: calc(9 * var(--u)) calc(16 * var(--u)) calc(10 * var(--u)); box-shadow: 0 1px 2px rgba(58, 41, 29, 0.06), 0 calc(10 * var(--u)) calc(26 * var(--u)) rgba(58, 41, 29, 0.14); cursor: pointer; }
  /* text never goes below 13px (names) and 12px (distance and time), whatever the map width */
  .near-card b { display: block; font-weight: 600; font-size: max(0.8125rem, calc(17 * var(--u))); line-height: 1.5; color: var(--walnut); }
  .near-card > span { display: block; font-size: max(0.75rem, calc(14.5 * var(--u))); line-height: 1.5; color: var(--amber-deep); font-weight: 500; font-variant-numeric: tabular-nums; }
  .near-poi[data-poi="airport"] .near-card, .near-poi[data-poi="buraydah"] .near-card { padding: calc(6 * var(--u)) calc(12 * var(--u)) calc(7 * var(--u)); border-radius: calc(10 * var(--u)); }
  .near-poi[data-poi="airport"] .near-card b, .near-poi[data-poi="buraydah"] .near-card b { font-size: max(0.8125rem, calc(15 * var(--u))); }
  .near-poi[data-poi="airport"] .near-card > span, .near-poi[data-poi="buraydah"] .near-card > span { font-size: max(0.75rem, calc(13 * var(--u))); }
  .near-poi.is-active .near-card { z-index: 5; border-color: var(--amber); box-shadow: var(--shadow-lift); }
  .near-card .near-go { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-height: 36px; box-shadow: var(--shadow); }
  .near-home-dot { width: calc(34 * var(--u)); height: calc(34 * var(--u)); margin: calc(-17 * var(--u)); border-width: calc(4 * var(--u)); box-shadow: 0 0 0 calc(2 * var(--u)) var(--amber-deep), 0 0 0 calc(13 * var(--u)) rgba(196, 143, 55, 0.22), 0 calc(4 * var(--u)) calc(14 * var(--u)) rgba(58, 41, 29, 0.35); }
  .near-home-dot::after { content: ""; position: absolute; inset: 28%; border-radius: 50%; background: var(--card); }
  .near-home-name { left: var(--cx); top: var(--cy); transform: translate(-50%, -50%); padding: calc(10 * var(--u)) calc(22 * var(--u)) calc(11 * var(--u)); border-radius: calc(12 * var(--u)); border: 1px solid var(--green-deep); font-size: calc(23 * var(--u)); line-height: 1.35; box-shadow: 0 calc(10 * var(--u)) calc(26 * var(--u)) rgba(58, 41, 29, 0.14); }
  .near-home-inset .near-home-dot { width: calc(22 * var(--u)); height: calc(22 * var(--u)); margin: calc(-11 * var(--u)); border-width: calc(3 * var(--u)); box-shadow: 0 0 0 calc(1.5 * var(--u)) var(--amber-deep), 0 calc(2 * var(--u)) calc(8 * var(--u)) rgba(58, 41, 29, 0.35); }
  .near-home-inset .near-home-name { display: block; font-family: var(--text); font-size: max(0.8125rem, calc(15 * var(--u))); padding: calc(6 * var(--u)) calc(12 * var(--u)) calc(7 * var(--u)); border-radius: calc(10 * var(--u)); }
  .near-credit { right: calc(12 * var(--u)); bottom: calc(10 * var(--u)); font-size: max(0.6875rem, calc(11.5 * var(--u))); }
  .near-list { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .near-dot, .near-num, .near-card, .near-ray, .near-lead, .near-list li, .near-go { transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .g-item img, .btn, .fab, .site-head, .tab, .totop { transition: none; }
  .totop { transform: none; }
  .g-item:hover img, .g-item:focus-visible img { transform: none; }
}

/* occasions on wide screens with a mouse: arched cards of one fixed height (enough for the longest text).
   At rest the icon and title sit in the middle and the text is hidden visually (it stays in the page for screen readers);
   on hover or keyboard focus they rise and the text fades in. Nothing changes size, so no card moves. */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .fit-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  .fit-list li, .fit-list li:last-child { --h: 372px; --pt: 38px; --pb: 18px; --head: 104px; grid-column: auto; width: auto; justify-self: stretch; height: var(--h); display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--pt) 14px var(--pb); border-radius: 50% 50% 18px 18px / 30% 30% 18px 18px; cursor: default; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
  .fit-list .occ-h, .fit-list .ic, .fit-list .occ-t { transform: translateY(calc((var(--h) - var(--pt) - var(--pb) - var(--head)) / 2)); transition: transform 0.3s ease; }
  .fit-list .ic { flex: none; width: 60px; height: 60px; }
  .fit-list svg { width: 29px; height: 29px; }
  .fit-list .occ-t { margin-top: 12px; height: 32px; font-size: 1.0625rem; line-height: 32px; white-space: nowrap; }
  .fit-list .occ-d { margin-top: 10px; font-size: 0.9375rem; line-height: 1.75; opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
  .fit-list li:hover, .fit-list li:focus-within { border-color: var(--amber); box-shadow: 0 10px 28px rgba(58, 41, 29, 0.08); }
  .fit-list li:hover .ic, .fit-list li:hover .occ-t, .fit-list li:focus-within .ic, .fit-list li:focus-within .occ-t { transform: none; }
  .fit-list li:hover .occ-d, .fit-list li:focus-within .occ-d { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) and (prefers-reduced-motion: reduce) {
  .fit-list li, .fit-list .ic, .fit-list .occ-t, .fit-list .occ-d { transition: none; }
}

/* ---------- 360 tour teaser: a still cover and one button, no tour files loaded here ---------- */
.t360 {
  position: relative; display: block; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 16 / 9; background: var(--ivory-deep); text-decoration: none;
}
.t360 img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.t360::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(36, 57, 42, 0.18), rgba(36, 57, 42, 0) 62%);
}
.t360-cta {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.6em; white-space: nowrap;
  min-height: 56px; padding: 0.55em 1.8em; border-radius: 999px;
  background: var(--green); color: #fffdf9; font-size: 1.125rem; font-weight: 500;
  box-shadow: 0 10px 30px rgba(36, 57, 42, 0.35); transition: background-color 0.2s ease;
}
.t360-cta svg { width: 1.3em; height: 1.3em; flex: none; }
.t360:hover .t360-cta { background: var(--green-deep); }
.t360:hover img { transform: scale(1.02); }
.t360:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (min-width: 700px) {
  .t360-cta { min-height: 64px; font-size: 1.25rem; padding: 0.6em 2.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .t360 img, .t360-cta { transition: none; }
  .t360:hover img { transform: none; }
}
