/* Shared language controls; existing layouts and photography stay in site.css. */
.language-selector { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 3px; border: 1px solid rgba(255,255,255,.24); border-radius: 4px; background: rgba(8,10,12,.62); }
.language-selector a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 6px 9px; border: 0; border-radius: 2px; color: #b8bec7; font-family: Arial, sans-serif; font-size: .68rem; font-weight: 700; line-height: 1.4; letter-spacing: .03em; text-transform: none; }
.language-selector a:hover { color: white; background: rgba(255,255,255,.1); }
.language-selector a.is-current { background: var(--red); color: white; }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.site-header { gap: 20px; }
.site-header > .language-selector { position: relative; z-index: 103; order: 3; }
.site-header .main-nav { margin-inline-start: auto; }
.gateway-meta { align-items: center; }
.gateway-meta .language-selector a { border: 0; padding: 6px 9px; }
.gateway-meta .language-selector span { display: inline; }
.privacy-content code { display: inline-block; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
a[dir="ltr"], bdi { unicode-bidi: isolate; }
.privacy-content a[href^="mailto:"] { display: inline-block; direction: ltr; unicode-bidi: isolate; }

/* English fallback bodies keep their own LTR reading direction. */
:lang(ar) { letter-spacing: normal; }
html[dir="rtl"] { font-family: Tahoma, Arial, sans-serif; }
html[dir="rtl"] body { font-family: inherit; }
html[dir="rtl"] .nav-links > a, html[dir="rtl"] .gateway-meta,
html[dir="rtl"] .gateway-prompt, html[dir="rtl"] .sector-enter,
html[dir="rtl"] .sector-content small, html[dir="rtl"] .cookie-notice > span { letter-spacing: normal; }
main[lang="ar"] h1, main[lang="ar"] h2, main[lang="ar"] h3 { line-height: 1.3; letter-spacing: normal; }
main[lang="ar"] .gateway-intro h1 { line-height: 1.2; }
main[lang="ar"] .sector-content strong { line-height: 1.25; letter-spacing: normal; }
main[lang="ar"] .sector-number { left: auto; right: 24px; }
main[lang="ar"] .gateway-footnote { left: auto; right: 3vw; }
main[lang="ar"] .privacy-content ul { padding-left: 0; padding-right: 22px; }
main[lang="ar"] .contact-location-copy { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .cookie-notice { right: auto; left: 24px; }
html[dir="rtl"] .site-footer, main[lang="ar"] .privacy-content { text-align: start; }
html[dir="rtl"] .nav-links > a:not(.nav-cta)::after { right: 0; left: 100%; transition: left .3s ease; }
html[dir="rtl"] .nav-links > a:hover::after, html[dir="rtl"] .nav-links > a.is-current::after { left: 0; }
main[lang="ar"] .sector-enter b, html[dir="rtl"] .nav-links > a::before { transform: scaleX(-1); }

/* Section pages: natural wrapping for Turkish and readable connected Arabic. */
main[lang="tr"] :is(.mach-about-hero-copy, .construction-hero-copy, .chemical-hero-copy, .company-about-copy, .services-hero) h1 {
    font-size: clamp(3rem, 6.5vw, 7rem); line-height: 1.08;
}
main:is([lang="tr"], [lang="ar"]) :is(h1, h2, h3, .portal-copy strong) { overflow-wrap: break-word; }
main:is([lang="tr"], [lang="ar"]) :is(.button, .text-link) { max-width: 100%; white-space: normal; }
main:is([lang="tr"], [lang="ar"]) .button { text-align: center; }
main:is([lang="tr"], [lang="ar"]) .construction-card-copy strong { font-size: clamp(1.65rem, 2.5vw, 3rem); line-height: 1.18; }
main[lang="ar"] :is(.eyebrow, .breadcrumb, .text-link, .button, small, dt, [class$="-action"], [class$="-count"]) { letter-spacing: normal; text-transform: none; }
main[lang="ar"] :is(.mach-about-hero-copy, .construction-hero-copy, .chemical-hero-copy, .company-about-copy, .services-hero) h1 {
    font-size: clamp(3rem, 6vw, 6.5rem); line-height: 1.25;
}
main[lang="ar"] :is(.portal-copy strong, .company-division h3, .construction-card-copy strong) { line-height: 1.25; letter-spacing: normal; }
main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail) div {
    padding-inline: 0 24px; border-right: 0; border-left: 1px solid rgba(255,255,255,.15);
}
main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail) div + div { padding-inline-start: 24px; }
main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail) div:last-child { border-left: 0; }
main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail, .chemical-hero-rail) span { letter-spacing: normal; }
main[lang="ar"] .mach-about-hero-shade { background: linear-gradient(270deg,rgba(5,6,8,.98),rgba(5,6,8,.89) 36%,rgba(5,6,8,.23) 76%),linear-gradient(0deg,rgba(5,6,8,.95),transparent 48%); }
main[lang="ar"] .construction-hero-shade { background: linear-gradient(270deg,rgba(4,6,8,.98),rgba(4,6,8,.89) 37%,rgba(4,6,8,.26) 75%),linear-gradient(0deg,rgba(4,6,8,.96),transparent 52%); }
main[lang="ar"] .chemical-hero-shade { background: linear-gradient(270deg,rgba(4,5,7,.98),rgba(4,5,7,.86) 45%,rgba(4,5,7,.24) 82%),linear-gradient(0deg,rgba(4,5,7,.94),transparent 48%); }
main[lang="ar"] .company-about-shade { background: linear-gradient(270deg,rgba(5,6,8,.96),rgba(5,6,8,.72) 43%,rgba(5,6,8,.12) 82%),linear-gradient(0deg,rgba(5,6,8,.86),transparent 54%); }
main[lang="ar"] .services-hero { background-image: linear-gradient(270deg,rgba(5,6,8,.97),rgba(5,6,8,.55)),url('../images/services/bpm.webp'); }
main[lang="ar"] .mach-range-media > span { left: auto; right: 34px; letter-spacing: normal; }
main[lang="ar"] .portal-number { left: auto; right: 30px; }
main[lang="ar"] .construction-card-index { left: auto; right: 27px; }
main[lang="ar"] .chemical-family-card > b { right: auto; left: 25px; }
main[lang="ar"] .chemical-family-logo img { object-position: right center; }
main[lang="ar"] .company-values article { padding-inline: 0 34px; border-right: 0; border-left: 1px solid var(--line); }
main[lang="ar"] .company-values article + article { padding-inline-start: 34px; }
main[lang="ar"] .company-values article:last-child { border-left: 0; }
main[lang="ar"] .chemical-hero-rail div { padding-inline: 0 24px; }
main[lang="ar"] .chemical-hero-rail div + div { padding-inline-start: 24px; border-left: 0; border-right: 1px solid rgba(255,255,255,.14); }
main[lang="ar"] .construction-capability-list article:hover { padding-left: 0; padding-right: 18px; }
main[lang="ar"] :is(.portal-action b, .construction-card-copy b, .company-division i, .chemical-family-card > b) { display: inline-block; transform: scaleX(-1); }
main[lang="ar"] :is(.text-link > span, .button > span) { display: inline-block; transform: scaleX(-1); }
main[lang="ar"] .construction-feature-card:hover .construction-card-copy b,
main[lang="ar"] .division-portal:hover .portal-action b { transform: translate(-4px,-4px) scaleX(-1); }

