/**
 * Component: Header Clean (loaded only via header-clean.php / Page Builder)
 *
 * The markup in header-clean.php is identical to header.php and the old theme CSS
 * (minified/nadineScss.min.css) still styles it in LTR. This file only adds the RTL
 * mirror of every physical (left/right) rule that the old header CSS uses, so the
 * header works in Hebrew. LTR is untouched.
 * Add new header rules here, with logical properties (inline-start / inline-end).
 */

/* ==========================================================================
   RTL mirror (html[dir="rtl"])
   ========================================================================== */

/* --- Logo / mobile column (Bootstrap pl-0 / pr-0 are physical) --- */
html[dir="rtl"] #navHeader .mainMenuLogoContainer.pl-0 {
    padding-left: 15px !important;
    padding-right: 0 !important;
}
html[dir="rtl"] #navHeader .col-6.pr-0 {
    padding-right: 15px !important;
    padding-left: 0 !important;
}

/* --- Icon spacing inside buttons (Bootstrap mr-2 is physical) --- */
html[dir="rtl"] #navHeader .mr-2 {
    margin-right: 0 !important;
    margin-left: .5rem !important;
}

/* --- Buttons: "leaf" corner flips to the other side --- */
html[dir="rtl"] #navHeader .hlink1,
html[dir="rtl"] #navHeader .newCurves {
    border-radius: 12px 12px 2px 12px;
}

/* --- Search field: icon on the start side, clear button on the end side --- */
html[dir="rtl"] #navHeader .headerSearch {
    border-radius: 8px 8px 2px 8px;
    background-position: right 20px center;
    padding-left: 34px;
    padding-right: 50px;
}
html[dir="rtl"] #navHeader .searchbar_close_icon_form {
    right: auto;
    left: 20px;
}
html[dir="rtl"] .myacresults {
    border-radius: 8px 2px 8px 8px;
}

/* --- Sticky assist button --- */
html[dir="rtl"] .stickyAssist.myFixed {
    right: auto;
    left: 80px;
}

/* --- Menu: dropdown arrow --- */
html[dir="rtl"] .NewHeaderMenu > ul > li.menu-item-has-children {
    padding-right: 0;
    padding-left: 10px;
}
html[dir="rtl"] .NewHeaderMenu > ul > li.menu-item-has-children::before {
    right: auto;
    left: 3px;
}

/* --- Menu: mega panel position, separators, link padding --- */
html[dir="rtl"] .NewHeaderMenu .newNavRow > ul {
    left: auto;
    right: -15vw;
}
html[dir="rtl"] .NewHeaderMenu .newNavRow > ul > li.new_menu_title {
    border-right: 0;
    border-left: 2px solid #eae3dc;
}
html[dir="rtl"] .NewHeaderMenu .newNavRow > ul > li.new_menu_title:last-of-type {
    border-left: 0;
}
html[dir="rtl"] .NewHeaderMenu .newNavRow > ul > li.new_menu_title > ul > li > a {
    padding: 6px 40px 6px 20px;
}

/* Laptop widths (same range as the old CSS) */
@media screen and (min-width: 1024px) and (max-width: 1601px) {
    html[dir="rtl"] .NewHeaderMenu .newNavRow > ul {
        left: auto;
        right: -30vw;
    }
    html[dir="rtl"] .NewHeaderMenu .newNavRow > ul > li.new_menu_title > ul > li > a {
        padding: 6px 30px 6px 10px;
    }
    html[dir="rtl"] .stickyAssist.myFixed {
        right: auto;
        left: 40px;
    }
}

/* --- Mobile / tablet (menu becomes an accordion) --- */
@media screen and (max-width: 1023px) {
    html[dir="rtl"] .NewHeaderMenu .newNavRow ul.newsubactive {
        left: auto;
        right: auto;
    }
    html[dir="rtl"] .NewHeaderMenu .newNavRow ul.newsubactive > li.new_menu_title {
        border-left: 0;
    }
    html[dir="rtl"] .NewHeaderMenu .newNavRow ul.newsubactive > li.new_menu_title ul.newsubactive {
        padding: 5px 10px 0 0;
    }
    html[dir="rtl"] .mobile_search_bar {
        padding: 0 14px 0 24px;
    }
    html[dir="rtl"] .searchSubmit {
        left: auto;
        right: 0;
        padding-left: 0;
        padding-right: 10px;
    }
    html[dir="rtl"] #searchBack svg {
        transform: scaleX(-1);
    }
}
