/* Maryam Properties — public website. Mobile-first, RTL-ready (logical properties), light & dark. */
:root {
  --bg: #faf8f4; --surface: #ffffff; --surface-2: #f3f0ea; --text: #13212a; --muted: #5f6d78; --border: #e6e1d8;
  --brand: #0e3b43; --brand-2: #155e68; --gold: #c49a3f; --gold-2: #a8812c; --link: #135a64; --ok: #15803d; --bad: #c62828;
  --radius: 16px; --shadow: 0 1px 2px rgba(19, 33, 42, .05), 0 6px 20px rgba(19, 33, 42, .06); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  --hdr: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0c1519; --surface: #131f25; --surface-2: #19282f; --text: #e8eef1; --muted: #9aabb6; --border: #24343c; --brand-2: #2a8c98; --link: #6fcbd5; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
}
:lang(ar) { --font: system-ui, -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
a { color: var(--link); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.015em; }
:lang(ar) :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(1.7rem, 5vw, 3rem); } h2 { font-size: clamp(1.35rem, 3.2vw, 2rem); } h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
[dir="rtl"] .ic-dir { transform: scaleX(-1); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 24px; } }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--gold-2); margin: 0 0 .4rem; }
:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--gold); } }
.link { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link .ic { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: 600 .95rem var(--font); cursor: pointer; white-space: nowrap; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); }
.btn-gold { background: var(--gold); color: #1c1407; }
.btn-gold:hover { background: #d3aa4c; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-wa { background: #1faa55; color: #fff; }
.btn.loading { opacity: .7; pointer-events: none; }
.icon-link { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--text); background: none; border: 0; cursor: pointer; }
.icon-link:hover { background: var(--surface-2); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.hdr.scrolled { border-bottom-color: var(--border); }
.hdr-in { display: flex; align-items: center; gap: 12px; height: var(--hdr); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand .logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: var(--gold); flex: none; }
.brand b { display: block; font-size: 1rem; line-height: 1.15; white-space: nowrap; }
.brand small { display: block; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.nav { display: none; }
.hdr-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.lang-dd { position: relative; }
.lang-dd summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--text); }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary:hover { background: var(--surface-2); }
.lang-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.lang-pop a, .nav-mobile-extra a { padding: 10px 12px; border-radius: 10px; color: var(--text); }
.lang-pop a:hover { background: var(--surface-2); }
.lang-pop a[aria-current], .nav-mobile-extra a[aria-current] { font-weight: 700; color: var(--link); }
.hide-xs { display: none; }
@media (min-width: 420px) { .hide-xs { display: inline; } }
body.menu-open .nav { display: grid; position: fixed; inset: var(--hdr) 0 0 0; background: var(--bg); padding: 16px; align-content: start; gap: 2px; overflow-y: auto; z-index: 49; }
body.menu-open .nav > a { font-size: 1.15rem; font-weight: 600; padding: 14px 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.nav-mobile-extra { display: grid; margin-top: 16px; }
@media (min-width: 1000px) {
  .nav, body.menu-open .nav { display: flex; position: static; background: none; padding: 0; gap: 4px; margin-inline-start: 20px; overflow: visible; }
  .nav > a, body.menu-open .nav > a { font-size: .93rem; font-weight: 600; padding: 8px 12px; border: 0; border-radius: 10px; color: var(--text); }
  .nav > a:hover { background: var(--surface-2); }
  .nav > a[aria-current] { color: var(--link); }
  .nav-mobile-extra, .menu-btn { display: none !important; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: linear-gradient(135deg, #0b3037, #155e68 60%, #2b7f78); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 22, 27, .55), rgba(7, 22, 27, .75)); }
.hero-in { position: relative; padding-block: 56px 40px; }
@media (min-width: 768px) { .hero-in { padding-block: 110px 80px; } }
.hero h1 { max-width: 18ch; font-weight: 800; text-wrap: balance; }
.hero .lead { max-width: 56ch; font-size: 1.05rem; color: rgba(255, 255, 255, .88); }
.hero .eyebrow { color: var(--gold); }
.search-box { margin-top: 24px; background: var(--surface); color: var(--text); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg); max-width: 920px; }
.seg-tabs { display: flex; gap: 4px; padding: 2px 2px 10px; }
.seg-tabs label { position: relative; }
.seg-tabs input { position: absolute; opacity: 0; }
.seg-tabs span { display: block; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--muted); }
.seg-tabs input:checked + span { background: var(--brand); color: #fff; }
.seg-tabs input:focus-visible + span { outline: 2px solid var(--gold); }
.search-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 720px) { .search-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; } }
.sf { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted); }
.sf input, .sf select { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 .95rem var(--font); color: var(--text); height: 44px; outline: none; }
.sf:focus-within { border-color: var(--brand-2); }

/* ---------- stats ---------- */
.stats-strip { background: var(--brand); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-block: 20px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 1.6rem; color: var(--gold); line-height: 1.2; }
.stats b .ic { width: 28px; height: 28px; }
.stats span { font-size: .85rem; color: rgba(255, 255, 255, .8); }

/* ---------- sections ---------- */
.sec { padding-block: 44px; }
@media (min-width: 768px) { .sec { padding-block: 72px; } }
.sec.tight { padding-block: 20px 56px; }
.sec.alt { background: var(--surface-2); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.sec-head.center { justify-content: center; text-align: center; }
.page-hero { padding-block: 28px 8px; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.tabs-p { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs-p a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; background: var(--surface); }
.tabs-p a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- property cards ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-p { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; min-width: 0; }
.card-p:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(19, 33, 42, .12); }
.card-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.card-p:hover .card-img img { transform: scale(1.04); }
.card-img .ph { display: grid; place-items: center; height: 100%; color: var(--muted); }
.card-img .ph .ic { width: 40px; height: 40px; }
.tag { display: inline-block; font: 700 .72rem var(--font); padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .94); color: var(--brand); }
.tag.gold { background: var(--gold); color: #1c1407; }
.tag.amber { background: #fdf0d5; color: #8a4b08; }
.card-img .tag { position: absolute; top: 12px; inset-inline-start: 12px; }
.card-img .tag.gold { inset-inline-start: auto; inset-inline-end: 60px; }
.card-img .count { position: absolute; bottom: 10px; inset-inline-end: 10px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 9px; border-radius: 99px; background: rgba(8, 20, 25, .7); color: #fff; font-size: .75rem; font-weight: 600; }
.card-img .count .ic { width: 14px; height: 14px; }
.fav { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: #3a4750; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.fav.on, .fav-btn.on { color: #d62c4c; }
.fav.on .ic, .fav-btn.on .ic { fill: currentColor; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.price { font-size: 1.2rem; color: var(--brand); font-weight: 800; }
@media (prefers-color-scheme: dark) { .price, .d-price { color: var(--gold) !important; } }
.card-body h3 { font-size: 1rem; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body h3 a { color: var(--text); }
.loc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; margin: 0; min-width: 0; }
.loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc .ic { width: 16px; height: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.facts > span { display: inline-flex; align-items: center; gap: 5px; }
.facts .ic { width: 17px; height: 17px; }
.empty, .empty-box { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty-box .ic { width: 40px; height: 40px; color: var(--muted); }
.empty-box h3, .empty-box h1 { color: var(--text); margin-top: 8px; font-size: 1.3rem; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; align-items: center; }
.filters .sf { grid-column: 1 / -1; }
.filters select, .filters input[type=number] { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0 10px; font: 500 .9rem var(--font); }
.filters .btn { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .filters { display: flex; flex-wrap: wrap; }
  .filters .sf { flex: 1 1 260px; }
  .filters select, .filters input[type=number] { width: auto; min-width: 130px; flex: 0 1 auto; }
  .filters .btn { flex: none; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }

/* ---------- services / why / cta ---------- */
.services { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); } .services.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.services article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.services p { color: var(--muted); font-size: .95rem; margin: 0; }
.svc-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-2); margin-bottom: 12px; }
.svc-ic .ic { width: 24px; height: 24px; }
.cta-band { background: linear-gradient(120deg, var(--brand), #155e68); color: #fff; }
.cta-in { display: grid; gap: 18px; padding-block: 40px; align-items: center; }
@media (min-width: 900px) { .cta-in { grid-template-columns: 1fr auto; } }
.cta-in p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 60ch; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.why { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .why { grid-template-columns: 1fr 440px; align-items: start; } }
.ticks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 16px; }
.ticks li { display: flex; gap: 14px; align-items: flex-start; }
.ticks li > .ic { color: var(--gold-2); width: 26px; height: 26px; margin-top: 2px; }
.ticks b { display: block; } .ticks span { color: var(--muted); font-size: .95rem; }
.ticks.compact { gap: 8px; } .ticks.compact li > .ic { width: 20px; height: 20px; color: var(--gold); }
.ticks.compact span { color: inherit; }
.contact-card, .side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); color: var(--text); }
.contact-lines { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.contact-lines a, .contact-lines > span { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: .92rem; }
.contact-lines .ic { color: var(--muted); width: 18px; height: 18px; }
.owners-hero { background: linear-gradient(135deg, #0b3037, #155e68); color: #fff; padding-block: 40px; }
.owners-hero .lead { color: rgba(255, 255, 255, .88); }
.owners-hero .link { color: var(--gold); }
.two { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .two { grid-template-columns: 1fr 460px; align-items: start; } .owners-hero { padding-block: 72px; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.steps li > b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--gold); margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- forms ---------- */
.enq { display: grid; gap: 10px; }
.fld { display: grid; gap: 4px; min-width: 0; }
.fld > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 10px 12px; font: 500 16px/1.4 var(--font); }
.fld textarea { resize: vertical; min-height: 88px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.fld .err { color: var(--bad); font-size: .8rem; min-height: 0; }
.fld.invalid input, .fld.invalid textarea, .fld.invalid select { border-color: var(--bad); }
[dir="rtl"] .fld input[type=tel], [dir="rtl"] .fld input[type=email] { direction: ltr; text-align: right; }
.row2, .row3 { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 460px) { .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); inset-inline-start: -9999px; }
.form-msg { margin: 0; font-size: .92rem; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); padding: 10px 12px; border-radius: 10px; }
.form-msg.bad { color: var(--bad); }
.seg-radio { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seg-radio legend { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio span { display: block; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: .88rem; font-weight: 600; }
.seg-radio input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--gold); }

/* ---------- detail ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.gallery { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.g-main { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.g-stage { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; background: #0b1a1f; cursor: zoom-in; }
.g-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-stage.ph { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); background: var(--surface-2); cursor: default; }
.g-stage.ph .ic { width: 42px; height: 42px; }
.g-video { display: grid; place-items: center; align-content: center; gap: 10px; height: 100%; color: #fff; background: radial-gradient(circle, #1d4c55, #0b1a1f); }
.g-video .ic { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: rgba(255, 255, 255, .15); fill: currentColor; }
.g-video.sm .ic { width: 36px; height: 36px; padding: 8px; }
.g-count { position: absolute; bottom: 12px; inset-inline-end: 12px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(8, 20, 25, .75); color: #fff; font-size: .82rem; font-weight: 600; pointer-events: none; }
.g-count .ic { width: 16px; height: 16px; }
.g-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 900px) { .g-thumbs { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; } }
.g-thumbs button { position: relative; border: 0; padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--surface-2); }
@media (min-width: 900px) { .g-thumbs button { aspect-ratio: auto; } }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumbs em { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 20, 25, .55); color: #fff; font-style: normal; font-weight: 700; font-size: 1.2rem; }
.detail { display: grid; gap: 24px; padding-block: 24px 60px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .detail { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; } .d-side { position: sticky; top: calc(var(--hdr) + 16px); } }
.d-head h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin: 8px 0 6px; }
.d-tags { display: flex; gap: 6px; }
.d-tags .tag { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.d-price { font-size: 1.7rem; font-weight: 800; color: var(--brand); margin: 10px 0; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.keyfacts { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .keyfacts { grid-template-columns: repeat(4, 1fr); } }
.keyfacts li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 2px; }
.keyfacts .ic { color: var(--gold-2); }
.keyfacts b { font-size: 1.05rem; } .keyfacts span { color: var(--muted); font-size: .82rem; }
.d-sec { padding-block: 18px; border-top: 1px solid var(--border); }
.d-sec h2 { font-size: 1.2rem; }
.prose { color: var(--text); max-width: 72ch; }
.amen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
@media (min-width: 640px) { .amen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.amen li { display: flex; gap: 8px; align-items: center; }
.amen .ic { color: var(--ok); width: 18px; height: 18px; }
.reg { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.reg div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.reg dt { font-size: .78rem; color: var(--muted); } .reg dd { margin: 0; font-weight: 700; }
.agent { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.agent .avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--gold); font-weight: 800; }
.agent b { display: block; } .agent small { display: block; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.enq-bar { position: fixed; bottom: 12px; inset-inline: 16px; z-index: 40; box-shadow: var(--shadow-lg); }
@media (min-width: 960px) { .enq-bar { display: none; } }
body.page-detail .ftr { padding-bottom: 80px; }
@media (min-width: 960px) { body.page-detail .ftr { padding-bottom: 0; } }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: #05090b; display: grid; grid-template-rows: auto 1fr; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; }
.lb-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.1rem; cursor: pointer; }
.lb-stage { display: grid; place-items: center; padding: 0 0 24px; min-height: 0; }
.lb-stage img, .lb-stage video { max-width: 100vw; max-height: calc(100vh - 100px); object-fit: contain; }
.lb-stage iframe { width: min(100vw, 1100px); aspect-ratio: 16 / 9; border: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-nav.prev { inset-inline-start: 12px; } .lb-nav.next { inset-inline-end: 12px; }
[dir="rtl"] .lb-nav { transform: translateY(-50%) scaleX(-1); }

/* ---------- footer ---------- */
.ftr { background: #0a2328; color: #cfdbdf; padding-top: 44px; margin-top: 0; }
.ftr .brand, .ftr .brand b { color: #fff; }
.ftr .brand small, .ftr .muted { color: #9fb2b8; }
.ftr-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.ftr-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .ftr-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .ftr-grid > div:first-child { grid-column: auto; } }
.ftr h4 { color: #fff; font-size: .95rem; }
.ftr-grid a { display: block; color: #cfdbdf; padding: 3px 0; font-size: .92rem; }
.ftr-grid a:hover { color: var(--gold); }
.ftr-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding-block: 16px; }
.wa-fab { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 45; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #1faa55; color: #fff; box-shadow: var(--shadow-lg); }
.wa-fab .ic { width: 28px; height: 28px; }
body.page-detail .wa-fab { bottom: 76px; }
@media (min-width: 960px) { body.page-detail .wa-fab { bottom: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
/* Listing text is often English inside Arabic pages: let each paragraph keep its own direction */
[dir="rtl"] :is(.d-head h1, .prose, .card-body h3, .loc span, .fld textarea, .agent b, .amen span) { unicode-bidi: plaintext; text-align: right; }

/* ---------- photo panels: fill the column next to a form ---------- */
.photo-panel { position: relative; width: 100%; margin: 22px 0 0; border-radius: 20px; overflow: hidden; min-height: 220px; aspect-ratio: 16 / 10; background: var(--surface-2); box-shadow: var(--shadow); }
.photo-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-panel figcaption { position: absolute; inset-inline: 0; bottom: 0; display: grid; gap: 4px; justify-items: start; padding: 48px 20px 20px; color: #fff; background: linear-gradient(180deg, transparent, rgba(6, 18, 22, .82)); }
.photo-panel figcaption b { font-size: 1.1rem; } .photo-panel figcaption span { color: rgba(255, 255, 255, .88); font-size: .95rem; max-width: 46ch; }
.photo-panel figcaption .btn { margin-top: 8px; }
.mini-stats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-stats li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.mini-stats b { font-size: 1.35rem; color: var(--gold); line-height: 1.2; } .mini-stats span { font-size: .8rem; color: rgba(255, 255, 255, .82); line-height: 1.35; }
@media (min-width: 960px) {
  /* The text column stretches to the form's height and the photo takes the remaining space */
  .why, .two { align-items: stretch; }
  .why > div:first-child, .two > div:first-child { display: flex; flex-direction: column; }
  .why .photo-panel, .two .photo-panel { flex: 1 1 auto; aspect-ratio: auto; }
  .why .contact-card, .two .contact-card { align-self: start; }
}
