/* Module for styling the global nav bar on desktop
   and mobile. */

/* Variables available for use (globals.css will be loaded beforehand):
   --brand-main (and transparent)
   --brand-second (and transparent)
   --brand-third (and transparent)
   --border-rad
   --Alverata
   --mobile-width
*/

/* Entire navbar behavior is contained in the #nav div. */
#nav {
    /* Keep it at the top of the screen. */
    position: fixed;
    top: 0px;
    left: 0px;

    /* Stretch across the screen with even spacing between items on
       either side of the logo. */
    display: flex;
    flex-direction: row;
    width: 100vw;
    justify-content: space-around;
    place-self: center stretch;
    z-index: 65;

    /* Fonts and colors */
    font-family: var(--Alverata);
    background: #f9f7eaaa;
    -webkit-backdrop-filter: blur(13px);
    backdrop-filter: blur(13px);

    /* Shadow for background separation. */
    box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.1);
}

    /* Logo image. Centered on desktop, left-aligned on mobile. */
#nav #nav-logo {
    z-index: 70;
    width: 100%;
    /* Prevent it from growing too big. */
    max-width: 200px;
}

#nav #nav-left, #nav-right {
    width: 35vw;
}

#nav .main-nav-links {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

#nav .main-nav-links div {
    display: flex;
    position: relative;
    margin-top: auto;
    border-left: var(--brand-third);
    border-right: var(--brand-third);
}

#nav .main-nav-links .nav-link {
    display: block;
    padding: 45px 3vw;
}


#nav a {
    text-decoration: none;
    color: var(--brand-main);
}

/* On desktop, the mobile nav is hidden. */
#mobile-nav {
    display: none;
}

/* But on mobile, we show it and hide the desktop nav. */
@media screen and (max-width:600px) {
    #nav {
        display: none;
    }

    .nav-shape.clicked {
        /* Override previous styles on the menu icon. */
        background-color: var(--brand-third) !important;
        z-index: 100;
    }

    #mobile-nav {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        box-sizing: border-box;
        height: 25px;
        width: 25px;
        z-index: 99;
    }

    #mobile-nav #mobile-nav-top-rectangle {
        position: fixed;
        top: 15px;
        right: 15px;
        background-color: var(--brand-main);
        width: 25.5px;
        height: 2px;
    }

    #mobile-nav #mobile-nav-mid-rectangle {
        position: fixed;
        top: 22.5px;
        right: 15px;
        background-color: var(--brand-main);
        width: 22.1px;
        height: 2px;
    }

    #mobile-nav #mobile-nav-bottom-rectangle {
        position: fixed;
        top: 30px;
        right: 15px;
        background-color: var(--brand-main);
        width: 25.5px;
        height: 2px;
    }

    #mobile-nav .nav-clicked {
        background-color: var(--brand-main);
        right: 25px;
    }

    #mobile-nav #mobile-nav-overlay {
        position: fixed;
        height: 100vh;
        width: 100vw;
        left: 110%;
        top: 0px;
        opacity: 0;
        background-color: var(--brand-main);
        color: var(--brand-third);
    }

    #mobile-nav #mobile-nav-overlay #mobile-nav-links {
        margin: 25% 5% 15% 5%;
        height: 60%;
        width: 90%;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        text-align: center;
    }

    #mobile-nav #mobile-nav-overlay #mobile-nav-links .nav-link {
        opacity: 0;
        color: var(--brand-third);
        text-decoration: none;
        font-family: AlverataBl, Georgia, 'Times New Roman', Times, serif;
        font-size: 36px;
    }
}#main-header {
    /* Fills the screen when loaded. */
    width: 100vw;
    height: 100vh;

    /* Keep everything else below. */
    position: relative;

    /* Align internal pieces correctly. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* The first row of #content-container is
       100vh. */
    grid-area: 1 / 1 / 2 / 6;

    /* Add a bottom border for separation.
       Also because it looks nice. */
    border-bottom: 3px solid var(--brand-main);

}

#main-header .hero-image,
#main-header .hero-image img {
    /* Fill the entire screen. */
    width: 100%;
    height: 100%;

    /* Everything else flows around. */
    position: absolute;
    z-index: 0;

    filter:brightness(90%);
}

#main-header img {
    object-fit: cover;
}

#main-header h1.hero-headline {
    z-index: 3;
    color: var(--brand-third);
    place-self: center;
    width: 50%;
}

#homepage-hero #plant-left {
    position: absolute;

    left: -15vw;
    top: 20vh;

    height: auto;
    width: 80vw;

    filter: brightness(1.5) grayscale(1);

    overflow: hidden;

    z-index: 0;
}

#homepage-hero #plant-right {
    position: absolute;
    rotate: 180deg;
    
    right: -15vw;
    top: 54vh;

    width: 80vw;
    height: auto;

    filter: brightness(2) grayscale(1);

    overflow: hidden;

    z-index: 0;
}

#homepage-hero #plant-left img,
#homepage-hero #plant-right img {
    height: auto;
    width: 80vw;

    image-rendering: optimizeQuality;
}

@media screen and (max-width: 600px) {
    #main-header h1.hero-headline {
        width: 90%;
    }

    #homepage-hero {
        overflow: hidden;
    }

    #homepage-hero #plant-left,
    #homepage-hero #plant-left img,
    #homepage-hero #plant-right,
    #homepage-hero #plant-right img {
        width: 1800px;
    }

    #homepage-hero #plant-left {
        top: 10vh;
        left: 10vw;
    }
    #homepage-hero #plant-right {
        top: 60vh;
        right: 13vw;
    }
}