/* ==========================================================================
   RTL (Right-to-Left) Stylesheet for Arabic Language Support
   Applied conditionally when locale is 'ar'
   ========================================================================== */

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

/* Arabic-friendly font stack */
body,
h1, h2, h3, h4, h5, h6,
p, span, a, li, td, th,
input, textarea, select, button,
.nav-link, .dropdown-item, .btn {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', 'Noto Sans Arabic', sans-serif;
}

/* ===== Navbar ===== */
.navbar-brand {
    margin-left: auto;
    margin-right: 0;
}

.navbar-nav {
    padding-right: 0;
}

.navbar-other {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.offcanvas-body.ms-lg-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

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

/* ===== Footer specific ===== */
footer .widget {
    text-align: right;
}

footer .list-unstyled {
    padding-right: 0;
    padding-left: 0;
}

/* Newsletter input group - keep natural order in RTL */
footer .input-group {
    direction: rtl;
}

footer .input-group > .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
}

footer .input-group > .btn {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* Social icons - natural flow */
footer .social a {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ===== Contact form ===== */
.contact_us_form label {
    text-align: right;
}

.contact_us_form .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

.contact_us_form .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* ===== General spacing fixes ===== */

/* me-* classes (margin-end) become margin-start in RTL */
.me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
.me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
.me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
.me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
.me-5 { margin-left: 3rem !important; margin-right: 0 !important; }
.me-6 { margin-left: 2rem !important; margin-right: 0 !important; }

/* ms-* classes (margin-start) become margin-end in RTL */
.ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
.ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
.ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
.ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
.ms-5 { margin-right: 3rem !important; margin-left: 0 !important; }

.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* pe-* / ps-* padding swaps */
.pe-xxl-15 {
    padding-right: 0 !important;
    padding-left: 3rem !important;
}

/* ===== Lists ===== */
ul, ol {
    padding-right: 0;
}

.list-unstyled {
    padding-right: 0;
}

/* Bullet lists with icons */
.icon-list li span:first-child {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ===== Text alignment overrides ===== */
.text-lg-start {
    text-align: right !important;
}

/* Keep center-aligned text centered */
.text-center {
    text-align: center !important;
}

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

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

.card.text-center {
    text-align: center !important;
}

/* ===== d-flex rows with icons ===== */
.d-flex.flex-row > div:first-child .icon {
    margin-left: 1.5rem;
    margin-right: 0;
}

/* ===== WhatsApp fixed button ===== */
/* Handled via inline style in blade now */

/* ===== Language switcher - keep LTR ===== */
.lang-switcher-wrapper,
.lang-dropdown {
    direction: ltr;
    text-align: left;
}

.lang-toggle-btn {
    direction: ltr;
}

/* ===== Swiper / Carousel ===== */
.swiper {
    direction: rtl;
}

/* ===== Cookie consent ===== */
.cookie-consent {
    direction: rtl;
    text-align: right;
}

/* ===== Offcanvas ===== */
.offcanvas-start {
    right: 0;
    left: auto;
}

/* ===== Counter / Stats ===== */
.counter-wrapper {
    text-align: center;
}

/* ===== Overlap grid (About page) ===== */
.overlap-grid {
    direction: rtl;
}

/* ===== Process steps ===== */
.process-wrapper .step {
    text-align: center;
}

/* ===== GCC Country Cards ===== */
.gcc-country-card {
    text-align: center !important;
}

/* ===== Responsive RTL fixes ===== */
@media (max-width: 991px) {
    .offcanvas-body {
        text-align: right;
    }

    .offcanvas-footer {
        text-align: right;
    }
}
