/* ==========================================================================
   كايرو سكوير — طبقة التحسين (polish.css)
   تُحمَّل بعد style.css و rtl.css (وتبقى الملفات الأصلية كما هي). تشمل:
   ترويسة وتنقّل موحّدان · فوتر موحّد · شريط تنقّل سفلي · هيرو الموبايل · تحسينات الموبايل.
   ========================================================================== */

:root{
  --header-h:76px;
  --bottom-nav-h:66px;
  --footer-bg:#14151A;
  --footer-line:rgba(255,255,255,.12);
  --footer-text:rgba(255,255,255,.72);
}
html{ scroll-padding-top:calc(var(--header-h) + 12px); }

/* ---------- Logo (header + footer) ---------- */
.logo-mark{
  width:38px; height:38px; border-radius:12px; flex:none; display:grid; place-items:center;
  background:var(--hd-mark-bg, var(--ink)); color:var(--hd-mark-fg, #fff);
  transition:background var(--dur) var(--ease);
}
.logo-mark svg{ width:26px; height:26px; color:inherit; }   /* house icon: 512 viewBox, drawn with 24-unit strokes */
.logo-text{ font-size:1.18rem; font-weight:800; line-height:1; white-space:nowrap; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header.site-header{
  --hd-fg:var(--ink); --hd-soft:var(--ink-soft); --hd-hover:rgba(21,22,26,.06);
  --hd-btn-bg:var(--surface); --hd-btn-bd:var(--line);
  --hd-mark-bg:var(--ink); --hd-mark-fg:#fff;
  --hd-pill-bg:var(--sand); --hd-cta-bg:var(--ink); --hd-cta-fg:#fff;
  height:var(--header-h);
}
.site-header.site-header.header-transparent:not(.is-scrolled){
  --hd-fg:#fff; --hd-soft:rgba(255,255,255,.9); --hd-hover:rgba(255,255,255,.14);
  --hd-btn-bg:rgba(255,255,255,.14); --hd-btn-bd:rgba(255,255,255,.34);
  --hd-mark-bg:rgba(255,255,255,.18); --hd-mark-fg:#fff;
  --hd-pill-bg:rgba(255,255,255,.22); --hd-cta-bg:#fff; --hd-cta-fg:var(--ink);
}
.site-header.site-header:not(.header-transparent){
  background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:saturate(1.4) blur(14px); backdrop-filter:saturate(1.4) blur(14px);
}

/* three zones: logo | nav (centred) | actions */
.site-header.site-header .header-inner{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:16px; height:var(--header-h);
}
.site-header.site-header .logo{ gap:10px; color:var(--hd-fg); justify-self:start; font-size:inherit; letter-spacing:0; }
.site-header.site-header .logo svg{ color:inherit; }
.site-header.site-header .logo-text{ color:var(--hd-fg); }

.site-header.site-header .nav-links{ gap:2px; font-size:.93rem; justify-self:center; }
.site-header.site-header .nav-links a{
  padding:9px 14px; border-radius:var(--r-pill); color:var(--hd-soft); font-weight:600; white-space:nowrap;
  transition:background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-header.site-header .nav-links a:hover{ background:var(--hd-hover); color:var(--hd-fg); }
.site-header.site-header .nav-links a.is-active{ background:var(--hd-pill-bg); color:var(--hd-fg); font-weight:700; }
.site-header.site-header .nav-links a.is-active::after{ content:none; display:none; }

.site-header.site-header .header-actions{ justify-self:end; gap:6px; min-width:0; }
.site-header.site-header .icon-btn{ background:var(--hd-btn-bg); border-color:var(--hd-btn-bd); color:var(--hd-fg); }
.site-header.site-header .location-pill{ color:var(--hd-soft); border-color:var(--hd-btn-bd); padding:8px 12px; font-size:.8rem; white-space:nowrap; }
.site-header.site-header .header-cta{
  background:var(--hd-cta-bg); color:var(--hd-cta-fg); border-radius:var(--r-pill); padding:10px 16px; min-height:42px; font-size:.88rem;
}
.site-header.site-header .header-cta:hover{ background:var(--hd-cta-bg); box-shadow:var(--shadow-sm); filter:brightness(.94); }
.site-header.site-header .header-call{ display:none; }

@media (max-width:1279px){ .site-header.site-header .location-pill{ display:none; } }
@media (min-width:768px) and (max-width:1099px){
  .site-header.site-header .header-cta{ display:none; }
  .site-header.site-header .header-call{ display:inline-flex; }
  .site-header.site-header .nav-links a{ padding:8px 11px; font-size:.88rem; }
}
@media (min-width:768px) and (max-width:899px){
  .site-header.site-header .logo-text{ display:none; }
  .site-header.site-header .nav-links a{ padding:8px 9px; font-size:.84rem; }
}

/* hamburger (built by initMobileMenu in main.js; phones only) */
.menu-btn{
  display:none; width:44px; height:44px; padding:0; border:0; border-radius:14px; background:transparent; color:var(--hd-fg);
  align-items:center; justify-content:center; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.menu-btn__bars{ position:relative; display:block; width:24px; height:16px; }
.menu-btn__bars i{
  position:absolute; inset-inline:0; height:2px; border-radius:2px; background:currentColor;
  transition:transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.menu-btn__bars i:nth-child(1){ top:0; }
.menu-btn__bars i:nth-child(2){ top:7px; }
.menu-btn__bars i:nth-child(3){ top:14px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(1){ top:7px; transform:rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(2){ opacity:0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(3){ top:7px; transform:rotate(-45deg); }
.mobile-menu, .mobile-menu-backdrop{ display:none; }

@media (max-width:767px){
  :root{ --header-h:64px; }
  .site-header.site-header .header-inner{ grid-template-columns:1fr auto; gap:10px; }
  .site-header.site-header .logo-text{ font-size:1.08rem; }
  .logo-mark{ width:36px; height:36px; border-radius:11px; }
  .site-header.site-header .header-cta{ display:none; }
  .site-header.site-header .header-call, .site-header.site-header #notifBtn{ display:none; }   /* call + WhatsApp live in the menu */
  .site-header.site-header .menu-btn{ display:inline-flex; }
  .site-header.site-header .icon-btn{ width:40px; height:40px; }
  /* home: header floats over the hero photo, turns solid after scrolling */
  .site-header.site-header.header-transparent:not(.is-scrolled){ position:absolute; background:transparent; border-color:transparent; }
  .site-header.site-header.header-transparent.is-scrolled{ background:rgba(251,249,245,.94); }
  /* over the photo the logo is a bare glyph + name (no tile) */
  .site-header.site-header.header-transparent:not(.is-scrolled) .logo-mark{ background:transparent; width:30px; }

  /* menu sheet: dark card under the header, same family as the bottom bar */
  html.menu-open{ overflow:hidden; }
  html.menu-open .site-header.site-header{ z-index:90; }
  .mobile-menu-backdrop{
    display:block; position:fixed; inset:0; z-index:75; background:rgba(10,12,16,.5);
    -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
    opacity:0; visibility:hidden; transition:opacity .25s var(--ease), visibility 0s linear .25s;
  }
  .mobile-menu{
    display:block; position:fixed; z-index:80; top:calc(var(--header-h) + 6px); inset-inline:12px;
    max-height:calc(100vh - var(--header-h) - 24px); max-height:calc(100svh - var(--header-h) - 24px); overflow-y:auto;
    padding:10px; border-radius:28px; background:var(--footer-bg); color:#fff; box-shadow:0 30px 70px -20px rgba(0,0,0,.65);
    opacity:0; visibility:hidden; transform:translateY(-10px) scale(.98); transform-origin:top center;
    transition:opacity .25s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  html.menu-open .mobile-menu-backdrop{ opacity:1; visibility:visible; transition-delay:0s; }
  html.menu-open .mobile-menu{ opacity:1; visibility:visible; transform:none; transition-delay:0s; }
  .mobile-menu a{
    display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:54px; padding:0 20px; border-radius:20px;
    color:rgba(255,255,255,.9); font-size:1.05rem; font-weight:600; transition:background .2s var(--ease), color .2s var(--ease);
  }
  .mobile-menu a svg{ flex:none; opacity:.55; }
  .mobile-menu a:hover, .mobile-menu a:focus-visible{ background:rgba(255,255,255,.1); color:#fff; }
  .mobile-menu a.is-active{ background:#fff; color:var(--ink); font-weight:700; }
  .mobile-menu a.is-active svg{ opacity:.8; }
  .mobile-menu__contact{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; padding-top:10px; border-top:1px solid var(--footer-line); }
  .mobile-menu__contact a{ justify-content:center; min-height:50px; padding:0 12px; border:1px solid rgba(255,255,255,.28); border-radius:999px; font-size:.95rem; }
  .mobile-menu__contact a.is-wa{ background:#fff; color:var(--ink); border-color:#fff; }
  .mobile-menu__contact a.is-wa:hover{ background:var(--sand); }
}
@media (prefers-reduced-motion: reduce){
  .menu-btn__bars i, .mobile-menu, .mobile-menu-backdrop{ transition:none; }
}

/* ==========================================================================
   Bottom navigation (phones)
   ========================================================================== */
@media (max-width:767px){
  :root{ --bottom-nav-h:78px; }                           /* 64px pill + 14px gap */
  body{ padding-bottom:0; }
  /* floating dark pill, four icons; the current page (and any icon you hover / press) turns into a white circle */
  .bottom-nav{
    left:50%; right:auto; translate:-50% 0; width:min(calc(100% - 40px), 340px); height:64px;
    bottom:calc(14px + env(safe-area-inset-bottom)); padding:0 8px; gap:2px; align-items:center; justify-content:space-between;
    background:var(--footer-bg); border:0; border-radius:999px; box-shadow:0 0 0 1px rgba(255,255,255,.14), 0 18px 36px -14px rgba(10,12,16,.6), 0 2px 6px rgba(10,12,16,.25);
  }
  .bottom-nav a{
    position:relative; flex:1; min-width:0; height:64px; display:grid; place-items:center; padding:0; border-radius:50%;
    color:#fff; -webkit-tap-highlight-color:transparent; transition:color .25s var(--ease);
  }
  .bottom-nav a::before{
    content:""; position:absolute; top:50%; left:50%; width:46px; height:46px; border-radius:50%; background:#fff;
    translate:-50% -50%; scale:.4; opacity:0; transition:scale .3s var(--ease), opacity .2s var(--ease);
  }
  .bottom-nav a svg{ position:relative; width:22px; height:22px; stroke-width:1.6; transition:transform var(--dur) var(--ease); }
  /* label stays for screen readers, hidden visually */
  .bottom-nav a span{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  .bottom-nav a:active svg{ transform:scale(.9); }
  .bottom-nav a.is-active, .bottom-nav a:active, .bottom-nav a:focus-visible{ color:var(--ink); }
  .bottom-nav a.is-active::before, .bottom-nav a:active::before, .bottom-nav a:focus-visible::before{ scale:1; opacity:1; }
  .bottom-nav a:focus-visible{ outline:2px solid #fff; outline-offset:-3px; }
  .bottom-nav a.is-active:focus-visible{ outline-color:var(--ink); }
}
@media (max-width:767px){
  /* hover works in a narrow desktop window and in phone emulation too (no (hover:hover) gate) */
  .bottom-nav a:hover{ color:var(--ink); }
  .bottom-nav a:hover::before{ scale:1; opacity:1; }
}

/* property page: floating CTA bar sits above the bottom nav */
.mobile-cta-bar .btn{
  min-height:46px; flex:1 1 0; min-width:0; padding:8px 10px; line-height:1.35; text-align:center;
  white-space:normal;               /* wrap instead of pushing a button out of the card on narrow phones / wide fonts */
}
@media (min-width:768px) and (max-width:960px){ .mobile-cta-bar{ bottom:0; } body.has-cta-bar{ padding-bottom:84px; } }
@media (max-width:767px){
  .mobile-cta-bar{
    left:12px; right:12px; bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px); padding:10px 12px;
    border:1px solid var(--line); border-radius:24px; box-shadow:0 14px 30px -14px rgba(10,12,16,.4);
  }
  body.has-cta-bar{ padding-bottom:0; }
  body.has-cta-bar .site-footer{ padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 84px); }
}

/* ==========================================================================
   Footer (identical on every page)
   ========================================================================== */
.site-footer{
  background:var(--footer-bg); color:var(--footer-text); border-top:3px solid var(--gold);
  padding:64px 0 0; margin-top:72px;
}
body[data-page="home"] .site-footer{ margin-top:0; }
.site-footer .footer-grid{ grid-template-columns:1.5fr 1fr 1fr 1.35fr; gap:44px; padding-bottom:48px; }
.site-footer .logo{ display:inline-flex; align-items:center; gap:10px; color:#fff; margin-bottom:16px; }
.site-footer .logo-mark{ background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.16); }
.footer-brand p{ max-width:300px; line-height:1.9; font-size:.92rem; color:var(--footer-text); }

.site-footer .footer-grid h5{
  color:#fff; font-size:1rem; font-weight:700; text-transform:none; letter-spacing:0; margin-bottom:20px;
  padding-bottom:12px; position:relative;
}
.site-footer .footer-grid h5::after{ content:""; position:absolute; inset-inline-start:0; bottom:0; width:28px; height:2px; background:var(--gold); border-radius:2px; }
.site-footer .footer-grid ul{ gap:4px; }
.site-footer .footer-grid a{ color:var(--footer-text); font-size:.92rem; transition:color var(--dur) var(--ease); }
.site-footer .footer-grid ul a{ display:inline-block; padding:5px 0; }
.site-footer .footer-grid a:hover{ color:#fff; text-decoration:none; }

.footer-contact .contact-list{ gap:10px; margin-bottom:20px; }
.footer-contact .contact-list li{ display:flex; align-items:flex-start; gap:10px; font-size:.92rem; line-height:1.7; }
.footer-contact .contact-list svg{ flex:none; margin-top:4px; color:var(--gold); }
.footer-contact .contact-list a{ padding:0; }
.footer-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.site-footer .footer-actions .btn{ flex:1 1 120px; min-height:44px; border-radius:var(--r-pill); font-size:.88rem; }
.site-footer .footer-actions .btn-wa{ background:#fff; color:var(--ink); }
.site-footer .footer-actions .btn-wa:hover{ background:var(--sand); color:var(--ink); }
.site-footer .footer-actions .btn-call{ border-color:rgba(255,255,255,.3); color:#fff; }
.site-footer .footer-actions .btn-call:hover{ border-color:#fff; color:#fff; }

.site-footer .footer-bottom{
  border-top:1px solid var(--footer-line); color:rgba(255,255,255,.58); padding:22px 0;
  display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; font-size:.84rem;
}
.site-footer .footer-bottom a{ color:rgba(255,255,255,.8); display:inline-flex; align-items:center; gap:6px; min-height:36px; }
.site-footer .footer-bottom a:hover{ color:#fff; }

@media (max-width:900px){
  .site-footer .footer-grid{ grid-template-columns:1fr 1fr; gap:34px 24px; }
  .footer-brand, .footer-contact{ grid-column:1 / -1; }
  .footer-brand p{ max-width:520px; }
}
@media (max-width:767px){
  .site-footer{ padding-top:44px; margin-top:56px; padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }   /* the footer runs under the floating bar */
  .site-footer .footer-grid{ padding-bottom:32px; }
  .footer-contact{
    background:rgba(255,255,255,.05); border:1px solid var(--footer-line); border-radius:var(--r-card); padding:22px 20px;
  }
  .site-footer .footer-grid ul a{ padding:7px 0; }
  .site-footer .footer-bottom{ flex-direction:column; text-align:center; gap:4px; padding:20px 0 24px; }
}

/* ==========================================================================
   Home hero — simplified: eyebrow · title · one search field · quick filters · one featured unit
   ========================================================================== */
.hero-inner{ padding-inline:24px; }
.hero{ min-height:clamp(620px, 100svh, 900px); }
.hero-media::after{
  background:
    linear-gradient(270deg, rgba(10,12,16,.5) 0%, rgba(10,12,16,0) 62%),
    linear-gradient(180deg, rgba(10,12,16,.42) 0%, rgba(10,12,16,.12) 36%, rgba(10,12,16,.7) 100%);
}
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:12px; margin-bottom:16px; font-size:.95rem; font-weight:600; color:rgba(255,255,255,.92);
}
.hero-eyebrow::before{ content:""; width:30px; height:2px; border-radius:2px; background:#E6C28F; }
.hero h1{ font-size:clamp(3rem, 6vw, 5.2rem); line-height:1.2; letter-spacing:0; max-width:640px; }
.hero p{ margin-top:16px; max-width:460px; font-size:1.05rem; line-height:1.9; color:rgba(255,255,255,.86); }
.hero-search{ margin-top:30px; max-width:600px; }

/* one clean search pill */
.hero .search-bar{ height:64px; padding:6px 22px 6px 6px; gap:12px; box-shadow:0 18px 40px -16px rgba(0,0,0,.5); }
.hero .search-bar input{ font-size:1rem; min-width:0; }
.hero .search-bar .search-submit{
  width:auto; min-width:0; height:52px; padding:0 24px; border-radius:var(--r-pill); gap:8px; font-weight:700; font-size:.95rem;
  background:var(--ink); color:#fff; transition:background var(--dur) var(--ease);
}
.hero .search-bar .search-submit:hover{ background:#000; }
.hero-chips{ margin-top:16px; gap:8px; }
.hero-chips .chip{ padding:8px 16px; font-size:.85rem; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }

/* featured unit card: photo, name + price, one meta line, two actions */
.hero-featured{ width:360px; padding:14px; border-radius:26px; box-shadow:0 30px 70px -24px rgba(0,0,0,.55); }
.hero-featured .hf-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.hero-featured .hf-top .hf-badge{ margin-bottom:0; background:var(--sand); }
.hero-featured .hero-arrows{ position:static; display:flex; gap:8px; }
.hero-featured .hero-arrows button{
  width:36px; height:36px; background:var(--sand); border:1px solid var(--line); color:var(--ink);
  -webkit-backdrop-filter:none; backdrop-filter:none; transition:background var(--dur) var(--ease);
}
.hero-featured .hero-arrows button:hover{ background:var(--sand-2); }
.hero-featured .hero-arrows button:active{ transform:scale(.92); }
.hero-featured .hf-img{ height:190px; border-radius:18px; margin-bottom:14px; }
.hero-featured .hf-type{
  position:absolute; bottom:10px; inset-inline-start:10px; padding:5px 12px; border-radius:var(--r-pill); font-size:.76rem; font-weight:700;
  color:#fff; background:rgba(21,22,26,.62); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
}
.hero-featured h3{ font-size:1.12rem; line-height:1.5; }
html[dir="rtl"] .hero-featured .hf-price{ font-size:1.05rem; font-weight:800; }
.hero-featured .hf-meta{
  display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line);
  font-size:.84rem; color:var(--muted);
}
.hero-featured .hf-meta span + span:not([hidden])::before{ content:"\2022"; margin-inline-end:16px; color:var(--line-strong); }
.hero-featured .hf-meta b{ color:var(--ink); font-weight:700; }
.hero-featured .hf-actions{ margin-top:14px; }
.hero-featured .hf-actions .btn{ min-height:46px; font-size:.85rem; border-radius:14px; }

/* small laptops: keep the card clear of the search field */
@media (min-width:1024px) and (max-width:1099px){
  .hero-featured{ width:330px; }
  .hero-search{ max-width:540px; }
  .hero h1{ max-width:520px; }
}

/* tablet + phone: the card sits under the text in a compact horizontal layout */
@media (max-width:1023px){
  .hero{ min-height:0; padding-bottom:28px; align-items:stretch; }
  html[dir="rtl"] .hero-featured{ left:auto; right:auto; bottom:auto; }
  .hero-featured{
    display:grid; grid-template-columns:clamp(104px, 26vw, 200px) 1fr; grid-template-areas:"top top" "img info" "meta meta" "act act";
    gap:12px 14px; position:relative; width:auto; max-width:none; margin:22px 24px 0; padding:12px; border-radius:22px;
  }
  .hero-featured .hf-top{ grid-area:top; margin:0; }
  .hero-featured .hf-img{ grid-area:img; height:auto; aspect-ratio:1 / 1; margin:0; border-radius:16px; }
  .hero-featured .hf-type{ display:none; }
  .hero-featured .hf-info{ grid-area:info; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; min-width:0; }
  .hero-featured .hf-info h3{ font-size:1.06rem; }
  html[dir="rtl"] .hero-featured .hf-price{ text-align:start; font-size:1.12rem; }
  .hero-featured .hf-meta{ grid-area:meta; margin:0; }
  .hero-featured .hf-actions{ grid-area:act; margin:0; }
}
@media (min-width:768px) and (max-width:1023px){ .hero .hf-type{ display:inline-block; } }

/* phones: full-screen photo hero — brand + menu, giant two-line title, short line, one pill button; the floating bar sits over the photo */
.hero-cta{ display:none; }
@media (max-width:767px){
  .hero{
    background:var(--ink); display:flex; flex-direction:column; justify-content:flex-start;
    min-height:100vh; min-height:100svh; padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 18px);
  }
  .hero-media{ display:block; }
  .hero-media::after{
    background:linear-gradient(180deg, rgba(10,12,16,.5) 0%, rgba(10,12,16,.14) 34%, rgba(10,12,16,.2) 56%, rgba(10,12,16,.68) 100%);
  }
  .hero-inner{ flex:1; display:flex; flex-direction:column; padding-top:calc(var(--header-h) + 14px); padding-bottom:0; padding-inline:16px; }
  .hero-eyebrow{ display:none; }
  .hero h1{
    color:#fff; font-size:clamp(2.6rem, 14vw, 4.2rem); line-height:1.12; letter-spacing:0; max-width:none; text-align:center; text-shadow:0 2px 30px rgba(0,0,0,.28);
  }
  .hero p{
    display:block; margin:auto auto 0; padding-top:24px; max-width:21rem; text-align:center; font-size:.95rem; line-height:1.8; color:rgba(255,255,255,.94); text-shadow:0 1px 14px rgba(0,0,0,.45);
  }
  .hero-search{ display:none; }                       /* no search + quick filters on phones */
  .hero-featured{ display:none; }                     /* the unit card is for tablets and desktops; units are right below */

  .hero-cta{
    position:relative; display:flex; align-items:center; justify-content:center; margin-top:20px; min-height:64px; padding:6px 64px;
    border-radius:999px; background:#fff; color:var(--ink); font-size:1.05rem; font-weight:700; -webkit-tap-highlight-color:transparent;
    box-shadow:0 18px 38px -18px rgba(0,0,0,.55); transition:transform .25s var(--ease), box-shadow .25s var(--ease);
  }
  .hero-cta:active{ transform:scale(.98); }
  .hero-cta__go{
    position:absolute; inset-block:6px; inset-inline-end:6px; aspect-ratio:1; border-radius:50%; display:grid; place-items:center;
    background:var(--footer-bg); color:#fff; transition:transform .3s var(--ease);
  }
  .hero-cta__go svg{ transition:translate .3s var(--ease); }
  .hero-cta:active .hero-cta__go svg{ translate:-3px 0; }
}
@media (max-width:767px){
  .hero-cta:hover .hero-cta__go svg{ translate:-3px 0; }
  .hero-cta:hover{ box-shadow:0 22px 44px -16px rgba(0,0,0,.6); }
}

/* soft cross-fade when the unit changes */
@keyframes hfSwap{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.hero-featured.is-swap .hf-img, .hero-featured.is-swap .hf-info, .hero-featured.is-swap .hf-meta{ animation:hfSwap .34s var(--ease) both; }
@media (prefers-reduced-motion: reduce){ .hero-featured.is-swap .hf-img, .hero-featured.is-swap .hf-info, .hero-featured.is-swap .hf-meta{ animation:none; } }

/* ==========================================================================
   Phones: general polish + home sections
   ========================================================================== */
@media (max-width:767px){
  /* iOS zooms into inputs under 16px; keep touch targets comfortable */
  .input, .select, textarea, select, .search-bar input{ font-size:16px; }
  .btn{ min-height:46px; }
  .btn-sm{ min-height:40px; }
  .icon-btn{ min-width:40px; min-height:40px; }

  .section{ padding:44px 0; }
  .section-tight{ padding:28px 0; }
  .section-head{ margin-bottom:20px; align-items:center; }
  .section-head .h2{ font-size:1.5rem; }
  .sec-title{ font-size:1.7rem; line-height:1.4; }
  .section-head .see-all{ min-height:40px; }

  /* units rail: show the next card peeking so it's obviously swipeable */
  .rail{ gap:14px; scroll-padding-inline:18px; scrollbar-width:none; }
  .rail .card-property{ min-width:0; flex:0 0 min(78vw, 300px); }

  /* unit types: 2 columns, the odd last card spans the row */
  .types__head{ margin-bottom:22px; }
  .types__grid{ gap:12px; }
  .type-card__body{ padding:12px 14px 14px; gap:2px; }
  .type-card__title{ font-size:1rem; }
  .type-card:last-child:nth-child(odd){ grid-column:1 / -1; }
  .type-card:last-child:nth-child(odd) .type-card__media{ aspect-ratio:16 / 8; }

  /* about */
  .about__intro{ gap:24px; }
  .about__intro + .about__intro{ margin-top:48px; }
  .about__image{ aspect-ratio:16 / 11; }
  .about__text{ font-size:1rem; line-height:1.95; margin:12px 0 22px; }
  .about__features{ gap:18px; }
  .about-feature{ gap:14px; }
  .about-feature__icon{ width:46px; height:46px; border-radius:14px; }
  .about-feature__title{ font-size:1.02rem; margin-bottom:4px; }
  .about-feature__desc{ font-size:.92rem; line-height:1.8; }
  .stats-row{ gap:8px; }
  .stat-card{ padding:16px 6px; }
  .stat-card__num{ font-size:1.35rem; }
  .stat-card__label{ font-size:.78rem; }

  /* services: swipeable rail instead of six stacked cards */
  .section-header{ margin-bottom:24px; }
  .sec-subtitle{ font-size:.95rem; line-height:1.85; }
  .services__grid{
    display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:18px;
    margin-inline:-18px; padding:2px 18px 10px; scrollbar-width:none; -webkit-overflow-scrolling:touch;
  }
  .services__grid::-webkit-scrollbar{ display:none; }
  .svc-card{ flex:0 0 min(80vw, 320px); scroll-snap-align:start; }
  .svc-card__body{ padding:16px; }
  .svc-card__desc{ font-size:.9rem; line-height:1.75; }

  /* closing CTA */
  .cta-section{ padding:48px 0; }
  .cta-section__inner{ padding:0 18px; gap:20px; text-align:center; justify-items:center; }
  .cta-section__image{ width:112px; max-width:none; aspect-ratio:1 / 1; border-radius:50%; border:3px solid rgba(255,255,255,.35); }
  .cta-section__title{ font-size:1.5rem; }
  .cta-section__lead{ font-size:.95rem; line-height:1.9; margin:12px 0 22px; }
  .cta-section .btn{ width:100%; }
}

/* ---------- Other pages on phones ---------- */
@media (max-width:767px){
  .breadcrumb{ padding-top:16px; font-size:.82rem; }
  .page-toolbar{ gap:10px; }
  .card-property .cp-fav{ width:40px; height:40px; }
  .empty-state{ padding-inline:8px; }
  .pagination{ flex-wrap:wrap; justify-content:center; }
}

@media (prefers-reduced-motion: reduce){
  .bottom-nav a svg, .hero-featured .hero-arrows button{ transition:none; }
}


/* ==========================================================================
   Phones: inner pages (units list · unit details · map · about)
   ========================================================================== */
.quote{ margin:0; }  /* <figure>/<blockquote> default margins were squeezing the review cards */
.quote blockquote{ margin:0; }

@media (max-width:767px){
  .page-head{ padding:12px 0 4px; }
  .page-head h1{ font-size:1.75rem; }
  .page-head .lede{ font-size:.95rem; line-height:1.8; }
  .card-surface{ padding:18px; }
}

/* ---------- Units list (properties / saved) ---------- */
.listing-bar{ flex-wrap:wrap; }
@media (max-width:640px){
  .page-toolbar{ display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:10px; margin-top:14px; align-items:stretch; }
  .page-toolbar .search-bar{ min-width:0; }
  .page-toolbar #mapViewLink{ width:auto; padding:0 18px; border-radius:var(--r-pill); gap:6px; }

  .listing-bar{ flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:12px; }
  .listing-bar > *{ min-width:0; max-width:100%; }
  .listing-bar .seg{ display:flex; width:100%; }
  .listing-bar .seg button{ flex:1 0 auto; }
  .type-chips{ flex-wrap:nowrap; overflow-x:auto; margin-inline:-18px; padding:2px 18px; scrollbar-width:none; }
  .type-chips::-webkit-scrollbar{ display:none; }
  .type-chips .chip{ flex:none; }
  .results-row{ margin:16px 0 14px; }

  /* grid view: two compact cards per row instead of one giant card */
  .grid-cards{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .grid-cards .card-property{ border-radius:18px; }
  .grid-cards .card-property .cp-media{ aspect-ratio:1 / 1; }
  html[dir="rtl"] .grid-cards .card-property .cp-type{ right:8px; top:8px; padding:4px 10px; font-size:.72rem; }
  html[dir="rtl"] .grid-cards .card-property .cp-fav{ left:6px; top:6px; width:34px; height:34px; }
  .grid-cards .cp-body{ padding:12px; gap:6px; }
  .grid-cards .cp-body h3{ font-size:.95rem; }
  .grid-cards .cp-price{ font-size:.9rem; }
  html[dir="rtl"] .grid-cards .cp-loc{ font-size:.76rem; overflow:hidden; text-overflow:ellipsis; }
  .grid-cards .cp-stats{ gap:10px; margin-top:0; padding-top:8px; }
  .grid-cards .cp-stat{ font-size:.75rem; gap:4px; }
  .grid-cards .cp-stat:nth-child(n+3){ display:none; }

  /* list view: thumbnail beside the details */
  .row-property{ flex-direction:row; gap:12px; padding:10px; border-radius:18px; }
  .row-property .rp-media{ width:112px; aspect-ratio:1 / 1; border-radius:12px; }
  .row-property .rp-top{ flex-direction:column; gap:2px; }
  .row-property .cp-stats{ margin-top:2px; padding-top:8px; gap:10px; }

  .pagination{ flex-wrap:nowrap; gap:4px; margin-top:32px; }
  .pagination button{ min-width:34px; height:38px; padding:0 6px; font-size:.84rem; }
}

/* ---------- Unit details ---------- */
.amenities-grid{ grid-template-columns:repeat(4, minmax(0,1fr)); }   /* every unit has 4 amenities: one tidy row at any width */
.pd-header, .pd-stats, .pd-block{ border-bottom:0; }                    /* no divider lines between the unit-details sections */
@media (max-width:767px){
  .gallery-hero{ border-radius:20px; }
  .gallery-hero .gh-main{ height:min(64vw, 300px); }
  .gallery-hero .gh-side{ height:96px; }
  .pd-layout{ margin-top:20px; }
  .pd-header{ padding-bottom:16px; gap:10px; }
  .pd-header .pd-price b{ font-size:1.5rem; }
  .pd-stats{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; padding:16px 0; }
  .pd-stat{ flex-direction:column; justify-content:center; gap:8px; text-align:center; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:12px 4px 10px; }
  .pd-stat .pd-stat-icon{ width:38px; height:38px; }
  .pd-stat b{ font-size:.86rem; line-height:1.35; }
  .pd-stat div > span{ display:block; font-size:.75rem; line-height:1.4; }
  .amenities-grid{ gap:8px; }
  .amenity{ gap:8px; padding:14px 4px; border-radius:16px; }
  .amenity span{ font-size:.75rem; line-height:1.4; }
  .pd-block{ padding:22px 0; }
  .similar-scroller{
    display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:18px;
    margin-inline:-18px; padding:2px 18px 8px; scrollbar-width:none;
  }
  .similar-scroller::-webkit-scrollbar{ display:none; }
  .similar-scroller .card-property{ flex:0 0 min(72vw, 280px); scroll-snap-align:start; }
}

/* ---------- Map: map first, units as a swipeable strip underneath ---------- */
@media (max-width:900px){
  .map-page-wrap{ display:flex; flex-direction:column; height:auto; }
  .map-sidebar{ display:contents; }
  .map-sidebar-head{ order:0; margin:0; padding:14px 18px; }
  .map-sidebar-head h1{ font-size:1.5rem; margin-top:8px; }
  .map-relative{ order:1; height:min(56svh, 480px); min-height:300px; }
  #leafletMap{ min-height:0; }
  .map-list{
    order:2; flex-direction:row; gap:12px; margin:0; padding:14px 18px 8px; overflow-x:auto;
    scroll-snap-type:x mandatory; scroll-padding-inline:18px; scrollbar-width:none;
  }
  .map-list::-webkit-scrollbar{ display:none; }
  .map-list .card-property{ flex:0 0 min(74vw, 280px); scroll-snap-align:start; }
  #mapListEmpty{ order:3; }
  .map-floating-card{ left:12px; right:12px; bottom:12px; }
}

/* ---------- About ---------- */
@media (max-width:767px){
  .acc summary{ padding:16px; }
  .acc-body{ padding:0 16px 18px; }
  .plan{ padding:20px; }
  .quote-grid{
    display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:18px;
    margin-inline:-18px; padding:2px 18px 8px; scrollbar-width:none;
  }
  .quote-grid::-webkit-scrollbar{ display:none; }
  .quote-grid .quote{ flex:0 0 min(84vw, 340px); scroll-snap-align:start; padding:18px; }
  .quote blockquote{ font-size:.95rem; line-height:1.85; }
}

/* very narrow phones (≤ 359px): let pagination wrap instead of widening the page */
@media (max-width:359px){ .pagination{ flex-wrap:wrap; } }


/* ==========================================================================
   Units page on phones/tablets: floating filters button + bottom-sheet drawer
   ========================================================================== */
@media (max-width:1023px){
  .btn.filters-fab.filters-fab{
    position:fixed; z-index:66; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translateX(-50%);
    display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:0 26px;
    border:0; border-radius:var(--r-pill); background:var(--ink); color:#fff; font-size:1rem; font-weight:800; white-space:nowrap;
    box-shadow:0 16px 34px -10px rgba(21,22,26,.6), 0 4px 12px rgba(21,22,26,.2);
    transition:transform .28s var(--ease), opacity .28s var(--ease), box-shadow var(--dur) var(--ease);
    -webkit-tap-highlight-color:transparent;
  }
  .btn.filters-fab.filters-fab:hover, .btn.filters-fab.filters-fab:focus-visible{ background:var(--ink); color:#fff; border:0; }
  .btn.filters-fab.filters-fab:active{ transform:translateX(-50%) scale(.95); }
  .filters-fab .fab-label{ order:0; }
  .filters-fab .fab-count{ order:1; }
  .filters-fab svg{ order:2; width:18px; height:18px; flex:none; }
  .filters-fab .fab-count{
    min-width:22px; height:22px; padding:0 6px; border-radius:var(--r-pill); background:#fff; color:var(--ink);
    font-size:.76rem; font-weight:800; display:grid; place-items:center; line-height:1;
  }
  .filters-fab .fab-count[hidden]{ display:none; }
  .btn.filters-fab.filters-fab.is-hidden, .btn.filters-fab.filters-fab.is-away{
    opacity:0; pointer-events:none; transform:translate(-50%, 18px) scale(.96);
  }

  /* drawer becomes a bottom sheet (was a full-screen takeover) */
  .filters-card{
    inset:auto 0 0 0; max-height:88svh; border:0; border-radius:26px 26px 0 0; padding:12px 22px calc(18px + env(safe-area-inset-bottom));
    box-shadow:0 -24px 60px -24px rgba(21,22,26,.45);
  }
  .filters-card::before{ content:""; display:block; width:44px; height:5px; margin:0 auto 14px; border-radius:3px; background:var(--line-strong); }
  .filters-card #filtersApplyMobile{
    position:sticky; bottom:6px; min-height:52px; margin-top:20px; border-radius:var(--r-pill);
    box-shadow:0 14px 28px -12px rgba(21,22,26,.55);
  }
}
@media (min-width:768px) and (max-width:1023px){
  .filters-card{ max-width:560px; margin-inline:auto; }
}
@media (max-width:767px){
  .btn.filters-fab.filters-fab{ bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 14px); }
  .page-head .lede{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
}
@media (prefers-reduced-motion: reduce){ .btn.filters-fab.filters-fab{ transition:none; } }

/* ==========================================================================
   Typography: Almarai (headings + body)
   ========================================================================== */
.search-bar input, .search-bar .input{ min-width:0; }          /* wider Arabic glyphs must never push the page sideways */
h1, h2, h3, .h1, .h2, .h3, .ab-hero__title, .sec-title, .sv-h2, .ab-h2{ text-wrap:balance; }


/* ==========================================================================
   Simple effects: hero intro, slow photo zoom, scroll reveal, press feedback, heart pop
   ========================================================================== */

/* press feedback everywhere */
.btn:active, .chip:active, .icon-btn:active{ transform:scale(.96); }
.card-property:active, .type-card:active, .svc-card:active, .ab-svc:active{ transform:scale(.985); }
@media (hover:hover){
  .site-footer .footer-grid ul a{ transition:color var(--dur) var(--ease), translate var(--dur) var(--ease); }
  .site-footer .footer-grid ul a:hover{ translate:-4px 0; }
}

/* favourite heart pops when you save a unit */
@keyframes heartPop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.4); } 100%{ transform:scale(1); } }
.card-property .cp-fav.pop svg, .cp-fav.pop svg{ animation:heartPop .45s var(--ease); }

/* bottom bar: the current page's icon settles in */
@keyframes navPop{ 0%{ transform:scale(.75); } 60%{ transform:scale(1.15); } 100%{ transform:scale(1); } }

/* scroll reveal (classes are added by js/fx.js only to blocks below the fold) */
.fx{ opacity:0; translate:0 24px; transition:opacity .7s var(--ease) var(--fx-d, 0ms), translate .7s var(--ease) var(--fx-d, 0ms); }
.fx.is-in{ opacity:1; translate:0 0; }

@media (prefers-reduced-motion: no-preference){
  @keyframes fxUp{ from{ opacity:0; translate:0 18px; } to{ opacity:1; translate:0 0; } }
  @keyframes fxFade{ from{ opacity:0; } to{ opacity:1; } }
  @keyframes kenburns{ from{ transform:scale(1.03); } to{ transform:scale(1.13); } }

  main{ animation:fxFade .45s ease-out both; }
  .hero-media img{ animation:kenburns 22s ease-out both; transform-origin:60% 40%; }
  .hero-eyebrow, .hero h1, .hero p, .hero-cta, .hero-search, .hero-featured{ animation:fxUp .85s var(--ease) both; }
  .hero-eyebrow{ animation-delay:.08s; }
  .hero h1{ animation-delay:.18s; }
  .hero p{ animation-delay:.3s; }
  .hero-cta{ animation-delay:.42s; }
  .hero-search{ animation-delay:.38s; }
  .hero-featured{ animation-delay:.5s; }
  .bottom-nav a.is-active svg{ animation:navPop .6s var(--ease) .15s both; }
  .btn.filters-fab.filters-fab{ animation:fxUp .6s var(--ease) .6s both; }
}
@media (prefers-reduced-motion: reduce){ .fx{ opacity:1; translate:none; transition:none; } }
