/* تطبيق RTL على الصفحة بالكامل */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif !important;
    line-height: 1.8;
    /* Professional line height for Arabic */
}

/* تعديل الـ navbar */
body.rtl .nav {
    direction: rtl;
    flex-direction: row;
}

body.rtl .nav__logo {
    order: 1;
    margin-right: 0;
    margin-left: 1.5rem;
}

body.rtl .nav__menu {
    order: 2;
    margin-right: 0;
    margin-left: auto;
}

body.rtl .nav__list {
    flex-direction: row;
    direction: rtl;
}

body.rtl .nav__item {
    direction: rtl;
}

body.rtl .nav__link {
    flex-direction: row-reverse;
    direction: rtl;
}

body.rtl .nav__link i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* السهم في القوائم المنسدلة RTL */
body.rtl .nav__item.dropdown .nav__link::after {
    margin-left: 0;
    margin-right: auto;
}

/* تأكد من ظهور السهم في الموبايل RTL */
@media screen and (max-width: 1023px) {
    body.rtl .nav__item.dropdown .nav__link::after {
        display: inline-flex !important;
        margin-right: auto;
        margin-left: 0;
    }
}




/* جعل أيقونة Dark Mode بجانب أيقونة اللغة في RTL */
body.rtl .change-theme {
    order: 3;
    margin-right: 1rem;
    margin-left: 0;
    padding-right: 0;
    padding-left: 10px;
}

body.rtl .nav__button {
    order: 4;
    margin-left: 1rem;
    margin-right: 0;
}

/* تقليل المسافة بين أيقونة اللغة وأيقونة الثيم */
body.rtl .nav__item.dropdown:has(#language-switcher) {
    margin-left: 0.25rem;
    margin-right: 0;
}

body.rtl .nav__item.dropdown:has(#language-switcher)+.change-theme {
    margin-right: 0.25rem;
}

/* تعديل القوائم المنسدلة - موحد مع الإنجليزي */
body.rtl .dropdown {
    direction: rtl;
}

body.rtl .dropdown-menu {
    left: 0 !important;
    right: 0 !important;
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
}

body.rtl .dropdown-menu li {
    direction: rtl !important;
    width: 100% !important;
}

