/* RUWT CMS site overrides */
.mxd-hero-02 {
    direction: ltr;
}

/* Cover-reveal hero (no floating images): video first, then still cover on short scroll */
.mxd-hero-02--cover-reveal,
.mxd-hero-section--cover-reveal .mxd-hero-02 {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.mxd-hero-02--cover-reveal .mxd-hero-02__cover-img {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* opacity controlled by GSAP (starts hidden, reveals over video) */
    opacity: 0;
}

.mxd-hero-02--cover-reveal .mxd-hero-02__cover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mxd-hero-02--cover-reveal .mxd-hero-02__background {
    z-index: 1;
}

.mxd-hero-02--cover-reveal .hero-static-copy {
    z-index: 6;
}

/* Stack title + subtitle instead of both absolute-centered (was overlapping). */
.hero-static-copy {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.2rem, 3.5vh, 2.8rem);
    width: min(92vw, 56rem);
    padding: 0 1.5rem;
    transform: translate(-50%, -50%);
    text-align: center;
    mix-blend-mode: difference;
    pointer-events: none;
}

.hero-static-copy .mxd-hero-02__intro,
.hero-static-copy .mxd-hero-02__outro {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
}

.hero-static-copy .mxd-hero-02__intro h1 {
    font-size: clamp(2.4rem, 6vw, 6rem);
    line-height: 1.15;
    margin: 0;
    letter-spacing: normal;
}

.hero-static-copy .mxd-hero-02__outro p {
    font-size: clamp(1.25rem, 2.8vw, 2.4rem) !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    margin: 0;
    font-weight: 600;
    max-width: 36ch;
}

html[dir="rtl"] .hero-static-copy {
    direction: rtl;
    unicode-bidi: plaintext;
}

html[dir="rtl"] .hero-static-copy .mxd-hero-02__intro h1,
html[dir="rtl"] .hero-static-copy .mxd-hero-02__outro p {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: center;
}

.mxd-hero-02__background video,
.mxd-hero-02__background img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mxd-hero-02__cover-img {
    pointer-events: none;
}

html[dir="rtl"] .mxd-hero-02__intro h1,
html[dir="rtl"] .mxd-hero-02__outro p,
html[dir="rtl"] .rtl-hero-title,
html[dir="rtl"] .rtl-hero-subtitle {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: center;
    white-space: normal;
    word-break: normal;
    letter-spacing: 0;
}

/* RTL hero: stack title + subtitle (theme overlays both at 50% / 50%) */
html[dir="rtl"] .rtl-hero-copy {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vh, 2.4rem);
    width: min(92vw, 56rem);
    padding: 0 1.5rem;
    transform: translate(-50%, -50%);
    text-align: center;
    mix-blend-mode: difference;
    pointer-events: none;
}

html[dir="rtl"] .rtl-hero-copy .mxd-hero-02__intro,
html[dir="rtl"] .rtl-hero-copy .mxd-hero-02__outro {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    padding: 0;
    z-index: auto;
}

html[dir="rtl"] .rtl-hero-copy .mxd-hero-02__intro h1 {
    font-size: clamp(2.2rem, 5.5vw, 5.5rem);
    line-height: 1.25;
    margin: 0;
}

html[dir="rtl"] .rtl-hero-copy .mxd-hero-02__outro p {
    font-size: clamp(1.35rem, 3vw, 2.8rem);
    line-height: 1.45;
    margin: 0;
    font-weight: 600;
}

html[dir="rtl"] .mxd-hero-02__intro,
html[dir="rtl"] .mxd-hero-02__outro {
    direction: rtl;
}

html[dir="rtl"] .mxd-hero-02__intro h1 .char,
html[dir="rtl"] .mxd-hero-02__outro p .char,
html[dir="rtl"] .mxd-hero-02__intro h1 .word,
html[dir="rtl"] .mxd-hero-02__outro p .word {
    display: inline !important;
    transform: none !important;
    opacity: 1 !important;
    position: static !important;
    direction: inherit;
}

