/* Navigation bar: Creation */
nav {
    background-color: rgb(138, 116, 139);
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
}

/*  
    ul (.navbar) is an unordered list
    li are the list items in the unordered list
    a are anchor tags (creates hyperlinks)
*/

/* Navigation bar: Display and alignment */
.navbar {
    overflow: hidden;
    list-style-type: none;
    display: flex;
    margin: 0px;
}

.navbar li {
    padding-right: 2em;
}

/* Navigation bar: Text/URLs*/
.navbar li a {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 24px;
    color: white;
    display: flex;
    padding: 0px;
    text-decoration: none;
    height: 100%;
    align-items: center;
}

/* Navigation bar: Hovering changes text color*/
.navbar li a:hover {
    color: black
}

/* Logo (flamingo picture) */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    padding-left: 0.5em;
}

.logo img {
    height: 80px;
    width: auto;
    display: block;
}

/* Hamburger menu button - hidden by default */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1em;
}

/* hamburger button: */
.hamburger span {
    width: 28px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.4s;
    display: block;
}

/* Hamburger animation when activated */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Mobile styles */
@media screen and (max-width: 800px) {
    nav {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .hamburger {
        display: flex;
        order: 2;
    }
    
    .logo {
        order: 1;
    }

    /* the list of links in the navbar */
    .navbar {
        order: 3;
        width: 100%;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
    
    .navbar li {
        width: 100%;
        text-align: center;
    }
    
    .navbar li a {
        width: 100%;
        font-size: 20px;;
        padding: 0.5em;
        padding-left: 0;
        margin: 0;
        justify-content: center;
        box-sizing: border-box;
    }

    /* when the hamburger menu is activ/open:  */
    .navbar.active {
        max-height: 500px;
        margin-bottom: 0.5em;
    }
}