/**
 * Sticky header navigation — load AFTER responsive.css
 * EN: logo left, menu right | AR: logo right, menu left
 */

/* ---- English (LTR) ---- */
html[dir="ltr"] .sticky-header .inner-container {
    direction: ltr;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between !important;
}

html[dir="ltr"] .sticky-header .inner-container .logo {
    order: 1;
    flex: 0 0 auto;
}

html[dir="ltr"] .sticky-header .inner-container .nav-outer {
    order: 2;
    display: flex !important;
    align-items: center;
    justify-content: flex-end !important;
    flex: 1 1 auto;
    width: auto !important;
    margin: 0;
}

html[dir="ltr"] .sticky-header .main-menu,
html[dir="ltr"] .sticky-header .main-menu .navbar-collapse {
    width: auto;
}

html[dir="ltr"] .sticky-header .main-menu .navigation {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
}

html[dir="ltr"] .sticky-header .main-menu .navigation > li {
    float: none !important;
    margin: 0;
    padding: 30px 25px;
}

/* ---- Arabic (RTL) ---- */
html[dir="rtl"] .sticky-header .inner-container {
    direction: ltr;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between !important;
}

html[dir="rtl"] .sticky-header .inner-container.padding15 {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[dir="rtl"] .sticky-header .inner-container .logo {
    order: 2;
    flex: 0 0 auto;
}

html[dir="rtl"] .sticky-header .inner-container .nav-outer {
    order: 1;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    flex: 1 1 auto;
    width: auto !important;
    margin: 0;

}

html[dir="rtl"] .sticky-header .main-menu,
html[dir="rtl"] .sticky-header .main-menu .navbar-collapse {
    width: auto;
    direction: rtl;
}

html[dir="rtl"] .sticky-header .main-menu .navigation {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
    direction: rtl;
}

html[dir="rtl"] .sticky-header .main-menu .navigation > li {
    float: none !important;
    margin: 0 0 0 25px !important;
    padding: 30px 0 30px 25px;
}

html[dir="rtl"] .sticky-header .main-menu .navigation > li:last-child {
    margin-left: 0 !important;
}

html[dir="rtl"] .sticky-header .main-menu .navigation > li > ul {
    right: auto;
    left: 0;
    text-align: right;
}

html[dir="rtl"] .sticky-header .mobile-nav-toggler {
    margin-left: 0;
    margin-right: 15px;
}

@media only screen and (max-width: 1024px) {
    html[dir="ltr"] .sticky-header .inner-container,
    html[dir="rtl"] .sticky-header .inner-container {
        justify-content: space-between !important;
    }
}

@media only screen and (max-width: 991px) {
    .sticky-header .main-menu {
        display: none;
    }

    /* One hamburger: main header when at top, sticky when scrolled */
    .main-header:has(.sticky-header.fixed-header) .header-lower .mobile-nav-toggler {
        display: none !important;
    }

    .sticky-header:not(.fixed-header) .mobile-nav-toggler {
        display: none !important;
    }
}
