/* ============================================================
   RTL Override for Apps Store
   Bootstrap 4.4.1 has NO native RTL support.
   This file mirrors all LTR → RTL properties.
   ============================================================ */

/* ===========================================================
   1. Bootstrap 4 Utility Overrides
   =========================================================== */
*, html, body {
    border-collapse: collapse;
    text-align: right;
}

/* ─── Floats ──────────────────────────────────────────────── */
.float-left  { float: right !important; }
.float-right { float: left !important; }
.ml-auto { margin-left: 0 !important; margin-right: auto !important; }
.mr-auto { margin-right: 0 !important; margin-left: auto !important; }

/* ─── Margin utilities ────────────────────────────────────── */
.ml-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mr-0 { margin-right: 0 !important; margin-left: 0 !important; }
.ml-1, .ml-sm-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
.mr-1, .mr-sm-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
.ml-2, .ml-sm-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
.mr-2, .mr-sm-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
.ml-3, .ml-sm-3 { margin-left: 0 !important; margin-right: 1rem !important; }
.mr-3, .mr-sm-3 { margin-right: 0 !important; margin-left: 1rem !important; }
.ml-4, .ml-sm-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }
.mr-4, .mr-sm-4 { margin-right: 0 !important; margin-left: 1.5rem !important; }
.ml-5, .ml-sm-5 { margin-left: 0 !important; margin-right: 3rem !important; }
.mr-5, .mr-sm-5 { margin-right: 0 !important; margin-left: 3rem !important; }
.ml-auto { margin-left: 0 !important; margin-right: auto !important; }
.mr-auto { margin-right: 0 !important; margin-left: auto !important; }

/* ─── Padding utilities ───────────────────────────────────── */
.pl-0 { padding-left: 0 !important; padding-right: 0 !important; }
.pr-0 { padding-right: 0 !important; padding-left: 0 !important; }
.pl-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
.pr-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
.pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
.pl-3 { padding-left: 0 !important; padding-right: 1rem !important; }
.pr-3 { padding-right: 0 !important; padding-left: 1rem !important; }
.pl-4 { padding-left: 0 !important; padding-right: 1.5rem !important; }
.pr-4 { padding-right: 0 !important; padding-left: 1.5rem !important; }
.pl-5 { padding-left: 0 !important; padding-right: 3rem !important; }
.pr-5 { padding-right: 0 !important; padding-left: 3rem !important; }

/* ─── table utilities ──────────────────────────────────────── */
table {
    border-collapse: collapse;
    text-align: right;
}

/* ─── Text utilities ──────────────────────────────────────── */
.text-left  { text-align: right !important; }
.text-right { text-align: left !important; }

/* ─── Border utilities ────────────────────────────────────── */
.border-left  { border-left: 0 !important; border-right: 1px solid #dee2e6 !important; }
.border-right { border-right: 0 !important; border-left: 1px solid #dee2e6 !important; }
.border-left-0  { border-left: 0 !important; }
.border-right-0 { border-right: 0 !important; }
.border-left   { border-left: none !important; border-right: inherit !important; }
.rounded-left  { border-top-left-radius: 0 !important; border-top-right-radius: .25rem !important; border-bottom-left-radius: 0 !important; border-bottom-right-radius: .25rem !important; }
.rounded-right { border-top-right-radius: 0 !important; border-top-left-radius: .25rem !important; border-bottom-right-radius: 0 !important; border-bottom-left-radius: .25rem !important; }

/* ─── Justify/Align ───────────────────────────────────────── */
.justify-content-start { justify-content: flex-end !important; }
.justify-content-end   { justify-content: flex-start !important; }

/* ─── Dropdown ────────────────────────────────────────────── */
.dropdown-menu-left {
    right: 0;
    left: auto;
}
.dropdown-menu-right {
    left: 0;
    right: auto;
}

/* ─── List group ──────────────────────────────────────────── */
.list-group-item {
    border-right-width: 0;
    border-left-width: 0;
}

/* ─── Media object ────────────────────────────────────────── */
.media {
    flex-direction: row-reverse;
}

/* ─── Form custom switch/check ────────────────────────────── */
.custom-control-left .custom-control-label::before {
    right: -1.5rem;
    left: auto;
}
.custom-control-left .custom-control-label::after {
    right: -1.5rem;
    left: auto;
}
.custom-switch .custom-control-label::before {
    right: -2rem;
    left: auto;
}
.custom-switch .custom-control-label::after {
    right: calc(-2rem - 4px);
    left: auto;
}

/* ─── Input group ──────────────────────────── */
.input-group>.form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}
.input-group>.admin-btn {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* .input-group>.custom-select:not(:first-child),
.input-group>.form-control:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
} */

/* ─── Input group prepend/append ──────────────────────────── */
.input-group-prepend {
    border-radius: 0 .25rem .25rem 0;
}
.input-group-append {
    border-radius: .25rem 0 0 .25rem;
}

/* ─── Nav ─────────────────────────────────────────────────── */
.navbar-toggler {
    margin-left: auto;
    margin-right: 0;
}

/* ─── Close button ────────────────────────────────────────── */
.modal-header .close {
    margin-left: auto;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 0;
}

/* ─── Card ────────────────────────────────────────────────── */
.card-header-tabs {
    margin-right: -16px;
    margin-left: 0;
}
.card-header-pills {
    margin-right: -16px;
    margin-left: 0;
}

/* ─── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    padding-left: 0;
    float: right;
}

/* ===========================================================
   2. Template-Specific RTL Overrides
   =========================================================== */

/* ─── Back to top button ──────────────────────────────────── */
.back-to-top {
    right: auto;
    left: 15px;
}

/* ─── Header ──────────────────────────────────────────────── */
#header {
    direction: rtl;
}
#header .logo {
    float: right;
    margin-left: 0;
    margin-right: auto;
}

