/*------------------------------------------------------------------
[Master Stylesheet] - Arabic RTL Version

Project:  Hams Alafia
-------------------------------------------------------------------*/

/* RTL Base Styles */
html[dir="rtl"],
body[dir="rtl"],
.rtl {
    direction: rtl;
    text-align: right;
}

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* Root Variables */
:root {
    --e-global-color-primary: #ffffff;
    --e-global-color-secondary: #000000;
    --e-global-color-accent: #fdde77;
    --e-global-color-text: #6d6c6c;
    --e-global-color-white: #ffffff;
    --e-global-color-black: #000000;
    --e-global-color-lime-green: #104c94;
    --e-global-color-very-dark-cyan: #104c94;
    --e-global-color-dark-cyan: #104c94;
    --e-global-color-very-light-gray: #f9f9f9;
    --e-global-color-border: #e5e5e5;
    --e-global-color-nav-text: #3f3f3f;
    --e-global-color-star-yellow: #fbc729;
    --e-global-color-pure-red: #ff0000;
}

/* Base RTL Styles */
body {
    font-family: "Plus Jakarta Sans", sans-serif;
    direction: rtl;
    text-align: right;
}

/* RTL Typography */
h1, h2, h3, h4, h5, h6 {
    /*text-align: right;*/
}

p {
    text-align: right;
    word-break: break-word;
}

.text-size-18,
.text-size-16,
.text-size-14 {
    text-align: right;
}

/* RTL Buttons */
.primary_btn i {
    margin-left: 0;
    margin-right: 14px;
}

/* RTL Layout */
.all_row,
.all_column {
    direction: rtl;
}

/* RTL Header */
.header .navbar-nav {
    direction: rtl;
}

.navbar-nav li {
    margin: 0 20px;
}

.navbar-nav li:first-child {
    margin-left: 20px;
    margin-right: 0;
}

.navbar-nav li:last-child {
    margin-right: 20px;
    margin-left: 0;
}

.navbar-nav .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

.navbar-nav .drop-down-pages {
    text-align: right;
}

.navbar-nav .drop-down-pages li:first-child a::before {
    left: auto;
    right: 8%;
}

.header .last_list {
    padding-left: 0;
    padding-right: 35px;
}

.header .phone-number {
    margin-left: 0;
    margin-right: 12px;
}

.header .phone-number .number {
    margin-left: 0;
    margin-right: 10px;
}

/* RTL Banner */
.banner-con .icons {
    left: auto;
    right: -152px;
}

.banner-con .banner_content {
    padding: 207px 0 280px 200px;
    text-align: right;
}

.banner-con .banner_content .text1 {
    padding-right: 0;
    padding-left: 100px;
}

.banner-con .banner_content .primary_btn {
    margin-right: 0;
    margin-left: 18px;
}

/* RTL About Section */
.about-con .about-sideimage {
    right: auto;
    left: 0;
}

.about-con .about_wrapper .about-image2 {
    right: auto;
    left: 10px;
}

.about-con .about_wrapper .about-image3 {
    right: auto;
    left: 52px;
}

.about-con .about_wrapper .box {
    left: auto;
    right: 50px;
}

.about-con .about_content {
    text-align: right;
}

.about-con .about_content .list1 {
    padding-right: 0;
    padding-left: 30px;
}

.about-con .about_content ul li i {
    left: auto;
    right: 0;
}

.about-con .about_content ul li p {
    padding-left: 0;
    padding-right: 28px;
}

/* RTL Services Section */
.our_services_section {
    /*padding: 130px 405px 185px 10px;*/
}

.our_services_section::before {
    left: auto;
    right: 0;
}

.our_services_section .image_box,
.our_services_section .owl-item {
    text-align: right;
}

.our_services_section .box h3 {
    padding-right: 0;
    padding-left: 70px;
}

.our_services_section .box .read_more i {
    margin-left: 0;
    margin-right: 10px;
}

