/* Arabic pages (html[dir="rtl"]): Arabic typefaces and right-to-left adjustments. Loads only on /ar/ pages, after premium.css. */

html[dir="rtl"], html[dir="rtl"] body {
  --font-family--heading: "Noto Naskh Arabic", "Hedvig Letters Serif", Georgia, serif;
  --font-family--body: "IBM Plex Sans Arabic", "TASA Orbiter", Arial, sans-serif;
  --font-family--label: "IBM Plex Sans Arabic", Arial, sans-serif;
}
html[dir="rtl"] body { font-family: var(--font-family--body); line-height: 1.8; }

/* Arabic letters join: spacing them out or setting capitals breaks the script */
html[dir="rtl"] *, html[dir="rtl"] *::before, html[dir="rtl"] *::after { letter-spacing: 0 !important; text-transform: none !important; }

/* Naskh needs more room between lines than the Latin serif */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] .ah-title, html[dir="rtl"] .sp-lead,
html[dir="rtl"] .ft-statement, html[dir="rtl"] .so-name, html[dir="rtl"] .cta-band h2 { line-height: 1.45 !important; font-weight: 500; }
html[dir="rtl"] .ah-hero .ah-title { font-family: var(--font-family--heading); font-size: clamp(2.5rem, 4.8vw, 4.5rem); max-width: 16ch; }
html[dir="rtl"] .page-head h1, html[dir="rtl"] .sp-head h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
html[dir="rtl"] .sc-head h2 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }
html[dir="rtl"] p, html[dir="rtl"] li { line-height: 1.85; }

/* the logo stays in Latin letters */
html[dir="rtl"] .brand-name { font-family: "Hedvig Letters Serif", Georgia, serif; }
html[dir="rtl"] .brand-text { direction: ltr; text-align: left; }

/* figures and Latin words keep their own order inside Arabic text */
html[dir="rtl"] .st-num, html[dir="rtl"] .proof-figures dd, html[dir="rtl"] .ah-num, html[dir="rtl"] .ah-badge-text strong { direction: ltr; unicode-bidi: isolate; }

