/* ============================================================
 *  e-Portal Holding — Arabic / RTL stylesheet
 *  Loaded ONLY on the Arabic pages (index-ar.html, about-ar.html, etc.)
 *  This file overlays css/style.css + css/enhancements.css and flips
 *  the few rules that are not already direction-agnostic.
 *  No design / size / animation changes are made here.
 * ============================================================ */

html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Use STC Forward (already has Arabic glyph coverage for our use)
   plus a robust Arabic fallback so all UI text renders crisply.

   IMPORTANT: do NOT use a universal `body *` selector here. Font Awesome
   sets `font-family: "Font Awesome 6 Free" / "Font Awesome 6 Brands"`
   on .fa-solid / .fa-brands / etc. with `!important`, and clobbering it
   would make every `<i class="fa-…">` render as a missing glyph.
   We set the font on `body` and let normal inheritance carry it to text
   descendants — icons override inheritance via their own class rules. */
html[dir="rtl"] body {
    font-family: 'STC Forward', 'Segoe UI', 'Tahoma', 'Arial', sans-serif !important;
}

/* Re-assert Font Awesome's icon font on every icon element so that no
   accidental cascade (from `style.css`'s `html, body, *` rule or anywhere
   else) can break icon glyphs in the Arabic / RTL view. */
html[dir="rtl"] .fa,
html[dir="rtl"] .fas,
html[dir="rtl"] .far,
html[dir="rtl"] .fal,
html[dir="rtl"] .fad,
html[dir="rtl"] .fa-solid,
html[dir="rtl"] .fa-regular,
html[dir="rtl"] .fa-light,
html[dir="rtl"] .fa-thin,
html[dir="rtl"] .fa-duotone,
html[dir="rtl"] .fa-classic {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}
html[dir="rtl"] .fab,
html[dir="rtl"] .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}
/* Regular-weight Font Awesome variants should keep their 400 weight */
html[dir="rtl"] .fa-regular,
html[dir="rtl"] .far {
    font-weight: 400;
}

/* keep brand monogram / logos / english tokens visually unchanged */
html[dir="rtl"] .ak_min_stc,
html[dir="rtl"] .ak_vr_logo_wrap,
html[dir="rtl"] .ak_new_logo {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ============================================================
 *  HEADER — language switch chip
 * ============================================================ */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border:1.5px solid #dde0e2;
    color: #4f008c;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .25s ease, color .25s ease, transform .25s ease;
    line-height: 1;
    white-space: nowrap;
}
.lang-switch:hover {
    background: #4f008c;
    color: #fff;
    transform: translateY(-1px);
}
.lang-switch i { font-size: 12px; }

/* ============================================================
 *  MOBILE MENU — language switch button
 *  Applies on mobile/tablet only (the burger menu doesn't exist above
 *  the `lg` breakpoint, so this block is naturally mobile-scoped, but
 *  we wrap it in a max-width media query for safety / clarity).
 *  The chip is centered, given its own breathing room, separated from
 *  the menu links by a hairline divider, and sized for comfortable
 *  thumb tapping. Same treatment for English (`العربية`) and
 *  Arabic (`English`) so both languages feel identical.
 * ============================================================ */
@media (max-width: 1023px) {
    #mobileMenu .lang-switch {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: max-content;
        min-width: 160px;
        margin: 28px auto 8px;
        padding: 11px 24px;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        background: #fff;
        color: #4f008c;
        border: 1.5px solid #4f008c;
        border-radius: 999px;
        text-align: center;
        position: relative;
        box-shadow: 0 2px 6px rgba(79, 0, 140, 0.06);
        transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
    }

    /* hairline separator between the menu links and the language chip */
    #mobileMenu .lang-switch::before {
        content: "";
        position: absolute;
        top: -14px;
        left: 50%;
        transform: translateX(-50%);
        width: 70%;
        height: 1px;
        background: #ececec;
    }

    #mobileMenu .lang-switch:hover,
    #mobileMenu .lang-switch:focus-visible {
        background: #4f008c;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(79, 0, 140, 0.18);
    }

    #mobileMenu .lang-switch i {
        font-size: 13px;
    }
}

/* ============================================================
 *  MOBILE MENU — slide from LEFT in RTL
 * ============================================================ */
html[dir="rtl"] .mobile-menu {
    right: auto;
    left: -300px;
    box-shadow: 5px 0 20px rgba(0,0,0,0.15);
    transition: left .3s;
}
html[dir="rtl"] .mobile-menu.active {
    right: auto;
    left: 0;
}

