/* Import Cairo font for Arabic typography */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

html[dir="rtl"] body {
    font-family: 'Cairo', 'Poppins', sans-serif !important;
    text-align: right;
}

/* RTL Spacing & Navigation Fixes */
html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

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

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

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

/* Navbar Brand & Items */
html[dir="rtl"] .navbar.custom-navbar-style .navbar-nav {
    margin-left: auto !important;
    margin-right: auto !important;
}

html[dir="rtl"] .navbar-brand img {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

/* Hero Section Controls */
html[dir="rtl"] .slider .content {
    text-align: right;
    right: 10%;
    left: auto;
}

/* Form Controls & Labels */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
    text-align: right;
}

/* Tables Alignment */
html[dir="rtl"] table,
html[dir="rtl"] th,
html[dir="rtl"] td {
    text-align: right;
}

/* Custom Card & Lists RTL Alignment */
html[dir="rtl"] .hse-principles .principle ul,
html[dir="rtl"] .qa-policy ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* Language Switcher Styling */
.lang-switcher-container {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 3px;
    margin-left: 15px;
}

html[dir="rtl"] .lang-switcher-container {
    margin-left: 0;
    margin-right: 15px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #d4af37;
    color: #000;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.lang-btn:hover:not(.active) {
    color: #fff;
}

/* Floating WhatsApp Launcher Alignment in RTL */
html[dir="rtl"] #wa-widget-launcher {
    left: 25px !important;
    right: auto !important;
}

html[dir="rtl"] #wa-widget-popover,
html[dir="rtl"] .wa-popover {
    left: 25px !important;
    right: auto !important;
    text-align: right;
    position: fixed !important;
    bottom: 95px !important;
}

html[dir="rtl"] p, html[dir="rtl"] li {
    line-height: 1.7;
}

/* Mobile RTL Adjustments */
@media (max-width: 767.98px) {
    html[dir="rtl"] .navbar-nav {
        text-align: right;
        padding-right: 0.5rem;
    }
    html[dir="rtl"] .lang-switcher-container {
        margin-top: 10px;
        margin-right: 0;
        display: inline-flex;
    }
    html[dir="rtl"] .calc-cat-pill {
        margin-left: 6px;
        margin-right: 0;
    }
    html[dir="rtl"] #wa-widget-launcher {
        left: 15px !important;
    }
    html[dir="rtl"] #wa-widget-popover,
    html[dir="rtl"] .wa-popover {
        left: 15px !important;
    }
}


