/* ========================================================================
   RTL Overrides — Arabic
   ======================================================================== */

body.lang-ar {
    text-align: right;
}

/* Flip directional icons */
body.lang-ar .lang-arrow {
    transform: scaleX(-1);
}

body.lang-ar [data-scroll-animation="slide-in"] {
    transform: translateX(30px);
}

/* Floating widget on the LEFT side in RTL.
   Use direct right/left because fixed elements don't respect
   the body's logical properties (viewport is always LTR). */
body.lang-ar .floating-contact-widget {
    right: auto;
    left: var(--space-lg);
}

/* Back to top on the RIGHT side in RTL (opposite of floating contact) */
body.lang-ar .back-to-top {
    left: auto;
    right: var(--space-lg);
}

/* Hero scroll indicator stays centered, no flip needed */

/* Form labels: natural RTL */
body.lang-ar .form-group input,
body.lang-ar .form-group select,
body.lang-ar .form-group textarea {
    text-align: right;
}

/* Phone/email inputs: keep LTR for usability */
body.lang-ar input[type="email"],
body.lang-ar input[type="tel"],
body.lang-ar input[type="url"] {
    direction: ltr;
    text-align: left;
}

/* Service card color tag position */
body.lang-ar .service-card::before {
    transform-origin: right;
}

/* Process connector arrows flip in RTL */
body.lang-ar .process-connector svg {
    transform: scaleX(-1);
}

/* Dropdown menus: natural RTL */
body.lang-ar .lang-menu {
    inset-inline-end: auto;
    inset-inline-start: 0;
}

/* Tilt animation: mirror in RTL */
body.lang-ar [data-hover-animation="tilt"]:hover {
    transform: perspective(1000px) rotateY(3deg) rotateX(2deg) scale(1.02) !important;
}

/* Nav menu items: keep LTR direction for some links */
body.lang-ar .nav-menu a[href^="http"] {
    direction: ltr;
    display: inline-block;
}

/* Hero text gradient in RTL: reverse direction */
body.lang-ar .hero-tagline {
    background: linear-gradient(225deg, #fff 0%, #5FCEDC 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* FAQ summary indicator position */
body.lang-ar .faq-item summary::after {
    margin-inline-start: var(--space-sm);
}

/* Section title gradient: reverse for RTL */
body.lang-ar .section-title,
body.lang-ar .service-hero-title {
    background: linear-gradient(225deg, var(--text-primary) 0%, var(--bg-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons with arrow icons: flip arrows in RTL */
body.lang-ar .btn svg,
body.lang-ar .service-link svg,
body.lang-ar .hero-cta svg {
    transform: scaleX(-1);
}

/* Floating buttons stack order: phone below whatsapp in RTL, or just keep natural */
body.lang-ar .floating-contact-widget {
    flex-direction: column-reverse;
}

/* Hero CTA: button order in RTL: Get Started first, then Learn more */
body.lang-ar .hero-cta {
    flex-direction: row-reverse;
}
