/*
Theme Name: Medical Website RTL
Description: Right-to-Left (RTL) Stylesheet for Arabic and other RTL languages.
*/

body {
    direction: rtl;
    unicode-bidi: embed;
    text-align: right;
}

/* Base resets for RTL */
h1, h2, h3, h4, h5, h6, p, ul, ol, li, div {
    text-align: right;
}

/* Margin and Padding flips */
.ml-auto { margin-right: auto; margin-left: 0; }
.mr-auto { margin-left: auto; margin-right: 0; }

/* Menus and navigation (Elementor covers most of this automatically in RTL mode, but safe fallbacks) */
.elementor-nav-menu--main {
    direction: rtl;
}

/* specific fixes for icons or spacing */
.fa, .fas, .far, .fab {
    /* If icons need to be flipped, e.g., an arrow pointing right should point left */
}

/* Hero Section adjustments */
@media (min-width: 1025px) {
    .elementor-element-eb84a7b {
        margin-left: 0 !important;
        margin-right: -5% !important; /* Reverse the left shift */
    }
}

/* Medical TOC (Table of Contents) adjustments */
.medical-toc-content .toc-subheading {
    padding-left: 0;
    padding-right: 20px;
}
.medical-toc-content .toc-subheading::before {
    margin-right: 0;
    margin-left: 6px;
}

/* Fix any left-aligned items */
.text-left { text-align: right !important; }
.text-right { text-align: left !important; }

/* Swiper / Slider RTL */
/* Swiper has native RTL support if we add dir="rtl" to the container, which WordPress does to the <html> tag */

/* Any absolute positioned elements */
.mc-gallery-lightbox-prev {
    left: auto !important;
    right: -70px !important;
    transform: scaleX(-1); /* Flip the arrow icon */
}
.mc-gallery-lightbox-next {
    right: auto !important;
    left: -70px !important;
    transform: scaleX(-1); /* Flip the arrow icon */
}
@media (max-width: 768px) {
    .mc-gallery-lightbox-prev { right: 10px !important; }
    .mc-gallery-lightbox-next { left: 10px !important; }
}
