/* Arabic (and later Kurdish): right-to-left layout and Noto Kufi Arabic.
   Loaded only on RTL pages, after main.css and pages.css.
   Brand shapes (the P mark, the P photo window, card P corners, the map) are never mirrored. */

:root[dir="rtl"] {
  --font: "Noto Kufi Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "Noto Kufi Arabic", "IBM Plex Mono", ui-monospace, monospace;
}
[dir="rtl"] body { line-height: 1.85; }

/* Kufi runs wide and tall: smaller headings, more line height, no Latin tracking or capitals */
[dir="rtl"] .h-display { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.35; letter-spacing: 0; font-weight: 700; }
[dir="rtl"] .h-section { font-size: clamp(26px, 3vw, 40px); line-height: 1.4; letter-spacing: 0; font-weight: 700; }
[dir="rtl"] .h-card { font-size: 20px; line-height: 1.5; letter-spacing: 0; }
[dir="rtl"] .page-hero h1 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.35; letter-spacing: 0; }
[dir="rtl"] .lead { line-height: 1.95; }
[dir="rtl"] .eyebrow, [dir="rtl"] .hero-proof span, [dir="rtl"] .mega-side .label, [dir="rtl"] .sol-num,
[dir="rtl"] .nav-badge, [dir="rtl"] .map-hint, [dir="rtl"] .tile-kicker, [dir="rtl"] .crumbs,
[dir="rtl"] .office h3 small, [dir="rtl"] .pin-card strong small, [dir="rtl"] .site-footer h3 {
  letter-spacing: 0; text-transform: none;
}
[dir="rtl"] .eyebrow { font-size: 14px; font-weight: 600; }
[dir="rtl"] .site-footer h3 { font-size: 14px; font-weight: 600; }
[dir="rtl"] .nav-link { font-size: 15px; padding-inline: 12px; }
[dir="rtl"] .stat b, [dir="rtl"] .pwin-square b, [dir="rtl"] .step-n { font-family: "IBM Plex Mono", monospace; }

