@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

/* =========================================
   CRITICAL ARABIC TEXT FIXES
   ========================================= */

/* 1. Force Arabic Font & Reset Text Properties on EVERYTHING */
html[lang="ar"] * {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    letter-spacing: 0px !important;
    word-spacing: normal !important;
    text-transform: none !important;
    /* Critical: uppercase breaks Arabic */
}

/* 2. Specific fix for headers which often have letter-spacing */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .h1,
html[lang="ar"] .h2,
html[lang="ar"] .h3,
html[lang="ar"] .h4,
html[lang="ar"] .h5,
html[lang="ar"] .h6 {
    font-family: 'Cairo', sans-serif !important;
    letter-spacing: 0 !important;
}

/* 3. Global RTL Settings */
html[lang="ar"] body {
    text-align: right;
    direction: rtl;
}

/* =========================================
   ELEMENT SPECIFIC FIXES
   ========================================= */

/* Icon Flipping */
[class^="tji-arrow-"],
[class*=" tji-arrow-"],
.fa-arrow-right,
.fa-arrow-left,
.fa-chevron-right,
.fa-chevron-left {
    display: inline-block;
    transform: scaleX(-1) !important;
}

/* Special icons that point right but should point left in RTL */
.btn-icon i,
.project-btn i,
.text-btn i,
.slider-next i,
.slider-prev i {
    transform: scaleX(-1) !important;
}

/* Swiper RTL Fixes */
.swiper {
    direction: ltr !important;
}

[dir="rtl"].swiper,
[dir="rtl"] .swiper {
    direction: rtl !important;
}

.swiper-pagination-area {
    left: auto !important;
    right: 50% !important;
    transform: translateX(50%) !important;
}

/* Header RTL Fixes */
.header-wrapper {
    flex-direction: row-reverse !important;
}

.mainmenu ul li {
    margin-left: 0 !important;
    margin-right: 30px !important;
}

.mainmenu ul li:first-child {
    margin-right: 0 !important;
}

.sub-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right !important;
}

.sub-menu li {
    margin-right: 0 !important;
}

/* Hamburger Menu RTL */
.mobile_menu_bar {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Breadcrumb RTL */
.tj-breadcrumb-item {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
}

.tj-page-link span:not(:last-child) {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* Section Headings */
.sec-heading {
    text-align: right !important;
}

.sec-heading.text-center {
    text-align: center !important;
}

.sec-heading .sub-title i {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

/* Form Inputs */
input,
textarea,
select {
    text-align: right !important;
    direction: rtl !important;
}

/* Footer */
.footer-widget {
    text-align: right !important;
}

.footer-widget .social-icons {
    justify-content: flex-start !important;
}

.footer-contact-list li i {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* Mobile Menu Text Alignment */
.header-wrapper .menu-area {
    text-align: right !important;
}

.header-wrapper .mainmenu ul li a {
    text-align: right !important;
    padding-right: 20px !important;
    padding-left: 0 !important;
}

.header-wrapper .mainmenu ul li a:hover {
    padding-right: 25px !important;
    padding-left: 0 !important;
}

.dropdown-toggle-btn {
    right: auto !important;
    left: 15px !important;
}

.header-wrapper .mainmenu ul.sub-menu li a {
    padding-right: 35px !important;
    padding-left: 0 !important;
}