aside,
header,
footer,
article,
span {
    padding: 10px;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    color: white;
    font-family: san-serif;
    font-size: 1.2em;
}

.grid-wrapper {
    /*changed the height from 100% to auto as the layout breaks when the height of the content 'overflows'.*/
    height: auto;
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: min-content auto min-content;
    background-color: #FFAFB0;
}

aside {
    grid-column: 1/2;
    grid-row: 2/3;
    background-color: #5EB7B7;
}

header {
    grid-column: 1/3;
    grid-row: 1/2;
    background-color: #96D1C7;
}

footer {
    grid-column: 1/3;
    grid-row: 3/4;
    background-color: #96D1C7;
}

article {
    grid-column: 2/3;
    grid-row: 2/3;
    /*   background-color: #FC7978; */
    border: 1px solid black;
}

.flex-wrapper {
    display: flex;
}

.image {
    display: inline-block;
    height: 1500px;
    margin: 1500px;
    background-color: #D6D5D5;
    flex-grow: 1;
    margin: 0 20px;
}

h1,
h4,
p {
    padding: 5px;
}

@media only screen and (max-width: 850px) {
    /*changes to code to arrange aside below article. */
    .grid-wrapper {
        display: flex;
        flex-direction: column;
    }
    aside {
        order: 1
    }
    footer {
        order: 2;
    }
    /*end of changes*/
    .flex-wrapper {
        flex-direction: column;
    }
    .image {
        margin-bottom: 20px;
    }
}