/* Arrows point the other way */
[dir="rtl"] svg:has(> use[href="#i-arrow"]) { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg.arrow { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .mega-card h3 svg { transform: scaleX(-1) translateX(-4px); }
[dir="rtl"] .mega-card:hover h3 svg { transform: scaleX(-1); }
[dir="rtl"] .office:hover .map svg, [dir="rtl"] .quick button:hover svg { transform: scaleX(-1) translateX(4px); }

/* Header */
[dir="rtl"] .skip { left: auto; right: 12px; }
[dir="rtl"] .site-header.is-scrolled .brand .wm-dark { margin-left: 0; margin-right: -12px; }
[dir="rtl"] .site-header.is-scrolled .header-row { padding: 0 16px 0 8px; }
[dir="rtl"] .mega::after { background: linear-gradient(270deg, var(--cyan), var(--blue) 45%, transparent 80%); }
[dir="rtl"] .mega-side::after { right: auto; left: -50px; }

/* Drawer opens from the left */
[dir="rtl"] .drawer { margin: 0 auto 0 0; }
[dir="rtl"] .drawer[open] { animation-name: drawer-in-rtl; }
@keyframes drawer-in-rtl { from { transform: translateX(-24px); opacity: 0; } }
[dir="rtl"] .drawer-link, [dir="rtl"] .drawer-acc { text-align: right; }

/* Hero */
[dir="rtl"] .hero .p-lines { right: auto; left: -14%; }
[dir="rtl"] .pwin-tag { right: auto; left: -6%; }
[dir="rtl"] .pwin-tag .dots { margin-left: 0; margin-right: 6px; }

/* Solutions, about, stats */
[dir="rtl"] .sol-list li { padding-left: 0; padding-right: 16px; }
[dir="rtl"] .sol-list li::before { left: auto; right: 0; }
[dir="rtl"] .about-media .square { left: auto; right: -18px; }
[dir="rtl"] .about-media .square.cy { left: auto; right: 70px; }
[dir="rtl"] .slogan { padding-left: 0; border-left: 0; padding-right: 18px; border-right: 3px solid var(--cyan); }
[dir="rtl"] .stat + .stat { padding-left: 0; border-left: 0; padding-right: 24px; border-right: 1px solid var(--line); }
[dir="rtl"] .stat b sup { margin-left: 0; margin-right: 2px; }
[dir="rtl"] .partner-row li + li { border-left: 0; border-right: 1px solid var(--line); }

/* MPS band */
[dir="rtl"] .mps .p-lines { right: auto; left: -16%; }
[dir="rtl"] .one-card { left: auto; right: -36px; }

/* Client logos keep scrolling the same way */
[dir="rtl"] .marquee { direction: ltr; }

/* Process line fills from the right */
[dir="rtl"] .steps::after { background: linear-gradient(270deg, var(--blue), var(--cyan)); transform-origin: right; }

/* Edu panels */
[dir="rtl"] .panel-ui { left: auto; right: 12px; }

/* Contact: map stays as a real map (left to right), the hint sits on the map side */
[dir="rtl"] .map-hint { text-align: left; }
[dir="rtl"] .map-stage { margin-left: 0; margin-right: auto; }
[dir="rtl"] .pin-card { text-align: right; }

/* Floating buttons and chat move to the left corner */
[dir="rtl"] .float { right: auto; left: 20px; align-items: flex-start; }
[dir="rtl"] .fab-chat .dot { right: auto; left: 4px; }
[dir="rtl"] .chat { right: auto; left: 20px; transform-origin: bottom left; }
[dir="rtl"] .chat-head .icon-btn { margin-left: 0; margin-right: auto; }
[dir="rtl"] .quick button { text-align: right; }

@media (max-width: 1024px) {
  [dir="rtl"] .pwin-tag { left: -4%; right: auto; }
  [dir="rtl"] .map-hint { text-align: center; }
  [dir="rtl"] .map-stage { margin-inline: auto; }
  [dir="rtl"] .stat:nth-child(4) { border-right: 0; padding-right: 0; }
  [dir="rtl"] .partner-row li:nth-child(4) { border-right: 0; }
  [dir="rtl"] .one-card { right: 16px; left: auto; }
}
@media (max-width: 680px) {
  [dir="rtl"] .stat { padding-left: 12px; padding-right: 0; }
  [dir="rtl"] .stat:nth-child(odd) { border-right: 0; padding-right: 0; }
  [dir="rtl"] .stat:nth-child(even), [dir="rtl"] .stat:nth-child(4) { border-right: 1px solid var(--line); padding-right: 20px; }
  [dir="rtl"] .partner-row li:nth-child(odd) { border-right: 0; }
  [dir="rtl"] .partner-row li:nth-child(even) { border-right: 1px solid var(--line); }
  [dir="rtl"] .float { left: 14px; right: auto; }
  [dir="rtl"] .chat { left: 14px; right: auto; }
  [dir="rtl"] .one-card { right: 0; left: 0; }
}

/* ---------- Inner pages ---------- */
/* Text inside drawn SVG graphics keeps its own anchor points */
[dir="rtl"] svg text { direction: ltr; unicode-bidi: plaintext; }
[dir="rtl"] .cr-phase { direction: rtl; }

/* Page hero: outline and brand squares mirror to the other side */
[dir="rtl"] .page-hero .p-lines, [dir="rtl"] .dark .p-lines { right: auto; left: -14%; }
[dir="rtl"] .page-hero-media .outline { transform: translate(-18px, -18px); }
[dir="rtl"] .page-hero-media .sq { left: auto; right: -16px; }
[dir="rtl"] .page-hero-media .sq-c { left: auto; right: 56px; }
[dir="rtl"] .one-badge { right: auto; left: -14px; }
[dir="rtl"] .ui-art .p-lines { right: auto; left: -20%; }

/* Lists with square or tick bullets */
[dir="rtl"] .checks li { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .checks li::before { left: auto; right: 0; }
[dir="rtl"] .plan-list li { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .plan-list li::before { left: auto; right: 0; }

/* Picture rows: outline slides the other way, squares on the right */
[dir="rtl"] .feature:hover .feature-media::before { transform: translate(-16px, -16px); }
[dir="rtl"] .feature-media::after { left: auto; right: -12px; transform-origin: 100% 100%; }

/* Metrics, logos, CTA */
[dir="rtl"] .metric + .metric { border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .metric b sup { margin-left: 0; margin-right: 2px; }
[dir="rtl"] .logo-grid { direction: ltr; }
[dir="rtl"] .cta-panel::after { left: auto; right: -70px; }

/* FAQ */
[dir="rtl"] .faq summary { padding: 20px 22px 20px 56px; }
[dir="rtl"] .faq summary::after { right: auto; left: 22px; }

/* One: comparison table, legend, sliders */
[dir="rtl"] .cmp-table th, [dir="rtl"] .cmp-table td { text-align: right; }
[dir="rtl"] .cmp-table .x, [dir="rtl"] .cmp-table .v { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .legend span::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .range::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--blue) var(--fill, 30%), var(--line) var(--fill, 30%)); }

/* About timeline */
[dir="rtl"] .timeline { padding-left: 0; padding-right: 4px; }
[dir="rtl"] .timeline::before { left: auto; right: 31px; }

/* Contact page */
[dir="rtl"] .reach a:hover { transform: translateX(-3px); }

/* MPS: hero chips and lifecycle list */
[dir="rtl"] .chip-a { left: auto; right: -28px; }
[dir="rtl"] .chip-b { right: auto; left: -22px; }
[dir="rtl"] .chip-c { left: auto; right: 8%; }
[dir="rtl"] .cycle-list button { text-align: right; }
[dir="rtl"] .cycle-list p { padding: 0 64px 0 18px; }
[dir="rtl"] .cycle-list li.is-active p { padding-bottom: 16px; }
@media (max-width: 1024px) {
  [dir="rtl"] .metric:nth-child(3) { border-right: 0; }
}
@media (max-width: 680px) {
  [dir="rtl"] .page-hero-media .sq { right: -8px; left: auto; }
  [dir="rtl"] .page-hero-media .sq-c { right: 44px; left: auto; }
  [dir="rtl"] .page-hero-media .outline { transform: translate(-10px, -10px); }
  [dir="rtl"] .one-badge { left: -6px; right: auto; }
  [dir="rtl"] .chip-a { right: -6px; left: auto; }
  [dir="rtl"] .chip-b { left: -6px; right: auto; }
}

/* Banner heroes: the picture's empty space is on the left, so the text stays on the left in RTL too (picture is never mirrored: logos) */
@media (min-width: 901px) {
  [dir="rtl"] .hb-inner > div, [dir="rtl"] .hb-home .hero-copy { margin-right: auto; margin-left: 0; }
}
[dir="rtl"] .hero-banner h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.3; }
[dir="rtl"] .hero-banner .lead { font-size: 16px; }

/* Side pop-up (free demo / trial) opens from the left, beside the floating buttons */
.demo-tab { right: auto; left: 0; border-radius: 0 14px 14px 0; box-shadow: 10px 14px 30px -12px rgba(3, 10, 60, .55); }
.demo-tab:hover { padding-right: 11px; padding-left: 15px; }
.demo-tab span { transform: none; }
.demo-teaser { right: auto; left: 62px; }
.demo-teaser strong { padding-right: 0; padding-left: 28px; }
.demo-teaser-x { right: auto; left: 8px; }
.demo-panel { inset: 0 auto 0 0; box-shadow: 30px 0 80px -30px rgba(3, 10, 60, .6); }
.demo-panel[open] { animation-name: demo-slide-rtl; }
@keyframes demo-slide-rtl { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes demo-in { from { opacity: 0; transform: translate(-24px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.demo-x { right: auto; left: 14px; }
@keyframes demo-nudge { 0%, 100% { transform: translate(0, -50%); } 30% { transform: translate(8px, -50%); } 60% { transform: translate(0, -50%); } }
@media (max-width: 760px) {
  .demo-teaser { left: 84px; right: 12px; }
}

/* One hero: the photo keeps the printer on the right, so the Arabic/Kurdish text stays in the dark left side */
@media (min-width: 901px) {
  .one-hero-photo .one-hero-copy { justify-self: end; width: min(600px, 52%); }
}
/* One price table "Need more?" row: bullets before the text, corner away from the title */
.one-special ul li::before { margin-right: 0; margin-left: 9px; }
.one-special::after { right: auto; left: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 64px; }
.one-special .btn { margin-right: 0; margin-left: 40px; }
@media (max-width: 760px) { .one-special .btn { margin-left: 0; } }

/* Arabic/Kurdish menu words run longer: tighter menu on mid-size screens so nothing wraps */
@media (min-width: 1281px) and (max-width: 1380px) {
  .nav-link { padding: 0 8px; font-size: 14.5px; }
  .header-row { gap: 14px; }
}
@media (max-width: 1280px) {
  .primary-nav, .header-actions .btn-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-row { justify-content: space-between; }
}

/* Smaller heroes (approved 2026-11-18): Kufi titles one step smaller than English, with Arabic line height */
[dir="rtl"] .hero-banner h1, [dir="rtl"] .page-hero h1, [dir="rtl"] .hb-home h1, [dir="rtl"] .one-hero h1 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.4; }
[dir="rtl"] .hero-banner .lead, [dir="rtl"] .hb-home .lead, [dir="rtl"] .one-hero .lead { font-size: 15.5px; line-height: 1.9; }
/* One plan finder: cyan corner on the outer side */
.fp-result::after { right: auto; left: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 56px; }

/* v3 photo banners: in Arabic/Kurdish the text sits on the right, so the photo moves to the left half */
@media (min-width: 861px) {
  [dir="rtl"] .sl-hero-media { right: auto; left: 0; }
  [dir="rtl"] .sl-hero-media img { object-position: 100% 50%; }
  [dir="rtl"] .sl-hero-media::after { background: linear-gradient(270deg, var(--nav-bg) 0%, rgba(12, 26, 107, .55) 15%, rgba(12, 26, 107, 0) 38%); }
}

/* v3 (2026-11-23): soft photo blend mirrored for right-to-left */
@media (min-width: 861px) {
  [dir="rtl"] .sl-hero-media { -webkit-mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, .25) 16%, rgba(0, 0, 0, .7) 32%, #000 52%); mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, .25) 16%, rgba(0, 0, 0, .7) 32%, #000 52%); }
  [dir="rtl"] .sl-hero-media::after { background: linear-gradient(270deg, rgba(12, 26, 107, .6) 0%, rgba(12, 26, 107, .25) 40%, rgba(12, 26, 107, 0) 75%); }
}

/* v3 Arabic/Kurdish audit (2026-11-26): One plan colour badge, dots before the word in right-to-left */
[dir="rtl"] .op-cm { margin-left: 0; margin-right: auto; padding: 0 8px 0 10px; }
[dir="rtl"] .op-cm i + i { margin-left: 0; margin-right: -4px; }
[dir="rtl"] .op-cm b { margin-left: 0; margin-right: 7px; }

/* ===== Arabic/Kurdish audit 2 (2026-11-26, owner: "boxes deformed, text styles changed") =====
   Goal: same look as the English v3 pages; only the font (Noto Kufi Arabic) and the reading direction change. */
/* Text styles back in line with English v3 (older v2 rules made headings bold and labels smaller) */
[dir="rtl"] .h-section, [dir="rtl"] .ch-h-title, [dir="rtl"] .sl-head h2, [dir="rtl"] .sl-hero h1, [dir="rtl"] .cat-hero h1 { font-weight: 500; }
[dir="rtl"] .h-display { font-weight: 600; }
[dir="rtl"] .eyebrow { font-size: 15px; }
[dir="rtl"] .hero-banner h1, [dir="rtl"] .page-hero h1, [dir="rtl"] .hb-home h1, [dir="rtl"] .one-hero h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1.35; }
[dir="rtl"] .hero-banner .lead, [dir="rtl"] .hb-home .lead, [dir="rtl"] .one-hero .lead { font-size: 17px; line-height: 1.85; }
/* Kufi is wider than Plex: section titles a touch smaller so they keep to one or two lines like English */
:root[lang="ku"] .h-section, :root[lang="ku"] .sl-head h2 { font-size: clamp(24px, 2.6vw, 36px); }
/* HP band: text is on the right in Arabic/Kurdish, so the dark shade moves to the right too */
[dir="rtl"] .hp-band { background: linear-gradient(270deg, rgba(7, 13, 46, .96) 0%, rgba(8, 16, 70, .84) 42%, rgba(8, 16, 70, .2) 78%, rgba(8, 16, 70, .05) 100%), url(../img/pages/one/one-hero-hp.webp) 20% 50% / cover fixed #081046; }
/* One plan cards: all the same height even when a Kurdish plan name runs onto two lines */
[dir="rtl"] .op-grid { align-items: stretch; }
/* "Not sure what you need?" band: text and buttons stay on one row on wide screens */
@media (min-width: 1100px) { [dir="rtl"] .cband-inner { flex-wrap: nowrap; } [dir="rtl"] .cband-actions { flex-wrap: nowrap; flex: none; } }
/* One cards: price block starts at the same height in every card (descriptions differ in length in AR/KU) */
[dir="rtl"] .op-body { flex: 1 1 auto; }
[dir="rtl"] .op-desc { flex: 1 1 auto; }
[dir="rtl"] .op-model { min-height: 3.6em; }
:root[lang="ku"] .op-body h3 { min-height: 2.9em; }
[dir="rtl"] .op-desc { flex: none; min-height: 7.6em; }
[dir="rtl"] .op-actions { margin-top: auto; }
[dir="rtl"] .op-desc { min-height: 9.4em; }
[dir="rtl"] .op-kind { min-height: 4.2em; align-content: flex-start; }
:root[lang="ar"] .op-desc { min-height: 10.2em; }
:root[lang="ar"] .op-desc { min-height: 11.4em; }
:root[lang="ku"] .op-desc { min-height: 11.4em; }
[dir="rtl"] .op-kind { min-height: 74px; }
:root[lang="ku"] .op-body h3 { min-height: 90px; }

/* Intro animation: identical to English in every language (owner 2026-11-26): English text, left-to-right, English fonts */
[dir="rtl"] .intro { --font: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace; font-family: var(--font); direction: ltr; letter-spacing: normal; }
[dir="rtl"] .intro-tag { font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; }

/* 2026-12-03: tick marks of the .sl-checks lists sit next to the text, on the right */
[dir="rtl"] .sl-checks li { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .sl-checks li::before { left: auto; right: 2px; }
