/* Designatix — Arabic (RTL) adjustments. Loaded only on /ar/ pages. */
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea { font-family: 'IBM Plex Sans Arabic', 'DM Sans', 'Inter', system-ui, sans-serif; }

/* Arabic letters must stay joined: no tracking, no forced capitals */
html[dir="rtl"] * { letter-spacing: 0 !important; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .cond, html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .nav-btn, html[dir="rtl"] .nav-cta, html[dir="rtl"] small, html[dir="rtl"] .hero-tags span { text-transform: none !important; }

/* Display type: Cairo for the condensed headline style */
html[dir="rtl"] .cond, html[dir="rtl"] h1, html[dir="rtl"] h2,
html[dir="rtl"] .sx-panel h1, html[dir="rtl"] .sx-panel h3 { font-family: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif; font-weight: 800; line-height: 1.2; }
html[dir="rtl"] h3, html[dir="rtl"] .eyebrow, html[dir="rtl"] .g-cap small, html[dir="rtl"] .xcase-points h3,
html[dir="rtl"] .uc-step i, html[dir="rtl"] .ic-step i, html[dir="rtl"] .xcase-card figcaption i { font-family: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif; }
html[dir="rtl"] .wordmark, html[dir="rtl"] .dx-brand { font-family: 'Michroma', 'DM Sans', sans-serif; direction: ltr; }
html[dir="rtl"] p, html[dir="rtl"] li, html[dir="rtl"] .lede { line-height: 1.75; }

/* Hero: dark shade behind the text, which now sits on the right */
html[dir="rtl"] .hero-shade { transform: scaleX(-1); }

/* Gallery captions, cards and lists read from the right */
html[dir="rtl"] .g-item.has-cap, html[dir="rtl"] .g-cap, html[dir="rtl"] .uc-step,
html[dir="rtl"] .ic-step, html[dir="rtl"] .dx-dd-panel a { text-align: right; }
html[dir="rtl"] .rel em { transform: scaleX(-1); display: inline-block; }

/* Exterior case study: the arrow points from the client inputs to our result */
html[dir="rtl"] .xcase-arrow { transform: scaleX(-1); }
@media (max-width: 900px) { html[dir="rtl"] .xcase-arrow { transform: none; } }

/* Services dropdown: sub-menus open to the left */
html[dir="rtl"] .dx-dd > a::after { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .dx-dd-sub { left: auto; right: 100%; padding-left: 0; padding-right: 10px; transform: translateX(6px); }
html[dir="rtl"] .dx-dd-row:hover > .dx-dd-sub, html[dir="rtl"] .dx-dd-row:focus-within > .dx-dd-sub, html[dir="rtl"] .dx-dd-row.open > .dx-dd-sub { transform: translateX(0); }
html[dir="rtl"] .dx-dd-row.has-sub > a::after { margin-left: 0; margin-right: auto; transform: rotate(135deg); }
html[dir="rtl"] .dx-dd .dx-dd-sub a[aria-current] { box-shadow: inset -2px 0 0 #d23638; }
@media (max-width: 900px) {
  html[dir="rtl"] .dx-dd-menu { left: auto; right: 0; }
  html[dir="rtl"] .dx-dd-sub { right: auto; padding: 0 30px 4px 0; transform: none; }
  html[dir="rtl"] .dx-dd-row.has-sub.open > a::after { transform: rotate(45deg); }
}

/* Email, links and numbers stay left-to-right inside Arabic text */
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
html[dir="rtl"] #mailLink span, html[dir="rtl"] .mono { direction: ltr; unicode-bidi: isolate; }

/* Language switch sits after the menu */
html[dir="rtl"] .dx-lang { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; }

/* Home: services film navigator on the right, with room before the text */
html[dir="rtl"] .sx-inner { grid-template-columns: 250px minmax(0, 500px) 1fr; column-gap: 36px; }
html[dir="rtl"] .sx-rail::before, html[dir="rtl"] .sx-rail::after { left: auto; right: 16px; }
html[dir="rtl"] .sx-dot .lbl { font-family: 'IBM Plex Sans Arabic', 'DM Sans', sans-serif; }
@media (max-width: 900px) {
  html[dir="rtl"] .sx-inner { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  html[dir="rtl"] .sx-rail { left: auto; right: 25px; }
  html[dir="rtl"] .sx-rail::before, html[dir="rtl"] .sx-rail::after { left: auto; right: 11px; }
}
