.container {
    display: grid;
    grid-template-areas: "a c" "b b" "e e" "e e" "d f" "d f" "d f" "g g";
    grid-gap: 20px;
    margin: 10px;
    background-color: white;
}


/* Medium devices (landscape tablets, 768px and up) */

@media only screen and (min-width: 600px) {
    .container {
        grid-template-areas: "a a c c" "b b b b" "f d d d" "f e e e" "f e e e" "f g g g";
    }
    .four {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr;
        grid-gap: 15px;
    }
}


/* Large devices (laptops/desktops, 992px and up) */

@media only screen and (min-width: 768px) {
    .container {
        grid-template-areas: "a b b b b c" "d e e e f f" "d e e e f f" "d e e e f f" "g g g g f f";
    }
    .four {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr 1fr;
        grid-gap: 15px;
    }
}

.one {
    grid-area: a;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    background-color: yellow;
    border: 1px solid black;
    padding: 0.5em 0.5em 0.5em 0;
}

.two {
    grid-area: b;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    background-color: pink;
    border: 1px solid black;
    padding: 1em;
}

.three {
    grid-area: c;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    background-color: lightgray;
    border: 1px solid black;
    padding: 0.5em 0.5em 0.5em 0;
}

.four {
    grid-area: d;
    display: grid;
    width: auto;
    grid-gap: 15px;
}

.four img {
    border: 1px solid black;
}

.five {
    grid-area: e;
    border: 1px solid black;
}

.six {
    grid-area: f;
    background-color: lightskyblue;
    border: 1px solid black;
    padding: 0.5em;
}

.seven {
    grid-area: g;
    background-color: lightgreen;
    border: 1px solid black;
    padding: 0.5em;
}

img {
    width: 100%;
}