/* RTL (Right-to-Left) Support for Arabic and other RTL languages */

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Navigation adjustments */
[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-item {
    text-align: right;
}

[dir="rtl"] .dropdown-item i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Flexbox adjustments */
[dir="rtl"] .d-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Padding adjustments */
[dir="rtl"] .pe-2 {
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
}

[dir="rtl"] .ps-2 {
    padding-right: 0.5rem !important;
    padding-left: 0 !important;
}

/* Text alignment */
[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Language switcher */
[dir="rtl"] .language-switcher .dropdown-menu {
    left: 0;
    right: auto;
}

/* Buttons */
[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .btn i:first-child {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Cards and containers */
[dir="rtl"] .card-body {
    text-align: right;
}

/* Forms */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .input-group {
    flex-direction: row-reverse;
}

/* Lists */
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* Bootstrap icons positioning */
[dir="rtl"] .bi-chevron-down::before {
    transform: scaleX(-1);
}

[dir="rtl"] .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Hero section */
[dir="rtl"] .hero-section {
    text-align: right;
}

/* Footer */
[dir="rtl"] .footer {
    text-align: right;
}

/* Floating contact buttons */
[dir="rtl"] .floating-contact-buttons {
    left: 20px;
    right: auto;
}

/* General spacing adjustments */
[dir="rtl"] * {
    unicode-bidi: embed;
}

[dir="rtl"] bdo[dir="ltr"] {
    unicode-bidi: bidi-override;
    direction: ltr;
}

/* Ensure numbers and English text remain LTR in RTL context */
[dir="rtl"] .ltr-text {
    direction: ltr;
    text-align: left;
    display: inline-block;
}