.our_services_section .owl-carousel .owl-dots {
    /*text-align: right;*/
}

/* RTL Choose Section */
.choose-con .choose_content {
    text-align: right;
}

.choose-con .choose_content p {
    padding-left: 0;
    padding-right: 25px;
    border-left: none;
    border-right: 2px solid var(--e-global-color-accent);
}

.choose-con .choose-box {
    text-align: right;
}

/* RTL Pricing Section */
.pricing-con .pricing-sideimage {
    left: auto;
    right: 0;
}

.pricing-con .pricing_content {
    text-align: right;
}

.pricing-con .pricing-box ul {
    text-align: right;
}

.pricing-con .pricing-box ul li i {
    left: auto;
    right: 0;
}

.pricing-con .pricing-box ul li p {
    padding-left: 0;
    padding-right: 25px;
}

/* RTL Project Section */
.project-con .project_content {
    text-align: right;
}

.project-con .project-box .content {
    padding: 20px 15px 20px 70px;
}

.project-con .project-box .content i {
    right: auto;
    left: 15px;
}

/* RTL Need Section */
.need-con:before {
    background-image: linear-gradient(to left, rgb(0 0 0 / 50%), transparent);
}

.need-con .need_content {
    text-align: right;
}

/* RTL Testimonial Section */
.testimonial-con .testimonial_content {
    text-align: right;
}

.testimonial-con .customer-status {
    left: auto;
    right: 51%;
    transform: translateX(50%);
}

.testimonial-con .slider-box .owl-theme .owl-nav button.owl-prev {
    left: auto;
    right: 0;
}

.testimonial-con .slider-box .owl-theme .owl-nav button.owl-next {
    right: auto;
    left: 0;
}

/* RTL Article Section */
.article-con .article_content {
    text-align: right;
}

.article-con .article-box .read_more i {
    margin-left: 0;
    margin-right: 10px;
}

/* RTL Footer */
.footer-con .middle_portion .logo-content .text {
    /*padding-left: 0px;*/
    /*padding-right: 30px;*/
}

.footer-con .middle_portion .logo-content i {
    left: auto;
    right: 0;
}

.footer-con .middle_portion li a {
    margin-left: 0;
    margin-right: 13px;
}

.footer-con .middle_portion .icon {
    padding: 74px 30px 74px 0;
}

.footer-con .middle_portion input {
    padding: 18px 24px 18px 55px;
}

.footer-con .middle_portion button {
    right: auto;
    left: 4px;
}

/* RTL Contact Forms */
.contactform-con .contact_content {
    padding: 118px 0 125px 45px;
    text-align: right;
}

.contactform-con .contact_content .input1 {
    float: right;
    margin-right: 0;
    margin-left: 18px;
}

.contactform-con::before {
    right: auto;
    left: 0;
}

.contactform-con .contact-sideimage {
    left: auto;
    right: 0;
}

/* RTL FAQ Section */
.faq-con .faq_content {
    text-align: right;
}

.faq-con .accordian-inner .card-header a {
    padding: 20px 26px 22px 45px;
}

.faq-con .accordian-inner .accordion-card i {
    right: auto;
    left: 20px;
}

/* RTL Utility Classes for RTL */
.rtl-text-right { text-align: right !important; }
.rtl-text-left { text-align: left !important; }
.rtl-float-right { float: right !important; }
.rtl-float-left { float: left !important; }
.rtl-mr-auto { margin-right: 0 !important; margin-left: auto !important; }
.rtl-ml-auto { margin-left: 0 !important; margin-right: auto !important; }

/* RTL Form Elements */
input, textarea, select {
    text-align: right;
}

input::placeholder, textarea::placeholder {
    text-align: right;
    direction: rtl;
}

/* RTL Lists */
ul, ol {
    padding-right: 0;
}

/* RTL Carousel Fix */
.owl-carousel {
    direction: ltr;
}

