﻿

.mega-menu {
    font-family: var(--font-sans);
}
.menu-wrapper {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    margin-left: auto;
}

.menu-container {
    position: relative;
}

.hamburger {
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

    .hamburger div {
        background: #333;
        height: 4px;
        margin: 5px 0;
        border-radius: 2px;
        right: 0;
        transition: transform .3s ease,opacity .3s ease;
        transform-origin: center;
    }

.hamburger--active div:nth-child(1) {
    transform: rotate(45deg) translate(7.5px,5px);
}

.hamburger--active div:nth-child(2) {
    opacity: 0;
}

.hamburger--active div:nth-child(3) {
    transform: rotate(-45deg) translate(7.5px,-5px);
}

/* ===========
   MEGA MENU
   =========== */
.mega-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    padding: 2rem;
    z-index: 101;
    max-height:calc(100vh - 65px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border: 0;
    box-shadow: 0 3px 13px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .18s ease,transform .18s ease,visibility 0s linear .18s;
    will-change: opacity,transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.menu-container.show-menu .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .18s ease,transform .18s ease,visibility 0s;
}

@media (min-width:1025px) {    
    .menu-wrapper:focus-within .mega-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: opacity .18s ease,transform .18s ease,visibility 0s;
    }

    .hover-bridge {
        pointer-events: none;
        height: 0;
    }
}

.hover-bridge {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 999;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 2rem;
    max-width: 1200px;
    min-height:246px;
    margin: 0 auto;
    text-align: left;
}

    .mega-grid h4 {
        margin: 0 0 .45rem;
        padding-bottom: .45rem;
        border-bottom: 1px solid #333;
        letter-spacing: .8px;
    }

    .mega-grid a {
        display: block;
        margin: .3rem 0;
        color: #006dcc;
        text-decoration: underline;
    }

        .mega-grid a:hover {
            text-decoration: underline;
        }

@media (max-width:1024px) {
    .mega-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media (max-width:768px) {
    .mega-grid h4 {
        margin: 0;
        padding-bottom: .45rem;
        border-bottom: .5px solid #ccc;
    }
}

@media (max-width:600px) {
    .mega-grid {
        grid-template-columns: 1fr;
    }
}

.mega-menu::-webkit-scrollbar {
    width: 6px;
}

.mega-menu::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.2);
    border-radius: 4px;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    display: none;
}

body.menu-open .menu-overlay {
    display: block;
}

body.menu-open {
    overflow: hidden;
    position: static;
}

.heading-4 {
    font-size: 1rem;
    margin: 0 0 .25rem 0;
    font-weight: 700;
    color: #006dcc;
    text-decoration: auto;
}

    .heading-4 a {
        text-decoration: auto;
        cursor:pointer;
    }

    body.menu-open .menu-overlay {
        display: block;
    }



/* iPhone Pro / modern mobile widths */
@media (max-width: 430px) {
    .mega-menu {
        max-height: calc(100vh - 150px);
    }
}





