/* 
  Author: Connor Kippes

  CSS for the navigation bar.
*/

nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    z-index: 9998;
    width: 100%;
    min-height: 4.5rem;
    padding: 0rem 2rem;
    background-color: var(--accent-color);
    /* background-color: white; */
    opacity:95%;
}

#nav-website {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

#nav-website-logo {
    height: 2rem;
    width: 2rem;
}

#nav-website-title {
    font-weight: 550 !important;
    color: white !important;
    /* color: var(--text-color); */
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    color: white !important;
    /* color: var(--text-color); */
}

.nav-list li a:hover {
    text-decoration: underline;
}

/*----menu animation gotten from https://www.sliderrevolution.com/resources/css-hamburger-menu/ Author: Mikael Ainalem -----*/
.ham {
    display:none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 400ms;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.hamRotate.active {
    transform: rotate(45deg);
}
.hamRotate180.active {
    transform: rotate(180deg);
}
.line {
    fill:none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke:white;
    stroke-width:5.5;
    stroke-linecap:round;
}
.ham7 .top {
    stroke-dasharray: 40 82;
}
.ham7 .middle {
    stroke-dasharray: 40 111;
}
.ham7 .bottom {
     stroke-dasharray: 40 161;
}
.ham7.active .top {
     stroke-dasharray: 17 82;
      stroke-dashoffset: -62px;
}
.ham7.active .middle {
     stroke-dashoffset: 23px;
}
.ham7.active .bottom {
     stroke-dashoffset: -83px;
}
#nav-mobile-menu {
    display:none;
}

@media (max-width: 940px) {
    nav {
        padding: 0 1rem;
        opacity: 100%;
    }

    .ham {
        display: block;
    }

    /*--hide nav elements */
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--accent-color);
        flex-direction: row;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    #nav-mobile-menu {
        list-style: none;
        position: fixed;
        flex-direction: column;
        z-index:1000;
        top: 3.5rem;
        left: 0;
        width: 100%;
        background-color: var(--accent-color);
        gap: 1rem;
        padding: 1rem 2rem 4rem 2rem; /*t r d l */
        transition: all 0.3s ease;
    }
    #nav-mobile-menu li a{
        color: white !important;
    }
}
