/* ==========================================================================
   AEIK Integrated Systems — RTL (Arabic) overrides
   --------------------------------------------------------------------------
   Every rule is scoped under [dir="rtl"], so this file is completely inert
   for the English (LTR) site. It only flips the handful of places where the
   layout uses *physical* left/right properties that don't auto-mirror.

   Scope (so far): site chrome — header, nav, footer, floating buttons, fonts.
   Page-body sections get their own RTL passes as each view is localized.
   ========================================================================== */

/* ----- Typography: Arabic typeface ----- */
[dir="rtl"] body,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] button,
[dir="rtl"] select,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: "Tajawal", "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ----- Header: contact card divider flips to the other side ----- */
[dir="rtl"] .aeik-contact-card {
    padding-left: 0;
    padding-right: 1rem;
    border-left: 0;
    border-right: 1px solid var(--aeik-line);
}

/* ----- Desktop dropdown opens aligned to the right edge ----- */
[dir="rtl"] .aeik-nav__dropdown {
    left: auto;
    right: 0;
}

/* ----- Hero title reveal: words enter from the left (RTL reading flow) ----- */
[dir="rtl"] .main-slider .title .aeik-letter {
    transform: translate(-40px, -40px);
}
[dir="rtl"] .main-slider .swiper-slide-active .title .aeik-letter {
    transform: translate(0, 0);
}

/* ----- Floating action buttons swap corners ----- */
[dir="rtl"] .aeik-totop {
    right: auto;
    left: 1.5rem;
}
[dir="rtl"] .aeik-wa {
    left: auto;
    right: 1.5rem;
}

/* ==========================================================================
   Page bodies — section-level RTL passes
   ========================================================================== */

/* Services cards: watermark number flips to the left corner */
[dir="rtl"] .aeik-services__num {
    right: auto;
    left: 1.6rem;
}

/* --------------------------------------------------------------------------
   Directional icons: every "arrow-right" / "chevron-right" points LEFT in RTL.
   One global flip covers links, CTAs, nav cards, breadcrumb separators, etc.
   Hover states below re-apply the mirror because their own `transform`
   (a translateX nudge) would otherwise cancel it out.
   -------------------------------------------------------------------------- */
[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-chevron-right {
    transform: scaleX(-1);
}

/* Hover nudges — compose mirror + translateX so the slide goes left (toward text) */
[dir="rtl"] .aeik-services__card:hover .aeik-services__link .bi-arrow-right {
    transform: scaleX(-1) translateX(3px);
}
[dir="rtl"] .aeik-svc-detail__cta:hover .bi-arrow-right {
    transform: scaleX(-1) translateX(3px);
}
[dir="rtl"] .aeik-cta-banner__btn:hover .bi-arrow-right {
    transform: scaleX(-1) translateX(4px);
}
[dir="rtl"] .aeik-svc-page__nav-card:hover .bi-arrow-right {
    transform: scaleX(-1) translateX(4px);
}

/* Partners — Golden Reseller cards: content reads right-to-left */
[dir="rtl"] .aeik-partners-page__golden-card {
    text-align: right;
}
/* gold accent rule under the description grows from the right edge */
[dir="rtl"] .aeik-partners-page__golden-card p::after {
    left: auto;
    right: 0;
    background: linear-gradient(270deg, #aab8d0 0%, #dfe7f3 60%, transparent 100%);
}

/* Partners — customer-reference lists: bullet sits on the right */
[dir="rtl"] .aeik-partners-page__refs-card li {
    padding-left: 0;
    padding-right: 1rem;
}
[dir="rtl"] .aeik-partners-page__refs-card li::before {
    left: auto;
    right: 0;
}

/* ==========================================================================
   Mobile (<= 991.98px): the slide-in nav comes from the RIGHT in RTL
   ========================================================================== */
@media (max-width: 991.98px) {
    [dir="rtl"] .aeik-nav {
        inset: 0 0 0 auto;            /* pin to the right edge */
        transform: translateX(100%);  /* slide in from the right */
        box-shadow: -0.5rem 0 1.5rem rgba(20, 60, 107, .08);
    }
    [dir="rtl"] .aeik-nav.is-open {
        transform: translateX(0);
    }

    /* Close (X) button moves to the top-left of the panel */
    [dir="rtl"] .aeik-nav__close {
        right: auto;
        left: 1rem;
    }

    /* Sub-menu indent flips */
    [dir="rtl"] .aeik-nav__dropdown {
        padding-left: 0;
        padding-right: 1rem;
    }

    /* Floating buttons keep their mobile sizing but mirrored sides */
    [dir="rtl"] .aeik-totop { left: 1rem; right: auto; }
    [dir="rtl"] .aeik-wa    { right: 1rem; left: auto; }
}
