/**
* RTL Styles for Arabic Language
* Academy LMS - RTL Support
**/

/* General RTL Layout */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl * {
    direction: rtl;
}

/* Container and Layout */
.rtl .container {
    direction: rtl;
}

/* Navigation and Menu */
.rtl .navbar-nav {
    direction: rtl;
}

.rtl .navbar-nav .nav-item {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .navbar-nav .nav-link {
    text-align: right;
}

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

/* Header Elements */
.rtl .top-bar ul {
    direction: rtl;
}

.rtl .top-bar ul li {
    margin-left: 15px;
    margin-right: 0;
}

.rtl .header-area {
    direction: rtl;
}

.rtl .navbar-brand {
    margin-left: auto;
    margin-right: 0;
}

/* Buttons and Links */
.rtl .btn {
    text-align: center;
}

.rtl .btn i {
    margin-left: 8px;
    margin-right: 0;
}

/* Cards and Content Boxes */
.rtl .card {
    text-align: right;
}

.rtl .card-title {
    text-align: right;
}

.rtl .card-text {
    text-align: right;
}

/* Lists */
.rtl ul {
    padding-left: 0;
    padding-right: 0;
}

.rtl ul li {
    text-align: right;
}

/* Forms */
.rtl .form-control {
    text-align: right;
}

.rtl .form-label {
    text-align: right;
}

.rtl .input-group {
    direction: rtl;
}

.rtl .input-group .form-control:not(:first-child) {
    border-bottom-right-radius: var(--bs-border-radius);
    border-top-right-radius: var(--bs-border-radius);
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.rtl .input-group .form-control:not(:last-child) {
    border-bottom-left-radius: var(--bs-border-radius);
    border-top-left-radius: var(--bs-border-radius);
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* Search Box */
.rtl .search-box {
    direction: rtl;
}

.rtl .search-box input {
    text-align: right;
    padding-left: 40px;
    padding-right: 15px;
}

.rtl .search-box .search-icon {
    left: 15px;
    right: auto;
}

/* Language Selector */
.rtl #lng-selector {
    text-align: right;
}

/* Icons */
.rtl .fa, .rtl .fas, .rtl .far, .rtl .fab {
    margin-left: 5px;
    margin-right: 0;
}

/* Sliders and Carousels */
.rtl .owl-carousel {
    direction: ltr; /* Keep carousel direction LTR for proper functionality */
}

.rtl .owl-carousel .owl-item {
    direction: rtl; /* But content inside should be RTL */
}

.rtl .swiper-container {
    direction: ltr; /* Keep swiper direction LTR for proper functionality */
}

.rtl .swiper-slide {
    direction: rtl; /* But content inside should be RTL */
}

/* Course Cards */
.rtl .course-card {
    text-align: right;
}

.rtl .course-card .card-body {
    text-align: right;
}

.rtl .course-card .instructor-info {
    direction: rtl;
}

.rtl .course-card .price {
    float: left;
}

.rtl .course-card .rating {
    float: right;
}

/* Banner Section */
.rtl .banner-section {
    text-align: right;
}

.rtl .banner-section h1,
.rtl .banner-section h2,
.rtl .banner-section h3,
.rtl .banner-section p {
    text-align: right;
}

/* Footer */
.rtl .footer {
    text-align: right;
}

.rtl .footer ul {
    text-align: right;
}

.rtl .footer ul li {
    text-align: right;
}

.rtl .footer-links {
    text-align: right;
}

/* Breadcrumb */
.rtl .breadcrumb {
    direction: rtl;
}

.rtl .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
    transform: scaleX(-1);
}

/* Modal */
.rtl .modal-dialog {
    direction: rtl;
}

.rtl .modal-content {
    text-align: right;
}

.rtl .modal-header .btn-close {
    margin-left: 0;
    margin-right: auto;
}

/* Tables */
.rtl .table {
    text-align: right;
}

.rtl .table th,
.rtl .table td {
    text-align: right;
}

/* Pagination */
.rtl .pagination {
    direction: rtl;
}

/* Tooltips */
.rtl .tooltip {
    direction: rtl;
}

/* Progress Bars */
.rtl .progress {
    direction: rtl;
}

/* Alerts */
.rtl .alert {
    text-align: right;
}

/* Grid System Adjustments */
.rtl .row {
    direction: rtl;
}

.rtl .col-1,
.rtl .col-2,
.rtl .col-3,
.rtl .col-4,
.rtl .col-5,
.rtl .col-6,
.rtl .col-7,
.rtl .col-8,
.rtl .col-9,
.rtl .col-10,
.rtl .col-11,
.rtl .col-12,
.rtl .col,
.rtl .col-auto,
.rtl .col-sm-1,
.rtl .col-sm-2,
.rtl .col-sm-3,
.rtl .col-sm-4,
.rtl .col-sm-5,
.rtl .col-sm-6,
.rtl .col-sm-7,
.rtl .col-sm-8,
.rtl .col-sm-9,
.rtl .col-sm-10,
.rtl .col-sm-11,
.rtl .col-sm-12,
.rtl .col-sm,
.rtl .col-sm-auto,
.rtl .col-md-1,
.rtl .col-md-2,
.rtl .col-md-3,
.rtl .col-md-4,
.rtl .col-md-5,
.rtl .col-md-6,
.rtl .col-md-7,
.rtl .col-md-8,
.rtl .col-md-9,
.rtl .col-md-10,
.rtl .col-md-11,
.rtl .col-md-12,
.rtl .col-md,
.rtl .col-md-auto,
.rtl .col-lg-1,
.rtl .col-lg-2,
.rtl .col-lg-3,
.rtl .col-lg-4,
.rtl .col-lg-5,
.rtl .col-lg-6,
.rtl .col-lg-7,
.rtl .col-lg-8,
.rtl .col-lg-9,
.rtl .col-lg-10,
.rtl .col-lg-11,
.rtl .col-lg-12,
.rtl .col-lg,
.rtl .col-lg-auto,
.rtl .col-xl-1,
.rtl .col-xl-2,
.rtl .col-xl-3,
.rtl .col-xl-4,
.rtl .col-xl-5,
.rtl .col-xl-6,
.rtl .col-xl-7,
.rtl .col-xl-8,
.rtl .col-xl-9,
.rtl .col-xl-10,
.rtl .col-xl-11,
.rtl .col-xl-12,
.rtl .col-xl,
.rtl .col-xl-auto {
    direction: rtl;
}

/* Specific home page elements */
.rtl .home-section {
    text-align: right;
}

.rtl .section-title {
    text-align: right;
}

.rtl .feature-list {
    text-align: right;
}

.rtl .feature-list li::before {
    left: auto;
    right: -20px;
}

/* Social Media Icons */
.rtl .social-links {
    direction: rtl;
}

.rtl .social-links a {
    margin-left: 10px;
    margin-right: 0;
}

/* Course Grid */
.rtl .course-grid {
    direction: rtl;
}

.rtl .course-item {
    text-align: right;
}

/* Statistics Section */
.rtl .stats-section {
    text-align: right;
}

.rtl .stat-item {
    text-align: right;
}

/* Call to Action */
.rtl .cta-section {
    text-align: right;
}

/* Newsletter */
.rtl .newsletter-section {
    text-align: right;
}

.rtl .newsletter-form {
    direction: rtl;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    .rtl .navbar-toggler {
        margin-left: 0;
        margin-right: auto;
    }
    
    .rtl .mobile-menu {
        text-align: right;
    }
    
    .rtl .mobile-menu ul li {
        text-align: right;
    }
}

/* Utility classes for RTL */
.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

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

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

.rtl .pl-0 { padding-right: 0 !important; padding-left: inherit; }
.rtl .pl-1 { padding-right: 0.25rem !important; padding-left: inherit; }
.rtl .pl-2 { padding-right: 0.5rem !important; padding-left: inherit; }
.rtl .pl-3 { padding-right: 1rem !important; padding-left: inherit; }
.rtl .pl-4 { padding-right: 1.5rem !important; padding-left: inherit; }
.rtl .pl-5 { padding-right: 3rem !important; padding-left: inherit; }

.rtl .pr-0 { padding-left: 0 !important; padding-right: inherit; }
.rtl .pr-1 { padding-left: 0.25rem !important; padding-right: inherit; }
.rtl .pr-2 { padding-left: 0.5rem !important; padding-right: inherit; }
.rtl .pr-3 { padding-left: 1rem !important; padding-right: inherit; }
.rtl .pr-4 { padding-left: 1.5rem !important; padding-right: inherit; }
.rtl .pr-5 { padding-left: 3rem !important; padding-right: inherit; }

.rtl .ml-0 { margin-right: 0 !important; margin-left: inherit; }
.rtl .ml-1 { margin-right: 0.25rem !important; margin-left: inherit; }
.rtl .ml-2 { margin-right: 0.5rem !important; margin-left: inherit; }
.rtl .ml-3 { margin-right: 1rem !important; margin-left: inherit; }
.rtl .ml-4 { margin-right: 1.5rem !important; margin-left: inherit; }
.rtl .ml-5 { margin-right: 3rem !important; margin-left: inherit; }

.rtl .mr-0 { margin-left: 0 !important; margin-right: inherit; }
.rtl .mr-1 { margin-left: 0.25rem !important; margin-right: inherit; }
.rtl .mr-2 { margin-left: 0.5rem !important; margin-right: inherit; }
.rtl .mr-3 { margin-left: 1rem !important; margin-right: inherit; }
.rtl .mr-4 { margin-left: 1.5rem !important; margin-right: inherit; }
.rtl .mr-5 { margin-left: 3rem !important; margin-right: inherit; } 