/* ─── Navigation Menu ─────────────────────────────────────── */
.nav-menu > ul > li {
    float: right;
}
.nav-menu a {
    padding: 8px 25px 12px 0;
}
.nav-menu .get-started {
    margin-left: 0;
    margin-right: auto;
    float: left;
}
.nav-menu .get-started a {
    padding: 8px 20px;
}
#mobile-get-started {
    margin-left: 0;
    margin-right: auto;
}

/* ─── Mobile Nav ──────────────────────────────────────────── */
.mobile-nav .drop-down > a:after {
    right: auto;
    left: 15px;
}
.mobile-nav .drop-down > a {
    padding-right: 15px;
    padding-left: 35px;
}

/* ─── Hero Section ────────────────────────────────────────── */
#hero {
    direction: rtl;
}
#hero h1, #hero h2 {
    text-align: right;
}
#hero .hero-img {
    text-align: center;
}

/* ─── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
    direction: rtl;
}
.breadcrumbs .d-flex {
    flex-direction: row-reverse;
}
.breadcrumbs h2 {
    margin-right: 0;
    margin-left: auto;
}
.breadcrumbs ol {
    padding-left: 0;
    padding-right: 0;
}
.breadcrumbs ol li + li {
    padding-left: 0;
    padding-right: 10px;
}
.breadcrumbs ol li + li::before {
    padding-right: 0;
    padding-left: 10px;
}

/* ─── Section Title ───────────────────────────────────────── */
.section-title {
    text-align: right;
}
.section-title h2 {
    text-align: right;
}

/* ─── About Section ───────────────────────────────────────── */
.about .content {
    text-align: right;
    direction: rtl;
}
.about .content ul li {
    padding-left: 0;
    padding-right: 28px;
}
.about .content ul i {
    position: absolute;
    left: auto;
    right: 0;
}
.about .content .btn-learn-more {
    margin-left: 0;
    margin-right: auto;
}

/* ─── Icon Box (Services) ─────────────────────────────────── */
.icon-box {
    text-align: right;
}
.icon-box .icon {
    float: right;
    margin-left: 15px;
    margin-right: 0;
}
.icon-box .title, .icon-box .title a {
    text-align: right;
}

/* ─── Counter Section ─────────────────────────────────────── */
.counts .content .count-box i {
    float: right;
}
.counts .content .count-box span {
    margin-left: 0;
    margin-right: 50px;
}

/* ─── Portfolio ───────────────────────────────────────────── */
.portfolio-info {
    text-align: right;
}
.portfolio-links {
    text-align: right;
}
.portfolio-links a {
    margin-left: 0;
    margin-right: 4px;
}

/* ─── Contact Section ─────────────────────────────────────── */
.contact .info > div {
    text-align: right;
}
.contact .info i {
    margin-left: 10px;
    margin-right: 0;
    float: right;
}

/* ─── Testimonials ────────────────────────────────────────── */
.testimonials .testimonial-content {
    text-align: right;
}

/* ─── Team Section ────────────────────────────────────────── */
.team .member .member-info {
    text-align: right;
}

/* ─── Footer ──────────────────────────────────────────── */
.site-footer .footer-title::after {
    right: 0;
    left: auto;
}


/* ─── AOS Animation Fixes ─────────────────────────────────── */
[data-aos="fade-left"] {
    transform: translateX(30px) !important;
}
[data-aos="fade-right"] {
    transform: translateX(-30px) !important;
}
[data-aos="fade-left"].aos-animate {
    transform: translateX(0) !important;
}
[data-aos="fade-right"].aos-animate {
    transform: translateX(0) !important;
}

/* ─── Owl Carousel RTL ────────────────────────────────────── */
.owl-nav .owl-prev {
    right: 0;
    left: auto;
}
.owl-nav .owl-next {
    left: 0;
    right: auto;
}

/* ─── Alert Dismiss RTL ───────────────────────────────────── */
.alert-dismissible {
    padding-left: 3rem;
    padding-right: 1rem;
}
.alert-dismissible .close {
    right: auto;
    left: 0;
}

/* ─── Admin Sidebar RTL ───────────────────────────────────── */
#sidebar {
    direction: rtl;
    border-left: 0;
    border-right: 1px solid #dee2e6;
}
#sidebar ul.components li a {
    padding: 10px 15px 10px 25px;
    text-align: right;
}
#sidebar ul.components li a i {
    margin-left: 8px;
    margin-right: 0;
}
