/* ============================================================
   Midad — Arabic typography layer
   Loaded only on Arabic (RTL) pages, after site.css.
   Titles: ITF Qomra Arabic.  Body: Helvetica Neue LT Arabic.
   ============================================================ */

@font-face{font-family:'ITF Qomra';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/itf-qomra-regular.woff) format('woff')}
@font-face{font-family:'ITF Qomra';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/itf-qomra-medium.woff) format('woff')}
@font-face{font-family:'ITF Qomra';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/itf-qomra-bold.woff) format('woff')}

/* Display / titles use ITF Qomra; body inherits Helvetica Neue LT Arabic via --sans */
html[lang="ar"]{--disp:'ITF Qomra','Editors Note',Georgia,serif}

html[lang="ar"] .disp,
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3,html[lang="ar"] h4,
html[lang="ar"] .fs-h1,html[lang="ar"] .art-title,html[lang="ar"] .ncard__title,
html[lang="ar"] .pcard__name,html[lang="ar"] .idx-row__name{
  font-family:'ITF Qomra','Editors Note',Georgia,serif;
}

/* Arabic is a connected, un-cased, non-italic script:
   remove Latin tracking, italics and uppercasing everywhere. */
html[lang="ar"] body,
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3,html[lang="ar"] h4,
html[lang="ar"] p,html[lang="ar"] a,html[lang="ar"] span,html[lang="ar"] li,
html[lang="ar"] .eyebrow,html[lang="ar"] .disp,html[lang="ar"] .vlabel,
html[lang="ar"] .nav a,html[lang="ar"] label,html[lang="ar"] .art-meta,
html[lang="ar"] .read-more,html[lang="ar"] blockquote,html[lang="ar"] cite{
  letter-spacing:normal;
}
html[lang="ar"] .eyebrow,html[lang="ar"] .vlabel,
html[lang="ar"] [class*="__lab"],html[lang="ar"] [class*="__meta"]{
  text-transform:none;
}
html[lang="ar"] em,html[lang="ar"] i:not(.ar):not([class*="icon"]){font-style:normal}

/* Arabic runs slightly taller — give headings a touch more leading */
html[lang="ar"] .disp,html[lang="ar"] .fs-h1,html[lang="ar"] h1,html[lang="ar"] h2{
  line-height:1.28;
}
html[lang="ar"] .fs-lede,html[lang="ar"] .art-lead,html[lang="ar"] p{line-height:1.9}

/* Keep Latin brand names (Four Seasons, Atlantis, One&Only, MIDAD…) in their
   Latin faces even inside Arabic text */
html[lang="ar"] .brandlat{font-family:var(--serif,'Editors Note',Georgia,serif);letter-spacing:.02em}

/* Vertical Latin labels (EST. 2003 etc.) stay LTR */
html[lang="ar"] .vlabel{direction:ltr}

/* Mirror inline directional arrow glyphs (→ ←) for RTL reading order */
html[lang="ar"] .ar{display:inline-block;transform:scaleX(-1)}

/* ============================================================
   RTL fixes — post-launch QA pass
   ============================================================ */

/* Phone / tel numbers: keep LTR so digit groups don't reorder (e.g. 9200) */
html[lang="ar"] a[href^="tel:"]{direction:ltr;unicode-bidi:isolate;display:inline-block}

/* Leadership: names, roles and IDs align to the right */
html[lang="ar"] .lcard__base,
html[lang="ar"] .lcard__name,
html[lang="ar"] .lcard__role,
html[lang="ar"] .lprin__id,
html[lang="ar"] .lprin__name,
html[lang="ar"] .lprin__role{text-align:right}

/* FS amenities: move the diamond bullet to the right, indent from the right */
html[lang="ar"] .fs-amen li{padding-left:0;padding-right:1.2rem}
html[lang="ar"] .fs-amen li::before{left:auto;right:0}

/* Country-code dropdown: right-aligned options, dial code sits on the right,
   menu stacks above revealed content */
html[lang="ar"] .ccsel__opt{text-align:right;display:flex;align-items:center;gap:.55rem;justify-content:flex-start}
html[lang="ar"] .ccsel__search{text-align:right}
html[lang="ar"] .ccsel__menu{z-index:200}
html[lang="ar"] .cc-dial{direction:ltr;unicode-bidi:isolate;flex:0 0 auto}
html[lang="ar"] .cc-nm{flex:1 1 auto}

/* Image placeholders: Arabic must not be letter-spaced (it breaks the connected script) */
html[lang="ar"] .ph-ph span{letter-spacing:normal;text-transform:none;font-size:.72rem}

/* Buttons/CTAs: remove Latin tracking + casing so Arabic stays connected & in the body face */
html[lang="ar"] button,
html[lang="ar"] .fbtn,
html[lang="ar"] .cr-btn,
html[lang="ar"] .btn,
html[lang="ar"] .txtlink,
html[lang="ar"] [class*="__cta"]{letter-spacing:normal;text-transform:none;font-family:inherit}

/* ============================================================
   RTL fixes — QA pass 2
   ============================================================ */

/* Leader cards: right-align name/role under the photo */
html[lang="ar"] .lcard__btn{text-align:right}

/* Big Arabic titles: render Latin digits in Editors Note (ITF Qomra numerals look off at large sizes) */
html[lang="ar"] .sched__fig,
html[lang="ar"] .ftl-year,
html[lang="ar"] .stat__num,
html[lang="ar"] .sched__no{font-family:'Editors Note',Georgia,serif}

/* Country dropdown: search + options right-aligned, dial code on the right */
html[lang="ar"] .ccsel__search{text-align:right;direction:rtl}
html[lang="ar"] .ccsel__opt{direction:rtl;text-align:right;justify-content:flex-start}

/* Directional arrows: keep them mirrored on hover (don't flip back to →) */
html[lang="ar"] .txtlink:hover .ar{transform:scaleX(-1) translateX(6px)}
html[lang="ar"] .pcard:hover .pcard__cta .ar{transform:scaleX(-1) translateX(5px)}
html[lang="ar"] .nfeat:hover .read-more .ar{transform:scaleX(-1) translateX(5px)}
html[lang="ar"] .ncard:hover .read-more .ar{transform:scaleX(-1) translateX(5px)}

/* Hero: give harakat (damma/fatha) room so they aren't clipped by the reveal mask */
html[lang="ar"] .hero h1 .rl{padding-top:.26em}
/* Hero: tighten line spacing so all four words fit above the fold on load */
html[lang="ar"] .hero h1{line-height:1.0}

/* ============================================================
   RTL fixes — QA pass 3
   ============================================================ */

/* News pull-quote: accent line on the right (RTL), not the left */
html[lang="ar"] .art-quote{padding-left:0;padding-right:1.7rem;border-left:0;border-right:2px solid var(--rust)}

/* Home/About stats: mirror the column dividers and edge padding for RTL */
html[lang="ar"] .sched__cell{border-left:0;border-right:1px solid var(--hair-l);padding-left:clamp(1rem,2vw,2rem);padding-right:clamp(1rem,2vw,2rem)}
html[lang="ar"] .sched__cell:first-child{border-right:0;padding-right:0}

/* RTL-safe honeypot: inline left:-9999px extends scrollWidth in RTL; hide via clip with no offset */
html[lang="ar"] input[name="_gotcha"]{position:absolute!important;left:auto!important;right:auto!important;top:auto!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
