/* NAVBAR */
#navbar{
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: var(--clr-1);
    box-shadow: var(--box-shadow-2);

    display: flex;
    justify-content: center;
    align-items: center;
}

#navbar-container{
    height: 100%;
    justify-content: space-between;
}

/* LOGO */
#logo{
    max-width: 40px;
    min-width: 40px;
    height: 48px;

    display: flex;
    justify-content: center;
    align-items: center;
}

#logo-svg{
    width: 100%;
    height: 100%;
}

/* MENU */
#menu-block{
    width: 100%;
    height: 100%;
    transition: transform .2s ease, visibility .2s ease;

    display: flex;
    justify-content: center;
    align-items: center;
}

#menu{
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-list{
    position: relative;
    width: fit-content;
    height: fit-content;
    margin: 0 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}
.menu-list:first-child{margin-left: 0;}
.menu-list:last-child{margin-right: 0;}

.menu-link{
    padding: 5px 10px;
    color: var(--clr-3);
    font-weight: 500;
    transition: color .2s ease;

    display: flex;
    justify-content: center;
    align-items: center;
}
@media (hover: hover) and (pointer: fine) {
    .menu-link:hover{
        color: var(--clr-4);
    }
}


.menu-link::after{
    content: '';
    position: absolute;
    top: calc(100% - 2px);
    left: 10px;
    background-color: var(--clr-3);
    width: 0;
    height: 2px;
    transition: width .2s ease, background-color .2s ease;
}
.menu-link.current{
    color: var(--clr-4);
}
.menu-link.current::after{
    width: calc(50% - 10px);
    background-color: var(--clr-4);
}
@media (hover: hover) and (pointer: fine) {
    .menu-link:hover::after{
        width: calc(50% - 10px);
        background-color: var(--clr-4);
    }
}

/* MENU ICON */
#menu-icon-block{
    display: none;
    transform: scale(0.7);
}

#menu-icon{
    display:flex;
    flex-direction:column;
    width:70px;
    cursor:pointer;
}

.menu-icon-element{
    background: var(--clr-3);
    border-radius: 10px;
    height: 7px;
    margin: 7px 0;
    transition: .2s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}


.menu-icon-element:nth-of-type(1){
    width:50%;
}

.menu-icon-element:nth-of-type(2){
    width:100%;
}

.menu-icon-element:nth-of-type(3){
    width:75%;
}

#menu-icon-check[type="checkbox"]{
    display:none;
}

#menu-icon-check[type="checkbox"]:checked ~ .menu-icon-element:nth-of-type(1){
    transform-origin:bottom;
    transform:rotatez(45deg) translate(8px,0px)
}

#menu-icon-check[type="checkbox"]:checked ~ .menu-icon-element:nth-of-type(2){
    transform-origin:top;
    transform:rotatez(-45deg)
}

#menu-icon-check[type="checkbox"]:checked ~ .menu-icon-element:nth-of-type(3){
    transform-origin:bottom;
    width:50%;
    transform: translate(30px,-11px) rotatez(45deg);
}
   











/* MEDIA */
@media screen and (max-width: 1200px) {
    #menu-block{
        width: fit-content;
    }
}

@media screen and (max-width: 767px) {
    #menu-block{
        position: absolute;
        visibility: hidden;
        right: 0;
        top: 100%;
        width: 400px;
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
        height: calc(100vh - var(--navbar-height));
        overflow-x: hidden;
        overflow-y: auto;
        background-color: var(--clr-1);
        box-shadow: rgba(0, 0, 0, 0.24) 0px 10px 8px;
    

        justify-content: flex-start;
        align-items: flex-start;
    }
    #menu-block.slideInRight{
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);  
        visibility: visible;

    }

    #menu{
        flex-direction: column;
        align-items: flex-start;
        height: fit-content;
        padding-top: 50px;
        padding-bottom: 150px;
        padding-left: calc(var(--side-gap));
        padding-right: calc(var(--side-gap));

    }

    .menu-list{
        width: 100%;
        margin: 25px 0;
    }

    .menu-link{
        width: 100%;
        justify-content: flex-start;
        font-size: calc(var(--font-size) * 1.2);
        padding-left: 0;
        padding-right: 0;
    }
    .menu-link::after{
        left: 0;
    }
    @media (hover: hover) and (pointer: fine) {
        .menu-link:hover::after{
            width: 100%;
        }
    }
    
    .menu-link.current::after{
        width: 100%;
    }

    #menu-icon-block{
        display: flex;
    }
}

@media screen and (max-width: 500px) {
    #menu-block{
        width: 100%;
    }

    #menu{
        padding-left: calc(var(--side-gap));
    }
}