.top-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    justify-content: center;

    background: white;
    color: #000;
    height: 50px;

    position: sticky;
    top: 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1em;
    z-index: 9999;
}

.top-nav a {
    color: black;
    text-decoration: none;
    padding: 1em 1rem;
    display: inline-block;
}

.top-nav ul a:hover {
    color: black;
    background-color: #eaf5c9;
}

.top-nav ul a.active {
    background-color: #66930d;
    color: #fff;
}

.top-nav .logo {
    display: none;
    position: absolute;
    left: 0;
}

.top-nav .logo img{
    height: 55px;
}
.top-nav .logo.visible {
    display: inherit;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 0;
    padding: 0;
    height: 100%;
    font-size: 15px;
}

.menu > li {
    margin: 0;
    overflow: hidden;
    height: 100%;
}

.menu-button-container {
    display: none;
    height: 100%;
    width: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 1rem;
}

#menu-toggle {
    display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
    display: block;
    background-color: #000;
    position: absolute;
    height: 4px;
    width: 30px;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.menu-button::before {
    content: "";
    margin-top: -8px;
}

.menu-button::after {
    content: "";
    margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
    margin-top: 0;
    transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
    background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
    margin-top: 0;
    transform: rotate(-405deg);
}

@media (max-width: 700px) {
    .top-nav {
        justify-content: flex-end !important;
    }

    .top-nav a {
        color: white;
        text-decoration: none;
        display: inherit;
        padding: unset;
    }

    .top-nav a:hover, .top-nav a.active {
        background-color: unset;
    }

    .menu-button-container {
        display: flex;
    }
    .menu {
        position: absolute;
        top: 0;
        margin-top: 50px;
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
        height: auto;
    }
    #menu-toggle ~ .menu li {
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }
    #menu-toggle:checked ~ .menu li {
        border: 1px solid #333;
        height: 2.5em;
        padding: 0.5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }
    .menu > li {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
        color: white;
        background-color: #222;
    }

    .menu > li:not(:last-child) {
        border-bottom: 1px solid #444;
    }

    .menu > li:has(a.active) {
        background-color: #66930d;
    }

    .menu > li:hover {
        background-color: #eaf5c9;
        color: black !important;
    }

    .menu > li:hover a {
        color: black !important;
    }

    .menu > li a {
        display: block;
        width: 100%;
        text-align: center;
        margin: -0.5em;
        padding: 0.5em 0;
    }
}