/* ============================================================
 *  HERO CAROUSEL — swiper RTL handling
 * ============================================================ */
html[dir="rtl"] .swiper { direction: rtl; }
html[dir="rtl"] .hero-slide {
    /* the grid order stays the same; readability of hero text is preserved */
    direction: rtl;
}
html[dir="rtl"] .hero-left { text-align: right; }
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-sub { text-align: right; }

/* ============================================================
 *  CHAIRPERSON / LEADERSHIP V4
 * ============================================================ */
html[dir="rtl"] .ak_v4_header,
html[dir="rtl"] .ak_v4_body,
html[dir="rtl"] .ak_v4_actions { text-align: right; }

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

html[dir="rtl"] .ak_v4_btn .btn_v4_circle svg { transform: scaleX(-1); }

html[dir="rtl"] .ak_v4_card,
html[dir="rtl"] .ak_v4_card * { text-align: right; }
html[dir="rtl"] .card_v4_header_inline { flex-direction: row; }

html[dir="rtl"] .ak_v4_floating_card { left: auto; right: -20px; }

html[dir="rtl"] .ak_v4_drawer {
    right: auto; left: -560px;
    transition: left .4s ease;
    box-shadow: 10px 0 40px rgba(0,0,0,.2);
}
html[dir="rtl"] .ak_v4_drawer.open { right: auto; left: 0; }
html[dir="rtl"] .ak_v4_close { margin-left: 0; margin-right: auto; }

/* ============================================================
 *  PILLARS V5
 * ============================================================ */
