/* ============================================================
   RTL.CSS - Arabic Right-To-Left Layout Support
   Loaded automatically when $lang === 'ar' via master.php
   ============================================================ */

/* Google Arabic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ── Root direction ── */
html,
body,
.page-wraper {
    direction: rtl;
    text-align: right;
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ── Arabic Typography ── */
body,
p,
h1, h2, h3, h4, h5, h6,
.dlab-title,
.title,
.sub-title,
span,
a {
    font-family: 'Tajawal', 'Cairo', Tahoma, Arial, sans-serif !important;
}

/* ── Text alignment helpers ── */
.text-left  { text-align: right !important; }
.text-right { text-align: left  !important; }
.section-head.text-center { text-align: center !important; }

/* ── Float helpers ── */
.float-left  { float: right !important; }
.float-right { float: left  !important; }
.pull-left   { float: right !important; }
.pull-right  { float: left  !important; }

/* ────────────────────────────────────────
   HEADER & NAVIGATION
──────────────────────────────────────── */
.logo-header { float: right !important; }
.site-header .extra-nav { float: left !important; }

/* In desktop view */
@media only screen and (min-width: 992px) {
    .header-nav .nav {
        float: left !important;
    }
}



.header-nav .nav > li > a {
    border-width: 0 1px 0 0 !important;
}

.header-nav .nav > li > a i {
    margin-left: 0 !important;
    margin-right: 3px !important;
}

.navbar-nav .sub-menu,
.navbar-nav .mega-menu {
    left: auto !important;
    right: 0 !important;
    text-align: right !important;
}

.navbar-nav .sub-menu li a {
    padding: 10px 15px 10px 10px !important;
    text-align: right !important;
}

.navbar-nav .sub-menu li.sub-menu-down > a:after {
    right: auto !important;
    left: 12px !important;
}

.navbar-toggler {
    float: left !important;
    margin-left: 0 !important;
    margin-right: 15px !important;
}

/* Mobile sliding menu flip from left-to-right to right-to-left */
@media only screen and (max-width: 991px) {
    body.rtl .mo-left .header-nav {
        left: auto !important;
        right: -280px !important;
    }
    body.rtl .mo-left .header-nav.show {
        left: auto !important;
        right: -1px !important;
        width: 280px !important;
    }
    body.rtl .header-nav .logo-header {
        text-align: right !important;
        float: none !important;
    }
    
        body.rtl .mo-left .navbar-toggler.open:after {
        left: -20px !important;
        right: auto !important;
        transform-origin: top left !important;
        margin: 0 20px 0 0 !important;
    }
}


/* ────────────────────────────────────────
   ICON BOX WRAPPERS
──────────────────────────────────────── */
.icon-bx-wraper.left {
    text-align: right;
}

.icon-bx-wraper.left > [class*="icon-bx-"] {
    float: right;
    margin-right: 0;
    margin-left: 20px;
}

.icon-bx-wraper.style-2 > [class*="icon-bx-"] {
    float: right;
}

.icon-bx-wraper.style-2 .icon-content {
    padding-left: 0;
    padding-right: 20px;
}

/* Keep centered horizontal feature boxes centered */
.horizontal-feature-box,
.horizontal-feature-box .icon-content {
    text-align: center !important;
}

/* ────────────────────────────────────────
   LISTS
──────────────────────────────────────── */
ul, ol {
    padding-left: 0;
    padding-right: 1.5rem;
}

.list-check li,
.list-angle-right li,
.list-arrow li {
    padding-left: 0;
    padding-right: 25px;
}

.list-check li::before,
.list-angle-right li::before,
.list-arrow li::before {
    left: auto;
    right: 0;
}

/* ────────────────────────────────────────
   FORMS
──────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select,
.form-control {
    direction: rtl;
    text-align: right;
}

label {
    display: block;
    text-align: right;
}

/* ────────────────────────────────────────
   OWL CAROUSEL
──────────────────────────────────────── */
.owl-nav .owl-prev { right: auto; left: -30px; }
.owl-nav .owl-next { left: auto;  right: -30px; }

/* ────────────────────────────────────────
   FOOTER
──────────────────────────────────────── */
.site-footer .footer-top .widget { text-align: right; }
.site-footer .footer-bottom .text-left  { text-align: right !important; }
.site-footer .footer-bottom .text-right { text-align: left  !important; }
.dlab-social-icon { direction: rtl; }

/* ────────────────────────────────────────
   BACK TO TOP
──────────────────────────────────────── */
#back-to-top {
    right: auto !important;
    left: 15px !important;
}

/* ────────────────────────────────────────
   ACCORDION
──────────────────────────────────────── */
.accordion .card-header a { text-align: right; }
.accordion .card-header a::after { float: left; }

/* ────────────────────────────────────────
   BANNER & COUNTERS
──────────────────────────────────────── */
.banner-one .banner-content { text-align: right; }

.counter-style-1,
.counter-style-2,
.counter-style-3 {
    text-align: right;
}

/* ────────────────────────────────────────
   TAG CLOUD
──────────────────────────────────────── */
.tagcloud a {
    float: right;
    margin: 0 0 5px 5px;
}






/* إصلاح محاذاة القسم في اللغة العربية */
.dlab-bnr-inr-entry {
    text-align: right;
}

/* ضبط اتجاه وسهم مسار التنقل (Breadcrumb) */
.breadcrumb {
    padding-right: 0;
    justify-content: flex-start;
}

.breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    content: ">" !important;
    /* أداة الفصل الاتجاهية الصحيحة لـ RTL */
}

/* إصلاح التداخل للنصوص الهجينة (عربي + إنجليزي) */
h1,
.breadcrumb-item {
    unicode-bidi: plaintext;
}

/* ────────────────────────────────────────
   إصلاحات تفصيلية لصفحات الموقع (RTL)
──────────────────────────────────────── */

/* قلب خط التوصيل المنحني أفقياً ليتطابق مع اتجاه تدفق العناصر المعكوس */
body.rtl .section-wraper-horizontal::before {
    transform: scaleX(-1) !important;
}

/* محاذاة العناوين الفرعية والنصوص اليسارية إلى اليمين */
body.rtl .text-left,
body.rtl .section-head.text-left {
    text-align: right !important;
}

/* هوامش الأيقونات والرموز التعبيرية */
body.rtl i[class*="fa-"],
body.rtl i[class*="la-"] {
    margin-right: 0 !important;
    margin-left: 5px !important;
}
body.rtl i.m-l10 {
    margin-left: 0 !important;
    margin-right: 10px !important;
}
body.rtl i.m-r10 {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* عكس أيقونات الأسهم التي تشير لليمين أفقياً */
body.rtl .fa-angle-right,
body.rtl .la-angle-right {
    transform: scaleX(-1) !important;
    display: inline-block !important;
}

/* ضبط الهوامش الداخلية والطفو لعلب الأيقونات المتمركزة */
body.rtl .icon-bx-wraper.style-2.text-center .icon-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.rtl .icon-bx-wraper.style-2.text-center > [class*="icon-bx-"] {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* مباعدة الفجوات في التخطيط المرن (Flex Gap) */
body.rtl .gap-3 {
    gap: 1rem !important;
}


  .navicon.open span:nth-child(2) {
      opacity: 0;
      right: -60px;
  }
