/* RTL Overrides for Uptown Template */

/* Global RTL settings */
body {
    direction: rtl;
    text-align: right;
}

.slider-text .breadcrumbs{
    direction: rtl;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
}

.slider-text .breadcrumbs span{
    display: inline-flex;
    align-items: center;
}

.slider-text .breadcrumbs span + span{
    margin-right: .5rem;
}

.slider-text .breadcrumbs span i{
    margin: 0 .5rem;
    display: inline-block;
    transform: scaleX(-1);
}

/* Override Bootstrap/Template defaults */
.text-left {
    text-align: right !important;
}

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

/* Hero Section adjustments */
/* .hero-wrap .text is usually centered by class, so no specific override needed yet */

/* Search Location (Search Button Fix) */
.search-location .form-group .form-field {
    position: relative;
}

.search-location .form-group .form-field input.form-control {
    padding-left: 25px !important;
    padding-right: 80px !important;
    text-align: right;
}

/* Match original selector in template CSS */
.search-location .form-group button,
.search-location .form-group .form-field button {
    left: auto !important;
    right: 0 !important;
    border-radius: 0 50% 50% 50% !important;
}

/* Footer arrows (long arrow icon spacing) */
.ftco-footer .ftco-footer-widget ul li a .icon-long-arrow-right{
    margin-right: 0 !important;
    margin-left: .5rem !important;
    display: inline-block;
    transform: scaleX(-1);
}

/* Fix for icons if they are absolutely positioned */
/* .icon { } */

/* Spacing adjustments (flipping margins/paddings) */
.mr-auto,
.mx-auto {
    margin-left: auto !important;
    margin-right: inherit !important;
}

.ml-auto,
.mx-auto {
    margin-right: auto !important;
    margin-left: inherit !important;
}

.pl-md-5 {
    padding-right: 3rem !important;
    padding-left: 0 !important;
}

.pr-md-5 {
    padding-left: 3rem !important;
    padding-right: 0 !important;
}

/* About section (Home/About) - mirror the overlap card direction for RTL */
@media (min-width: 992px) {
    .wrap-about .heading-section {
        margin-left: 0 !important;
        margin-right: -120px;
        -webkit-box-shadow: 20px 5px 14px -15px rgba(0, 0, 0, 0.13);
        -moz-box-shadow: 20px 5px 14px -15px rgba(0, 0, 0, 0.13);
        box-shadow: 20px 5px 14px -15px rgba(0, 0, 0, 0.13);
    }
}

/* About page specific improvements */
.wrap-about {
    text-align: right;
}

.wrap-about h2 {
    text-align: right;
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    line-height: 1.4;
}

.wrap-about p {
    text-align: right;
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    line-height: 1.8;
    direction: rtl;
    unicode-bidi: embed;
}

/* Better Arabic text rendering */
.about-item-content,
.wrap-about .heading-section p,
.about-text-content {
    text-align: right;
    direction: rtl;
    unicode-bidi: embed;
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure proper text alignment in about section */
.ftco-section .wrap-about {
    text-align: right;
}

.ftco-section .wrap-about .heading-section {
    text-align: right;
}

/* Fix for line breaks and spacing in Arabic text */
.wrap-about .heading-section p {
    margin-bottom: 1rem;
    text-align: justify;
    text-align-last: right;
}

/* Counter section RTL improvements */
.ftco-counter .text {
    text-align: right;
    direction: rtl;
}

.ftco-counter .text span {
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    text-align: right;
    display: block;
}

/* Hero section Arabic text improvements */
.hero-wrap .slider-text h1,
.hero-wrap .slider-text .breadcrumbs {
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    text-align: center;
    direction: rtl;
}

/* Better handling of mixed content (Arabic with English) */
.wrap-about .heading-section p,
.wrap-about .heading-section h2 {
    unicode-bidi: plaintext;
    text-align: right;
}

/* Ensure proper spacing for Arabic punctuation */
.wrap-about .heading-section p::after {
    content: "";
    display: inline-block;
    width: 0;
}

/* Fix for potential text overflow in Arabic */
.wrap-about .heading-section {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Additional Arabic text improvements */
.about-text-content p {
    text-align: right;
    direction: rtl;
    unicode-bidi: embed;
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    word-spacing: 0.05em;
}

/* Better handling of Arabic numbers and mixed content */
.about-text-content {
    text-align: right;
    direction: rtl;
}

/* Ensure proper line height for Arabic text */
.wrap-about .heading-section h2 {
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* Improve readability for longer Arabic text */
.about-item-content {
    text-align: justify;
    text-align-last: right;
    letter-spacing: 0.01em;
}

/* Handle Arabic punctuation properly */
.about-text-content p:last-child {
    margin-bottom: 0;
}

/* Responsive improvements for Arabic text */
@media (max-width: 767.98px) {
    .wrap-about .heading-section {
        padding: 2rem 1rem;
    }
    
    .wrap-about h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .about-text-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}