/**
 * RTL overrides for Arabic site (lang="ar" dir="rtl").
 * Loaded after styles.css — fixes physical left/right from the English build.
 */

html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[dir="rtl"] .font-kanit,
html[dir="rtl"] .section-title,
html[dir="rtl"] .banner-title,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── Bootstrap alignment (physical utilities) ───────────────────── */
html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Keep numeric counters / ratios LTR where needed */
html[dir="rtl"] .banner-counter {
    direction: ltr;
    unicode-bidi: embed;
}

/* ── Navbar & logo ─────────────────────────────────────────────── */
html[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 0;
    margin-inline-end: 1rem;
}

html[dir="rtl"] .nav-logo-stack {
    margin-right: 0;
    margin-inline-end: 15px;
}

html[dir="rtl"] .nav-logo-stack .nav-logo--scrolled {
    left: auto;
    right: auto;
    inset-inline-start: 0;
}

/* Do not override justify-content-end — in RTL flex-end is inline-left (opposite logo) */
html[dir="rtl"] nav.header-nav .dropdown-menu.dropdown-menu-lg-end {
    inset-inline-end: 0 !important;
    inset-inline-start: auto !important;
}

html[dir="rtl"] nav.header-nav .dropdown-item.header-nav-dropdown-link {
    padding: 0.6rem 1.15rem 0.6rem 2.35rem;
    text-align: right;
}

html[dir="rtl"] nav.header-nav .header-nav-dropdown-link__icon {
    right: auto;
    left: 1.1rem;
    transform: translate(0.5rem, -50%);
}

html[dir="rtl"] nav.header-nav .dropdown-item.header-nav-dropdown-link:hover .header-nav-dropdown-link__icon,
html[dir="rtl"] nav.header-nav .dropdown-item.header-nav-dropdown-link:focus .header-nav-dropdown-link__icon,
html[dir="rtl"] nav.header-nav .dropdown-item.header-nav-dropdown-link.active .header-nav-dropdown-link__icon {
    transform: translate(0, -50%);
}

html[dir="rtl"] nav.header-nav.scrolled .lang-switch {
    border-left: none;
    border-right: none;
    border-inline-start: 1px solid var(--gray-300) !important;
    padding-left: 0 !important;
    padding-inline-start: 1.5rem !important;
}

html[dir="rtl"] .lang-switch {
    padding-left: 0 !important;
    padding-inline-start: 1.5rem !important;
}

/* Product lines dropdown: left chevron (Arabic); open state points up */
html[dir="rtl"] .nav-chevron.nav-chevron--dropdown {
    transform: none;
    font-size: 0.65em;
}

html[dir="rtl"] nav.header-nav .nav-link[aria-expanded="true"] .nav-chevron.nav-chevron--dropdown {
    transform: rotate(-90deg);
}

/* ── Icons that imply direction (nav dropdown uses fa-arrow-left in arabic/includes/header.php) ─ */
html[dir="rtl"] .btn-readmore .fa-arrow-right,
html[dir="rtl"] .btn-icon-wrapper .fa-arrow-right,
html[dir="rtl"] .btn-primary-custom .fa-arrow-right,
html[dir="rtl"] .btn-explore-pill .fa-arrow-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .rotate-neg-45 {
    transform: scaleX(-1) rotate(-45deg);
}

html[dir="rtl"] .banner-prev-custom .fa-arrow-left,
html[dir="rtl"] .banner-next-custom .fa-arrow-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .nav-prev-icon.fa-chevron-left,
html[dir="rtl"] .nav-next-icon.fa-chevron-right {
    transform: scaleX(-1);
}

/* Markets carousel: inner controls stay LTR so chevrons match Owl prev/next */
html[dir="rtl"] .custom-nav .nav-prev-icon.fa-chevron-left,
html[dir="rtl"] .custom-nav .nav-next-icon.fa-chevron-right {
    transform: none;
}

/* ── Buttons: asymmetric padding from LTR design ───────────────── */
html[dir="rtl"] .btn-primary-custom {
    padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-sm);
}

