.header{
    position: relative;
    max-width: 1280px;
    padding: 10px;
    padding-bottom: 0px;
    margin:auto;
    text-align: left;
    z-index: 10;
    animation-name: fadein;
    animation-duration: 0.3s;
}

@media only screen and (min-width: 768px) {
    .header {
        text-align: center;
    } 
}

#leading {
    /*position: fixed;*/
    color: #006600;
    /*background-color: #006600;*/
    width: 100%;
    top: 0px;
    text-align: center;
    font: 500 13pt 'Nunito Sans';
    z-index: 11;
}

.logo {
    display: inline-block;
    width: 60%;
    margin: auto;
    max-width: 400px;
}

#navbutton {
    display: block;
    position:absolute;
    right: 20px;
    float: right;
    top: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(0,-50%);
    height: 40px;
    width: 50px;
    /*border: 1px solid red;*/
    /*z-index: 10;*/
}

#menuicon {
    display: block;
    width: 100%;
    height: 100%;
}

#xicon{
    display: none;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#navbar {
    display: none;
    position: absolute;
    margin: auto;
    left:20px;
    right:20px;
    border-collapse:collapse;
    transform: translate(0%,20px);
    animation-name: fadein;
    animation-duration: 1s;
    border-radius: 12px;
    overflow: hidden;
}

#navbar .navlink {
    display: block;
    color: white;
    background-color: black;
    font: 400 15pt 'Nunito Sans';
    padding: 15px 0px 20px 20px;    
    border: 0.5px solid #CCFFCC77;
    height: 1em;  
    margin: auto;
}

#navbar a:link { text-decoration: none; }

@keyframes fadein {
    from {opacity: 0%;}
    to {opacity: 100%;}
}

@media only screen and (min-width: 768px) {
    #navbutton {
        display: none;
    }

    #navbar {
        display: block;
        position: relative;
        width: max-content;
        left:auto;
        right:auto;
        margin-top: 20px;
        margin-bottom: 0px;
        transform: translate(0,0);
        font-size: 0px; /*needed to remove gaps between navlinks to max-content always works*/
        background-color: black; /* need in case font-size 0 does not work */
        border-radius: 0px;
    }

    #navbar .navlink {  
        display: inline-block;
        height: 1em;
        /*font-size: 20px;*/
        font: 400 15pt 'Nunito Sans';
        padding: 4px 10px 10px 10px;
    }

    #addwater {
        /*position: fixed;*/
        color: #006600;
        /*background-color: #006600;*/
        width: 100%;
        top: 0px;
        text-align: center;
        font: 500 13pt 'Nunito Sans';
        z-index: 11;
    }

    
    #contentgrid {
        display: grid;
        grid-template-columns: 4fr 3fr;
        grid-template-rows: auto;
    }
}

#navbar .navlink.active{
    background-color: #006600;
    color: white;
}
