body {
    &.mobile-menu-open {
        overflow: hidden;
        #site-announcement,
        .large-image-page-banner,
        .wp-site-blocks main {
            filter: blur(5px);
        }

    }
}

:root {
    --hne-admin-bar-offset: 0px;
    --hne-fixed-header-height: 75px;
    --hne-sticky-header-offset: var(--hne-fixed-header-height);
}

body.admin-bar {
    --hne-admin-bar-offset: var(--wp-admin--admin-bar--height, 32px);
    --hne-sticky-header-offset: calc(var(--hne-admin-bar-offset) + var(--hne-fixed-header-height));
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        --hne-admin-bar-offset: var(--wp-admin--admin-bar--height, 46px);
    }
}

#site-header {
    display: flex;
    position: relative;
    justify-content: space-between;
    min-height: var(--hne-fixed-header-height, 75px);
    padding: 0;
    z-index: 1001;

    #logos-and-menu-content {
        position: fixed;
        top: var(--hne-admin-bar-offset, 0px);
        left: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 16px 32px;
        background-color: var(--wp--preset--color--white);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        @media only screen and (min-width: 1160px) {
            min-height: 110px;
        }
    }

    .logos-and-menu {
        display: flex;
        justify-content: space-between;
        column-gap: 12px;
        align-items: center;
        width: 100%;
        max-width: 1376px;
        margin-inline: auto;

        .logos {
            display: flex;
            align-items: center;
            img {
                @media only screen and (max-width: 999px) {
                    max-width: calc(100% - 40px);
                }
            }
        }
    }
    #primary-menu-open {
        background-image: url("data:image/svg+xml, %3Csvg%20width=%2232%22%20height=%2221%22%20viewBox=%220%200%2032%2021%22%20fill=%22none%22%20xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d=%22M31.6721%200H0V2.1324H31.6721V0Z%22%20fill=%22%23333333%22%2F%3E%0A%3Cpath%20d=%22M31.6721%209.27148H0V11.4039H31.6721V9.27148Z%22%20fill=%22%23333333%22%2F%3E%0A%3Cpath%20d=%22M31.6721%2018.814H0V20.9464H31.6721V18.814Z%22%20fill=%22%23333333%22%2F%3E%0A%3C%2Fsvg%3E%0A");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        display: block;
        width: 32px;
        height: 20px;
        @media only screen and (min-width: 1160px) {
            display: none;
        }

        &.close {
            background-image: url("data:image/svg+xml, %3Csvg%20width=%2220%22%20height=%2220%22%20viewBox=%220%200%2020%2020%22%20fill=%22none%22%20xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path=%22url(%23clip0_251_26190)%22%3E%0A%3Cpath%20d=%22M18.4151%200L10%208.41515L1.58485%200L0%201.58485L8.41515%2010L0%2018.4151L1.58485%2020L10%2011.5849L18.4151%2020L20%2018.4151L11.5849%2010L20%201.58485L18.4151%200Z%22%20fill=%22black%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id=%22clip0_251_26190%22%3E%0A%3Crect%20width=%2220%22%20height=%2220%22%20fill=%22white%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A");
            background-repeat: no-repeat;
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            z-index: 2000;
        }
    }

    #hne_menu_main {
        position: relative;
        min-width: 32px;
        .menu {
            display: none;
            font-size: var(--wp--preset--font-size--nav-button-text);
            font-weight: 700;
            text-transform: uppercase;
            margin-top: 0;
            margin-left: auto;
            padding-left: 0;
            padding-right: 24px;
            align-items: center;
            list-style-type: none;
            column-gap: 60px;

            @media only screen and (min-width: 1160px) {
                display: flex;
            }

            & > li:not(.button) {
                position: relative;
                a {
                    color: var(--wp--preset--color--gray-text);
                    text-decoration: none;
                    display: flex;
                    column-gap: 6px;
                    align-items: center;

                    &:after {
                        content: '';
                        min-width: 9px;
                        height: 9px;
                        background-image: url("data:image/svg+xml, %3Csvg%20xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width=%229%22%20height=%229%22%20viewBox=%220%200%209%209%22%20fill=%22none%22%3E%0A%20%20%3Cg%20clip-path=%22url(%23clip0_476_1154)%22%3E%0A%20%20%20%20%3Cpath%20d=%22M9%207.56765L7.57496%209V2.43815L1.00548%209L0.00159044%207.9888L6.56185%201.42536H0L1.42504%200H8.99968V7.56765H9Z%22%20fill=%22%23F15F22%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3CclipPath%20id=%22clip0_476_1154%22%3E%0A%20%20%20%20%20%20%3Crect%20width=%229%22%20height=%229%22%20fill=%22white%22%2F%3E%0A%20%20%20%20%3C%2FclipPath%3E%0A%20%20%3C%2Fdefs%3E%0A%3C%2Fsvg%3E");
                        background-repeat: no-repeat;
                        background-size: contain;
                        transition: transform 0.3s ease-in-out;
                    }

                    body.mobile-menu-open & {
                        &:after {
                            min-width: 15px;
                            height: 15px;
                        }
                    }

                    &:hover {
                        text-decoration: none;

                        &:after {
                            transform: rotate(90deg);
                        }
                    }
                }
                & > a {
                    @media only screen and (min-width: 1160px) {
                        padding-bottom: 12px;
                    }

                    .has-large-image-page-banner & {
                        color: var(--wp--preset--color--white);
                    }

                    body.mobile-menu-open & {
                        justify-content: space-between;
                        color: var(--wp--preset--color--gray-text);
                    }
                }
                &.hover {
                    a {
                        &:after {
                            transform: rotate(90deg);
                        }
                    }
                }
            }
            body.mobile-menu-open & {
                display: block;
                position: fixed;
                width: 100vw;
                height: calc(100vh - var(--hne-sticky-header-offset));
                top: var(--hne-sticky-header-offset);
                left: 0;
                background-color: var(--wp--preset--color--white);
                border-top: 1.5px solid var(--wp--preset--color--gray-text);
                z-index: 1000;
                overflow-y: auto;
                color: var(--wp--preset--color--gray-text);
                font-size: 22px;
                font-weight: 500;
                line-height: 145.455%;
                letter-spacing: 0.44px;
                filter: none !important;

                & > li {
                    padding: 22px 1rem;
                    border-bottom: 1.5px solid var(--wp--preset--color--gray-text);
                    &:last-of-type {
                        border-bottom: none;
                    }
                }
            }
        }

        .button {
            a {
                @media only screen and (min-width: 1160px) {
                    display: flex;
                }
                color: var(--wp--preset--color--gray-text);
                text-decoration: none;
                border-radius: 60px;
                border: 2px solid var(--wp--preset--color--haverhill-orange-bright);
                margin-top: -12px;
                white-space: nowrap;
                padding: 5px 40px;
                transition: all 0.3s ease-in-out;
                position: relative;
                overflow: hidden;
                z-index: 1;

                .has-large-image-page-banner & {
                    color: var(--wp--preset--color--white);
                }

                body.mobile-menu-open & {
                    display: block;
                    text-align: center;
                    color: var(--wp--preset--color--gray-text);
                }

                &:before {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    height: 0;
                    background-color: var(--wp--preset--color--haverhill-orange-bright);
                    transition: height 0.3s ease-in-out;
                    z-index: -1;
                }

                &:hover {
                    text-decoration: none;
                    color: var(--wp--preset--color--white);

                    &:before {
                        height: 100%;
                    }
                }
            }
        }
    }
    .sub-menu {
        display: none;
        list-style: none;
        position: absolute;
        top: 100%;
        background-color: var(--wp--preset--color--white);
        padding-left: 0;
        width: max-content;
        border: 1.5px solid var(--wp--preset--color--separator-gray);
        z-index: 2000;
        body.mobile-menu-open & {
            position: relative;
            top: unset;
            border: none;
            display: block;
            width: 100vw;
            margin: 16px -16px -16px -16px;

        }
        li {
            a {
                color: var(--wp--preset--color--gray-text) !important;
                padding: 15px;
                &:after {
                    display: none;
                }
                &:hover {
                    background-color: var(--wp--custom--announcement-bg-gray);
                }
            }
            body.mobile-menu-open & {
                border-top: 1.5px solid var(--wp--preset--color--separator-gray);
                a {
                    justify-content: flex-start;
                    &:before {
                        content: '—';
                    }
                }
            }
        }
    }
    .right {
        .sub-menu {
            right: 0;
        }
    }

    &.top-color {
        .large-image-page-banner {
            width: 100vw;
            position: relative;

            &:before {
                content: '';
                height: 41%;
                min-height: 200px;
                width: 100vw;
                display: block;
                position: absolute;
            }

            .title-wrapper {
                position: absolute;
                top: 150px;
                left: 50%;
                width: 1376px;
                max-width: calc(100% - 64px);
                transform: translate(-50%, -50%);
                font-weight: 700;
                @media only screen and (min-width: 768px) {
                    top: 30%;
                }
            }
        }
        &.blue {
            color: var(--wp--preset--color--white);
            .large-image-page-banner {
                &:before {
                    background-color: var(--wp--preset--color--haverhill-blue);
                }
            }
            #logos-and-menu-content {
                background-color: var(--wp--preset--color--haverhill-blue);
                .logos-and-menu {
                    background-color: var(--wp--preset--color--haverhill-blue);
                }
            }
        }
        &.green {
            color: var(--wp--preset--color--white);
            .large-image-page-banner {
                &:before {
                    background-color: var(--wp--preset--color--haverhill-green);
                }
            }
            #logos-and-menu-content {
                background-color: var(--wp--preset--color--haverhill-green);
                .logos-and-menu {
                    background-color: var(--wp--preset--color--haverhill-green);
                }
            }
        }
        &.orange {
            color: var(--wp--preset--color--white);
            .large-image-page-banner {
                &:before {
                    background-color: var(--wp--preset--color--haverhill-orange);
                }
            }
            #logos-and-menu-content {
                background-color: var(--wp--preset--color--haverhill-orange);
                .logos-and-menu {
                    background-color: var(--wp--preset--color--haverhill-orange);
                }
            }
        }
    }
}

body.single-post #site-header #logos-and-menu-content {
    background-color: var(--wp--custom--announcement-bg-gray);
    box-shadow: none;
}