.mxd-divider__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mxd-menu__media .menu-media__wrapper video,
.mxd-menu__media .menu-media__wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-contact__list--lang {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.menu-contact__list--lang .tag-m.is-active {
    opacity: 1;
    text-decoration: underline;
}

html[dir="rtl"] .mxd-menu__navigation {
    direction: ltr;
}

html[dir="rtl"] .mxd-menu__caption p,
html[dir="rtl"] .main-menu__caption,
html[dir="rtl"] .menu-data__text {
    direction: rtl;
    unicode-bidi: plaintext;
}

/* Header / menu logo — no default icon overlap */
.ruwt-brand-logo__img,
.mxd-logo__image.ruwt-brand-logo__img,
.menu-logo__image.ruwt-brand-logo__img {
    display: block;
    width: auto;
    height: 3.6rem;
    max-width: 12rem;
    object-fit: contain;
}

@media only screen and (min-width: 768px) {
    .ruwt-brand-logo__img,
    .mxd-logo__image.ruwt-brand-logo__img,
    .menu-logo__image.ruwt-brand-logo__img {
        height: 4rem;
        max-width: 14rem;
    }
}

.mxd-logo {
    gap: 0;
}

/* Centered header logo */
.mxd-header--logo-center {
    left: 0 !important;
    right: 0;
    width: 100% !important;
    padding-left: 3rem;
    padding-right: 3rem;
    pointer-events: none;
}

.mxd-header--logo-center .mxd-header__logo,
.mxd-header--logo-center .mxd-header__controls {
    pointer-events: auto;
}

.mxd-header--logo-center .mxd-header__logo {
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    max-width: min(50vw, 220px);
    text-align: center;
    display: flex;
    align-items: center;
    height: 3.6rem;
}

.mxd-header--logo-center .mxd-header__controls {
    position: absolute;
    top: 3rem;
    /* Leave room for the fixed hamburger (≈5rem) + gap */
    right: calc(3rem + 6.5rem);
    z-index: 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    height: 3.6rem;
    padding-right: 0;
}

.mxd-header--logo-center .mxd-header__link,
.mxd-header--logo-center .mxd-color-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3.6rem;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}

.mxd-header--logo-center .mxd-color-switcher .switcher-icon,
.mxd-header--logo-center .mxd-color-switcher .switcher-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

@media only screen and (min-width: 768px) {
    .mxd-header--logo-center .mxd-header__logo,
    .mxd-header--logo-center .mxd-header__controls,
    .mxd-header--logo-center .mxd-header__link,
    .mxd-header--logo-center .mxd-color-switcher,
    .inner-headline__breadcrumbs {
        height: 4rem;
    }
}

html[dir="rtl"] .mxd-header--logo-center {
    left: 0 !important;
    right: 0 !important;
}

html[dir="rtl"] .mxd-header--logo-center .mxd-header__controls {
    right: auto;
    left: calc(3rem + 6.5rem);
}

@media only screen and (min-width: 768px) {
    .mxd-header--logo-center {
        padding-left: 6rem;
        padding-right: 6rem;
    }

    .mxd-header--logo-center .mxd-header__controls {
        right: calc(6rem + 6.5rem);
    }

    html[dir="rtl"] .mxd-header--logo-center .mxd-header__controls {
        left: calc(6rem + 6.5rem);
    }
}

@media only screen and (min-width: 1600px) {
    .mxd-header--logo-center {
        padding-left: 10rem;
        padding-right: 10rem;
    }

    .mxd-header--logo-center .mxd-header__controls {
        right: calc(10rem + 6.5rem);
    }

    html[dir="rtl"] .mxd-header--logo-center .mxd-header__controls {
        left: calc(10rem + 6.5rem);
    }
}

.ruwt-brand-logo__text {
    font-size: var(--ruwt-logo-size, 24px);
    line-height: 1;
    white-space: nowrap;
}

/* Inner pages: breadcrumbs aligned with header row (left) */
.inner-headline {
    position: relative;
    padding-top: 0;
    min-height: 9rem;
}

.inner-headline__breadcrumbs {
    position: absolute;
    top: 3rem;
    left: 3rem;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 3.6rem;
    margin: 0;
    padding: 0;
}

