/* =========================================================
   RTL support — loaded by functions.php when is_rtl()
   (Arabic and any other right-to-left locale)

   Note: style.css already embeds html[dir="rtl"] rules for
   header/footer grids, hero, section-head, ws-list, adv-item
   and contact-item. This file covers what is still missing:
   the blog/single-post page and the remaining LTR leftovers.
   ========================================================= */

/* ---------- 1. Blog article page ---------- */

html[dir="rtl"] .post-hero,
html[dir="rtl"] .post-body { direction: rtl; }

html[dir="rtl"] .post-hero h1,
html[dir="rtl"] .post-body h2,
html[dir="rtl"] .post-body h3,
html[dir="rtl"] .post-body p,
html[dir="rtl"] .post-body li,
html[dir="rtl"] .post-body td,
html[dir="rtl"] .post-body th,
html[dir="rtl"] .post-body figcaption { text-align: right; }

/* keep media blocks direction-agnostic */
html[dir="rtl"] .post-body figure,
html[dir="rtl"] .post-body img,
html[dir="rtl"] .post-body .video-embed { direction: ltr; }

/* table headers keep centred feel, cells follow direction */
html[dir="rtl"] .post-body table { direction: rtl; }
html[dir="rtl"] .post-body th { text-align: right; }

/* lists indent on the right */
html[dir="rtl"] .post-body ul,
html[dir="rtl"] .post-body ol { padding-left: 0; padding-right: 24px; }

/* links inside Arabic copy inherit direction automatically */

/* ---------- 2. Remaining LTR leftovers in the theme ---------- */

html[dir="rtl"] .main-nav { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .header-actions { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .play svg { margin-left: 0; margin-right: 3px; }
html[dir="rtl"] .wa-head .close { margin-left: 0; margin-right: auto; }

/* the hero block hard-codes text-align:left for LTR copy */
html[dir="rtl"] .hero-content,
html[dir="rtl"] .hero h1,
html[dir="rtl"] .hero .lead,
html[dir="rtl"] .hero-cta,
html[dir="rtl"] .hero-notes { text-align: right; }

/* favourites price cell was flipped to the right for LTR */
html[dir="rtl"] .fav-row .price-cell { text-align: left; align-items: flex-start; }

/* ---------- 3. Safety net for mixed-script content ---------- */

/* Latin product codes (PC, TR90, UV400, 1.74) inside Arabic copy
   must keep their own reading order; browsers do this natively,
   this only guards against inherited text-align oddities. */
html[dir="rtl"] .post-body b,
html[dir="rtl"] .post-body strong { unicode-bidi: plaintext; }
