@media screen and (max-width: 767px) {
    .navbar .listItems {
        display: none;
    }

    .navbar .hamburg {
        display: block;
    }

    .navbar .offcanvas .listItems {
        display: block;
        margin-top: -16px;
    }

    .navbar .offcanvas .listItems li {
        margin: 20px 0px;
    }

    .navbar .dropdownListItem {
        margin: 0px !important;
    }

    .navbar .navLogo img {
        width: 120px;
    }

    .mySwiper .swiperImage {
        height: 400px;
    }

    .heroSection {
        max-height: 400px;
    }

    .heroSection .owl-carousel,
    .heroSection .hero-carousel {
        max-height: 400px;
    }

    .heroSection .item {
        max-height: 400px;
    }

    .heroSection .swiperImage {
        height: 400px !important;
        max-height: 400px !important;
    }

}


@media screen and (min-width: 992px) and (max-width: 1399px) {

    .flex_column_center,
    .ourApp .flex_column_center,
    .contactUs .flex_column_center,
    .registration .flex_column_center {
        padding: 0px 200px;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {

    .flex_column_center,
    .ourApp .flex_column_center,
    .contactUs .flex_column_center,
    .registration .flex_column_center {
        padding: 0px 0px 0px 0px;
    }
}

@media screen and (min-width: 576px) and (max-width: 767px) {

    .flex_column_center,
    .ourApp .flex_column_center,
    .contactUs .flex_column_center,
    .registration .flex_column_center {
        padding: 0px 50px;
    }
}

@media screen and (max-width: 575px) {

    .flex_column_center,
    .ourApp .flex_column_center,
    .contactUs .flex_column_center,
    .registration .flex_column_center
    {
        align-items: start;
        justify-content: flex-start;
        text-align: start;
        padding: 0px 0px;
    }
}

/* RTL Support for Arabic Language */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

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

[dir="rtl"] .navbar .listItems li {
    margin-left: initial;
    margin-right: 30px;
}

[dir="rtl"] .navbar .navLogoWrapper {
    margin-left: initial;
    margin-right: auto;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-left: initial;
    margin-right: 0.5rem;
}

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

[dir="rtl"] .navbar .menuListWrapper {
    direction: rtl;
}

[dir="rtl"] .navbar .hamburg {
    float: left;
}

[dir="rtl"] .offcanvas-end {
    left: 0;
    right: auto;
    border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
    border-right: none;
    transform: translateX(-100%);
}

[dir="rtl"] .offcanvas-end.show {
    transform: translateX(0);
}

[dir="rtl"] .btn-close {
    float: left;
}

[dir="rtl"] .container,
[dir="rtl"] .container-fluid {
    direction: rtl;
}

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

[dir="rtl"] .menuListWrapper {
    text-align: left;
}

/* Arabic font support */
[dir="rtl"] body, 
[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4, 
[dir="rtl"] h5, 
[dir="rtl"] h6,
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] div,
[dir="rtl"] a,
[dir="rtl"] button {
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif, 'Arial Unicode MS';
    line-height: 1.6;
}

/* Fix dropdowns in RTL */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-item {
    text-align: right;
}

/* Language switcher styling */
.language-switcher {
    position: relative;
}

.language-switcher .dropdown-toggle {
    border: 1px solid #ddd;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-switcher .dropdown-toggle:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.language-switcher .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.language-switcher .dropdown-menu {
    min-width: 150px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.language-switcher .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher .dropdown-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

.language-switcher .dropdown-item:active {
    background: #007bff;
    color: white;
}

/* Language flag icons */
.flag-icon {
    width: 20px;
    height: 15px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

.flag-icon-us {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 30"><rect width="50" height="30" fill="%23B22234"/><rect width="50" height="2.3" y="2.3" fill="white"/><rect width="50" height="2.3" y="6.9" fill="white"/><rect width="50" height="2.3" y="11.5" fill="white"/><rect width="50" height="2.3" y="16.1" fill="white"/><rect width="50" height="2.3" y="20.7" fill="white"/><rect width="50" height="2.3" y="25.3" fill="white"/><rect width="20" height="16.1" fill="%233C3B6E"/></svg>');
}

.flag-icon-sa {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 30"><rect width="50" height="30" fill="%23006C35"/><text x="25" y="18" text-anchor="middle" fill="white" font-size="8" font-family="Arial">العربية</text></svg>');
}

/* RTL specific adjustments for mobile */
@media screen and (max-width: 767px) {
    [dir="rtl"] .navbar .offcanvas {
        text-align: right;
    }
    
    [dir="rtl"] .navbar .offcanvas .listItems li {
        text-align: right;
    }
    
    [dir="rtl"] .offcanvas-header {
        flex-direction: row-reverse;
    }
}
