.site-header {
    position: relative;
    border-bottom-width: 1px;
    border-bottom-color: var(--digi-silver);
    border-bottom-style: solid;
    z-index: 999;

    &.transparent {
        background-color: transparent;
        position: absolute;
        top: 0;
        width: 100%;
        border: 0;
    }

    ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1.25rem;
    min-height: 80px;
}

.site-branding {
    position: relative;
    z-index: 10;
    transition: all 300ms ease-in-out;

    &,
    a {
        display: flex;
        align-items: center;
    }
}

.digi-site-logo {
    position: relative;
    z-index: 20;
    margin-right: auto;
}

.digi-logo-img {
    width: 200px;
    transition: all 300ms ease-in-out;
}

.digi-header-nav {
    display: flex;

    li {
        display: flex;
        align-items: stretch;
        position: relative;
    }

    a {
        display: flex;
        align-items: center;
        position: relative;
        color: var(--digi-charcoal);
        font-size: 1rem;
        padding: 0 0.5rem;
        text-decoration: none;
        transition: all 300ms ease-in-out;

        &:hover {
            color: var(--digi-crimson);
        }
    }

    .current-menu-item a {
        color: var(--digi-crimson);
    }

    li.menu-item-has-children > a {
        gap: 0.5rem;
    }

    .menu-text {
        display: inline-flex;
    }

    .nav-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1rem;
        height: 1rem;
        cursor: pointer;
        transition: transform 300ms ease-in-out;

        svg {
            width: 0.8rem;
            height: 0.8rem;
            fill: currentColor;
        }
    }

    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff;
        width: 200px;
        visibility: hidden;
        opacity: 0;
        padding: 0.5rem;
        border-bottom-left-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
        box-shadow: 0 5px 5px 0 rgba(9, 5, 58, 0.1);
        transition: all 300ms ease-in-out;

        li {
            width: 100%;
        }

        a {
            justify-content: space-between;
            font-size: 0.9rem;
            font-weight: normal;
            color: rgba(0, 0, 0, 0.8);
            padding: 0.5rem;
            width: 100%;
            gap: 0.6rem;
            border-radius: 0.2rem;

            &:hover {
                background-color: rgba(255, 237, 237, 0.3);
                color: var(--digi-charcoal);
                opacity: 1;
            }
        }

        .current-menu-item a {
            background-color: rgba(255, 237, 237, 0.3);
            color: var(--digi-charcoal);
        }

        .sub-menu {
            top: 0;
            left: 100%;
        }
    }

    li:is(:hover, :active, :focus-within) > .sub-menu {
        visibility: visible;
        opacity: 1;
    }
}

.digi-nav-menu {
    display: flex;
    gap: 0.5rem;
}

/* Mobile Menu */
.digi-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 3rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: none;
}

.digi-menu-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 24px;
    height: 20px;
    cursor: pointer;
    z-index: 10;

    span {
        position: absolute;
        display: flex;
        height: 2px;
        width: 100%;
        background-color: var(--digi-charcoal);
        border-radius: 0.75rem;
        transition: all 300ms ease-in-out;

        &:nth-child(1),
        &:nth-child(2),
        &:nth-child(3) {
            left: 0;
        }

        &:nth-child(1) {
            top: 0;
        }

        &:nth-child(2) {
            top: 50%;
            transform: translateY(-50%);
        }

        &:nth-child(3) {
            bottom: 0;
            left: 0;
        }
    }
}

body.mopen .digi-menu-bars span {
    &:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    &:nth-child(2) {
        opacity: 0;
    }

    &:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

.digi-menu-toggle:hover span {
    background-color: var(--digi-charcoal);
}
