.topnav {
    position: fixed;
    display: flex;
    align-items: center;
    z-index: 5;
}
.topnav img {
    height: auto;
    cursor: pointer;

    -webkit-transition: all 0.4s ease-in-out;
    -moz-transition: all 0.4s ease-in-out;
    -o-transition: all 0.4s ease-in-out;
    -ms-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
}

.topnav img:hover {
    filter: brightness(120%);
}

.topnav a {
    position: relative;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
    color: rgb(160,160,160);

    -webkit-transition: color 0.4s ease-in-out;
    -moz-transition: color 0.4s ease-in-out;
    -o-transition: color 0.4s ease-in-out;
    -ms-transition: color 0.4s ease-in-out;
    transition: color 0.4s ease-in-out;
}

.topnav a::after {
    position: absolute;
    content: "";
    left: 50%;
    top: 120%;
    width: 0;
    border-bottom: 3px solid var(--themePink);

    -webkit-transition: left 0.4s ease-in-out, width 0.4s ease-in-out;
    -moz-transition: left 0.4s ease-in-out, width 0.4s ease-in-out;
    -o-transition: left 0.4s ease-in-out, width 0.4s ease-in-out;
    -ms-transition: left 0.4s ease-in-out, width 0.4s ease-in-out;
    transition: left 0.4s ease-in-out, width 0.4s ease-in-out;
}

.topnav a:hover::after,
.topnav a.underlined::after {
    width: 100%;
    left: 0;
}

.topnav a:hover {
    color: rgb(180,180,180);
}

.topnav.light a{
    color: white;
}

.topnav.dark a {
    color: rgb(0,0,0);
}

.topnav.light a:hover {
    color: rgb(160,160,160);
}

.topnav.dark a:hover {
    color: rgb(140,140,140);
}

.bottomnav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    box-shadow: 0 -4px 8px 0 rgba(0,0,0,0.3);
}

.bottomnav.sticky {
    position: fixed;
    z-index: 98;
}

.bottomnav .left {
    margin-right: auto;
    display: flex;
    align-items: center;
}

.bottomnav .left .button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--themePink);
    cursor: pointer;

    background-color: transparent;

    -webkit-transition: background-color 0.4s ease-in-out;
    -moz-transition: background-color 0.4s ease-in-out;
    -o-transition: background-color 0.4s ease-in-out;
    -ms-transition: background-color 0.4s ease-in-out;
    transition: background-color 0.4s ease-in-out;
}

.bottomnav .left .button h1 {
    color: var(--themeGrey);
    font-weight: 550;

    -webkit-transition: color 0.4s ease-in-out;
    -moz-transition: color 0.4s ease-in-out;
    -o-transition: color 0.4s ease-in-out;
    -ms-transition: color 0.4s ease-in-out;
    transition: color 0.4s ease-in-out;
}

.bottomnav .left .button:hover,
.bottomnav .left .button.highlighted{
    background-color: var(--themePink);
}

.bottomnav .left .button:hover h1,
.bottomnav .left .button.highlighted h1{
    color: white;
}

.bottomnav .right {
    display: flex;
    align-items: center;
}

.bottomnav .right a {
    color: var(--themeGrey);
    position: relative;

    -webkit-transition: color 0.4s;
    -moz-transition: color 0.4s;
    -o-transition: color 0.4s;
    -ms-transition: color 0.4s;
    transition: color 0.4s;
}

.bottomnav .right a:hover {
    color: var(--themeLtGrey);
}

.bottomnav .right a:last-child {
    text-decoration: underline;
}

@media screen and (min-width: 860px) {

    .topnav {
        top: 4vh;
        left: 4vw;
    }

    .navWrapper .topnav {
        position: static;
    }

    .topnav img {
        width: 3.2vw;
        margin-right: 1.2vw;
    }

    .topnav img:hover {
        width: 3.7vw;
        margin-left: -0.25vw;
        margin-right: 0.95vw;
        margin-top: -0.25vw;
        margin-bottom: -0.25vw;
    }

    .topnav a {
        font-size: 0.85vw;
        margin: 0 0.8vw 0 0.8vw;
        letter-spacing: 0.075vw;
    }

    .navWrapper.block {
        width: 100%;
        left: 0;
        top: 0;
        position: fixed;
        height: 10vh;
        background-color: white;
        display: flex;
        align-items: center;
        padding-left: 4vw;
        z-index: 98;
        box-shadow: 0 4px 8px 0 rgba(0,0,0,0.3);
    }

    .bottomnav {
        padding: 0 4vw 3vh 4vw;
        height: 10vh;
        min-height: 72px;
        box-sizing: border-box;
        width: 100%;
    }

    .bottomnav.sticky {
        bottom: 0;
    }

    .bottomnav .left .button {
        width: 6.2vw;
        height: 3vh;
        margin: 0 0.15vw 0 0.15vw;
    }

    .bottomnav .left .button h1 {
        font-size: 0.8vw;
        letter-spacing: 1px;
    }

    .bottomnav .right a {
        font-size: 0.92vw;
        margin: 0 0.6vw 0 0.6vw;
        letter-spacing: 0.075vw;
    }

    .bottomnav .right a:last-child {
        margin-left: 1.5vw;
    }

    .bottomnav .right a::after {
        content: "";
        position: absolute;
        width: 6px;
        top: calc(50% - 1.5px);
        left: calc(100% + 0.3vw + 2px);
        border-bottom: 2px solid var(--themeGrey);
    }

    .bottomnav .right a:nth-child(n+4)::after {
        display: none;
    }

}

