/*
    Hoofdmenu (Views/Partials/_Hoofdmenu.cshtml) en hamburgermenu (_HoofdmenuMobiel.cshtml).

    Los CSS-bestand in plaats van een SCSS-partial: StyleSheet.css wordt buiten dit project
    gecompileerd. Kleuren uit StyleSheet.scss: $color-blue rgb(47,72,92), $color-bouwconnect #e87d3e.

    De regels onder ".mainNav .hm" heffen de oude opmaak van ".mainNav ul li" op (float, marges,
    onderstreep-animatie) waar die het nieuwe menu in de weg zit.
*/

/* ── desktop ─────────────────────────────────────────────────────────────── */

.mainNav .hm {
    display: flex;
    align-items: center;
    float: none;
}

.mainNav .hm > li.hm-item {
    position: relative;
    float: none;
    display: block;
    margin-left: 32px;
}

.mainNav .hm > li.hm-item:first-child {
    margin-left: 0;
}

@media (max-width: 1199px) {
    .mainNav .hm > li.hm-item {
        margin-left: 22px;
    }
}

.mainNav .hm .hm-link .fa {
    font-size: 15px;
    margin-left: 2px;
}

.mainNav .hm .hm-link:after {
    margin-top: 2px;
}

/* Uitklapmenu: bij hover en bij toetsenbordfocus. */
.mainNav .hm .hm-dropdown {
    position: absolute;
    top: 100%;
    left: -20px;
    padding-top: 14px;
    min-width: 260px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .15s ease-in-out, transform .15s ease-in-out, visibility .15s;
    z-index: 100;
}

.mainNav .hm .hm-heeft-sub:hover .hm-dropdown,
.mainNav .hm .hm-heeft-sub:focus-within .hm-dropdown {
    visibility: visible;
    opacity: 1;
    transform: none;
}

.mainNav .hm .hm-dropdown ul {
    background: #fff;
    border-top: 3px solid #e87d3e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    padding: 10px 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

.mainNav .hm .hm-dropdown li {
    float: none;
    display: block;
    margin: 0;
}

.mainNav .hm .hm-dropdown a {
    display: block;
    padding: 8px 20px;
    letter-spacing: 0;
    color: #333;
    white-space: nowrap;
}

.mainNav .hm .hm-dropdown a:after {
    display: none;
}

.mainNav .hm .hm-dropdown a:hover,
.mainNav .hm .hm-dropdown a:focus,
.mainNav .hm .hm-dropdown a.active {
    background: #f4f6f8;
    color: rgb(47, 72, 92);
    text-decoration: none;
}

/* Contact als donkerblauwe knop met witte letters. */
.mainNav .hm .hm-item a.hm-knop {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    background: rgb(47, 72, 92);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    line-height: 1.4;
    transition: background-color .2s ease-in-out;
}

.mainNav .hm .hm-item a.hm-knop:after {
    display: none;
}

.mainNav .hm .hm-item a.hm-knop:hover,
.mainNav .hm .hm-item a.hm-knop:focus,
.mainNav .hm .hm-item a.hm-knop.active {
    background: rgb(32, 50, 64);
    color: #fff;
    text-decoration: none;
}

.mainNav .hm .hm-open {
    border: 0;
    background: none;
    padding: 4px 6px;
    color: #000;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.mainNav .hm .hm-open:hover {
    color: #e87d3e;
}

/* Desktop: geen hamburger. Onder 992px: alleen de hamburger. */
.mainNav .hm > li.hm-item-hamburger {
    display: none;
}

@media (max-width: 991px) {
    .mainNav .hm > li.hm-item {
        display: none;
    }

    .mainNav .hm > li.hm-item-hamburger {
        display: block;
        margin-left: 0;
    }
}

/* In de header staat een lege .sidetrigger-div uit het oude menu; zonder zijmenu doet die niets. */
.hm-actief .headerIconsMenu .sidetrigger.logo-divisie {
    display: none !important;
}

/* ── mobiel ──────────────────────────────────────────────────────────────── */

.hm-mobiel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-width: 100%;
    background: #fff;
    z-index: 1100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -4px 0 20px rgba(0, 0, 0, .15);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease-in-out, visibility .25s;
    font-family: 'Open Sans', sans-serif;
}

.hm-mobiel.open {
    transform: none;
    visibility: visible;
}

.hm-mobiel-achtergrond {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1099;
}

body.hm-mobiel-open {
    overflow: hidden;
}

.hm-mobiel-kop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.hm-mobiel-logo img {
    height: 36px;
    width: auto;
}

.hm-sluit {
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    color: #333;
    cursor: pointer;
}

.hm-mobiel nav {
    padding: 8px 20px 28px;
}

.hm-mobiel-lijst,
.hm-mobiel-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hm-mobiel-lijst > li {
    border-bottom: 1px solid #eee;
}

.hm-mobiel-link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border: 0;
    background: none;
    text-align: left;
    font-family: 'Kadwa', 'Open Sans', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    color: #000;
    cursor: pointer;
}

.hm-mobiel-link:hover,
.hm-mobiel-link:focus {
    color: #e87d3e;
    text-decoration: none;
}

/* Focusrand alleen bij toetsenbord, niet na een tik. */
.hm-mobiel-link:focus:not(:focus-visible),
.hm-sluit:focus:not(:focus-visible),
.mainNav .hm .hm-open:focus:not(:focus-visible) {
    outline: none;
}

.hm-toggle .fa {
    font-size: 20px;
    transition: transform .2s ease-in-out;
}

.hm-toggle[aria-expanded="true"] .fa {
    transform: rotate(90deg);
}

.hm-mobiel-sub {
    padding: 0 0 12px 14px;
}

.hm-mobiel-sub a {
    display: block;
    padding: 8px 0;
    font-size: 16px;
    color: #333;
}

.hm-mobiel-sub a:hover,
.hm-mobiel-sub a:focus {
    color: #e87d3e;
    text-decoration: none;
}

.hm-mobiel-knop {
    display: block;
    margin-top: 24px;
    padding: 14px 20px;
    border-radius: 4px;
    background: rgb(47, 72, 92);
    color: #fff;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .5px;
}

.hm-mobiel-knop:hover,
.hm-mobiel-knop:focus {
    background: rgb(32, 50, 64);
    color: #fff;
    text-decoration: none;
}

.hm-mobiel-contact {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
}

.hm-mobiel-contact a {
    display: block;
    color: rgb(47, 72, 92);
}
