/*
 * RTL stylesheet for Webteck Child theme
 *
 * WordPress will automatically load this file instead of style.css when the site is in an RTL locale.
 * Add any RTL-specific overrides below.
 */

html[dir="rtl"] {
    direction: rtl;
}


/* Ensure body is in RTL mode (helps with components that do not inherit direction properly) */

html[dir="rtl"] body {
    direction: rtl;
}


/* -------------------------------------------------------------
   Common swaps for theme elements (float/margin/padding/position)
   ------------------------------------------------------------- */

html[dir="rtl"] .alignleft {
    float: right;
    margin-left: 1.5em;
    margin-right: 0;
}

html[dir="rtl"] .alignright {
    float: left;
    margin-right: 1.5em;
    margin-left: 0;
}

html[dir="rtl"] .aligncenter {
    margin-left: auto;
    margin-right: auto;
}

html[dir="rtl"] .page-links>.page-links-title {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .page-links>span:not(.page-links-title):not(.screen-reader-text),
html[dir="rtl"] .page-links>a {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .blog-single.format-quote:before,
html[dir="rtl"] .blog-single.format-link:before,
html[dir="rtl"] .blog-single.tag-sticky-2:before,
html[dir="rtl"] .blog-single.sticky:before {
    left: 15px;
    right: auto;
}

html[dir="rtl"] .blog-single.tag-sticky-2:before,
html[dir="rtl"] .blog-single.sticky:before {
    left: 0;
    right: auto;
}


/* Search form + password form padding swap */

html[dir="rtl"] .wp-block-search .wp-block-search__input {
    padding-right: 20px;
    padding-left: 0;
}

html[dir="rtl"] .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input {
    padding: 0 25px 0 8px;
}

html[dir="rtl"] .post-password-form input {
    padding-right: 25px;
    padding-left: 0;
}


/* Meta list spacing */

html[dir="rtl"] .th-search .search-grid-meta>* {
    margin-left: 15px;
    margin-right: 0;
}

html[dir="rtl"] .th-search .search-grid-meta>*:last-child {
    margin-left: 0;
}


/* Form icons (e.g., input icons) */

html[dir="rtl"] .form-group>i {
    right: auto;
    left: 25px;
}

html[dir="rtl"] [class*="col-"].form-group>i {
    right: auto;
    left: calc((var(--bs-gutter-x) / 2) + 25px);
}


/* Elementor divider alignment */

html[dir="rtl"] .elementor-widget-divider--element-align-left .elementor-divider__element {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .elementor-widget-divider--element-align-right .elementor-divider__element {
    margin-right: auto;
    margin-left: 0;
}


/* Elementor section-specific RTL fixes (mirrors columns for better layout) */

html[dir="rtl"] .elementor-section.elementor-element-4921b449>.elementor-container {
    flex-direction: row-reverse !important;
}


/* Flip directional icons (Font Awesome) */

html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-long-arrow-alt-right,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-angle-right {
    transform: scaleX(-1);
    margin-right: 5px;
}


/* Button icon spacing (RTL) */

html[dir="rtl"] .th-btn i,
html[dir="rtl"] .th-btn .fas,
html[dir="rtl"] .th-btn .far,
html[dir="rtl"] .th-btn .fal,
html[dir="rtl"] .th-btn .fab {
    margin-inline-start: 0.5rem;
    margin-inline-end: 0;
}


/* Footer-specific RTL fixes */

html[dir="rtl"] .footer-widget .widget_title:before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .footer-widget .widget_title:after {
    left: auto;
    right: 96px;
}

html[dir="rtl"] .footer-widget .widget_title.style2:before,
html[dir="rtl"] .footer-widget .widget_title.style2:after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .footer-widget .widget_title.style2:after {
    right: 40px;
}

html[dir="rtl"] .footer-widget.widget_meta a,
html[dir="rtl"] .footer-widget.widget_pages a,
html[dir="rtl"] .footer-widget.widget_archive a,
html[dir="rtl"] .footer-widget.widget_categories a,
html[dir="rtl"] .footer-widget.widget_nav_menu a {
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] .footer-widget.widget_meta a:before,
html[dir="rtl"] .footer-widget.widget_pages a:before,
html[dir="rtl"] .footer-widget.widget_archive a:before,
html[dir="rtl"] .footer-widget.widget_categories a:before,
html[dir="rtl"] .footer-widget.widget_nav_menu a:before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .footer-widget .form-group>i {
    right: auto;
    left: 25px;
}


/* Footer line animation (mirrored) */

html[dir="rtl"] .footer-widget .widget_title.style2:after {
    -webkit-animation: footerLineRtl 7s linear infinite;
    animation: footerLineRtl 7s linear infinite;
}

html[dir="rtl"] .newsletter-wrap {
    border-right: 2px solid var(--theme-color);
    border-left: 0;
    padding-right: 25px;
    margin-right: 25px;
}

@-webkit-keyframes footerLineRtl {
    0% {
        right: 40px;
    }
    50% {
        right: 0;
    }
    100% {
        right: 40px;
    }
}

@keyframes footerLineRtl {
    0% {
        right: 40px;
    }
    50% {
        right: 0;
    }
    100% {
        right: 40px;
    }
}


/* Header / navigation RTL fixes */

html[dir="rtl"] .main-menu>ul>li:first-child {
    /* margin-left: 0 !important;
    margin-right: 0; */
}

html[dir="rtl"] .main-menu>ul>li:last-child {
    /* margin-right: 0 !important;
    margin-left: 0; */
}

html[dir="rtl"] .main-menu ul li.menu-item-has-children>a:after {
    margin-left: 4px;
    margin-right: 4px;
}

html[dir="rtl"] .main-menu ul.sub-menu,
html[dir="rtl"] .main-menu ul.mega-menu {
    text-align: right;
}

html[dir="rtl"] .main-menu ul.sub-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .main-menu ul.sub-menu li a {
    padding-left: 0;
    padding-right: 23px;
}

html[dir="rtl"] .main-menu ul.sub-menu li a:before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .main-menu ul.sub-menu li.menu-item-has-children>a:after {
    float: left;
}

html[dir="rtl"] .main-menu ul.sub-menu li ul.sub-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .main-menu ul.sub-menu li ul.sub-menu li ul {
    left: auto;
    right: 100%;
}

html[dir="rtl"] .header-links li:not(:last-child) {
    margin: 0 0 0 26px;
}

html[dir="rtl"] .header-links li>i {
    margin-right: 0;
    margin-left: 6px;
}

html[dir="rtl"] .header-social .social-title {
    margin: 0 0 0 15px;
}

html[dir="rtl"] .header-social a {
    margin: 0 0 0 15px;
}

html[dir="rtl"] .header-layout1 .main-menu {
    margin-right: 60px;
    margin-left: 0;
}

html[dir="rtl"] .header-layout1 .logo-bg {
    left: auto;
    right: 0;
}

html[dir="rtl"] .header-layout1 .logo-bg:before,
html[dir="rtl"] .header-layout1 .logo-bg:after {
    left: auto;
    right: 0;
    -webkit-clip-path: polygon(100% 0, 80px 0, 0 100%, 100% 100%);
    clip-path: polygon(100% 0, 80px 0, 0 100%, 100% 100%);
}


/* Mobile menu / offcanvas menu RTL fixes */

html[dir="rtl"] .th-menu-wrapper,
html[dir="rtl"] .th-menu-wrapper2 {
    direction: rtl;
}

html[dir="rtl"] .th-menu-wrapper .th-menu-toggle,
html[dir="rtl"] .th-menu-wrapper2 .th-menu-toggle2 {
    right: auto;
    left: -16.5px;
}

html[dir="rtl"] .th-menu-wrapper .th-menu-area,
html[dir="rtl"] .th-menu-wrapper2 .th-menu-area {
    left: auto;
    right: -110%;
    border-right: none;
    border-left: 3px solid var(--theme-color);
}

html[dir="rtl"] .th-menu-wrapper.th-body-visible .th-menu-area,
html[dir="rtl"] .th-menu-wrapper2.th-body-visible .th-menu-area {
    left: auto;
    right: 0;
}

html[dir="rtl"] .th-mobile-menu {
    text-align: right;
}

html[dir="rtl"] .th-mobile-menu ul li a {
    padding-left: 0;
    padding-right: 18px;
}

html[dir="rtl"] .th-mobile-menu ul li a:before {
    left: auto;
    right: 0;
    margin-right: 0;
    margin-left: 10px;
}

html[dir="rtl"] .th-mobile-menu ul li ul li {
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] .th-mobile-menu ul .th-item-has-children>a .th-mean-expand {
    right: auto;
    left: 0;
}

html[dir="rtl"] .th-mobile-menu ul .th-item-has-children>a:after {
    float: left;
}


/* Hero section RTL fixes */

html[dir="rtl"] .th-hero-wrapper .slick-dots {
    left: auto;
    right: 80px;
}

html[dir="rtl"] .th-hero-wrapper .slider-arrow {
    --pos-x: 100px;
    left: auto;
    right: var(--pos-x, -120px);
}

@media (max-width: 1399px) {
    html[dir="rtl"] .th-hero-wrapper .slider-arrow {
        left: auto;
        right: var(--pos-x, -120px);
    }
}

@media (max-width: 991px) {
    html[dir="rtl"] .th-hero-wrapper .slider-arrow {
        left: auto;
        right: var(--pos-x, -120px);
    }
}


/* Hero 1 shapes / image swap */

html[dir="rtl"] .hero-1 .hero-shape1,
html[dir="rtl"] .hero-1 .hero-shape2 {
    right: auto;
    left: 0;
}

html[dir="rtl"] .hero-1 .hero-shape3 {
    left: auto;
    right: -60px;
}

html[dir="rtl"] .hero-1 .hero-img {
    right: auto;
    left: 10%;
}

html[dir="rtl"] .hero-1 .hero-img:before {
    right: auto;
    left: -40px;
}


/* Hero 2 gradient / shapes */

html[dir="rtl"] .hero-2 .th-hero-bg:before {
    background: linear-gradient(to left, var(--theme-color), transparent);
}

html[dir="rtl"] .hero-2 .hero-shape1,
html[dir="rtl"] .hero-2 .hero-shape2,
html[dir="rtl"] .hero-2 .hero-shape3 {
    right: auto;
    left: 0;
}

html[dir="rtl"] .hero-2 .ripple-shape {
    left: auto;
    right: -50px;
}


/* Hero 4 RTL fixes */

@media (min-width: 1300px) {
    html[dir="rtl"] .hero-4 .hero-img {
        right: auto;
        left: 2%;
    }
}

html[dir="rtl"] .hero-4 .triangle-1,
html[dir="rtl"] .hero-4 .triangle-2 {
    right: auto;
    left: 0;
    -webkit-clip-path: polygon(0 0, 100% 100%, 0% 100%);
    clip-path: polygon(0 0, 100% 100%, 0% 100%);
}

html[dir="rtl"] .hero-4 .hero-shape2,
html[dir="rtl"] .hero-4 .hero-shape3 {
    right: auto;
    left: 0;
}

html[dir="rtl"] .hero-style4 .ripple-shape {
    left: auto;
    right: -50px;
}

html[dir="rtl"] .th-social a:last-child {
    margin-right: 5px;
}

html[dir="rtl"] body {
    font-family: "Cairo", "Noto Sans Arabic", "Tajawal", sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5 {
    font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .navbar {
    font-family: 'Tajawal', sans-serif;
}


/* -------------------------------------------------------------
   WooCommerce RTL Styles
   ------------------------------------------------------------- */


/* Product loops and grids */

html[dir="rtl"] .woocommerce ul.products li.product,
html[dir="rtl"] .woocommerce-page ul.products li.product {
    float: right;
}

html[dir="rtl"] .woocommerce .products .star-rating {
    float: left;
}

html[dir="rtl"] .woocommerce ul.products li.product .button {
    float: left;
}

html[dir="rtl"] .woocommerce .woocommerce-result-count {
    float: right;
}

html[dir="rtl"] .woocommerce .woocommerce-ordering {
    float: right;
}


/* Product page */

html[dir="rtl"] .woocommerce div.product .woocommerce-product-gallery {
    float: right;
    margin-left: 2em;
    margin-right: 0;
}

html[dir="rtl"] .woocommerce div.product .summary {
    float: left;
}

html[dir="rtl"] .woocommerce div.product .woocommerce-tabs ul.tabs {
    text-align: right;
}

html[dir="rtl"] .woocommerce div.product .woocommerce-tabs ul.tabs li {
    float: right;
}

html[dir="rtl"] .woocommerce div.product .woocommerce-tabs ul.tabs li a {
    text-align: right;
}


/* Cart and checkout */

html[dir="rtl"] .woocommerce table.shop_table th,
html[dir="rtl"] .woocommerce table.shop_table td {
    text-align: right;
}

html[dir="rtl"] .woocommerce table.shop_table .product-remove {
    text-align: left;
}

html[dir="rtl"] .woocommerce .cart-collaterals {
    float: left;
    width: 48%;
}

html[dir="rtl"] .woocommerce .cart-collaterals .cart_totals {
    float: right;
    width: 48%;
}

html[dir="rtl"] .woocommerce .checkout .col-1,
html[dir="rtl"] .woocommerce .checkout .col-2 {
    float: right;
    width: 48%;
}

html[dir="rtl"] .woocommerce .checkout .col-1 {
    margin-left: 2em;
    margin-right: 0;
}

html[dir="rtl"] .woocommerce .checkout .col-2 {
    margin-right: 2em;
    margin-left: 0;
}


/* My account */

html[dir="rtl"] .woocommerce-MyAccount-navigation {
    float: right;
    width: 30%;
}

html[dir="rtl"] .woocommerce-MyAccount-content {
    float: left;
    width: 68%;
}


/* Buttons and forms */

html[dir="rtl"] .woocommerce .button,
html[dir="rtl"] .woocommerce button.button,
html[dir="rtl"] .woocommerce input.button,
html[dir="rtl"] .woocommerce #respond input#submit {
    text-align: center;
}

html[dir="rtl"] .woocommerce .quantity .qty {
    text-align: center;
}


/* Breadcrumbs */

html[dir="rtl"] .woocommerce .woocommerce-breadcrumb {
    direction: rtl;
}


/* Pagination */

html[dir="rtl"] .woocommerce nav.woocommerce-pagination ul {
    float: left;
}

html[dir="rtl"] .woocommerce nav.woocommerce-pagination ul li {
    float: right;
}


/* Product categories */

html[dir="rtl"] .woocommerce .product-category a {
    text-align: right;
}


/* Reviews */

html[dir="rtl"] .woocommerce #reviews #comments ol.commentlist li .comment-text {
    margin-left: 0;
    margin-right: 50px;
}

html[dir="rtl"] .woocommerce #reviews #comments ol.commentlist li img.avatar {
    left: auto;
    right: -50px;
}


/* Widgets */

html[dir="rtl"] .woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-handle {
    margin-left: -1em;
    margin-right: 0;
}

html[dir="rtl"] .woocommerce .widget_price_filter .price_slider_amount {
    text-align: right;
}

html[dir="rtl"] .woocommerce .widget_price_filter .price_slider_amount .button {
    float: left;
}


/* Additional RTL fixes for WooCommerce */

html[dir="rtl"] .woocommerce .woocommerce-message,
html[dir="rtl"] .woocommerce .woocommerce-info,
html[dir="rtl"] .woocommerce .woocommerce-error {
    padding-left: 3.5em;
    padding-right: 1em;
    background-position: right 1em center;
}

html[dir="rtl"] .woocommerce .woocommerce-message:before,
html[dir="rtl"] .woocommerce .woocommerce-info:before,
html[dir="rtl"] .woocommerce .woocommerce-error:before {
    right: auto;
    left: 1em;
}

html[dir="rtl"] .woocommerce form .form-row label {
    text-align: right;
}

html[dir="rtl"] .woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
    text-align: right;
    padding-left: 0;
    padding-right: 8px;
}

html[dir="rtl"] .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 1px;
    right: auto;
}

