header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid black;
    padding: 0 0 0 3rem;
    z-index: 9;
    position: sticky;
    top: 0;
    background-color: white;
}

header img {
    width: 14rem;
    height: auto;
    position: relative;
    top: calc(100% - 7rem);
}

.menu-header-container {
    height: 100%;
}

#menu-header {
    display: flex;
    align-items: center;
    height: 100%;
}

#menu-header > li {
    height: 100%;
}

#menu-header > li > a {
    display: flex;
    height: 100%;
    padding: 0 2rem;
    align-items: center;
}

#menu-header > li:not(.menu-item-has-children) > a {
    text-decoration: none;
}

#menu-header > li:first-child > a {
    border-left: 2px solid black;
}

#menu-header > li:not(:last-child) > a {
    border-right: 2px solid black;
}

header ul {
    list-style: none;
}

header .sub-menu {
    background: #B25032;
    position: absolute;
    top: 7rem;
    width: -moz-available;
    width: -webkit-fill-available;
    width: fill-available;
    line-height: 1rem;
    display: grid;
    grid-template-rows: 0fr;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);;
    padding: 0;
}

header .sub-menu li {
    padding: 1rem;
    margin-top: 1rem;
}

header .sub-menu li:not(:last-child) {
    border-bottom: 2px solid white;
}

header nav:not(.post-navigation) .sub-menu a {
    display: inline-block;
    color: white;
    margin-bottom: 0.5rem;
    transition: color 0.1s ease;
}

header .sub-container {
    overflow: hidden;
}

nav:not(.post-navigation) a {
    color: black;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    transition: color 0s 0.1s linear;
}

#menu-header > li > a::before {
    content: '';
    display: block;
    height: 0rem;
    width: 100%;
    background: #B25032;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);;
    z-index: -1;
}

#menu-header > li:hover > a {
    color: white;
}

#menu-header > li:hover .sub-menu {
    grid-template-rows: 1fr;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);;
}

#menu-header > li:hover > a::before {
    height: 7rem;
}

#menu-header > li:hover > a::after {
    transform: rotate(180deg) translateY(2px);
}

#menu-header > li.menu-item-has-children > a::after {
    content: '▼';
    margin-left: 0.5rem;
    font-size: 1rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-expand {
    display: none;
}

@media screen and (max-width: 1000px) {
    .menu-header-container {
        display: none;
    }

    .mobile-expand {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        padding: 1.25rem;
        position: absolute;
        height: min-content;
        top: 1rem;
        right: 1rem;
        margin-top: 0.5rem;
        z-index: 3;
    }

    .mobile-expand .bar {
        height: 0.25rem;
        width: 1rem;
        background-color: black;
    }

    .mobile-expand:hover .bar {
        background-color: #f4b54b;
    }

    header {
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        height: 7rem;
        padding: 0 0 0 1rem;
    }

    header.expanded {
        height: 100vh;
        background-color: #B25032;
    }

    header.expanded img {
        transition: filter 0.4s ease;
    }

    header.expanded img {
        filter: brightness(99);
    }

    header.expanded .menu-header-container {
        display: unset;
    }

    header.expanded #menu-header {
        flex-direction: column;
    }

    header.expanded #menu-header > li {
        display: flex;
        flex-direction: column;
        justify-content: center;
        line-height: 2rem;
    }

    header.expanded #menu-header > li > a {
        height: fit-content;
        border: none;
        padding: 0;
    }

    header .sub-menu {
        background-color: transparent;
        position: unset;
    }

    header .sub-container {
        overflow: unset;
    }

    #menu-header > li > a {
        display: unset;
        color: white;
    }

    #menu-header > li a[href] {
        text-decoration: underline;
    }

    #menu-header {
        border-left: 2px solid white;
        padding-left: 0px;
        align-items: unset;
        margin-left: 2rem;
    }

    header.expanded .sub-menu li {
        padding: 0;
        line-height: 2rem;
        margin-bottom: 1rem;
    }

    header .menu-item-has-children > a {
        left: -15rem;
        margin-bottom: -3rem;
    }

    header #menu-header > .menu-item {
        padding-left: 2rem;
        margin-top: 1rem;
    }

    header #menu-header > .menu-item:first-child {
        margin-top: 4rem;
    }
    
    header #menu-header > .menu-item:not(:last-child) {
        border-bottom: 2px solid white;
    }

    header .sub-menu li:not(:last-child) {
        border: none;
    }
}