/* RTL stylesheet for Arabic pages (v3) — loaded by header.php when lang=ar */

/* Font fallback import: guarantees Tajawal loads even if the header link is
   served from an old cache */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* === Arabic typography ===
   Applies to ALL elements EXCEPT icon fonts (FontAwesome / Flaticon), which
   must keep their own font-family or icons turn into empty squares. */
html[dir="rtl"] body,
html[dir="rtl"] body *:not(i):not([class^="icon-"]):not([class*=" icon-"]):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class^="flaticon-"]):not(.ibs-flag) {
    font-family: 'Tajawal', sans-serif !important;
}
html[dir="rtl"] h1, html[dir="rtl"] h2 { letter-spacing: 0 !important; }

/* === Direction & alignment === */
body { direction: rtl; text-align: right; }
.pull-left { float: right !important; }
.pull-right { float: left !important; }
ul, ol { padding-right: 0; }
.list-style-two li.pl_30 { padding-left: 0 !important; padding-right: 30px !important; }
.list-style-two li:before { left: auto !important; right: 0 !important; }
.ml_30, .ml_40, .ml_65, .ml_70 { margin-left: 0 !important; margin-right: 30px !important; }
.mr_65 { margin-right: 0 !important; margin-left: 65px !important; }
input.form-control { text-align: right; }
.it-trust, .form-group label { text-align: right; }
.sec-title-ten, .content-box { text-align: right; }
.acc-btn { padding-left: 80px !important; padding-right: 30px !important; }
.acc-btn .icon-outer { right: auto !important; left: 20px !important; }
.mobile-menu { text-align: right; }
.mobile-menu .navigation li > a { text-align: right; }

/* === Desktop navigation in RTL === */
.main-menu .navigation > li { float: right; }

/* KEY FIX: the theme never makes menu items a positioning context, so
   dropdown coordinates were measured against the WHOLE header (right:0 landed
   at the right edge of the screen). Anchor each dropdown to its own item: */
html[dir="rtl"] .main-menu .navigation > li.dropdown,
html[dir="rtl"] .sticky-header .navigation > li.dropdown {
    position: relative !important;
}

/* Regular dropdowns (Tools): open from the item's right edge, extending
   leftwards — the natural reading direction in RTL */
html[dir="rtl"] .main-menu .navigation > li > ul,
html[dir="rtl"] .sticky-header .navigation > li > ul {
    left: auto !important;
    right: 0 !important;
    text-align: right;
}
html[dir="rtl"] .main-menu .navigation > li > ul > li > a,
html[dir="rtl"] .sticky-header .navigation > li > ul > li > a { text-align: right; }

/* Language menu: leftmost item on screen in RTL — open from its left edge,
   extending rightwards/inwards so it stays fully on screen */
html[dir="rtl"] .main-menu .navigation > li.lang-menu > ul,
html[dir="rtl"] .sticky-header .navigation > li.lang-menu > ul {
    right: auto !important;
    left: 0 !important;
}

/* Dropdown arrow buttons sit on the opposite side in RTL */
.main-menu .navigation li.dropdown .dropdown-btn { right: auto; left: 0; }

@media (max-width: 991px) { .centred-mobile { text-align: center !important; } }
