.header{
    position: fixed;
    display: flex;
    z-index: 99;
    top: 0;

    justify-content: space-between;
    align-items: center;

    padding: 1.1em 7em;
    width: 100%;

    background-color: #fff;
    font-size: 1.125rem;
}

.logo{
    font-family: 'Julius Sans One', sans-serif;
    text-decoration: none;
    color: #1a1919;
    font-weight: bold;
    font-size: 1.4rem;

    display: inline;
}

.logo:hover{
    color: var(--purple-dark);
    transition: ease .4s;
}

#hamburger{
    display: none;
    width: 1.5625rem;
    height: 1.5625rem;
}

.btn-hamburger{
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;

    background: none;
    cursor: pointer;
}

.line{
    display: block;

    width: 100%;
    height: 0.125rem;
    margin: 0.3125rem auto;

    background-color: black;
    border-radius: 0.3125rem;

    animation-duration: 0.45s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.btn-hamburger.open .top{
    animation-name: top-line-animation;
}

.btn-hamburger.open .mid{
    animation-name: mid-line-animation;
}

.btn-hamburger.open .bottom{
    animation-name: bottom-line-animation;
}

.top{
    animation-name: top-line-animation-close;
}

.mid{
    animation-name: mid-line-animation-close;
}

.bottom{
    animation-name: bottom-line-animation-close;
}

.nav-bar{
    display: flex;
}

.nav-bar__ul-li {
    display: inline-block;
    padding: 0 2em;
}

.nav-bar__ul-li-a{
    text-decoration: none;
    color: #1a1919;
    font-family: 'PT Sans', sans-serif;
}
.nav-bar__ul-li-a:hover{
    color: var(--purple-dark);
}

.switch{
    position: relative;
    display: flex;
    width: 1.875rem;
    height: 0.9375rem;

    margin: auto;

    background-color: #2f2e41;
    line-height: 1.875rem;
    outline: none;

    border-radius: 62.5rem;
    border: none;

    cursor: pointer;
}

.icon-switch{
    display: block;

    background: none;
    font-size: 1rem;
    color: #f8f8f8;
}

.switch::after{
    position: absolute;
    content: "";

    width: 1.0313rem;
    height: 1.0313rem;
    top: 0;
    left: 0;

    box-shadow: 0 0 0.125rem 0.125rem rgba(0, 0, 0, .2);
    background-color: #f1f1f1;
    border-radius: 50%;

    right: unset;
}

.activeSection {
    color: var(--purple-dark) !important;
}

.activeSection:hover{
    color: #4c46bb !important;
}

.active{
    background-color: var(--purple-dark);
}

.active::after{
    right:0;
    left: unset;
}

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

    .header{
        padding: 1.1em 1.2em;
    }

    #hamburger{
        display: inline-block;
    }

    .btn-hamburger:hover > .line{
        background-color: var(--purple-dark);
        transition: background-color .2s ease-in;
    }

    .nav-bar{
        flex-direction: column;
        position: fixed;
        top: 4.0371rem;
        left: 100%;

        width: 100%;
        height: calc(100vh - 4.0371rem);

        background-color: #fff;
        overflow-y: auto;

        transition: left 0.3s;
        text-align: center;
    }

    .nav-bar__ul-li{
        display: block;
        padding: 1.6em 0;
    }

    .open{
        left: 0;
    }

    .switch{
        margin: 2em auto;
        width: 2.5rem;
        height: 1.25rem;
    }

    .icon-switch{
        font-size: 1.25rem;
    }

    .switch::after{
        width: 1.25rem;
        height: 1.25rem;
    }

}

/* Animations */

@keyframes top-line-animation {

    50%, 100% {
        margin: auto 0;
        transform: translateY(0.125rem) rotate(-45deg);
    }

}

@keyframes bottom-line-animation {

    50%, 100% {
        margin: auto 0;
        transform: translateY(-0.125rem) rotate(45deg);
    }

}

@keyframes mid-line-animation {

    0%, 25% {
        width: 75%;
    }

    50%, 100% {
        margin: 0 auto;
        width: 0;
        opacity: 0;
    }

}

@keyframes top-line-animation-close {

   0% {
       margin: 0 auto;
       transform: translateY(2px) rotate(-45deg);
   }

   50%, 100% {
       margin: 0.3125rem auto;
       transform: translateY(0) rotate(0);
   }

}

@keyframes mid-line-animation-close {

    0% {
        margin: 0 auto;
        width: 0;
        opacity: 0;

    }

    20%, 100% {
        margin: 0 auto;
        width: 100%;
        opacity: 1;

    }

 }

 @keyframes bottom-line-animation-close {

    0% {
        margin: 0 auto;
        transform: translateY(-2px) rotate(45deg);
    }


    50%, 100% {
        margin: 0.3125rem auto;
        transform: translateY(0) rotate(0);
    }

}
