/* RTL Overrides */

/* Global RTL adjustments */
body {
    text-align: right;
    direction: rtl;
}

/* Back to top button */
.back-to-top {
    left: 45px;
    right: auto;
}

/* Navbar */
.navbar .dropdown-toggle::after {
    margin-right: 8px;
    margin-left: 0;
}

.navbar-light .navbar-nav .nav-link {
    margin-left: 30px;
    margin-right: 0;
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-left: 0;
    }
}

/* Header Carousel */
.header-carousel .owl-nav {
    left: 8%;
    right: auto;
}

/* Section Title */
.section-title::before {
    right: -40px;
    left: auto;
}

.section-title::after {
    right: -60px;
    left: auto;
}

.section-title.text-start::before {
    right: 0;
    left: auto;
}

.section-title.text-start::after {
    right: 0;
    left: auto;
}

/* Testimonial Carousel */
.testimonial-carousel::before {
    right: 0;
    left: auto;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.testimonial-carousel::after {
    left: 0;
    right: auto;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Footer */
.footer .btn.btn-social {
    margin-left: 5px;
    margin-right: 0;
}

.footer .btn.btn-link {
    text-align: right;
}

.footer .btn.btn-link::before {
    margin-left: 10px;
    margin-right: 0;
    content: "\f104";
    /* Font Awesome left angle arrow */
}

.footer .footer-menu a {
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, .1);
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.footer .footer-menu a:last-child {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

/* Prices */
.original-price {
    margin-left: 10px;
    margin-right: 0;
}

/* Bootstrap Utilities Overrides for RTL if needed */
.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

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

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

.float-start {
    float: right !important;
}

.float-end {
    float: left !important;
}

/* Chat RTL */
.user-avatar {
    margin-left: 8px;
    margin-right: 0;
}

/* Navbar Logo RTL - Force Logo to Left */
.navbar-brand h2 {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    /* In RTL, this makes it LTR (Left to Right) visual order */
    justify-content: center;
}

.navbar-brand img {
    margin-right: 1rem !important;
    /* Space between logo and text */
    margin-left: 0 !important;
}

/* Newsletter RTL */
.footer form input.form-control {
    padding-left: 3rem !important;
    /* Space for button on left */
    padding-right: 1.5rem !important;
    /* Normal padding on right */
}

.footer form button[type="submit"] {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* Header Carousel Text Position RTL */
.header-carousel .owl-carousel-item .row {
    justify-content: flex-end !important;
    /* Moves text block to the Left in RTL */
}

.header-carousel .owl-carousel-item .text-start {
    text-align: right !important;
    /* Ensure text itself is still RTL aligned */
}

/* Course Buttons RTL - Reverse border-radius */
/* Read More button - should have rounded corners on RIGHT in RTL */
[dir="rtl"] .btn.border-end[style*="border-radius: 30px 0 0 30px"] {
    border-radius: 0 30px 30px 0 !important;
}

/* Join Now button - should have rounded corners on LEFT in RTL */
[dir="rtl"] .btn[style*="border-radius: 0 30px 30px 0"] {
    border-radius: 30px 0 0 30px !important;
}