/* Nseem El Khair — Arabic (right-to-left) adjustments. Loaded last, only on /ar/ pages (html[lang="ar"][dir="rtl"]).
   Flex and grid rows already reverse with dir="rtl"; this file handles fonts and the pieces placed with left/right. */

/* ── Type: Cairo for headings, Almarai for text (clear at small sizes); Latin digits and names keep the site fonts ── */
html[lang="ar"] {
  --font-display: "Cairo", "Bricolage Grotesque", Arial, sans-serif;
  --font-body: "Almarai", Inter, system-ui, "Segoe UI", Arial, sans-serif;
  --font-accent: "Instrument Serif", "Cairo", Georgia, serif;
}
html[lang="ar"] body { font-family: var(--font-body); }
/* Arabic letters join up, so letter spacing would break the words apart */
html[lang="ar"] body *, html[lang="ar"] body *::before, html[lang="ar"] body *::after { letter-spacing: 0 !important; }
/* Arabic has no italics: never slant it artificially, and keep accents upright */
html[lang="ar"] body { font-synthesis: none; }
html[lang="ar"] em, html[lang="ar"] i:not([class]) { font-style: normal; }
/* headings: a little more line height so dots and marks above/below letters are not cut */
html[lang="ar"] .display { line-height: 1.3; }
html[lang="ar"] [data-split] .w { padding-block: .08em; margin-block: -.08em; }

/* Heading widths are set in "ch" for English; Arabic words run wider, so give them more room */
html[lang="ar"] .head3 h2, html[lang="ar"] .footer__cta h2, html[lang="ar"] .markets__title { max-width: 18ch; }
html[lang="ar"] .qcine__title h2 { max-width: 16ch; }
html[lang="ar"] .section-head h2 { max-width: 20ch; }
/* Cairo 800 sets larger than the Latin display face: big titles a step smaller, a little wider */
html[lang="ar"] .head3 h2 { font-size: clamp(2.3rem, 6vw, 5.6rem); }
html[lang="ar"] .phero__title { font-size: clamp(2.4rem, 5.2vw, 5.2rem); max-width: 16ch; }
html[lang="ar"] .dhero__title { font-size: clamp(2.5rem, 5.4vw, 5.6rem); max-width: 14ch; }
html[lang="ar"] .clabel__title { font-size: clamp(2.4rem, 4.8vw, 4.8rem); max-width: 14ch; }
html[lang="ar"] .g2-hero__title { font-size: clamp(2.4rem, 5.4vw, 5.4rem); max-width: 16ch; }

/* ── Home hero: the banner photos keep the dark side on the left (the packs carry printed text, so they can't be
   mirrored); the Arabic copy stays in that dark area and reads right to left inside it ── */
html[dir="rtl"] .hero__content { flex-direction: row-reverse; }
html[dir="rtl"] .hero__tab { text-align: right; }
html[dir="rtl"] .hero__tab-bar i { transform-origin: right; }

