/* ==========================================================================
   RTL overrides for Snappy Care Theme
   ========================================================================== */

body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif !important;
    --font-body: 'Cairo', sans-serif !important;
    --font-heading: 'Cairo', sans-serif !important;
}

body.rtl .page-header,
body.rtl .page-header-content,
body.rtl .page-header .section-description {
    text-align: right !important;
}

/* Header & Navigation Mirroring */
body.rtl .header-content {
    flex-direction: row; /* Flexbox naturally mirrors order with dir="rtl" */
}

body.rtl .nav {
    margin-left: 0;
    margin-right: auto;
}

body.rtl .nav-menu {
    display: flex;
    padding: 0;
    margin: 0;
}

body.rtl .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

body.rtl .dropdown-icon {
    margin-left: 0;
    margin-right: 6px;
}

body.rtl .header-cta {
    margin-left: 0;
    margin-right: 24px;
}

/* Privacy Policy Layout Mirroring */
body.rtl .legal-layout {
    display: flex;
    flex-direction: row; /* Automatically mirrored by dir="rtl" */
}

@media (min-width: 1025px) {
    body.rtl .legal-sidebar {
        padding-left: 40px;
        padding-right: 0;
        border-right: none;
        border-left: 1px solid var(--gray-200, #eee);
    }
    
    body.rtl .legal-main {
        padding-left: 0;
        padding-right: 40px;
    }
}

body.rtl .sidebar-link {
    text-align: right;
    border-left: none;
    border-right: 2px solid transparent;
    padding-left: 0;
    padding-right: 16px;
}

body.rtl .sidebar-link.active {
    border-left-color: transparent;
    border-right-color: var(--primary-color, #3C5A3E);
}

body.rtl .plain-list {
    padding-right: 0;
    margin-left: 0;
    margin-right: 20px;
}

body.rtl .plain-list li {
    padding-left: 0;
    padding-right: 10px;
}

body.rtl .legal-main,
body.rtl .legal-section,
body.rtl .legal-subsection,
body.rtl .sidebar-box,
body.rtl .sidebar-title {
    text-align: right !important;
}

/* Section Header Alignment */
body.rtl .section-header,
body.rtl .testimonials-header,
body.rtl .insights-header,
body.rtl.services-page .section-header,
body.rtl.services-page .section-header.text-center,
body.rtl.services-page .services-faq-header {
    text-align: right !important;
    align-items: flex-start !important;
}

body.rtl.services-page .services-faq-header {
    direction: rtl;
}

body.rtl.services-page .services-faq-header > div,
body.rtl.services-page .services-faq-header .faq-desc-area,
body.rtl.services-page .services-faq-header .section-description,
body.rtl.services-page .services-faq-header .faq-title,
body.rtl.services-page .services-faq-header .faq-subtitle {
    text-align: right !important;
}

body.rtl.services-page .services-faq-header .faq-desc-area {
    margin-right: 0;
    margin-left: auto;
}

@media (max-width: 1024px) {
    body.rtl.services-page .services-faq-header,
    body.rtl .faq-header {
        display: block !important;
        align-items: initial !important;
    }

    body.rtl.services-page .services-faq-header > div,
    body.rtl.services-page .services-faq-header .faq-desc-area,
    body.rtl.services-page .services-faq-header .faq-subtitle,
    body.rtl.services-page .services-faq-header .faq-title,
    body.rtl.services-page .services-faq-header .section-description {
        width: 100%;
        display: block;
        text-align: right !important;
    }

    body.rtl.services-page .services-faq-header .faq-subtitle {
        width: fit-content;
        margin-right: 0;
        margin-left: auto;
    }

    body.rtl.services-page .services-faq-header .faq-title,
    body.rtl.services-page .services-faq-header .section-description {
        margin-right: 0;
        margin-left: auto;
    }
}

body.rtl .section-title,
body.rtl .section-subtitle,
body.rtl .section-description {
    text-align: right !important;
}

/* Hero Section RTL Alignment */
body.rtl .hero-content {
    text-align: right !important;
}

body.rtl .hero-subtitle,
body.rtl .hero-title,
body.rtl .hero-description {
    text-align: right !important;
}

body.rtl .hero-buttons {
    justify-content: flex-start !important;
}

@media (max-width: 1024px) {
    body.rtl .hero-content {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: 0;
        align-self: stretch;
    }
}

/* CSR Section RTL Adjustments */
body.rtl .csr-content {
    max-width: 400px;
}

body.rtl .csr-label {
    white-space: normal;
}

/* Slider Navigation RTL Adjustments */
body.rtl .slider-nav {
    right: auto;
    left: 0;
}

body.rtl .slider-arrow svg {
    transform: scaleX(-1);
}

/* Management page RTL adjustments */
body.rtl .chairman-text-side,
body.rtl .chairman-message-body,
body.rtl .chairman-message-body p,
body.rtl .profile-content,
body.rtl .profile-bio-text,
body.rtl .profile-bio-text p,
body.rtl .chairman-name-main,
body.rtl .profile-name-title,
body.rtl .profile-role-pill {
    direction: rtl;
    text-align: right !important;
}

body.rtl .chairman-designation {
    direction: rtl;
    text-align: right !important;
    justify-content: flex-end;
}

body.rtl .chairman-designation::after {
    order: 0;
}

body.rtl .profile-linkedin-btn {
    direction: rtl;
}