html[dir="rtl"] .ak_pillars_header,
html[dir="rtl"] .ak_pillar_card_v5 { text-align: right; }
html[dir="rtl"] .card_v5_top { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .svc_item { flex-direction: row-reverse; }

html[dir="rtl"] .ak_v5_drawer {
    right: auto; left: -560px;
    transition: left .4s ease;
    box-shadow: 10px 0 40px rgba(0,0,0,.2);
}
html[dir="rtl"] .ak_v5_drawer.open { right: auto; left: 0; }

/* ============================================================
 *  ABOUT PAGE
 * ============================================================ */
html[dir="rtl"] .ak-about-overview,
html[dir="rtl"] .ak-about-text,
html[dir="rtl"] .ak-about-title,
html[dir="rtl"] .ak-stat-card,
html[dir="rtl"] .ak-metrics-item,
html[dir="rtl"] .ak-performance-section { text-align: right; }

/* Timeline – natural RTL mirror: 2025 (newest) appears first on the RIGHT,
   user scrolls right-to-left to reveal older years toward 1983 on the left. */
html[dir="rtl"] .ep-tl-rail { flex-direction: row; }                /* let RTL flow naturally */
html[dir="rtl"] .ep-tl-controls { flex-direction: row-reverse; }
html[dir="rtl"] .ep-tl-controls .ep-tl-btn i { transform: scaleX(-1); }

/* Progress bar – anchor on the LEFT (toward 1983 / oldest end) and grow rightward toward 2025.
   Gradient is mirrored so the active-pink colour aligns with 2025 on the right. */
html[dir="rtl"] .ep-tl-progress {
    left: 0;
    right: auto;
    background: linear-gradient(270deg, #ff375e 0%, #4f008c 100%);
}

/* ============================================================
 *  OFFERED SOLUTIONS
 * ============================================================ */
html[dir="rtl"] .akPillar_header,
html[dir="rtl"] .akPillar_content_panel,
html[dir="rtl"] .akPillar_nav_item { text-align: right; }
html[dir="rtl"] .akPillar_nav { direction: rtl; }

html[dir="rtl"] .akSol_body,
html[dir="rtl"] .akSol_card { text-align: right; }
html[dir="rtl"] .akSol_list { padding-right: 1.2rem; padding-left: 0; }

/* ============================================================
 *  VENDOR RELATIONS
 * ============================================================ */
html[dir="rtl"] .ak_vr_hero_inner,
html[dir="rtl"] .ak_vr_card,
html[dir="rtl"] .ak_vr_cta_inner { text-align: center; }

html[dir="rtl"] .ak_vr_card::before {
    left: auto; right: 0;
    transform-origin: right;
}

html[dir="rtl"] .ak_vr_company_btn i { transform: scaleX(-1); }
html[dir="rtl"] .ak_vr_card:hover .ak_vr_company_btn:hover i { transform: scaleX(-1) translateX(3px); }

/* ============================================================
 *  CAREERS
 * ============================================================ */
html[dir="rtl"] .cr-hero,
html[dir="rtl"] .cr-job-card,
html[dir="rtl"] .cr-job-details-inner,
html[dir="rtl"] .cr-form-section { text-align: right; }

html[dir="rtl"] .cr-search-bar { direction: rtl; }
html[dir="rtl"] .cr-search-bar i { right: 18px; left: auto; }
html[dir="rtl"] .cr-search-bar input { padding-right: 46px; padding-left: 18px; text-align: right; }

html[dir="rtl"] .cr-job-head,
html[dir="rtl"] .cr-job-meta { flex-direction: row-reverse; }
html[dir="rtl"] .cr-form-head { flex-direction: row-reverse; }
html[dir="rtl"] .cr-row { direction: rtl; }
html[dir="rtl"] .cr-field { text-align: right; }
html[dir="rtl"] .cr-field input,
html[dir="rtl"] .cr-field select { text-align: right; }
html[dir="rtl"] .cr-phone-flex { flex-direction: row-reverse; }
html[dir="rtl"] .cr-form-foot { flex-direction: row-reverse; }
html[dir="rtl"] .cr-btn-view i,
html[dir="rtl"] .cr-btn-apply i,
html[dir="rtl"] .cr-btn-submit i { transform: scaleX(-1); }

/* ============================================================
 *  CONTACT US
 * ============================================================ */
html[dir="rtl"] .ak_contact_card,
html[dir="rtl"] .ak_contact_header { text-align: center; }
html[dir="rtl"] .ak_contact_address { direction: rtl; }
html[dir="rtl"] .ak_contact_action_group { direction: rtl; }

/* ============================================================
 *  OUR COMPANIES
 * ============================================================ */
html[dir="rtl"] .ak_portal_header,
html[dir="rtl"] .ak_new_card { text-align: right; }
html[dir="rtl"] .ak_card_top { flex-direction: row-reverse; }
html[dir="rtl"] .ak_action_link { flex-direction: row-reverse; }
html[dir="rtl"] .ak_action_link span { transform: scaleX(-1); }

/* drawer slides from LEFT in RTL */
html[dir="rtl"] .ak_new_card::before { left: auto; right: 0; }
html[dir="rtl"] .ak_side_drawer {
    right: auto; left: -480px;
    transition: left .4s;
    box-shadow: 10px 0 40px rgba(0,0,0,.25);
}
html[dir="rtl"] .ak_side_drawer.active { right: auto; left: 0; }
html[dir="rtl"] .ak_drawer_header { flex-direction: row-reverse; }
html[dir="rtl"] .ak_drawer_list { padding-right: 18px; padding-left: 0; }

/* ============================================================
 *  FOOTER
 * ============================================================ */
html[dir="rtl"] .ak_minimal_footer,
html[dir="rtl"] .ak_min_holding,
html[dir="rtl"] .ak_min_copy { text-align: center; }
html[dir="rtl"] .ak_min_nav { direction: rtl; }
html[dir="rtl"] .ak_min_members { direction: rtl; }

/* ============================================================
 *  SOVEREIGN CLOUD COMING-SOON
 * ============================================================ */
html[dir="rtl"] .ak_coming_container,
html[dir="rtl"] .ak_coming_sub,
html[dir="rtl"] .ak_coming_title { text-align: center; }
html[dir="rtl"] .ak_coming_btn i { transform: scaleX(-1); }
html[dir="rtl"] .ak_coming_dots { margin-left: 0; margin-right: 4px; }

/* ============================================================
 *  MISC — keep numeric badges / dates LTR (so 24/7, 1982, 1,000+
 *  render correctly amid RTL flow)
 * ============================================================ */
html[dir="rtl"] .ak-metrics-value,
html[dir="rtl"] .ep-tl-year,
html[dir="rtl"] .ak-stat-number,
html[dir="rtl"] .cr-job-code,
html[dir="rtl"] .ak_founded_badge,
html[dir="rtl"] .cr-job-salary {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* font-awesome icons in nav remain centered (no transforms needed) */
html[dir="rtl"] #burger,
html[dir="rtl"] #closeMenu { direction: ltr; }

.ak_main_subtitle{
    max-width: 100% !important;
}
