/* ==========================================================
   Sticky header: once the full header scrolls away, the nav
   bar (.menu-bar) is fixed to the top with a compact logo.
   Toggled by assets/js/sticky-header.js
   ========================================================== */

.menu-bar__logo { display: none; }

.menu-bar.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* below the offcanvas mobile menu (z-index 1000) */
    z-index: 990;
    border-top: 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 4px 22px rgba(15, 50, 129, .12);
    animation: menu-bar-slide-down .35s ease-out;
}

.menu-bar.is-sticky .navbar {
    flex-wrap: nowrap;
    align-items: center;
    padding: 6px 0 !important;
}

.menu-bar.is-sticky .menu-bar__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 10px;
}

.menu-bar.is-sticky .menu-bar__logo img {
    height: 46px;
    width: auto;
}

/* the menu column fills the rest of the row next to the logo */
.menu-bar.is-sticky .navbar > .col-md-12 {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    padding-right: 0;
}

/* mobile: logo left, menu button right */
.menu-bar.is-sticky .navbar-toggler {
    margin-left: auto !important;
}

@keyframes menu-bar-slide-down {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .menu-bar.is-sticky { animation: none; }
}

@media (max-width: 991px) {
    .menu-bar.is-sticky .navbar { padding: 4px 12px !important; }
    .menu-bar.is-sticky .menu-bar__logo img { height: 40px; }
    /* the collapsed menu column is empty on mobile */
    .menu-bar.is-sticky .navbar > .col-md-12 { display: none; }
    /* the theme turns the menu button into a full-width grey strip
       (absolute, width 100%) - make it a normal button beside the logo */
    .menu-bar.is-sticky .navbar-toggler {
        position: static;
        width: auto;
        background: transparent;
        padding: 6px 8px;
    }
}
