/* ==========================================================
   RS Verity – Arabic (RTL) adjustments
   Loaded only on the *-ar.html pages, after the *-rtl.css files
   ========================================================== */
html[dir="rtl"] body {
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}
html[dir="rtl"] :is(h1, h2, h3, h4, h5, h6, p, a, li, label, input, textarea, select, button, blockquote, td, th, .tp-caption):not([class^="icon-"]):not([class*=" icon-"]):not(.fa) {
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif !important;
}

/* Arabic letters must never be spaced or upper-cased */
html[dir="rtl"] * { letter-spacing: 0 !important; text-transform: none !important; }
html[dir="rtl"] body { line-height: 1.8; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 { line-height: 1.5; }

/* Phone numbers / e-mails stay left-to-right */
html[dir="rtl"] .ltr, html[dir="rtl"] a[href^="mailto"], html[dir="rtl"] a[href^="tel"] { direction: ltr; unicode-bidi: isolate; }

/* Revolution slider: keep the engine LTR, captions RTL */
html[dir="rtl"] .rev_slider_wrapper, html[dir="rtl"] .rev_slider { direction: ltr; }
html[dir="rtl"] .rev_slider .tp-caption { direction: rtl; }

/* Owl / bx carousels compute positions in LTR */
html[dir="rtl"] .owl-carousel, html[dir="rtl"] .bx-wrapper { direction: ltr; }
html[dir="rtl"] .owl-carousel .owl-item, html[dir="rtl"] .bx-wrapper li { direction: rtl; }

/* Directional arrows in buttons/links point the other way */
html[dir="rtl"] .fa-chevron-right:before { content: "\f053"; }
html[dir="rtl"] .fa-angle-right:before { content: "\f104"; }
html[dir="rtl"] .fa-long-arrow-right:before { content: "\f177"; }
html[dir="rtl"] .fa-arrow-right:before { content: "\f060"; }

/* Numbers such as "+1k" keep their reading order */
html[dir="rtl"] .num-fact p { direction: ltr; unicode-bidi: isolate; }

/* ---------- Arabic logo lockup: RS mark + "آر إس فيريتي للاستشارات والتدريب" ---------- */
.logo-ar { display: inline-flex; align-items: center; gap: 12px; line-height: 1; vertical-align: middle; text-decoration: none; }
.header .logo .logo-ar { height: 100px; }
.logo-ar-mark { width: auto !important; height: 66px !important; max-width: none !important; margin: 0 !important; display: block; }
.logo-ar-text { display: flex; flex-direction: column; gap: 6px; padding-inline-start: 12px; border-inline-start: 1px solid rgba(48,30,2,.18); }
.logo-ar-name { font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif !important; font-size: 27px; font-weight: 800; color: #301e02; line-height: 1.15; white-space: nowrap; }
.logo-ar-sub { font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif !important; font-size: 14.5px; font-weight: 600; color: #a8835a; line-height: 1.2; white-space: nowrap; }
/* footer + dark theme: light version */
.footer-logo .logo-ar { margin-bottom: 35px; }
.footer-logo .logo-ar-mark { height: 78px !important; }
.footer-logo .logo-ar-text, html[data-theme="dark"] .header .logo-ar-text { border-color: rgba(255,255,255,.2); }
.footer-logo .logo-ar-name, html[data-theme="dark"] .header .logo-ar-name { color: #f3ede4 !important; }
.footer-logo .logo-ar-sub, html[data-theme="dark"] .header .logo-ar-sub { color: #c4a27c !important; }
.footer-logo .logo-ar-name { font-size: 30px; }
@media only screen and (max-width: 991px) {
    .header .logo .logo-ar { height: 90px; gap: 9px; }
    .logo-ar-mark { height: 52px !important; }
    .logo-ar-text { padding-inline-start: 9px; gap: 4px; }
    .logo-ar-name { font-size: 21px; }
    .logo-ar-sub { font-size: 12px; }
}
@media only screen and (max-width: 400px) {
    .header .logo .logo-ar { gap: 7px; }
    .logo-ar-mark { height: 44px !important; }
    .logo-ar-text { padding-inline-start: 7px; }
    .logo-ar-name { font-size: 18px; }
    .logo-ar-sub { font-size: 11px; }
}

/* top bar: keep Arabic reading order (label, then number / e-mail) */
html[dir="rtl"] .top .flat-information a { direction: rtl; unicode-bidi: normal; }

/* Widget titles (footer: تابعنا / خدماتنا / اشترك معنا): keep the two small lines right next to the title */
html[dir="rtl"] .widget .title-link { display: inline-block; padding-left: 36px; }
html[dir="rtl"] .widget .title-link:before,
html[dir="rtl"] .widget .title-link:after { right: auto !important; }
html[dir="rtl"] .widget .title-link:before { left: 11px !important; }
html[dir="rtl"] .widget .title-link:after { left: 0 !important; }

/* Top bar phone icon faces the Arabic reading direction */
html[dir="rtl"] .flat-information > li.phone i:before { transform: scaleX(-1); }
