/*Navbar*/

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 57px;
    white-space: nowrap;
    z-index: 1000;
    background-color: rgba(250, 250, 250, 0.2);
    backdrop-filter: saturate(200%) blur(10px);
    display: flex;
    justify-content: flex-end;
    padding: 1rem 2rem;
    padding-inline: 32px;
}

.nav-list {
    flex-wrap: nowrap;
    list-style: none;
    display: flex;
    gap: 1.2rem;
}


.nav-list > li.current-menu-item a {
    position: relative;
    padding-bottom: 5px;
    width: 100%;
}

.nav-list > li.current-menu-item a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--koraal);
    border-radius: 10px;
}

.nav-list .item a {
    text-decoration: none;
    color: white;
    transition: color 0.5s ease, box-shadow 0.5s ease;
    padding: 5px;
    border-radius: 50px;
}

.nav-list > li a:hover:not(.active) {
    box-shadow: inset 200px 0 0 0 var(--rem-teal);
    color: white;
    transition: ease 0.5s;
    border-radius: 50px;
}

.nav-list > li.active a:hover {
    text-shadow: none;
    box-shadow: none;
}


/*hambo*/
#hambo-toggle {
    display: none;
}

.hambo-container {
    z-index: 10;
    margin: 10px -10px 0 0;
    display: none;
    height: 100%;
    width: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

.hambo::before {
    content: '';
    margin-top: -8px;
}

.hambo::after {
    content: '';
    margin-top: 8px;
}

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

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

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

@media (max-width: 760px) {

    .hambo-container {
        margin-top: 0;
        display: flex;
        height: 100%;
        width: 30px;
        cursor: pointer;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 10;
    }

    .hambo,
    .hambo::before,
    .hambo::after {
        background-color: white;
    }

    #hambo-toggle:checked + .hambo-container .hambo::before,
    #hambo-toggle:checked + .hambo-container .hambo::after {
        background-color: var(--rem-teal);
    }

    .nav-list {
        position: absolute;
        top: 0;
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: flex-end;
        align-items: flex-start;
        gap: 0;
        background-color: rgba(250, 250, 250, 0.8);
        backdrop-filter: saturate(200%) blur(10px);
        padding: 0;
    }

    #hambo-toggle:checked ~ .nav-list {
        padding: 35px;
    }

    #hambo-toggle ~ .nav-list li {
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #hambo-toggle ~ .nav-list li a {
        opacity: 0;
    }

    #hambo-toggle:checked ~ .nav-list li {
        font-size: 1.3rem;
        height: 3.5em;
        padding: 0.5em 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #hambo-toggle:checked ~ .nav-list li a {
        opacity: 1;
    }

    .nav-list > li {
        display: flex;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
    }

    .nav-list .item a {
        color: var(--rem-teal);
    }

    .nav-list > li.active a,
    .nav-list > li.active a:hover {
        color: var(--rem-teal);
        text-shadow: none;
        box-shadow: none;
    }

    .nav-list > li:not(.active) a:hover {
        box-shadow: none;
        color: var(--rem-teal) !important;
    }


    .nav-list > li.current-menu-item.active a {
        padding: 6px;
    }


}

/* Over light sections */
.navbar.nav-light .nav-list .item a {
    color: var(--rem-teal);
}

/* Hover on light sections - desktop */
.navbar.nav-light .nav-list > li:not(.active) > a:hover {
    color: var(--cream);
    box-shadow: inset 200px 0 0 0 var(--rem-teal);
}

/* Active page on light sections */
.navbar.nav-light .nav-list > li.active > a {
    color: var(--rem-teal);
    box-shadow: none;
}

/* Hamburger follows the light/dark theme too */
.hambo,
.hambo::before,
.hambo::after {
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1), background-color 0.5s ease;
}

.navbar.nav-light .hambo,
.navbar.nav-light .hambo::before,
.navbar.nav-light .hambo::after {
    background-color: var(--rem-teal);
}

/* Mobile dropdown: always teal text on the light panel */
@media (max-width: 760px) {
    .navbar #hambo-toggle ~ .nav-list .item a {
        color: var(--rem-teal);
    }

    .navbar #hambo-toggle ~ .nav-list > li:not(.active) a:hover {
        color: var(--cream);
    }
}

@media (max-width: 1050px) {
    .navbar #hambo-toggle:checked ~ .nav-list a {
        color: var(--rem-teal);
    }

    .navbar #hambo-toggle:checked ~ .nav-list a:hover,
    .navbar #hambo-toggle:checked ~ .nav-list a:focus-visible {
        color: var(--rem-teal-mid);
    }
}

/* Desktop navbar */
@media (min-width: 761px) {
    .nav-list > li.current-menu-item > a::after {
        transform-origin: left;
        transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    }

    .navbar.nav-over-hero .nav-list > li:not(.active) > a:hover {
        box-shadow: none;
        color: white;
        opacity: 0.75;
    }
}