@media (max-width: 760px) {
    main[lang="ar"] :is(.mach-about-hero-shade, .construction-hero-shade, .chemical-hero-shade, .company-about-shade) {
        background: linear-gradient(0deg,rgba(4,5,7,.99),rgba(4,5,7,.8) 65%,rgba(4,5,7,.3));
    }
    main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail, .chemical-hero-rail) div { padding-inline: 0 7px; }
    main[lang="ar"] :is(.mach-about-hero-stats, .company-about-stats, .construction-hero-rail, .chemical-hero-rail) div + div { padding-inline-start: 10px; }
    main[lang="ar"] .company-values article { padding-inline: 0; border-left: 0; }
    main[lang="ar"] .company-values article + article { padding-inline-start: 0; }
}

/* Project and machinery catalogues; numeric values retain their LTR order. */
main:is([lang="tr"], [lang="ar"]) :is(.machinery-hero-content, .construction-projects-hero-copy, .construction-detail-hero-copy) h1 { font-size: clamp(3rem, 6vw, 7rem); }
main:is([lang="tr"], [lang="ar"]) .product-detail-copy h1 { font-size: clamp(3rem, 6vw, 7rem); line-height: 1.06; }
main:is([lang="tr"], [lang="ar"]) .construction-project-nav strong { line-height: 1.2; overflow-wrap: break-word; }
.spec-panel dd bdi, .product-key-specs bdi { white-space: nowrap; }
main[lang="ar"] :is(.machine-card-copy > p, .family-index, .product-detail-visual figcaption, .product-key-specs span, .configuration-notice span, .construction-projects-count span, .construction-project-link, .construction-detail-scroll, .construction-detail-methods span, .construction-project-nav small) { letter-spacing: normal; text-transform: none; }
main[lang="ar"] :is(.machinery-hero-rail, .product-key-specs) div { padding-inline: 0 24px; border-right: 0; border-left: 1px solid rgba(255,255,255,.15); }
main[lang="ar"] :is(.machinery-hero-rail, .product-key-specs) div + div { padding-inline-start: 24px; }
main[lang="ar"] :is(.machinery-hero-rail, .product-key-specs) div:last-child { border-left: 0; }
main[lang="ar"] .machinery-hero-rail span { letter-spacing: normal; }
main[lang="ar"] .machinery-hero-shade { background: linear-gradient(270deg,rgba(5,6,8,.97),rgba(5,6,8,.84) 37%,rgba(5,6,8,.24) 75%),linear-gradient(0deg,rgba(5,6,8,.96),transparent 48%); }
main[lang="ar"] .construction-projects-hero-shade { background: linear-gradient(270deg,rgba(4,5,7,.98),rgba(4,5,7,.78) 43%,rgba(4,5,7,.25) 78%),linear-gradient(0deg,rgba(4,5,7,.9),transparent 55%); }
main[lang="ar"] .construction-detail-hero-shade { background: linear-gradient(270deg,rgba(4,5,7,.94),rgba(4,5,7,.58) 52%,rgba(4,5,7,.18)),linear-gradient(0deg,rgba(4,5,7,.96),transparent 67%); }
main[lang="ar"] .machine-arrow { right: auto; left: 18px; transform: scaleX(-1); }
main[lang="ar"] .machine-card-copy dl div { padding-inline: 0 10px; }
main[lang="ar"] .spec-panel dd { text-align: end; }
main[lang="ar"] .configuration-notice { border-left-width: 1px; border-right: 3px solid var(--red); background-image: linear-gradient(250deg,rgba(239,27,36,.12),rgba(17,20,24,.98) 37%,rgba(10,12,15,.98)); }
main[lang="ar"] .configuration-notice::after { right: auto; left: 20px; }
main[lang="ar"] .related-grid b { right: auto; left: 23px; transform: scaleX(-1); }
main[lang="ar"] .construction-projects-count { right: auto; left: 6vw; padding-inline: 24px 0; border-left: 0; border-right: 1px solid var(--red); }
main[lang="ar"] .construction-detail-scroll { right: auto; left: 6vw; }
main[lang="ar"] .construction-project-nav a { text-align: start; }
main[lang="ar"] .construction-project-nav a + a { border-left: 0; border-right: 1px solid var(--line); text-align: end; }
main[lang="ar"] .construction-project-nav strong { letter-spacing: normal; }
main[lang="ar"] .construction-project-nav small { display: inline-flex; gap: .4em; align-items: center; }
main[lang="ar"] :is(.construction-project-link b, .construction-project-nav small > span) { display: inline-block; transform: scaleX(-1); }
@media (max-width: 760px) {
    main[lang="ar"] :is(.machinery-hero-shade, .construction-projects-hero-shade) { background: linear-gradient(0deg,rgba(4,5,7,.99),rgba(4,5,7,.8) 65%,rgba(4,5,7,.3)); }
    main[lang="ar"] :is(.machinery-hero-rail, .product-key-specs) div { padding-inline: 0 7px; }
    main[lang="ar"] :is(.machinery-hero-rail, .product-key-specs) div + div { padding-inline-start: 10px; }
}
@media (max-width: 680px) {
    main[lang="ar"] .construction-project-nav a + a { border-right: 0; }
}

