/* Atlas AMM 0.5.7 — Arabic-only visual fixes.
   Loaded only when the translated runtime locale is exactly ar.
   Structural layout / media / English are not changed by this stylesheet. */

/* In the approved four-column CCL300 hero the pseudo-dividers use physical
   left:0. The RTL grid reverses item placement, so each internal divider
   belongs on the RIGHT edge of the subsequent RTL item instead. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats > div + div::before {
    left: auto;
    right: 0;
}
/* First and last item paddings were defined with physical left/right sides.
   Repair them only in RTL, keeping the same 28px/20px gutters. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats > div:first-child {
    padding-left: 28px;
    padding-right: 0;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats > div:last-child {
    padding-left: 0;
    padding-right: 28px;
}
/* Keep mixed LTR technical numerals/order: 250–300, 68 kW, 50+, AISI 304.
   The Arabic caption stays RTL and the numerical values are unchanged. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats strong {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats span {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: right;
}
/* Keep two-column small-screen geometry symmetrical. The original responsive
   design uses odd/right and even/left items with 20px padding. */
@media (max-width: 700px) {
    html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats > div:nth-child(odd) {
        padding-left: 20px;
        padding-right: 0;
    }
    html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-ccl300 .hero-stats > div:nth-child(even) {
        padding-right: 20px;
        padding-left: 0;
    }
}


/* 0.5.12 — About Us: Arabic reading alignment only.
 * This page has its own editorial/grid layouts. Older RTL rules handled
 * production lines but not About Us; Arabic headings, body copy and process
 * steps therefore inherited physical English alignment. Preserve grid/column
 * dimensions, photo positions, illustrations and Latin technical values. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about {
    direction: rtl;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, summary,
    .aa-mono, .aa-eyebrow, .aa-lead, .aa-button, .aa-line-link
) {
    direction: rtl;
    text-align: right;
    letter-spacing: normal;
}
/* A max-width paragraph otherwise remains pinned to the physical left of
 * its grid cell in some LTR-defined editorial sections. Pin the readable
 * block to the right without changing its width, breakpoints or ordering. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    .aa-hero-aside p, .aa-story-copy > p, .aa-story-origin p,
    .aa-promise-intro > p, .aa-portfolio-head p,
    .aa-portfolio-panel p, .aa-manufacture-intro .aa-lead,
    .aa-manufacture-card p, .aa-innovation-copy > p,
    .aa-process-heading p, .aa-process-list p,
    .aa-support-copy > p, .aa-project-card p
) {
    margin-inline-start: 0;
    margin-inline-end: auto;
}
/* The process rail has a separate numbered grid column. Right-align the
 * TEXT column, not its rail or its grid, and keep numerals in LTR order. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about .aa-process-list li > div {
    direction: rtl;
    text-align: right;
    min-width: 0;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about .aa-process-list li > span {
    direction: ltr;
    unicode-bidi: isolate;
}
/* Let translated Arabic fit existing text columns naturally rather than
 * clipping long phrases; this changes no sizing or media placement. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    h1, h2, h3, h4, h5, h6, p, figcaption
) {
    overflow-wrap: break-word;
}

/* 0.5.13 — Arabic heading scale only (20% smaller).
 * No fixed pixel sizes: each heading keeps the theme's original responsive
 * font-size, including clamp() and breakpoint overrides, scaled to 80%.
 * CSS zoom performs this relative visual reduction without replacing those
 * responsive declarations. Paragraphs, controls and assets are not targeted.
 * Scoped to a translated Arabic request, never English or other languages. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar :is(h1, h2, h3) {
    zoom: 0.8;
}


/* 0.5.14 — About Us: right-edge alignment for the existing Arabic labels.
 * The editorial theme sets text-align:left on .atlas-about. Its small
 * section kickers are inline elements in RTL two-column grids, so their text
 * stayed near the middle even after H1/H2/H3 became right-aligned.
 * Align only the requested containers; never mirror grids or move media. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    .aa-hero-title, .aa-expertise-top > div:first-child,
    .aa-making-heading > div:first-child
) {
    text-align: right;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    .aa-hero-tag, .aa-expertise-top .aa-kicker,
    .aa-making-heading .aa-kicker
) {
    direction: rtl;
    text-align: right;
    letter-spacing: normal;
}
/* In Arabic, put the short gold kicker stroke before the first word on the
 * right, not on the English physical-left side. No change to its size. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about :is(
    .aa-hero-tag, .aa-expertise-top .aa-kicker,
    .aa-making-heading .aa-kicker
)::before {
    margin-right: 0;
    margin-left: 13px;
}
/* The large warranty number is not a heading and was never touched by the
 * existing h1/h2/h3 right-alignment rule. Put the intact LTR '05' at the
 * right edge; keep its Arabic description directly underneath, also right. */
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about .aa-proof--warranty .aa-warranty-number {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
}
html[lang="ar"][dir="rtl"] body.atlas-amm-language.atlas-amm-lang-ar .atlas-about .aa-proof--warranty .aa-warranty-number small {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: right;
    letter-spacing: normal;
}
