/* Arabic / RTL — loaded for all pages; rules only apply when dir=rtl */

html[dir="rtl"] body {
    font-family: "Noto Sans Arabic", "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .hero h1,
html[dir="rtl"] .lang-dialog-title,
html[dir="rtl"] .download-consent-title,
html[dir="rtl"] .arch-title-text {
    font-family: "Noto Sans Arabic", "Instrument Serif", Georgia, serif;
}

/*
 * Hero: keep copy on the physical left (dark side of the photo).
 * RTL alone pushes a max-width block to the right and over the subject.
 */
html[dir="rtl"] .hero-copy {
    margin-left: 0;
    margin-right: auto;
    width: min(28rem, 100%);
    max-width: 28rem;
    text-align: right;
}

html[dir="rtl"] .hero-media img {
    /* Same as LTR — subject stays on the right, clear of the copy */
    object-position: right center;
}

html[dir="rtl"] .hero-media::after {
    /* Stronger left scrim so Arabic text never sits on the photo */
    background:
        linear-gradient(90deg, rgba(14, 18, 23, 0.97) 0%, rgba(14, 18, 23, 0.9) 36%, rgba(14, 18, 23, 0.55) 52%, rgba(14, 18, 23, 0.12) 68%, transparent 82%),
        linear-gradient(180deg, rgba(14, 18, 23, 0.35) 0%, transparent 28%, transparent 72%, rgba(14, 18, 23, 0.45) 100%);
}

html[dir="rtl"] .hero h1 {
    max-width: none;
}

html[dir="rtl"] .kicker {
    letter-spacing: 0;
    text-transform: none;
}

@media (max-width: 800px) {
    html[dir="rtl"] .hero-media img {
        object-position: 72% center;
    }

    html[dir="rtl"] .hero-media::after {
        background:
            linear-gradient(180deg, rgba(14, 18, 23, 0.94) 0%, rgba(14, 18, 23, 0.88) 40%, rgba(14, 18, 23, 0.7) 68%, rgba(14, 18, 23, 0.88) 100%),
            linear-gradient(90deg, rgba(14, 18, 23, 0.65) 0%, transparent 70%);
    }

    html[dir="rtl"] .hero-copy {
        width: 100%;
        max-width: 100%;
    }
}

/* Keep code, consoles, and URLs LTR inside RTL pages */
html[dir="rtl"] code,
html[dir="rtl"] pre,
html[dir="rtl"] kbd,
html[dir="rtl"] .install-console,
html[dir="rtl"] .install-console-body,
html[dir="rtl"] .install-commands,
html[dir="rtl"] .enquiry-form input[type="email"] {
    direction: ltr;
    unicode-bidi: isolate;
}

html[dir="rtl"] .install-console-bar h3 {
    margin: 0 2.2rem 0 0;
}

html[dir="rtl"] .install-console-chevron {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .install-flow-step:not(:last-child)::before {
    left: auto;
    right: 0.72rem;
}

html[dir="rtl"] .slideshow-item {
    text-align: right;
}

html[dir="rtl"] .slideshow-viewer-x {
    right: auto;
    left: 0.75rem;
}

html[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .lang-dialog-option {
    text-align: right;
}

/* Mobile nav: mirror the language picker separator */
@media (max-width: 860px) {
    html[dir="rtl"] .lang-picker {
        border-inline-start: none;
        border-block-start: 1px solid rgba(255, 255, 255, 0.06);
    }
}
