/* ============================================================
   RTL (Right-to-Left) Override — Arabic, Hebrew, Persian, etc.
   Auto-loaded when Lang::isRtl() returns true
   ============================================================ */

/* Base direction */
body {
    direction: rtl;
    text-align: right;
}

/* Bootstrap RTL overrides */
.text-start { text-align: right !important; }
.text-end   { text-align: left !important; }
.ms-auto    { margin-right: auto !important; margin-left: 0 !important; }
.me-auto    { margin-left: auto !important; margin-right: 0 !important; }
.ms-1, .ms-2, .ms-3, .ms-4, .ms-5 {
    margin-right: inherit;
    margin-left: 0;
}
.me-1, .me-2, .me-3, .me-4, .me-5 {
    margin-left: inherit;
    margin-right: 0;
}
.ps-1, .ps-2, .ps-3, .ps-4, .ps-5 {
    padding-right: inherit;
    padding-left: 0;
}
.pe-1, .pe-2, .pe-3, .pe-4, .pe-5 {
    padding-left: inherit;
    padding-right: 0;
}

/* Flex direction */
.flex-row { flex-direction: row-reverse !important; }
.d-flex:not(.flex-column):not(.flex-row-reverse) {
    /* Let individual components decide */
}

/* Navbar */
.navbar-nav { flex-direction: row-reverse; }

/* Icons with margins */
.bi + span,
i + span { margin-right: 0.25rem; margin-left: 0; }
span + .bi,
span + i { margin-left: 0.25rem; margin-right: 0; }

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

/* Cards */
.card-body { text-align: right; }

/* Hero section */
.hero-content { text-align: right; }
.hero-badge { right: auto; left: 20px; }

/* Footer */
.footer-custom { text-align: right; }
.footer-social { justify-content: flex-start; }

/* Sidebar (admin) */
.sb-nav .sb-item i { margin-left: 0.75rem; margin-right: 0; }
.sb-chevron { transform: rotate(180deg); }

/* Form elements */
input, textarea, select {
    text-align: right;
}
input[type="email"],
input[type="url"],
input[type="tel"] {
    text-align: left; /* These should remain LTR */
    direction: ltr;
}

/* Dropdown menus */
.dropdown-menu { text-align: right; }

/* Arrow icons flip */
.bi-arrow-right::before { content: "\F12C"; /* bi-arrow-left */ }
.bi-chevron-right::before { content: "\F284"; /* bi-chevron-left */ }

/* Search overlay */
#searchOverlay .input-group {
    flex-direction: row-reverse;
}

/* Swiper navigation */
.swiper-button-next { right: auto; left: 10px; }
.swiper-button-prev { left: auto; right: 10px; }

/* WhatsApp float button */
.wa-float-wrap { right: auto; left: 24px; }
.wa-tooltip { right: auto; left: 100%; margin-left: 12px; margin-right: 0; }

/* Cookie banner */
.cookie-banner .bi { margin-left: 0.5rem; margin-right: 0; }

/* Portfolio overlay */
.portfolio-overlay span .bi { margin-left: 0.5rem; margin-right: 0; }

/* Stats & counters */
.stat-number { direction: ltr; unicode-bidi: bidi-override; }

/* Tables */
.table th, .table td { text-align: right; }
.table .text-end { text-align: left !important; }

/* Border start/end swap */
.border-start { border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; border-left: 0 !important; }
.border-end { border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; border-right: 0 !important; }

/* Accordion */
.accordion-button::after {
    margin-right: auto;
    margin-left: 0;
}

/* List group */
.list-group-item { text-align: right; }

/* Quote/testimonial cards */
.testimonial-card { text-align: right; }

/* Section badges */
.section-badge i { margin-left: 0.5rem; margin-right: 0; }