/* ── Header ── */
html[dir="rtl"] .lang ul { right: auto; left: 0; }
@media (max-width: 640px) { html[dir="rtl"] .header__bar { padding-left: 0; padding-right: 14px; } }
html[dir="rtl"] .mobile-menu__products a::before { background: linear-gradient(270deg, #181514f5 0%, #181514b8 48%, #18151433 100%); }

/* ── Home: product range panels ── */
html[dir="rtl"] .panel__arrow { right: auto; left: 16px; }
html[dir="rtl"] .panel__vtitle { left: auto; right: 22px; }
html[dir="rtl"] .panel__body { left: auto; right: clamp(20px, 2.4vw, 36px); }

/* ── Home: quality video — title bottom right, sound bottom left, pause top left ── */
html[dir="rtl"] .qcine__shade { background: linear-gradient(160deg, transparent 40%, #120f0ecc 100%); }
html[dir="rtl"] .qcine__title { left: auto; right: clamp(20px, 4vw, 60px); }
html[dir="rtl"] .qcine__sound { right: auto; left: clamp(20px, 4vw, 56px); }
html[dir="rtl"] .qcine__pause { right: auto; left: clamp(14px, 2vw, 24px); }
@media (max-width: 600px) {
  html[dir="rtl"] .qcine__title { left: auto; right: 14px; }
  html[dir="rtl"] .qcine__sound { right: auto; left: 10px; }
}

/* ── Products page ── */
html[dir="rtl"] .stats div { border-left: 0; border-right: 1px solid #ffffff1f; }
html[dir="rtl"] .stats div:first-child { border-right: 0; padding-left: clamp(0px, 1.4vw, 20px); padding-right: 0; }
html[dir="rtl"] .switch__track i { left: auto; right: 3px; }
html[dir="rtl"] .switch[aria-checked="true"] .switch__track i { transform: translateX(-18px); }
html[dir="rtl"] .catalog__count b { margin-right: 0; margin-left: .1em; }
html[dir="rtl"] .prod__badge { right: auto; left: 12px; }
html[dir="rtl"] .prod__go { right: auto; left: 12px; }

/* ── Product details ── */
html[dir="rtl"] .facts li { padding: 14px 0 14px clamp(16px, 2.4vw, 32px); margin-right: 0; margin-left: clamp(16px, 2.4vw, 32px); border-right: 0; border-left: 1px solid #ffffff1f; }
html[dir="rtl"] .facts li:last-child { border-left: 0; margin-left: 0; }
html[dir="rtl"] .formats button { text-align: right; }
html[dir="rtl"] .formats button::after { content: "استفسر ←"; right: auto; left: 8px; }
html[dir="rtl"] .formats button:hover { padding-left: 6px; padding-right: 14px; }
html[dir="rtl"] .packs button { text-align: right; }
html[dir="rtl"] .field select { background-position: left 18px center; padding-right: 18px; padding-left: 44px; }
html[dir="rtl"] .field label { transform-origin: right top; }
html[dir="rtl"] .pager__link + .pager__link { border-left: 0; border-right: 1px solid #ffffff1a; text-align: left; justify-items: end; }
html[dir="rtl"] .pager__link--prev .pv--pager { right: auto; left: clamp(16px, 4vw, 64px); }
html[dir="rtl"] .pager__link--next .pv--pager { left: auto; right: clamp(16px, 4vw, 64px); }

/* season strip: full Arabic month names under the 12 bars; on narrower screens they run vertically */
html[lang="ar"] .months b { font-weight: inherit; white-space: nowrap; }
@media (max-width: 1020px) {
  html[lang="ar"] .months b { writing-mode: vertical-rl; font-size: .66rem; line-height: 1; }
}

/* ── Contact: the map fades from the copy side (now the right), the label's plane flies left ── */
html[dir="rtl"] .clabel::before {
  background:
    linear-gradient(270deg, var(--night) 0%, #120f0ef0 30%, #120f0e8c 55%, #120f0e33 80%),
    linear-gradient(0deg, var(--night) 0%, transparent 30%),
    linear-gradient(180deg, #120f0ecc 0%, transparent 25%),
    #ad203126;
}
html[dir="rtl"] .tag__temp { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .tag__row--route > div:last-child { text-align: left; }
html[dir="rtl"] .tag__plane, html[dir="rtl"] .letter__plane, html[dir="rtl"] .letter__sent-plane { display: inline-block; scale: -1 1; }
html[dir="rtl"] .tag__wa { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .blank select { padding-right: 0; padding-left: 1.05em; background-position: left .1em center; }

/* ── Gallery lightbox: previous on the right, next on the left, close top left ── */
html[dir="rtl"] .lightbox__close { right: auto; left: 18px; }
html[dir="rtl"] .lightbox__prev { left: auto; right: clamp(10px, 2vw, 28px); }
html[dir="rtl"] .lightbox__next { right: auto; left: clamp(10px, 2vw, 28px); }
html[dir="rtl"] .lightbox__prev svg, html[dir="rtl"] .lightbox__next svg { scale: -1 1; }

@media (max-width: 760px) {
  html[dir="rtl"] .stats div:nth-child(3) { border-right: 0; padding-right: 0; }
  html[dir="rtl"] .facts li { padding: 12px 0 12px 10px; margin-right: 0; margin-left: 10px; }
  html[dir="rtl"] .pager__link + .pager__link { border-right: 0; }
}
@media (max-width: 480px) {
  html[dir="rtl"] .prod__badge { right: auto; left: 8px; }
}

/* ── About: "Why Nseem El Khair" wheel. The grid mirrors by itself, so the icon nodes on the orbit mirror too
   (angle a → 180° − a) and each side's text keeps facing the circle ── */
html[dir="rtl"] .ab-node { transform: rotate(calc(180deg - var(--a))) translateX(calc(var(--hub) * .56)) rotate(calc(var(--a) - 180deg)); }
html[dir="rtl"] .ab-point--3 { padding-left: 0; padding-right: 7%; }
html[dir="rtl"] .ab-point--4 { text-align: left; padding-right: 0; padding-left: 7%; }
html[dir="rtl"] .ab-point--5 { text-align: left; }
html[dir="rtl"] .ab-card__mark { right: auto; left: -18px; }
html[dir="rtl"] .ab-goals p { padding-right: 0; padding-left: 18px; }
html[dir="rtl"] .ab-goals small { right: auto; left: 14px; }
html[dir="rtl"] .ab-steps::before { background: linear-gradient(270deg, #ff827d80, #ffffff1f 60%, #8fd3ff66); }
@media (max-width: 1100px) {
  html[dir="rtl"] .ab-point, html[dir="rtl"] .ab-point--1, html[dir="rtl"] .ab-point--2, html[dir="rtl"] .ab-point--3,
  html[dir="rtl"] .ab-point--4, html[dir="rtl"] .ab-point--5 { text-align: right; padding: 0; }
  html[dir="rtl"] .ab-point { padding-top: 18px; }
}

/* left-to-right data inside Arabic text */
html[lang="ar"] bdi[dir="ltr"], html[lang="ar"] [dir="ltr"] { unicode-bidi: isolate; }