body.rtl .dropdown-menu li a {
    text-align: right !important;
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

body.rtl .dropdown-menu li a i {
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
}

body.rtl .dropdown-menu li a span {
    flex: 1 !important;
    text-align: right !important;
}

/* تأكد من أن القوائم المنسدلة في الموبايل متطابقة تماماً */
@media screen and (max-width: 1023px) {
    body.rtl .nav__item.dropdown .dropdown-menu {
        width: 100% !important;
        right: 0 !important;
        left: 0 !important;
        position: static !important;
    }

    body.rtl .nav__item.dropdown .dropdown-menu li {
        width: 100% !important;
    }

    body.rtl .nav__item.dropdown .dropdown-menu li a {
        width: 100% !important;
        padding: 1.25rem 1.5rem 1.25rem 3rem !important;
        flex-direction: row-reverse !important;
    }

    body.rtl .nav__item.dropdown .dropdown-menu li a i {
        margin-left: 0.75rem !important;
        margin-right: 0 !important;
    }

    body.rtl .nav__item.dropdown .dropdown-menu li a span {
        text-align: right !important;
    }

    /* زر الإغلاق في RTL */
    body.rtl .dropdown-close-btn {
        margin: 0.5rem auto !important;
    }
}

/* تعديل الأزرار */
body.rtl .button i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* تعديل الـ Home Section */
body.rtl .home__container {
    direction: rtl;
}

body.rtl .home__value {
    direction: rtl;
}

/* تعديل الأيقونات - لا تنعكس الأيقونات */
body.rtl .bx-chevron-right {
    transform: scaleX(-1);
}

body.rtl .bx-chevron-left {
    transform: scaleX(-1);
}

body.rtl .bx-right-arrow-alt {
    transform: scaleX(-1);
}

body.rtl .bx-left-arrow-alt {
    transform: scaleX(-1);
}

/* تعديل الـ Contact Form */
body.rtl .contact__form-icon {
    left: auto;
    right: 1rem;
}

body.rtl .contact__form-input {
    padding-left: 1rem;
    padding-right: 3rem;
}

/* تعديل الـ News Cards */
body.rtl .news-card__meta {
    flex-direction: row-reverse;
}

body.rtl .news-card__link {
    flex-direction: row-reverse;
}

body.rtl .news-card__link i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* تعديل الـ Projects */
body.rtl .project-card {
    direction: rtl;
    text-align: right;
}

body.rtl .project-card__content {
    margin-left: 1rem;
    margin-right: 1rem;
}

body.rtl .project-card__button {
    direction: rtl;
    flex-direction: row-reverse;
}

body.rtl .project-card__button::after {
    transform: scaleX(-1);
}

body.rtl .project-card__button:hover::after {
    transform: scaleX(-1) translateX(5px);
}

/* تعديل الـ Value Accordion */
body.rtl .value__accordion-header {
    flex-direction: row-reverse;
}

body.rtl .value__accordion-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

body.rtl .value__accordion-arrow {
    left: 1rem;
    right: auto;
}

/* تعديل الـ Scroll Up Button */
body.rtl .scrollup {
    left: 1.5rem;
    right: auto;
}

body.rtl .whatsapp-button {
    left: 1.5rem;
    right: auto;
}

/* تعديل الـ Mobile Navbar */
@media screen and (max-width: 1023px) {
    body.rtl .nav__menu {
        direction: rtl;
        right: -100%;
        left: auto;
        transition: right 0.4s ease;
    }

    body.rtl .nav__menu.show-menu {
        right: 0;
        left: auto;
    }

    body.rtl .nav__list {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
    }

    body.rtl .nav__link {
        width: 100%;
        justify-content: flex-start;
        text-align: right;
    }

    body.rtl .nav__toggle {
        right: auto;
        left: 1rem;
    }
}

/* تعديل الخطوط للعربية */
body.rtl {
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

/* Fix for Hero Mask Text in Arabic */
.mask-line {
    line-height: 1.15 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    padding-bottom: 0.1em !important; 
    overflow: visible !important;
}

.mask-line-2 {
    letter-spacing: normal !important;
    margin-top: -5px !important;
}

/* Footer alignment for Arabic */
footer.premium-footer .footer-title::after {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

footer.premium-footer .footer-desc {
    max-width: 100% !important;
}

footer.premium-footer a.footer-link:hover {
    transform: translateX(0) translateY(-4px) !important;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
    font-weight: 700;
}

/* تعديل الـ Swiper للـ Partners */
body.rtl .About__container {
    direction: ltr !important;
}

body.rtl .About__card {
    direction: rtl;
}

body.rtl .swiper-button-next,
body.rtl .swiper-button-prev {
    direction: ltr;
}

/* تبديل أزرار التنقل في Swiper */
body.rtl .swiper-button-next {
    left: 0;
    right: auto;
}

body.rtl .swiper-button-prev {
    right: 0;
    left: auto;
}

/* منع انعكاس الصور والعناصر المرئية */
body.rtl img,
body.rtl .home__img,
body.rtl .home__orbe,
body.rtl .value__orbe,
body.rtl .project-card__image,
body.rtl .news-slide__image {
    transform: none !important;
}

/* تعديل Grid للمشاريع */
body.rtl .projects__container {
    direction: rtl;
}

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

/* تعديل News Slider */
body.rtl .news-slider__container {
    direction: ltr;
}

body.rtl .news-slide__content {
    direction: rtl;
    text-align: right;
}

/* تعديل Statistics */
body.rtl .home__value {
    direction: rtl;
    text-align: center;
}

body.rtl .home__value-description {
    text-align: center;
}


/* RTL Support for WhatsApp and Scroll Up buttons - Unified Responsive */
body.rtl .whatsapp-button {
    right: auto !important;
    left: 2.2rem !important;
    bottom: 4.5rem !important;
    /* نفس الإنجليزية */
}

body.rtl .scrollup {
    right: auto !important;
    left: 2.2rem !important;
    /* bottom محسوب تلقائياً من mobile.css */
}

/* Desktop RTL - نفس الإنجليزية */
@media screen and (min-width: 1024px) {
    body.rtl .whatsapp-button {
        right: auto !important;
        left: 2.2rem !important;
        bottom: 4.5rem !important;
    }

    body.rtl .scrollup {
        right: auto !important;
        left: 2.2rem !important;
    }
}

/* Tablet RTL - نفس الإنجليزية */
@media screen and (max-width: 1023px) {
    body.rtl .whatsapp-button {
        right: auto !important;
        left: 1.25rem !important;
        bottom: 3.5rem !important;
    }

    body.rtl .scrollup {
        right: auto !important;
        left: 1.25rem !important;
    }
}

/* Mobile RTL - نفس الإنجليزية */
@media screen and (max-width: 768px) {
    body.rtl .whatsapp-button {
        right: auto !important;
        left: 1rem !important;
        bottom: 3rem !important;
    }

    body.rtl .scrollup {
        right: auto !important;
        left: 1rem !important;
    }

    body:not(.rtl) .contact__wrapper {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile RTL - نفس الإنجليزية */
@media screen and (max-width: 380px) {
    body.rtl .whatsapp-button {
        right: auto !important;
        left: 0.75rem !important;
        bottom: 2.5rem !important;
    }

    body.rtl .scrollup {
        right: auto !important;
        left: 0.75rem !important;
    }
}

@media screen and (max-width: 700px) {
    body:not(.rtl) .change-theme {
        padding-right: 75px !important;
    }
}


@media screen and (max-width: 1000px) {
    body:not(.rtl) .change-theme {
        padding-right: 95px !important;
    }
}

@media screen and (max-width: 800px) {
    body.rtl .change-theme {
        padding-left: 80px;
    }
}


@media screen and (max-width: 1000px) {
    body.rtl .change-theme {
        padding-left: 95px;
    }
}






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

    /* RTL Specific Styles */
    body.rtl .change-theme {
        padding-left: 80px;
    }

    body.rtl .nav__toggle,
    body[dir="rtl"] .nav__toggle {
        right: auto;
    }

    body.rtl .home__title {
        text-align: right !important;
        /* margin-top: 100px; */
    }

    body.rtl .home__description,
    body.rtl .home__description p {
        text-align: right !important;
    }

    /* LTR (English) Specific Styles */
    body:not(.rtl) .nav__toggle {
        right: 1rem;
    }

    body:not(.rtl) .home__title {
        text-align: left !important;
        /* margin-top: 100px !important; */
    }

    body:not(.rtl) .home__description {
        text-align: left !important;
    }

    /* Common Styles for Both */
    #prime-coler {
        font-size: 35px;
    }

    .about-hero-subtitle {
        margin-top: 40px;
    }
}


/*=============== SPACING BETWEEN THEME ICON AND CONTACT BUTTON IN RTL ===============*/
@media screen and (min-width: 1024px) {
    body.rtl .change-theme {
        margin-left: 1.5rem !important;
    }
}


/*=============== LTR RESET (ENGLISH) ===============*/
/* Reset navbar order when NOT in RTL mode */
body:not(.rtl) .nav {
    direction: ltr;
    flex-direction: row;
}

body:not(.rtl) .nav__logo {
    order: 0;
    margin-left: 0;
    margin-right: auto;
}

body:not(.rtl) .nav__menu {
    order: 0;
    margin-left: auto;
    margin-right: 0;
}

body:not(.rtl) .nav__list {
    flex-direction: row;
    direction: ltr;
}

body:not(.rtl) .nav__link {
    flex-direction: row;
    direction: ltr;
}

body:not(.rtl) .nav__link i {
    margin-right: 0.5rem;
    margin-left: 0;
}

body:not(.rtl) .change-theme {
    order: 0;
    margin-left: 0;
    margin-right: 0;
    padding-right: 40px;
    padding-left: 35px;
}

body:not(.rtl) .nav__button {
    order: 0;
    margin-right: 0;
    margin-left: 0;
}


/*=============== SPACING BETWEEN THEME ICON AND CONTACT BUTTON IN RTL ===============*/
@media screen and (min-width: 1024px) {
    body.rtl .change-theme {
        margin-left: 1.5rem !important;
    }
}

/*=============== DROPDOWN ARROWS FIX FOR ARABIC ===============*/
/* إصلاح دوران الأسهم في القوائم المنسدلة للعربي */
body.rtl .dropdown-arrow {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    transition: transform 0.3s ease !important;
}

body.rtl .dropdown-arrow.rotated {
    transform: rotate(180deg) !important;
}

body.rtl .nav__item.dropdown.active .dropdown-arrow {
    transform: rotate(180deg) !important;
}

body.rtl .nav__item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg) !important;
}

/* إصلاح الأسهم في الموبايل للعربي */
@media screen and (max-width: 767px) {
    body.rtl .nav__item.dropdown.active .dropdown-arrow {
        transform: rotate(180deg) !important;
        background: rgba(239, 193, 169, 0.15) !important;
        border-radius: 50% !important;
    }
}

/*=============== COMPONENT SPECIFIC RTL FIXES ===============*/

/* Statistics Section Numbers - Keep LTR for professional look if requested, otherwise RTL */
body.rtl .home__value-number {
    direction: ltr;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

/* Timeline Responsiveness */
@media screen and (max-width: 768px) {
    body.rtl .timeline-item {
        grid-template-columns: 1fr !important;
        text-align: right !important;
    }

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

    body.rtl .timeline-line {
        margin: 1rem 0;
    }
}

/* Footer Icon Fix */
body.rtl .footer__info {
    flex-direction: row !important;
    /* Icon on right, text on left */
    justify-content: flex-start !important;
    gap: 0.75rem !important;
}

body.rtl .footer__info i {
    margin-top: 0.3rem !important;
    order: 0;
    /* Keep icon first which is on the right in RTL row */
}

/* Horizontal Scroll Fix for Mobile */
body.rtl {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* News Cards RTL spacing */
body.rtl .news-card__category i,
body.rtl .news-card__date i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Arrow orientation for button icons */
body.rtl .button i,
body.rtl .news-card__link i {
    transform: scaleX(-1);
    display: inline-block;
}

/* Fix for swiper buttons on mobile RTL */
@media screen and (max-width: 768px) {

    body.rtl .swiper-button-next,
    body.rtl .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Heading Sizes for Arabic - More readable */
body.rtl .section__title {
    font-size: 1.8rem;
    line-height: 1.4;
}

@media screen and (max-width: 768px) {
    body.rtl .section__title {
        font-size: 1.5rem;
    }

    body.rtl .home__title {
        font-size: 2rem !important;
    }

    /* Founder Section Mobile Fix */
    body.rtl .founder-profile-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    body.rtl .founder-bio {
        text-align: center !important;
    }

    body.rtl .founder-bio__name,
    body.rtl .founder-bio__position {
        justify-content: center !important;
    }

    body.rtl .founder-companies-grid {
        grid-template-columns: 1fr !important;
    }

    /* Contact Section Mobile Fix */
    body.rtl .contact__wrapper {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    body.rtl .contact__item {
        flex-direction: row-reverse !important;
        text-align: right !important;
        justify-content: flex-start !important;
    }
}

/* Ensure placeholder text is right-aligned */
body.rtl input::placeholder,
body.rtl textarea::placeholder {
    text-align: right !important;
}

/* Global Font Smoothing for Arabic */
body.rtl * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix for specific Arabic characters in headings */
body.rtl h1,
body.rtl h2,
body.rtl h3 {
    letter-spacing: normal !important;
}

/*=============== ENHANCED ARABIC MOBILE RESPONSIVE STYLES ===============*/

/* ============= HOME SECTION MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .home__container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem;
        gap: 2rem;
    }

    body.rtl .home__data {
        text-align: center !important;
        order: 1;
        width: 100%;
    }

    body.rtl .home__title {
        text-align: center !important;
        font-size: 2.25rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    body.rtl #prime-coler {
        font-size: 3.25rem;
        display: block;
        margin-bottom: 0.5rem;
    }

    body.rtl .home__description {
        text-align: center !important;
        font-size: 1rem;
        line-height: 1.8;
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }

    body.rtl .home__images {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 1rem 0;
    }

    /* إحصائيات الصفحة الرئيسية */
    body.rtl .home__value {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        width: 100%;
        direction: rtl;
        order: 3;
        margin: 1.5rem 0;
    }

    body.rtl .home__value > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        background: rgba(239, 193, 169, 0.08);
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    body.rtl .home__value-number {
        font-size: 2rem;
        font-weight: 700;
        color: var(--first-color);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        direction: ltr;
    }

    body.rtl .home__value-description {
        font-size: 0.875rem;
        text-align: center;
        line-height: 1.5;
        margin-top: 0.5rem;
    }

    body.rtl .home__value-description br {
        display: none;
    }

    body.rtl .home__buttons {
        order: 4;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    body.rtl .home__buttons .button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .home__title {
        font-size: 1.875rem;
    }

    body.rtl #prime-coler {
        font-size: 2.25rem;
    }

    body.rtl .home__description {
        font-size: 0.938rem;
    }

    body.rtl .home__value {
        gap: 1rem !important;
    }

    body.rtl .home__value > div {
        padding: 0.875rem;
    }

    body.rtl .home__value-number {
        font-size: 1.75rem;
    }

    body.rtl .home__value-description {
        font-size: 0.813rem;
    }
}

@media screen and (max-width: 400px) {
    body.rtl .home__title {
        font-size: 1.625rem;
    }

    body.rtl #prime-coler {
        font-size: 2.5rem;
    }

    body.rtl .home__description {
        font-size: 0.875rem;
        padding: 0;
    }

    body.rtl .home__value {
        gap: 0.75rem !important;
    }

    body.rtl .home__value > div {
        padding: 0.75rem;
    }

    body.rtl .home__value-number {
        font-size: 1.5rem;
    }

    body.rtl .home__value-description {
        font-size: 0.75rem;
    }
}

/* ============= PROJECTS SECTION MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .projects__container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding: 0 1rem;
    }

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

    body.rtl .project-card__content {
        padding: 1.5rem;
    }

    body.rtl .project-card__title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        text-align: right;
    }

    body.rtl .project-card__description {
        font-size: 0.938rem;
        line-height: 1.7;
        text-align: right;
    }

    body.rtl .project-card__button {
        display: inline-flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .project-card__title {
        font-size: 1.125rem;
    }

    body.rtl .project-card__description {
        font-size: 0.875rem;
    }

    body.rtl .project-card__button {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }
}

/* ============= VALUE/ABOUT SECTION MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .value__container {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        padding: 0 1rem;
    }

    body.rtl .value__images {
        order: 1;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    body.rtl .value__content {
        order: 2;
        text-align: center;
    }

    body.rtl .value__data {
        text-align: center;
        margin-bottom: 2rem;
    }

    body.rtl .value__description {
        text-align: center;
        padding: 0 0.5rem;
        line-height: 1.8;
    }

    body.rtl .value__accordion {
        width: 100%;
    }

    body.rtl .value__accordion-item {
        text-align: right;
        margin-bottom: 1rem;
    }

    body.rtl .value__accordion-header {
        flex-direction: row-reverse;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    body.rtl .value__accordion-icon {
        margin-left: 0;
        margin-right: 0;
    }

    body.rtl .value__accordion-title {
        flex: 1;
        text-align: right;
    }

    body.rtl .value__accordion-arrow {
        order: -1;
    }

    body.rtl .value__accordion-content {
        text-align: right;
        padding: 0 1rem 1rem;
    }

    body.rtl .value__accordion-description {
        text-align: right;
        line-height: 1.7;
    }

    body.rtl .value__img-caption {
        text-align: center;
        font-size: 0.938rem;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .value__description {
        font-size: 0.938rem;
    }

    body.rtl .value__accordion-title {
        font-size: 1rem;
    }

    body.rtl .value__accordion-description {
        font-size: 0.875rem;
    }
}

/* ============= PARTNERS SECTION MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .About__container {
        padding: 0 1rem;
    }

    body.rtl .About__card {
        direction: rtl;
        text-align: center;
    }

    body.rtl .About__data {
        text-align: center;
        padding: 1rem;
    }

    body.rtl .About__title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    body.rtl .About__description {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    /* أسهم التنقل للشركاء */
    body.rtl .swiper-button-next,
    body.rtl .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .About__title {
        font-size: 1rem;
    }

    body.rtl .About__description {
        font-size: 0.813rem;
    }

    body.rtl .swiper-button-next,
    body.rtl .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ============= NEWS SLIDER MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .news-slider {
        direction: rtl;
    }

    body.rtl .news-slide {
        display: flex;
        flex-direction: column;
    }

    body.rtl .news-slide__image {
        width: 100%;
        height: 250px;
        order: 1;
    }

    body.rtl .news-slide__content {
        order: 2;
        text-align: right;
        padding: 1.5rem;
    }

    body.rtl .news-slide__meta {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-start;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    body.rtl .news-slide__date,
    body.rtl .news-slide__category {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
    }

    body.rtl .news-slide__title {
        font-size: 1.375rem;
        text-align: right;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    body.rtl .news-slide__description {
        font-size: 0.938rem;
        text-align: right;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    body.rtl .news-slider__view-all {
        display: flex;
        justify-content: flex-start;
    }

    body.rtl .news-slider__view-all .button {
        flex-direction: row-reverse;
    }

    body.rtl .news-slide__badge {
        left: auto;
        right: 1rem;
    }

    /* أسهم السلايدر - إظهار كلا السهمين */
    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 44px;
        height: 44px;
    }

    body.rtl .news-slider__arrow--left {
        left: auto !important;
        right: 10px !important;
    }

    body.rtl .news-slider__arrow--right {
        right: auto !important;
        left: 10px !important;
    }

    body.rtl .news-slider__dots {
        direction: ltr;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .news-slide__image {
        height: 200px;
    }

    body.rtl .news-slide__content {
        padding: 1.25rem;
    }

    body.rtl .news-slide__title {
        font-size: 1.25rem;
    }

    body.rtl .news-slide__description {
        font-size: 0.875rem;
    }

    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px;
        height: 40px;
    }

    body.rtl .news-slider__arrow--left {
        left: auto !important;
        right: 8px !important;
    }

    body.rtl .news-slider__arrow--right {
        right: auto !important;
        left: 8px !important;
    }
}

@media screen and (max-width: 400px) {
    body.rtl .news-slide__image {
        height: 180px;
    }

    body.rtl .news-slide__title {
        font-size: 1.125rem;
    }

    body.rtl .news-slide__description {
        font-size: 0.813rem;
    }

    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 36px;
        height: 36px;
    }

    body.rtl .news-slider__arrow--left {
        left: auto !important;
        right: 5px !important;
    }

    body.rtl .news-slider__arrow--right {
        right: auto !important;
        left: 5px !important;
    }
}

/* ============= CONTACT SECTION MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .contact__wrapper {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 2.5rem;
    }

    body.rtl .contact__left {
        order: 2;
    }

    body.rtl .contact__right {
        order: 1;
    }

    body.rtl .contact__info {
        direction: rtl;
    }

    body.rtl .contact__details {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    body.rtl .contact__item {
        display: flex;
        flex-direction: row-reverse !important;
        align-items: flex-start;
        gap: 1rem;
        text-align: right;
    }

    body.rtl .contact__item i {
        font-size: 1.5rem;
        color: var(--first-color);
        margin-top: 0.25rem;
    }

    body.rtl .contact__item h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    body.rtl .contact__item p {
        font-size: 0.938rem;
        line-height: 1.6;
    }

    body.rtl .contact__form-container {
        padding: 2rem 1.5rem;
    }

    body.rtl .contact__form-title {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    body.rtl .contact__form-group {
        position: relative;
        margin-bottom: 1rem;
    }

    body.rtl .contact__form-icon {
        position: absolute;
        right: 1rem;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    body.rtl .contact__form-area .contact__form-icon {
        top: 1.25rem;
        transform: none;
    }

    body.rtl .contact__form-input {
        padding-right: 3rem;
        padding-left: 1rem;
        text-align: right;
    }

    body.rtl .contact__form-button {
        width: 100%;
        justify-content: center;
    }

    body.rtl .location-map {
        border-radius: 12px;
        overflow: hidden;
    }

    body.rtl .location-map iframe {
        width: 100%;
        height: 250px;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .contact__form-container {
        padding: 1.5rem 1rem;
    }

    body.rtl .contact__item h4 {
        font-size: 0.938rem;
    }

    body.rtl .contact__item p {
        font-size: 0.875rem;
    }

    body.rtl .location-map iframe {
        height: 220px;
    }
}

/* ============= FOOTER MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .footer__container {
        direction: rtl;
    }

    body.rtl .footer__content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    body.rtl .footer__data {
        text-align: center;
    }

    body.rtl .footer__logo {
        justify-content: center;
        flex-direction: row-reverse;
        gap: 1rem;
    }

    body.rtl .footer__logo h3 {
        font-size: 1.25rem;
    }

    body.rtl .footer__description {
        font-size: 0.938rem;
        line-height: 1.7;
        max-width: 400px;
        margin: 1rem auto;
    }

    body.rtl .footer__social {
        justify-content: center;
        gap: 1rem;
    }

    body.rtl .footer__title {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }

    body.rtl .footer__links {
        display: flex;
        flex-direction: column;
        align-items: center;
       /* gap: 0.875rem;*/
    }
    @media screen and (max-width: 540px) {
        body.rtl .footer__links {
            /* display: flex; */
            flex-direction: column;
            align-items: revert-layer;
            /* gap: 0rem; */
        }
        .footer__info span {
            width: 200px;
        }
        .contact__left, .contact__right {
            min-width: 0px;
        }

    body.rtl .footer__link {
        font-size: 0.938rem;
    }

    body.rtl .footer__info {
        display: flex;
        flex-direction: row-reverse;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.938rem;
    }

    body.rtl .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-top: 2.5rem;
        padding-top: 2rem;
    }

    body.rtl .footer__copy {
        font-size: 0.875rem;
    }

    body.rtl .footer__terms {
        display: flex;
        justify-content: center;
        gap: 1rem;
        font-size: 0.875rem;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .footer__logo h3 {
        font-size: 1.125rem;
    }

    body.rtl .footer__description {
        font-size: 0.875rem;
    }

    body.rtl .footer__title {
        font-size: 1rem;
    }

    body.rtl .footer__link,
    body.rtl .footer__info {
        font-size: 0.875rem;
    }

    body.rtl .footer__copy,
    body.rtl .footer__terms {
        font-size: 0.813rem;
    }
}

/* ============= SECTION TITLES MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .section__subtitle {
        text-align: center;
        font-size: 0.938rem;
    }

    body.rtl .section__title {
        text-align: center;
        font-size: 1.75rem;
        line-height: 1.4;
    }

    body.rtl .section {
        padding: 3.5rem 0;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .section__subtitle {
        font-size: 0.875rem;
    }

    body.rtl .section__title {
        font-size: 1.5rem;
    }

    body.rtl .section {
        padding: 3rem 0;
    }
}

@media screen and (max-width: 400px) {
    body.rtl .section__subtitle {
        font-size: 0.813rem;
    }

    body.rtl .section__title {
        font-size: 1.375rem;
    }

    body.rtl .section {
        padding: 2.5rem 0;
    }
}

/* ============= BUTTONS MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .button {
        flex-direction: row-reverse;
        gap: 0.5rem;
    }

    body.rtl .button i {
        transform: scaleX(-1);
    }
}

/* ============= SCROLL & WHATSAPP BUTTONS MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .scrollup,
    body.rtl .whatsapp-button {
        right: auto !important;
        left: 1.25rem !important;
    }
}

@media screen and (max-width: 768px) {
    body.rtl .scrollup,
    body.rtl .whatsapp-button {
        left: 1rem !important;
    }
}

@media screen and (max-width: 380px) {
    body.rtl .scrollup,
    body.rtl .whatsapp-button {
        left: 0.75rem !important;
    }
}

/* ============= TYPING TEXT MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl .typing-text {
        display: block;
        text-align: center;
        direction: rtl;
    }

    body.rtl .typing-cursor {
        margin-right: 2px;
        margin-left: 0;
    }
}

/* ============= FIX HORIZONTAL SCROLL ON MOBILE RTL ============= */
@media screen and (max-width: 1023px) {
    body.rtl {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body.rtl .container {
        
        max-width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    body.rtl main,
    body.rtl section {
        overflow-x: hidden !important;
    }
}