/**
 * Language System Styles
 * Handles RTL/LTR layouts and language switcher UI
 */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(111, 196, 199, 0.1), rgba(230, 69, 63, 0.1));
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.lang-switcher:hover {
    background: linear-gradient(135deg, rgba(111, 196, 199, 0.15), rgba(230, 69, 63, 0.15));
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.lang-btn {
    padding: 0.35rem 0.9rem;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: var(--primary-red, #e6453f);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: white;
    color: var(--primary-red, #e6453f);
    box-shadow: 0 2px 8px rgba(230, 69, 63, 0.2);
    font-weight: 700;
}

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

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

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

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

[dir="rtl"] .slider-content {
    text-align: right;
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-5px);
    padding-right: 1.5rem;
    padding-left: 1.2rem;
}

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

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

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

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

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

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

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

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

[dir="rtl"] .pe-3 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

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

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

/* Footer RTL Styles */
[dir="rtl"] footer {
    direction: rtl;
}

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

[dir="rtl"] footer .text-md-start {
    text-align: right !important;
}

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

[dir="rtl"] footer .align-items-start {
    text-align: right;
}

[dir="rtl"] footer .gap-2 {
    flex-direction: row-reverse;
}

[dir="rtl"] footer ul {
    padding-right: 0;
    padding-left: 0;
}

[dir="rtl"] footer .list-unstyled {
    text-align: right;
}

[dir="rtl"] footer .list-unstyled li {
    text-align: right;
}

[dir="rtl"] footer .row {
    direction: rtl;
}

[dir="rtl"] footer .col-lg-3,
[dir="rtl"] footer .col-lg-2,
[dir="rtl"] footer .col-lg-5,
[dir="rtl"] footer .col-md-3,
[dir="rtl"] footer .col-md-6,
[dir="rtl"] footer .col-6 {
    text-align: right;
}

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

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

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

/* Ensure icons and text align properly in RTL */
[dir="rtl"] footer .d-flex.align-items-start {
    flex-direction: row-reverse;
}

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

/* Social icons container */
[dir="rtl"] footer .d-flex.gap-2 {
    justify-content: flex-start;
}

@media (max-width: 991px) {
    .lang-switcher {
        margin: 1rem 0;
        justify-content: center;
    }

    [dir="rtl"] .dropdown-menu {
        margin-right: 1rem;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    [dir="rtl"] footer .text-center {
        text-align: center !important;
    }

    [dir="rtl"] footer .col-6 {
        text-align: right;
    }
}