@media (min-width: 901px) and (max-width: 1250px) {
    .site-header { padding-inline: 22px; gap: 14px; }
    .site-header .brand { width: 125px; }
    .nav-links { gap: 14px; }
    .nav-links > a { font-size: .64rem; letter-spacing: .04em; }
    .nav-links .nav-cta { padding-inline: 10px; }
}
@media (max-width: 900px) {
    .site-header { gap: 12px; }
    .site-header > .brand { margin-inline-end: auto; }
    .site-header > .language-selector { order: 1; }
    .site-header > .nav-toggle { order: 2; flex: 0 0 48px; }
    .gateway-meta { flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; max-width: 65%; }
    .gateway-meta .language-selector { flex-basis: auto; }
    .gateway-header { gap: 16px; }
}
@media (max-width: 520px) {
    .site-header { padding-inline: 14px; gap: 9px; }
    .site-header .brand { width: 100px; }
    .site-header.is-scrolled .brand { width: 82px; }
    .language-selector a { min-width: 31px; min-height: 36px; padding-inline: 6px; }
    .gateway-brand { width: 112px; }
    .gateway-meta > span { display: none; }
    .gateway-meta { gap: 10px; max-width: 65%; }
    .gateway-meta > a { font-size: .65rem; }
    .gateway-header { padding: 20px 16px; }
    html[dir="rtl"] .cookie-notice { left: 18px; }
    main[lang="ar"] .gateway-footnote { right: 18px; }
}