html[dir="rtl"] .woocommerce .select2-dropdown {
    text-align: right;
}


/* Product page specific RTL */

html[dir="rtl"] .woocommerce div.product .row.gx-60 {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .woocommerce div.product .row.gx-60 .col-lg-6 {
    text-align: left;
}

html[dir="rtl"] .woocommerce div.product .row .col-lg-6:first-child {
    order: 2;
}

html[dir="rtl"] .woocommerce div.product .row .col-lg-6:nth-child(2) {
    order: 1;
}

html[dir="rtl"] .woocommerce div.product .product-about {
    text-align: right;
}

html[dir="rtl"] p {
    font-family: 'Cairo', sans-serif;
    /* line-height:1.9; */
    font-size: 18px;
}

html[dir="rtl"] .recent-post-wrap .recent-post .media-img {
    margin-left: 15px;
    margin-right: 0;
}

html[dir="rtl"] .menu-services-ar-container .menu li a:before {
    left: 25px;
    right: auto;
    content: "\f060";
}

html[dir="rtl"] .breadcumb-wrapper .breadcumb-content .breadcumb-menu li:after {
    content: "\f323";
    margin-right: 10px;
}

html[dir="rtl"] .scroll-top {
    left: 30px;
    right: auto;
}

html[dir="rtl"] .footer-widget.widget_nav_menu a:before {
    content: "\f053";
}

html[dir="rtl"] .accordion-card .accordion-button:after {
    left: 30px;
    right: auto;
}

html[dir="rtl"] .accordion-card .accordion-button {
    padding-left: 50px;
    padding-right: 30px;
    text-align: right;
}


/* Arabic menu font */

html[dir="rtl"] nav ul li a,
html[dir="rtl"] .menu li a,
html[dir="rtl"] .main-menu li a {
    font-family: 'Cairo', sans-serif;
    /* font-weight: 600; */
    font-size: 17px;
}


/* RTL spacing */

html[dir="rtl"] nav ul li,
html[dir="rtl"] .menu li,
html[dir="rtl"] .main-menu li {
    /* margin-left: 18px; */
}


/* dropdown language switcher */

html[dir="rtl"] .sub-menu li a {
    font-size: 17px;
}


/* Footer menu title */

html[dir="rtl"] .footer-widget .widget_title {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    /* font-weight:700;
    font-size:18px; */
}


/* Footer menu links */

html[dir="rtl"] .footer-widget .webteck-menu li a {
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 500;
}


/* Recent post titles */

html[dir="rtl"] .footer-widget .recent-post .post-title a {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 18px;
}


/* Post date */

html[dir="rtl"] .recent-post .recent-post-meta a {
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
}

html[dir="rtl"] .th-btn {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
}

html[dir="rtl"] .hero-subtitle {
    font-family: 'Tajawal', sans-serif;
    font-size: 21px;
}

@media (max-width:768px) {
    html[dir="rtl"] .newsletter-wrap {
        border-right: 0;
        border-left: 0;
        padding-right: 0px;
        margin-right: 0px;
    }
}

@media (min-width: 1300px) {
    html[dir="rtl"] .hompage-ar-secon-section .img-box4 {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1300px) {
    html[dir="rtl"] .hompage-ar-third-section .img-box5 {
        margin-right: auto;
        margin-left: auto;
    }
}

html[dir="rtl"] .title-area-wrap .title-area .sub-title img {
    margin-left: 5px;
    margin-right: auto;
}

html[dir="rtl"] .blog-content .blog-meta a i {
    margin-right: auto;
    margin-left: 6px;
}

html[dir="rtl"] .blog-content .blog-meta a:last-child {
    margin-right: 15px;
}

html[dir="rtl"] .product_meta>span>a:first-child,
html[dir="rtl"] .product_meta>span>span:first-child {
    margin-left: auto;
    margin-right: 7px;
}

html[dir="rtl"] .widget_shopping_cart .mini_cart_item {
    text-align: right;
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2 .offer-feature {
    right: auto;
    left: 0;
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2 .offer-feature .feature {
    transform: rotate(-45deg);
    left: 31px;
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2:before {
    transform: scaleX(-1);
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2:after {
    transform: scaleX(-1);
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2 .available-list li:after {
    right: 0;
    left: auto;
}

html[dir="rtl"] .elementor-widget-webteckprice .price-grid2 .available-list li {
    padding-right: 30px;
    padding-left: auto;
}