.inner-headline__breadcrumbs .breadcrumbs__nav {
    align-items: center;
}

.inner-headline__content {
    padding-top: 9rem;
}

html[dir="rtl"] .inner-headline__breadcrumbs {
    left: auto;
    right: 3rem;
}

@media only screen and (min-width: 768px) {
    .inner-headline__breadcrumbs {
        left: 6rem;
    }

    html[dir="rtl"] .inner-headline__breadcrumbs {
        right: 6rem;
    }

    .inner-headline__content {
        padding-top: 10rem;
    }
}

@media only screen and (min-width: 1600px) {
    .inner-headline__breadcrumbs {
        left: 10rem;
    }

    html[dir="rtl"] .inner-headline__breadcrumbs {
        right: 10rem;
    }
}

.mxd-logo--text-only .mxd-logo__text,
.menu-logo--text-only .menu-logo__text {
    line-height: 1;
}

.mxd-header.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Footer: keep nav above watermark without breaking template sizing */
.mxd-footer__footer-blocks.mxd-grid-item:first-child {
    position: relative;
    z-index: 5;
}

.mxd-footer__fw-mark {
    position: relative;
    z-index: 1;
}

/* Footer mark letter images — same rise animation as text chars */
.fw-mark__content--letters {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.02em;
    font-size: 28cqw;
    line-height: 0.746;
    direction: ltr;
    unicode-bidi: isolate;
}

.fw-mark__letter-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    line-height: 0;
}

.fw-mark__letter {
    display: block;
    will-change: transform, opacity;
}

.fw-mark__letter img {
    display: block;
    height: 0.9em;
    width: auto;
    max-width: none;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.fw-mark__letter-fallback {
    display: block;
    font-style: normal;
    font-weight: 500;
    line-height: 0.746;
    font-family: var(--_font-accent);
    text-transform: uppercase;
    color: var(--t-bright);
    white-space: nowrap;
}

html[dir="rtl"] .fw-mark__content--letters {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Keep leaked menu overlay logo hidden until menu opens */
.mxd-menu__overlay:not(.menu-open) .mxd-menu__logo {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mxd-menu__overlay.menu-open .mxd-menu__logo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

html[dir="rtl"] .mxd-section-manifest .manifest,
html[dir="rtl"] .mxd-section-manifest .manifest span {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: start;
}

.mxd-section-manifest .manifest span {
    display: inline;
}

/* RTL Arabic: correct reading order (disable broken split/scramble output) */
html[dir="rtl"] body,
html[dir="rtl"] .manifest,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p,
html[dir="rtl"] .btn-caption {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

html[dir="rtl"] .rtl-text-static,
html[dir="rtl"] .mxd-services-list__title h3,
html[dir="rtl"] .mxd-services-list__descr p,
html[dir="rtl"] .mxd-blog-list__title p,
html[dir="rtl"] .mxd-blog-list__excerpt p,
html[dir="rtl"] .mxd-process-points__title p,
html[dir="rtl"] .mxd-process-points__descr p,
html[dir="rtl"] .mxd-testimonials-card__text p,
html[dir="rtl"] .mxd-divider-xl__caption h2,
html[dir="rtl"] .mxd-section-title__title h2,
html[dir="rtl"] .fw-mark__content span,
html[dir="rtl"] .footer-data span {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: start;
}

html[dir="rtl"] .rtl-text-static .char,
html[dir="rtl"] .rtl-text-static .word,
html[dir="rtl"] .reveal-type .char,
html[dir="rtl"] .reveal-type .word,
html[dir="rtl"] .splitting .char,
html[dir="rtl"] .splitting .word {
    display: inline !important;
    transform: none !important;
    opacity: 1 !important;
    position: static !important;
}

/* Legacy RTL header overrides removed — centered header handles placement */

@media only screen and (min-width: 768px) {
    html[dir="rtl"] .mxd-menu__logo {
        right: 6rem;
    }
}

@media only screen and (min-width: 1600px) {
    html[dir="rtl"] .mxd-menu__logo {
        right: 10rem;
    }
}
