/*
Arabic Font Support for Tawazoun Platform
Using JF Flat Regular for better Arabic text readability
*/

/* Define JF Flat Regular font */
@font-face {
    font-family: 'JF Flat Regular';
    src: url('fonts/JF Flat Regular/Web Fonts/7d411bb0357d6fd29347455b7d207995.eot') format('embedded-opentype'),
         url('fonts/JF Flat Regular/Web Fonts/7d411bb0357d6fd29347455b7d207995.woff2') format('woff2'),
         url('fonts/JF Flat Regular/Web Fonts/7d411bb0357d6fd29347455b7d207995.woff') format('woff'),
         url('fonts/JF Flat Regular/Web Fonts/7d411bb0357d6fd29347455b7d207995.ttf') format('truetype'),
         url('fonts/JF Flat Regular/Web Fonts/7d411bb0357d6fd29347455b7d207995.svg#JFFlatRegular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Arabic text styling - automatically applied to elements containing Arabic characters */
.arabic-text,
[lang="ar"],
[dir="rtl"],
.force-arabic-font {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    line-height: 1.8 !important;
    direction: rtl;
}

/* Specific classes for content areas that might contain Arabic text */
.blog-content.has-arabic,
.news-content.has-arabic,
.press-content.has-arabic,
.content-area.has-arabic {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    line-height: 1.8 !important;
}

/* Mixed content support - for content that has both Arabic and English */
.mixed-content,
.content-area[data-content-lang="mixed"] {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    line-height: 1.8 !important;
}

/* Auto-detected Arabic content */
.content-area[data-content-lang="arabic"] {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    line-height: 1.8 !important;
    text-align: right;
    direction: rtl;
}

/* Ensure proper Arabic text rendering in different content areas */
.blog-content p:has-arabic,
.news-content p:has-arabic,
.press-content p:has-arabic,
.blog-content div:has-arabic,
.news-content div:has-arabic,
.press-content div:has-arabic {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    line-height: 1.8 !important;
}

/* Headlines and titles in Arabic */
h1.arabic-text, h2.arabic-text, h3.arabic-text, 
h4.arabic-text, h5.arabic-text, h6.arabic-text {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-weight: bold !important;
    line-height: 1.6 !important;
}

/* Responsive font sizes for Arabic text */
@media (max-width: 768px) {
    .arabic-text,
    .blog-content.has-arabic,
    .news-content.has-arabic,
    .press-content.has-arabic {
        font-size: 16px !important;
        line-height: 1.9 !important;
    }
}

@media (max-width: 480px) {
    .arabic-text,
    .blog-content.has-arabic,
    .news-content.has-arabic,
    .press-content.has-arabic {
        font-size: 15px !important;
        line-height: 2.0 !important;
    }
}

/* Improved Arabic text readability styles */
.arabic-text {
    letter-spacing: 0.5px;
    word-spacing: 2px;
}

/* For gallery shortcodes and other embedded content with Arabic */
.gallery-replacement .arabic-text,
.video-gallery-replacement .arabic-text {
    font-family: 'JF Flat Regular', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* Fallback for browsers that don't support the custom font */
/*@supports not (font-display: swap) {
    .arabic-text {
        font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
    }
}*/


/*CSS for RTL THEME*/
@media (min-width: 992px) {
    #header .header-nav-main nav > ul > li > a.dropdown-toggle .fa-chevron-down {
        margin-right: 5px;
        font-size: 0.6rem;
    }
}

#header .header-nav-top .nav > li.nav-item:not(.dropdown) > a [class*="fa-"], #header .header-nav-top .nav > li.nav-item:not(.dropdown) > a .icons {
    right: -1px;
    top: -1px;
}

ol, ul {
    padding-right: 2rem;
}

.telephone {
    direction: ltr;
}

#header .header-top.header-top-borders .nav-item-borders {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: none;
    padding-left: 12px!important;
    padding-right: 12px!important;
}

    #header .header-top.header-top-borders .nav-item-borders:first-child {
        padding-right: 0;
    }

.rtl-right {
    text-align: right!important;
}
.rtl-left {
    text-align: left!important;
}

.rtl-dir{
        direction: rtl!important;
}
.ltr-dir{
        direction: ltr!important;
}

.accordion.accordion-modern-status > .card .card-header a:after {
   
    left: 25px!important;
    right: calc(100% - 25px)
}

.accordion-button::after {    
    margin-right: auto!important;
    margin-left:0px!important;
}

.breadcrumb > li + li:before {
    content: "\f104";   
}

#header .header-nav-top .dropdown-menu {
    transform: translate(-76px, 46px)!important;
    text-align: right!important;
}

.home-cover-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(../img/home/home_cover_bg_ar.png) center center no-repeat!important;
    background-size: 75%!important;
    opacity: 1; /* adjust as needed */
    z-index: -1; /* keeps it behind the content */
}