@media screen and (max-width: 859px) {

    .navWrapper.mobile {
        width: 100%;
        height: 11vh;
        background-color: white;
        z-index: 10;
        position: fixed;
        left: 0;
        top: 0;
        box-shadow: 0 4px 8px 0 rgba(0,0,0,0.3);
    }

    .topnav {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0;
        pointer-events: none;
        z-index: 10;
        background-color: rgba(0,0,0,0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        box-sizing: border-box;
        padding-bottom: 2vh;

        -webkit-transition: background-color 0.6s, opacity 0.6s;
        -moz-transition: background-color 0.6s, opacity 0.6s;
        -o-transition: background-color 0.6s, opacity 0.6s;
        -ms-transition: background-color 0.6s, opacity 0.6s;
        transition: background-color 0.6s, opacity 0.6s;
    }

    .topnav.open {
        opacity: 1;
        pointer-events: all;
    }

    .topnav img {
        display: none;
    }

    .topnav a {
        width: auto;
        display: block;
        font-size: 4vw;
        font-weight: 400;
        letter-spacing: 1.8vw;
        margin: 1.2vh 0 1.2vh 0;
        padding-left: 1.5vw;
        color: white;
        text-align: center;
    }

    .topnav a:after {
        border-bottom-width: 2px;
    }

    .topnav a:nth-child(2) {
        margin-top: -5vh;
    }

    .mainLogo {
        position: fixed;
        left: 4.3vw;
        top: 2.3vh;
        width: 52px;
        height: auto;
        cursor: pointer;
        z-index: 15;

        -webkit-transition: opacity 0.6s ease-in-out;
        -moz-transition: opacity 0.6s ease-in-out;
        -o-transition: opacity 0.6s ease-in-out;
        -ms-transition: opacity 0.6s ease-in-out;
        transition: opacity 0.6s ease-in-out;
    }

    .mainLogo.light {
        opacity: 0.5;
    }

    .navButton {
        position: fixed;
        height: 36px;
        width: 36px;
        background-color: transparent;
        cursor: pointer;
        right: 5vw;
        top: 3vh;
        z-index: 11;
    }
    
    .navButton .navLine {
        position: absolute;
        height: 2px;
        background-color: rgb(0,0,0);
        border-radius: 4px;
    
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
        -o-transition: all 0.5s;
        -ms-transition: all 0.5s;
        transition: all 0.5s;
    }
    
    .navButton:hover .navLine{
        background-color: rgb(120,120,120);
    }

    .navButton.light .navLine {
        background-color: white;
    }
    
    .navButton.open .navLine {
        background-color: white;
    }
    
    .navButton .navLine:first-child {
        top: 25%;
        width: 50%;
        left: 50%;
    }
    
    .navButton .navLine:nth-child(2) {
        top: calc(50% - 1px);
        width: 100%;
        left: 0;
    }
    
    .navButton .navLine:last-child {
        top: calc(75% - 2px);
        width: 25%;
        left: 75%;
    }
    
    .navButton.open .navLine:first-child {
        top: 50%;
        width: 100%;
        left: 0;
    
        transform: rotate(45deg);
    }
    
    .navButton.open .navLine:nth-child(2) {
        opacity: 0;
        width: 0;
        left: 100%;
    }
    
    .navButton.open .navLine:last-child {
        left: 0;
        width: 100%;
        top: 50%;
    
        transform: rotate(-45deg);
    }

    .bottomnav {
        margin-top: 0;
        width: 100%;
        height: 13vh;
        flex-direction: column;
        justify-content: center;
        padding-bottom: 1vh;
    }

    .bottomnav.sticky {
        bottom: 0;
    }
    
    .bottomnav .left {
        width: 100%;
        justify-content: center;
    }

    .bottomnav .left .button {
        width: 20vw;
        height: 3.2vh;
        margin: 0 0.5vw 0 0.5vw;
    }

    .bottomnav .left .button h1 {
        font-size: 2.7vw;
        letter-spacing: 1px;
    }

    .bottomnav .right {
        margin-top: 6px;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        align-content: center;
    }

    .bottomnav .right a {
        font-size: 2.8vw;
        margin: 0 3vw 0.7vh 3vw;
    }

    .bottomnav .right a::after {
        content: "";
        position: absolute;
        width: 6px;
        top: calc(50% - 1.5px);
        left: calc(100% + 2vw);
        border-bottom: 2px solid var(--themeGrey);
    }

    .bottomnav .right a:nth-child(n+4)::after {
        display: none;
    }

    .bottomnav .right a:last-child {
        margin-top: 0.2vh;
    }

    @media screen and (max-height: 480px) {
        .bottomnav {
            display: none;
        }

        .navWrapper {
            display: none;
        }
    }
}