/*
** ---------------------------------------------------
** GBC INDUSTRIAL TOOLS - RTL CUSTOM OVERRIDES (ARABIC)
** ---------------------------------------------------
*/

/* 1. General Layout & Directional Decos */
.left-line {
    padding-left: 0;
    padding-right: 20px;
}
.left-line::before {
    left: auto;
    right: 0;
}

.input-left-line {
    border-left: none;
    border-right: 10px solid var(--primary-color);
    padding-left: 0;
    padding-right: 10px;
}

/* 2. Floating Flag (Request Estimate) */
.flag-contatti {
    right: auto;
    left: 0;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
}
.flag-contatti img {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* 3. Navigation & Megamenu */
#menu-main {
    margin-left: 0 !important;
    margin-right: 3rem !important; /* Ms-md-5 equivalent */
}

@media (min-width: 992px) {
    #main-navbar .navbar-nav .nav-item > a {
        border-bottom: none;
    }
    #main-navbar .navbar-nav .current-menu-item > a,
    #main-navbar .navbar-nav .current_page_item > a,
    #main-navbar .navbar-nav .active > a {
        border-bottom: 2px solid var(--primary-color);
    }
}

/* 4. Swiper Navigation - Swiper handles RTL but sometimes custom buttons need help */
.swiper-custom-button-next,
.swiper-custom-button-prev {
    transform: scaleX(-1);
}

/* 5. GBC Specific Gradients (Half Rows) */
.row-half-primary {
    background: linear-gradient(to left, #fff 50%, var(--primary-color) 50%);
}
.row-half-grey-half-primary {
    background: linear-gradient(to left, #f2f2f2 50%, var(--primary-color) 50%);
}

@media only screen and (max-width: 768px) {
    .row-half-primary {
        background: #fff;
    }
    .row-half-grey-half-primary {
        background: #f2f2f2;
    }
    .col-half-primary {
        background: linear-gradient(to left, #fff 50%, var(--primary-color) 50%);
    }
    .col-half-grey-half-primary {
        background: linear-gradient(to left, #f2f2f2 50%, var(--primary-color) 50%);
    }
}

/* 6. Contact Form 7 Overrides */
.wpcf7-radio input[type="radio"] {
    margin-right: 0;
    margin-left: 5px;
}
span.wpcf7-list-item {
    margin-right: 0;
    margin-left: 0.25em;
}
.contact-form-newsletter input[type="checkbox"] {
    margin-right: 0;
    margin-left: 5px;
}
.contact-form-newsletter input[type="checkbox"]:checked::after {
    left: auto;
    right: 5px;
}


/* 8. LTR Helpers */
.ltr-text {
    direction: ltr !important;
    display: inline-block;
}

/* 9. Mobile alignment fixes */
@media (max-width: 991.98px) {
    /* Keep logo on the right */
    .navbar-brand {
        margin-left: auto;
        margin-right: 0;
    }
    .navbar-toggler {
        margin-left: 0;
        margin-right: auto;
    }
}

/* 10. Newsletter Form Label Alignment */
.contact-form-newsletter label {
    display: block;
    text-align: right;
}

/* 11. Swiper Custom Pagination RTL Fixes */
.prodotti-swiper .swiper-custom-pagination,
.news-swiper .swiper-custom-pagination {
    right: auto;
    left: 30px;
}

@media (max-width: 768px) {
    .prodotti-swiper .swiper-custom-pagination,
    .news-swiper .swiper-custom-pagination {
        left: 15px;
    }
}
