/* Right-to-left overrides, loaded only when the site is displayed in Arabic. */
body.rtl{text-align:right}
.rtl .card-facts,.rtl .hero-facts,.rtl .spec-grid{direction:rtl}
.rtl .main-nav{margin-left:0;margin-right:auto}
.rtl .filters label,.rtl .enquiry-form label{text-align:right}
.rtl .crumbs{direction:rtl}
.rtl .faq-item summary::after{float:left}
.rtl .card-link::after{content:""}
.rtl .btn-row{flex-direction:row}
.rtl .listing-layout{direction:rtl}
.rtl .detail-layout{direction:rtl}
.rtl .footer-grid{direction:rtl}
.rtl .data-table th,.rtl .data-table td{text-align:right}
.rtl .table th,.rtl .table td{text-align:right}
.rtl .right{text-align:left}
.rtl .sidebar{border-left:1px solid rgba(255,255,255,.1);border-right:0}
.rtl .side-nav a{border-left:0;border-right:3px solid transparent}
.rtl .side-nav a.active{border-right-color:var(--d-primary)}
.rtl .gallery-caption{direction:rtl}
.rtl .autocomplete-list{text-align:right}
.rtl .stat-card span,.rtl .stat-value{direction:ltr;display:inline-block}
.rtl .price-tag,.rtl .card-price{direction:ltr;text-align:right}
.rtl input[type=number],.rtl input[type=tel]{direction:ltr;text-align:right}

/* ==================================================================
   Mixed Arabic / Latin text
   ------------------------------------------------------------------
   Most of what this catalogue shows is developer-supplied and often
   English — project names, cities, price ranges. Dropped into an RTL
   paragraph the bidi algorithm takes the page's direction as the base,
   which throws full stops to the front of English sentences, swaps the
   ends of a price range and parks a comma on the wrong side of
   "Cagnes-sur-Mer, فرنسا".

   unicode-bidi:plaintext lets each of these take its base direction
   from its own first strong character instead, which is what makes
   them read correctly. Short fields keep the page's right alignment so
   the layout stays even; prose aligns with its own language, because a
   right-aligned English paragraph is just hard to read.
   ================================================================== */
.rtl .card-eyebrow,.rtl .card-body h3,.rtl .card-meta,.rtl .card-price,
.rtl .card-facts li,.rtl .crumbs,.rtl .dev-chip,.rtl .page-title,
.rtl .detail-hero h1,.rtl .detail-hero .lead,.rtl .hero-facts span,
.rtl .fact-list strong,.rtl .fact-list span,.rtl .tag,.rtl .photo-credit,
.rtl .data-table td,.rtl .data-table th,.rtl .stat-value,
.rtl .dev-card h3,.rtl .dev-card p,.rtl .city-name,
.rtl .unit-card h3,.rtl .spec-grid li,.rtl .amenity-list li,
.rtl .ab-opt-t,.rtl .ab-opt-s{unicode-bidi:plaintext}

.rtl .rich p,.rtl .rich li,.rtl .section-sub,.rtl .hero-sub{
  unicode-bidi:plaintext;text-align:start;
}

/* ==================================================================
   Direction-bound decoration
   ================================================================== */

/* The CMS alignment classes name an edge, but what an editor means by
   "left" is the edge the text starts from — so they mirror. */
.rtl .text-left{text-align:right}
.rtl .text-right{text-align:left}

/* Arrows point the way you travel, so they turn around. */
.rtl .arr{display:inline-block;transform:scaleX(-1)}

/* A caret made from two borders and rotated 45deg already points down;
   mirroring it only tipped it on its side. "Down" is not a direction that
   has a mirror image. */
.rtl .ab-pick::after{rotate:45deg}
body.rtl.has-hero .brand-cue span::after{
  border-inline-end:0;border-right:2px solid var(--plate-ink);
}

/* Card badges sit in the corners, which swap. */
.rtl .badge-featured{left:auto;right:12px}
.rtl .badge-status{right:auto;left:12px}

/* A list's bullets belong on the side the text starts from. */
.rtl .rich ul,.rtl .rich ol{padding-left:0;padding-right:1.2rem}

/* Label on one side, value on the other. */
.rtl .fact-list strong{text-align:left}

/* A phone number is read left to right in any language, and the leading
   "+" otherwise drifts to the end of it. */
.rtl .contact-list a[href^="tel:"],
.rtl .contact-list a[href*="wa.me"],
.rtl .header-phone,.rtl .phone-link{
  unicode-bidi:isolate;direction:ltr;
}

/* The nav underline sweeps out from the start of the word. */
.rtl .main-nav a::after{transform-origin:left center}
.rtl .main-nav a:hover::after{transform-origin:right center}

/* ==================================================================
   Arabic typography
   ------------------------------------------------------------------
   The Latin display scale is set tight — h1 sits at line-height .98
   with -0.028em tracking, which suits the heading face and suits Cairo
   not at all. Cairo's tails (ي, ش, ج, ع) drop well below the
   baseline, so at .98 they land outside the line box; in the hero,
   where every word sits in an overflow:hidden mask for the reveal
   animation, they were being sliced clean off. Negative tracking is
   wrong here too — Arabic is a connected script, and pulling the
   letters together squeezes the joins.
   ================================================================== */
body.rtl,.rtl h1,.rtl h2,.rtl h3,.rtl h4,
.rtl .hero-title,.rtl .section-title,.rtl .page-title{letter-spacing:normal}

.rtl h1{line-height:1.25}
.rtl h2{line-height:1.3}
.rtl h3,.rtl h4{line-height:1.45}

/* The reveal masks get room below the baseline, without moving the
   line itself: the padding grows the clip box, the negative margin
   takes the same amount back out of the flow. */
.rtl .hero-title .w{padding-bottom:.16em;margin-bottom:-.16em}

/* ------------------------------------------------------------------
   Single-line labels that clip
   ------------------------------------------------------------------
   The same descender problem as the headings, in miniature. These
   labels are set at line-height 1 or thereabouts — fine for Latin caps
   and digits — and clip to an ellipsis, so Cairo's tails (ن, و, ع)
   were being cut off flat at the bottom of the box.
   ------------------------------------------------------------------ */
.rtl .tab span{line-height:1.5}
.rtl .tab{padding-block:.45rem .4rem}
.rtl .ab-opt-t,.rtl .ab-opt-s{line-height:1.45}