/* hero: the statue and the shading move to the other side */
html[dir="rtl"] .ah-figure { right: auto; left: max(9vw, calc(50% - 560px)); transform: scaleX(-1) translateZ(0); }
html[dir="rtl"] .ah-stage::after { background: linear-gradient(270deg, #0a1424fa 0%, #0a1424e0 40%, #0a142466 72%, #0a142499 100%),
  linear-gradient(#0a1424b3, transparent 30%, transparent 60%, #0a1424f2); }
html[dir="rtl"] .ah-video-toggle { margin-left: 24px; margin-right: auto; }
@media (max-width: 991px) { html[dir="rtl"] .ah-figure { left: -8%; } }
@media (max-width: 600px) { html[dir="rtl"] .ah-figure { left: -30%; } }

/* arrows point the reading way */
html[dir="rtl"] .sc-arrow, html[dir="rtl"] .ah-btn-arrow { transform: scaleX(-1); }
html[dir="rtl"] .sc-card:hover .sc-arrow, html[dir="rtl"] .sp-link:hover .sc-arrow { transform: scaleX(-1) translateX(4px); }
html[dir="rtl"] .so-row:hover .sc-arrow { transform: scaleX(-1) translate(3px, -3px); }
html[dir="rtl"] .ah-btn.is-paper:hover .ah-btn-arrow { transform: scaleX(-1) translate(2px, -2px); }

/* lines and indents that sat on the left */
html[dir="rtl"] .st-grid li { padding-left: 24px; padding-right: 28px; border-left: 0; border-right: 1px solid #0a142438; }
@media (max-width: 767px) { html[dir="rtl"] .st-grid li { padding-right: 20px; padding-left: 0; } }
html[dir="rtl"] .eyebrow-text.text-size-small::before { margin-right: 0; margin-left: 14px; }
html[dir="rtl"] .prose ul, html[dir="rtl"] .svc-docs ul { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .sp-docs li { padding-left: 0; padding-right: 0; }
html[dir="rtl"] .svc-docs { padding-left: 0; border-left: 0; padding-right: 32px; border-right: 1px solid var(--hairline); }
html[dir="rtl"] .cta-side { padding-left: 0; border-left: 0; padding-right: 32px; border-right: 1px solid #c4a06759; }
@media (max-width: 991px) {
  html[dir="rtl"] .cta-side { padding-right: 0; border-right: 0; }
  html[dir="rtl"] .svc-docs { padding-right: 0; border-right: 0; }
}
html[dir="rtl"] #contact-section .info-box-wrap { border-left: 0; border-right: 1px solid var(--brass-deep); padding-left: 0; padding-right: 1rem; }
html[dir="rtl"] .form_input, html[dir="rtl"] textarea { text-align: right; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
html[dir="rtl"] .contact-checkbox { gap: 10px; }
html[dir="rtl"] .w-checkbox-input { margin-left: 8px; margin-right: 0; float: right; }
html[dir="rtl"] .page-head::after { right: auto; left: -2%; }

/* milestones: the timeline line sits on the right */
html[dir="rtl"] .milestone_line-wrap { left: auto; right: 0; }
html[dir="rtl"] .milestone_text-wrap-2 { text-align: right; }

/* language menu and WhatsApp button on the reading side */
html[dir="rtl"] .locale-menu { right: auto; left: 0; }
html[dir="rtl"] .locale-opt[aria-current]::after { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .wa-float { right: auto; left: 20px; }
@media (max-width: 600px) { html[dir="rtl"] .wa-float { left: 16px; } }
html[dir="rtl"] .locale-btn span, html[dir="rtl"] .locale-opt { font-family: var(--font-family--body); }

/* "© 2026 Adoul Aouatif" keeps its Latin order */
html[dir="rtl"] .ft-copy, html[dir="rtl"] .ft-contact a[href^="tel:"], html[dir="rtl"] .ft-contact a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; }

/* page header photos: the shading starts from the right */
html[dir="rtl"] .page-head.has-photo::before { background: linear-gradient(270deg, #0a1424f5 0%, #0a1424d9 38%, #0a142473 72%, #0a142499 100%),
  linear-gradient(#0a1424c7, transparent 34%, transparent 58%, #0a1424e6); }
@media (max-width: 600px) { html[dir="rtl"] .page-head.has-photo::before { background: linear-gradient(#0a1424cc, #0a1424b3 40%, #0a1424f0); } }

/* icons: commitments dividers and the timeline gap on the reading side */
html[dir="rtl"] .ms-icon { margin-right: 0; margin-left: 4px; }
html[dir="rtl"] .vals-grid li { padding: 36px 0 8px 28px; }
html[dir="rtl"] .vals-grid li + li { padding-left: 28px; padding-right: 28px; border-left: 0; border-right: 1px solid #0a14241f; }
@media (max-width: 991px) { html[dir="rtl"] .vals-grid li:nth-child(3) { padding-right: 0; border-right: 0; } }
@media (max-width: 600px) { html[dir="rtl"] .vals-grid li, html[dir="rtl"] .vals-grid li + li { padding: 28px 0 4px; border-right: 0; } }

/* contact form */
html[dir="rtl"] .req { margin-left: 0; margin-right: 3px; }
html[dir="rtl"] #contact-section .contact-form select.form_input { padding-right: 16px; padding-left: 48px; background-position: left 18px center; }
html[dir="rtl"] .dd-btn { padding: 0 16px 0 48px; }
html[dir="rtl"] .dd-chev { right: auto; left: 16px; }
html[dir="rtl"] .dd-country .dd-btn { padding: 0 16px 0 40px; }
html[dir="rtl"] .dd-country .dd-chev { left: 12px; }
html[dir="rtl"] .tel-group .dd-btn { border-right: 1px solid var(--line); border-left: 0; }
html[dir="rtl"] .dd-country .dd-list { right: 0; left: auto; }
html[dir="rtl"] .contact-checkbox .cf-error { margin-left: 0; margin-right: 32px; }

/* the button hover animation splits words into letter boxes, which unjoins Arabic letters: keep them inline so the word shapes as one */
html[dir="rtl"] .gsap_split_word, html[dir="rtl"] .gsap_split_letter { display: inline !important; }
html[dir="rtl"] .button-text { direction: rtl; unicode-bidi: isolate; }
html[dir="rtl"] .ft-copy { text-align: right; }