/* Chemical catalogue: translated prose wraps; Latin model codes stay LTR. */
main:is([lang="tr"], [lang="ar"]) .chemical-products-hero h1 { font-size: clamp(3rem, 6vw, 6.4rem); }
main:is([lang="tr"], [lang="ar"]) :is(.chemical-product-card-copy h2, .chemical-detail-copy h1, .chemical-product-nav strong) { overflow-wrap: anywhere; }
main:is([lang="tr"], [lang="ar"]) .chemical-search input { font-size: .75rem; }
main[lang="ar"] :is(.chemical-filter-row button, .chemical-result-count, .chemical-product-card-copy p, .chemical-product-card-copy > span, .chemical-product-card-visual > small, .chemical-spec-grid dt, .chemical-product-nav small, .chemical-detail-visual > small) { letter-spacing: normal; text-transform: none; }
main[lang="ar"] .chemical-products-symbol { right: auto; left: 8vw; }
main[lang="ar"] .chemical-search input { padding-inline: 15px 42px; }
main[lang="ar"] .chemical-search i { right: auto; left: 16px; }
main[lang="ar"] .chemical-filter-row button span { margin-left: 0; margin-inline-start: 6px; }
main[lang="ar"] .chemical-product-card-visual > img { object-position: right center; }
main[lang="ar"] .chemical-product-card-visual > small { left: auto; right: 27px; }
main[lang="ar"] .chemical-product-card-visual .chemical-orbit { right: auto; left: -45px; }
main[lang="ar"] .chemical-product-card-copy > span b { display: inline-block; transform: scaleX(-1); }
main[lang="ar"] .chemical-product-card:hover .chemical-product-card-copy > span b { transform: scaleX(-1) translate(3px,-3px); }
main[lang="ar"] .chemical-detail-visual { border-left: 0; border-right: 1px solid var(--line); }
main[lang="ar"] .chemical-detail-number { right: auto; left: 3vw; direction: ltr; }
main[lang="ar"] .chemical-detail-visual > small { left: auto; right: 40px; }
main[lang="ar"] :is(.chemical-use-section li, .chemical-logistics-grid li) { padding-inline: 25px 0; }
main[lang="ar"] :is(.chemical-use-section li, .chemical-logistics-grid li)::before { left: auto; right: 0; }
main[lang="ar"] .chemical-use-section article + article { border-left: 0; border-right: 1px solid var(--line); }
main[lang="ar"] .chemical-product-nav a { text-align: start; }
main[lang="ar"] .chemical-product-nav a + a { border-left: 0; border-right: 1px solid var(--line); text-align: end; }
@media (max-width: 760px) {
    main:is([lang="tr"], [lang="ar"]) .chemical-products-hero-copy { width: 100%; }
    main[lang="ar"] .chemical-detail-visual { border-right: 0; }
    main[lang="ar"] .chemical-use-section article + article { border-right: 0; }
    main[lang="ar"] .chemical-product-nav a + a { border-right: 0; }
}
