/* RTL Style for Arabic Version */

/* Global Font and Direction */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
li,
div,
input,
textarea,
button,
select {
    font-family: 'Cairo', sans-serif !important;
}

body {
    direction: rtl;
    text-align: right;
}

/* Float Flipping */
.float-left {
    float: right !important;
}

.float-right {
    float: left !important;
}

/* Text Align Flipping */
.text-left {
    text-align: right !important;
}

.text-right {
    text-align: left !important;
}

/* Margin and Padding Flipping Helpers */
.ml-auto {
    margin-right: auto !important;
    margin-left: initial !important;
}

.mr-auto {
    margin-left: auto !important;
    margin-right: initial !important;
}

.mr-10 {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

.ml-10 {
    margin-right: 10px !important;
    margin-left: 0 !important;
}

.mr-20 {
    margin-left: 20px !important;
    margin-right: 0 !important;
}

.ml-20 {
    margin-right: 20px !important;
    margin-left: 0 !important;
}

/* Header Area - Flexbox Layout Fix */
.header-menu {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    /* Valid for RTL: Start (Right) -> End (Left) */
    flex-wrap: nowrap;
    text-align: right;
}

.header-menu ul {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right;
}

.header-menu ul li {
    display: inline-block;
    /* Fallback */
    margin-left: 30px !important;
    /* Space between items */
    margin-right: 0 !important;
    float: none !important;
    /* Remove floats */
    position: relative;
    /* Ensure submenu anchors to this */
}

/* Link padding and clickable area */
.header-menu ul li a {
    display: block;
    padding: 15px 15px;
    /* Increase clickable area */
    text-decoration: none;
    white-space: nowrap;
    /* Prevent breaking lines */
}

.header-menu ul li a::before {
    right: 0;
    left: auto;
    bottom: 15px;
    /* Adjust underline position due to padding */
}

.header-menu ul li a:hover:before {
    left: 0;
    right: auto;
}

/* Button Positioning */
.main-btn {
    margin-right: auto;
    /* Push to the far left if needed, but space-between handles it */
    margin-left: 0;
}

/* Submenu */
.header-menu ul .sub-menu {
    text-align: right;
    left: auto;
    right: 0;
    /* Align submenu to the right of parent */
    position: absolute;
    top: 100%;
}

.header-menu ul .sub-menu ul {
    display: block !important;
    /* Reset flex for submenu list */
}

.header-menu ul .sub-menu ul li {
    display: block !important;
    margin: 0 !important;
    border-bottom: 1px solid #eee;
}

.header-menu ul .sub-menu ul li a {
    text-align: right;
    padding: 10px 15px;
}

.header-menu ul .sub-menu ul li a::after {
    left: 20px;
    right: auto;
    transform: translateY(-50%) scale(0) rotate(180deg);
}

.header-menu ul .sub-menu ul li a:hover::after {
    transform: translateY(-50%) scale(1) rotate(180deg);
}

.header-menu ul .sub-menu ul li a::before {
    right: 0;
    left: auto;
    bottom: 0;
    /* Reset underline for submenu items */
}

/* Slider */
.slider-content {
    direction: rtl;
    text-align: right;
}

.baner-shape1 {
    right: 0;
    left: auto;
    transform: translateX(500px);
    transform-origin: left;
}

.baner-shape2 {
    right: 0;
    left: auto;
    transform: translateX(500px);
    transform-origin: left;
}

.active .baner-shape1,
.active .baner-shape2 {
    transform: translateX(0px);
}

/* General Section Titles */
.section-title,
.section-sub-title,
.section-main-title {
    text-align: right;
}

.section-title.text-center {
    text-align: center;
}

/* Location Area (Fixing Red Line) */
.location-title h4::before {
    right: 0;
    left: auto !important;
}

/* Choose Us Area */
.choose-itmes {
    margin-right: 70px;
    margin-left: 0;
}

.choose-icon {
    float: right;
    margin-left: 25px;
    margin-right: 0;
}

/* Progress items offset mirroring */
.progress-items {
    right: auto;
    left: -80px;
}

/* Modern Progress Bar / Barfiller */
.barfiller {
    transform: scaleX(-1) !important;
    /* Flip direction for RTL */
    background-color: #2a2a2a !important;
    height: 12px !important;
    border-radius: 50px !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 530px;
    margin-right: 0 !important;
    margin-top: 15px !important;
    border: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.barfiller .fill {
    transform: none !important;
    /* Remove the old skew */
    border-radius: 50px !important;
    background: linear-gradient(90deg, #e55426, #ff7e54) !important;
    height: 100% !important;
    box-shadow: 0 0 10px rgba(229, 84, 38, 0.3);
}

.process-ber-plugin {
    text-align: right;
    margin-bottom: 40px;
}

span.process-bar {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.barfiller .tip {
    transform: scaleX(-1) !important;
    /* Counter-flip the text */
    top: -35px !important;
    font-weight: 700 !important;
    color: #e55426 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 18px !important;
}

/* Specific fix for Experience Bar (id: bar3) */
#bar3 .tip {
    font-size: 0 !important;
    /* Hide the percentage number and % sign */
}

#bar3 .tip::after {
    content: "+15";
    font-size: 18px !important;
    color: #e55426;
    font-weight: 700;
    display: inline-block;
}

/* Ensure tip wrap doesn't overflow */
.barfiller .tipWrap {
    display: block !important;
}


/* Service Area */
.service-content {
    left: 0;
    right: auto;
}

/* Portfolio Area */
.protfolio-thumb img:nth-child(2) {
    right: 0 !important;
    left: auto !important;
    clip-path: polygon(100% 0, 50% 0, 50% 100%, 100% 100%);
}

.protfolio-thumb img:nth-child(3) {
    left: 0 !important;
    right: auto !important;
    clip-path: polygon(50% 0, 0 0, 0 100%, 50% 100%);
}

/* Footer Section */
.footer-socilal-title h4::before {
    right: 0px;
    left: auto;
}

.footer-wiget-title h4::before {
    right: 0;
    left: auto;
}

.footer-wiget-menu ul li a:hover {
    margin-right: 10px;
    margin-left: 0;
}

.footer-social ul li {
    margin-left: 7px;
    margin-right: 0;
}

/* Blog Date & Details */
.blog-date {
    left: 0;
    right: auto;
}

.blog-details-tag h6 {
    margin-left: 32px;
    margin-right: 0;
}

.blog-details-tag a:before {
    right: -2px;
    left: auto;
}

.text-sm-end a::before {
    right: -2px;
    left: auto;
}

/* Inputs */
input,
textarea {
    text-align: right;
    direction: rtl;
}

.widget_search input {
    padding-right: 20px;
    padding-left: 0;
}

button.icons {
    left: 0;
    right: auto;
    border-radius: 3px 0 0 3px;
}

/* Sidebar Widget */
.sidebar-group .widget-heading {
    left: 32px;
    right: auto;
}

.sidebar-group .sidebar-widget {
    left: -100%;
    right: auto;
}

.sidebar-group.isActive .sidebar-widget {
    left: 0;
}

.close-side-widget {
    float: left;
}

/* Back to Top */
.prgoress_scrollup {
    left: 55px;
    right: auto;
}

/* Team Area */
.team-icon {
    left: 48px;
    right: auto;
}

.team-main-icon {
    left: 50px;
    right: auto;
}

/* Nest Button Shapes */
.nest-btn__shape {
    right: calc((var(--b) - 1) * 25%);
    left: auto;
}

/* Owl Carousel Nav Buttons */
.owl-carousel .owl-nav .owl-prev,
.owl-carousel .owl-nav .owl-next {
    float: right;
}

/* Breadcrumb Fix (الرئيسية / الصفحة) */
.bratcome-text ul li a::before {
    display: none !important;
}

.bratcome-text ul li:not(:last-child)::after {
    content: "/" !important;
    margin: 0 10px !important;
    font-size: 18px !important;
    color: #fff !important;
    display: inline-block !important;
    position: static !important;
    /* Remove absolute positioning from original CSS */
}

.bratcome-text ul {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    direction: rtl !important;
}

.bratcome-text ul li {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    color: #fff !important;
}

.bratcome-text {
    display: flex !important;
    justify-content: flex-start !important;
    width: fit-content !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
}

.breatcome-title h1,
.breatcome-discription p {
    text-align: center !important;
}