html[dir="rtl"] .btn-explore-pill {
    padding: 8px 24px 8px 8px;
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-explore-pill .icon-circle {
    transform: scaleX(-1);
}

/* ── Home banner: badge + avatars ─────────────────────────────── */
html[dir="rtl"] .banner-customer-badge {
    padding: 6px 6px 6px 16px;
    flex-direction: row-reverse;
}

html[dir="rtl"] .avatar-group {
    flex-direction: row-reverse;
}

html[dir="rtl"] .avatar-overlap {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline-start: -12px;
}

html[dir="rtl"] .avatar-group img.avatar-img {
    margin-left: -11px !important;
    margin-inline-end: 0;
}

/* Hero bottom controls: keep row visual order sensible */
html[dir="rtl"] .slider-nav {
    flex-direction: row-reverse;
}

/* ── Horizontal services strip: LTR scroll for GSAP; RTL text in each card */
html[dir="rtl"] .horiz-gallery-wrapper,
html[dir="rtl"] .horiz-gallery-strip {
    direction: ltr;
}

html[dir="rtl"] .horiz-gallery-item {
    direction: rtl;
}

html[dir="rtl"] .horiz-gallery-item .role-card .position-absolute.start-0 {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .horiz-gallery-item .text-start {
    text-align: right !important;
}

/* ── Product lines: grid uses columns, not flex — mirror alternation ─ */
html[dir="rtl"] .product-lines-split-row:not(.product-lines-split-row--reverse) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

html[dir="rtl"] .product-lines-split-row:not(.product-lines-split-row--reverse) .product-lines-split-media {
    order: 2;
}

html[dir="rtl"] .product-lines-split-row:not(.product-lines-split-row--reverse) .product-lines-split-content {
    order: 1;
}

html[dir="rtl"] .product-lines-split-row--reverse {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

html[dir="rtl"] .product-lines-split-row--reverse .product-lines-split-media {
    order: 1;
}

html[dir="rtl"] .product-lines-split-row--reverse .product-lines-split-content {
    order: 2;
}

html[dir="rtl"] .product-lines-split-content {
    text-align: right;
}

/* ── Product detail / list-detail: readable Arabic labels + alignment ─ */
html[dir="rtl"] .product-detail-page .section-subtitle {
    letter-spacing: 0.04em;
    text-transform: none;
}

html[dir="rtl"] .product-detail-page .product-detail-copy,
html[dir="rtl"] .product-detail-page .product-detail-tagline-card,
html[dir="rtl"] .product-detail-page .product-detail-card-body,
html[dir="rtl"] .product-detail-page .product-detail-card-title {
    text-align: start;
}

/* ── About values rows: swap reverse meaning under RTL ─────────── */
html[dir="rtl"] .about-page .value-row.reverse {
    flex-direction: row;
}

html[dir="rtl"] .about-page .value-row:not(.reverse) {
    flex-direction: row-reverse;
}

html[dir="rtl"] .about-page .value-media.ms-lg-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
}

/* ── Empower section gradient ─────────────────────────────────── */
html[dir="rtl"] .empower-bg {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

/* ── Insights / cards ─────────────────────────────────────────── */
html[dir="rtl"] .insight-overlay {
    left: auto;
    right: 0;
    width: 100%;
}

html[dir="rtl"] .insight-date {
    flex-direction: row-reverse;
}

html[dir="rtl"] .insight-date .fa-clock,
html[dir="rtl"] .fa-quote-left {
    margin-inline-end: 0.25rem;
    margin-inline-start: 0;
}

/* ── Choice / contact / footer ────────────────────────────────── */
/* List: DOM is [icon][text]; direction rtl puts icon at inline-start (right), text to its left */
html[dir="rtl"] .choice-list {
    align-items: stretch;
}

html[dir="rtl"] .choice-list-item {
    flex-direction: row;
    text-align: right;
}

html[dir="rtl"] .choice-list-item span {
    flex: 1;
    min-width: 0;
    text-align: right;
}

html[dir="rtl"] .choice-section .choice-subtitle,
html[dir="rtl"] .choice-section .section-title {
    text-align: right;
}

html[dir="rtl"] .contact-info-card-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-info-card-main {
    text-align: right;
}

html[dir="rtl"] .footer-nav-list,
html[dir="rtl"] .footer-desc,
html[dir="rtl"] .footer-tagline {
    text-align: right;
}

html[dir="rtl"] .footer-bottom-bar .footer-copy {
    text-align: center;
}

html[dir="rtl"] .align-self-start {
    align-self: flex-end !important;
}

html[dir="rtl"] .justify-content-lg-end {
    justify-content: flex-start !important;
}

/* ── Floating UI ──────────────────────────────────────────────── */
html[dir="rtl"] .floating-btns-global {
    right: auto;
    left: 2rem;
}

html[dir="rtl"] .progress-ring {
    left: auto;
    right: 0;
}

html[dir="rtl"] .back-to-top-btn .fa-arrow-up {
    transform: scaleX(-1);
}

/* ── Forms ───────────────────────────────────────────────────── */
html[dir="rtl"] input::placeholder,
html[dir="rtl"] textarea::placeholder {
    text-align: right;
}

html[dir="rtl"] .form-control,
html[dir="rtl"] .contact-form-field,
html[dir="rtl"] .career-detail-field {
    text-align: right;
}

/* Career detail job — override LTR-only heading; list + body copy use logical alignment */
html[dir="rtl"] .career-detail-subtitle--qual {
    text-align: start;
}

html[dir="rtl"] .career-detail-qual-list li {
    text-align: start;
}

/* ── Owl carousels: stage LTR so prev/next match swipe; text stays RTL in slides */
html[dir="rtl"] .owl-carousel .owl-stage-outer {
    direction: ltr;
}

html[dir="rtl"] .owl-carousel .owl-item {
    direction: rtl;
}

/* ── Bootstrap spacing utilities (physical ms/me/ps/pe) ───────── */
html[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
html[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
html[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }

@media (min-width: 768px) {
    html[dir="rtl"] .ms-md-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }
    html[dir="rtl"] .me-md-3 { margin-right: 0 !important; margin-left: 1rem !important; }
    html[dir="rtl"] .ps-md-4 { padding-left: 0 !important; padding-right: 1.5rem !important; }
    html[dir="rtl"] .ps-md-5 { padding-left: 0 !important; padding-right: 3rem !important; }
    html[dir="rtl"] .pe-md-5 { padding-right: 0 !important; padding-left: 3rem !important; }
}

@media (min-width: 992px) {
    html[dir="rtl"] .ps-lg-4 { padding-left: 0 !important; padding-right: 1.5rem !important; }
    html[dir="rtl"] .ps-lg-5 { padding-left: 0 !important; padding-right: 3rem !important; }
    html[dir="rtl"] .pe-lg-4 { padding-right: 0 !important; padding-left: 1.5rem !important; }
    html[dir="rtl"] .pe-lg-5 { padding-right: 0 !important; padding-left: 3rem !important; }
}

html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}
.milestones-stat-value {
    font-size: 4rem;
    font-weight: 600 !important;
}

.section-title {
    font-weight: 700;
}

.ar-left {
    text-align: left;
}

/* ── About page: CEO quote — Cairo (overrides Kanit/Georgia from styles.css); RTL alignment + photo edge */
html[dir="rtl"] .about-quote-content {
    text-align: start;
}

html[dir="rtl"] .about-quote-kicker,
html[dir="rtl"] .about-quote-text,
html[dir="rtl"] .about-quote-name,
html[dir="rtl"] .about-quote-role {
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[dir="rtl"] .about-quote-text {
    font-style: normal;
}

html[dir="rtl"] .about-quote-kicker {
    letter-spacing: 0.04em;
    text-transform: none;
}

html[dir="rtl"] .about-quote-photo {
    float: none;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    html[dir="rtl"] .about-quote-photo {
        margin-left: 0;
        margin-right: auto;
    }
}

.product-list-tab {
    text-align: right;
}
.industries-video-caption {
    text-align: right;
}

/* Blog cards — RTL text alignment */
html[dir="rtl"] .blog-card__title,
html[dir="rtl"] .blog-card__byline {
    text-align: start;
}

html[dir="rtl"] .blog-detail-kicker {
    text-transform: none;
    letter-spacing: 0.06em;
}

html[dir="rtl"] .blog-detail-kicker,
html[dir="rtl"] .blog-detail-title,
html[dir="rtl"] .blog-detail-meta,
html[dir="rtl"] .blog-detail-body,
html[dir="rtl"] .blog-detail-back__link,
html[dir="rtl"] .blog-detail-sidebar__title,
html[dir="rtl"] .blog-detail-related__title,
html[dir="rtl"] .blog-detail-related__excerpt,
html[dir="rtl"] .blog-detail-related__more {
    font-family: 'Cairo', Georgia, 'Times New Roman', serif;
}

/* Blog detail sidebar list: no Bootstrap list-unstyled — zero start padding/margin in RTL */
html[dir="rtl"] aside.blog-detail-sidebar .blog-detail-related {
    list-style: none;
    padding: 0;
    margin: 0;
}

html[dir="rtl"] aside.blog-detail-sidebar .blog-detail-related > li {
    margin-inline: 0;
    padding-inline: 0;
}


@media (min-width: 100px) and (max-width: 991.98px) {
    .product-lines-split-row {
        display: block;
    }
    .product-lines-split-img{
        margin-bottom: 30px;
    }
    .contact-info-banner-text {
        right: 0;
        text-align: right;
    }
   
   
}