* {
    box-sizing: border-box;
}

body {
    color: #F7F1EB80;
    background-color: rgba(7, 245, 174, 0.5);
    margin: 0px;
}

header {
    background-color: rgba(132, 58, 178, 0.5);
    grid-row: 1/2;
    grid-column: 2/8;
    
}

main {
    padding-left: 1rem;
    padding-right: 1rem;
    grid-row: 4/5;
    grid-column: 2/8;
    background-color: rgba(225, 10, 245, 0.5);
    
}

h1 {
    
    line-height: 140%;
    padding: 0.5rem;
    background-position: right;
    background-repeat:no-repeat;
    padding-left: 1em;
    background-origin: content-box;
    margin: 0;
}

nav a:hover {
    background-color: #d2c5b6;
}

nav {
    background: rgba(178, 118, 58, 0.5);
    height: 5rem;
    font-weight: bold;
    position: sticky;
    top: 0;
    grid-row: 2/3;
    grid-column: 2/8;
}

nav ul{
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-flow: row nowrap;
    list-style-type: none;
}

nav ul li {
    width: 100%;
}

form {
    display:grid;
    grid-template-rows: auto;
    grid-template-columns: 200px 1fr;
    grid-gap: 0.75rem;
    width: 100%;
}

#wrapper {
    display:grid;
    grid-auto-rows:minmax(0px, auto);
    grid-template-columns:minmax(0px, 1fr)repeat(6,minmax(0,175px))minmax(0px,1fr);
}

#headerbar {
    height: 5rem;
    background-color: #F7F1EB80;
    grid-row: 1/2;
    grid-column: 1/9;
}

#tabsbar {
    background-color: #F7F1EB80;
    grid-row: 2/3;
    grid-column: 1/9;
}

#backgroundimageindex {
    background-color: rgba(255, 0, 0, 0.5);
    background-size:cover;
    height: 300px;
    background-repeat: no-repeat;
    background-position: center;
    grid-row: 3/4;
    grid-column: 1/9;
}

#mainframe {
    background-color: rgba(129, 81, 32, 0.5);
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;

}

#mainframe #textbox1 {
    background-color: rgba(129, 81, 32, 0.5);
    height: 300px;
    width: 31rem;
    

}

#mainframe #indexwritingimage1 {
    background-color: rgba(0,255,0,0.5);
    height: 300px;
    width: 31rem;
    margin-top: 1rem;
    align-self: end;
}

#mainframe #textbox2 {
    background-color: rgba(129,81,32,0.5);
    height: 300px;
    width: 31rem;
    margin-top: 1rem;
}

#mainframe #indexwritingimage2 {
    background-color: rgba(0,255,0,0.5);
    height: 300px;
    width: 31rem;
    margin-top: 1rem;
    align-self: end;
}

#mainframe #textbox3 {
    background-color: rgba(129, 81, 32, 0.5);
    height: 200px;
    width: 31rem;
    margin-top: 1rem;
}

#mainframe #indexwritingimage3 {
    background-color: rgba(0,255,0,0.5);
    height: 200px;
    width: 31rem;
    margin-top: 1rem;
    align-self: end;
    margin-bottom: 1rem;
}

@media only screen and (max-width: 1100px) {
    #wrapper {
        grid-template-columns:minmax(0px, 1fr)repeat(6,minmax(0,150px))minmax(0px,1fr);
    }
}

@media screen and (max-width: 900px) {
    nav {
        position: static;
        grid-column: 1/5;
    }

    nav ul {
        flex-flow: column nowrap;
    }

    #backgroundimageindex {
        height: auto;
        grid-row: 2/3;
        grid-column: 5/8;
    }

@media screen and (max-width: 600px) {
    header h1 {
        background-image: none;
        text-align: center;
    }

    nav {
        grid-row: 2/3;
        grid-column: 1/9;
    }

    #backgroundimageindex {
        display: none;
    }

}

}