.owl-carousel .owl-item {
    direction: rtl;
}

/* RTL Sub Banner */
.sub_banner .sub_banner_con::before {
    background-image: linear-gradient(to left, rgb(0 0 0 / 80%), transparent);
}

.sub_banner .sub_banner_con {
    text-align: right;
}

/* RTL Back to Top */
#button {
    right: auto;
    left: 80px;
}

/* RTL Error Page */
.error_page .error_content {
    text-align: right;
}

/* RTL Coming Soon */
.comingsoon_outer .sub_banner_content {
    text-align: right;
}

.comingsoon_outer .sub_banner_content form {
    direction: rtl;
}

.comingsoon_outer .sub_banner_content button {
    right: auto;
    left: -5px;
    border-radius: 35px 0 0 35px;
}

/* RTL Modal */
.project_modal .modal-header button {
    right: auto;
    left: 7px;
}

.project_modal .modal-content .project_content {
    padding: 40px 20px 40px 0;
}

.project_modal .modal-content .project_content .properties ul {
    padding-left: 0;
    padding-right: 25px;
}

.project_modal .modal-content .project_content .properties ul li .circle {
    left: auto;
    right: -25px;
}

/* RTL Home 2, 3, 4, 5 specific fixes */
.banner2-con .banner_content,
.banner3-con .banner_content,
.banner4-con .banner_content,
.banner5-con .banner_content {
    text-align: right;
}

.banner2-con .banner_content .primary_btn,
.banner3-con .banner_content .primary_btn,
.banner4-con .banner_content .primary_btn,
.banner5-con .banner_content .primary_btn {
    margin-right: 0;
    margin-left: 18px;
}

/* Responsive RTL */
@media (max-width: 768px) {
    .header .last_list {
        padding-right: 15px;
    }

    .banner-con .banner_content {
        padding: 150px 0 200px 50px;
    }

    .banner-con .banner_content .text1 {
        padding-left: 0;
    }
}

/* Important RTL overrides */
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .float-start { float: right !important; }
[dir="rtl"] .float-end { float: left !important; }
[dir="rtl"] .me-auto { margin-left: auto !important; margin-right: 0 !important; }
[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }

/* Ensure RTL works with existing classes */
.rtl-mode {
    direction: rtl;
    text-align: right;
}



/* RTL Navbar Styles */
html[dir="rtl"] .navbar {
    direction: rtl;
}

html[dir="rtl"] .navbar-nav {
    text-align: right;
    padding-right: 0;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Mobile Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }

    .navbar-nav {
        padding: 1rem 0;
    }

    .nav-item {
        border-bottom: 1px solid #f8f9fa;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 12px 20px !important;
        font-size: 16px;
        color: #333 !important;
    }

    .phone-number .number {
        font-size: 14px;
    }

    /* RTL specific mobile adjustments */
    html[dir="rtl"] .navbar-collapse {
        text-align: right;
    }

    html[dir="rtl"] .nav-link {
        text-align: right;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        margin: 0 auto;
    }

    .navbar-brand img {
        max-height: 35px !important;
    }

    .language-switcher {
        margin-left: 50px;
    }

    .phone-number .number {
        font-size: 12px;
    }

    .nav-link {
        padding: 10px 15px !important;
        font-size: 15px;
    }
}

/* Navbar Toggler Animation */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    width: 20px;
    height: 2px;
    background: #333;
    display: block;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.navbar-toggler.collapsed .navbar-toggler-icon:nth-child(1) {
    transform: rotate(0);
}

.navbar-toggler.collapsed .navbar-toggler-icon:nth-child(2) {
    opacity: 1;
}

.navbar-toggler.collapsed .navbar-toggler-icon:nth-child(3) {
    transform: rotate(0);
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon:nth-child(2) {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* RTL Toggler positioning */
html[dir="rtl"] .navbar-toggler {
    margin-left: auto;
    margin-right: 0;
}