article#square-boxes {
    background: #eeeeee;
    border-bottom: rgba(51, 51, 51, .5) solid .0625em;
    color: #ffffff;
    display: flex;
    flex-flow: row wrap;
    padding: 0 0 1.25em 1.25em;
    position: relative;
    text-shadow: .1em .1em .05em rgba(44, 46, 50, .5);
}

article#square-boxes section {
    align-items: center;
    flex: auto;
    height: 30em;
    overflow: hidden;
    margin: 1.25em 1.25em 0 0;
    position: relative;
    width: calc(100% - 1.25em);
}

article#square-boxes section:nth-of-type(n + 5) {
    height: 13em;
    width: calc(100% - 1.25em);
}

article#square-boxes section img {
    height: 30em;
    object-fit: cover;
    width: 100%;
}

article#square-boxes section:nth-of-type(n + 5) img {
    height: 13em;
}

article#square-boxes section:before {
    background: rgba(0,0,0, 0.5);
    bottom: 0;
    content: "";
    display: block;
    left: 0;
    margin: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}

article#square-boxes section:focus-within:before,
article#square-boxes section:hover:before {
    background: rgba(0,0,0, .1);
}

article#square-boxes section h3 {
    font-size: 2.2em;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

article#square-boxes section a {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 13.4em;
    justify-content: center;
    margin: .125em;
    text-align: center;
    width: calc( 100% - .25em);
}

article#square-boxes section a:focus {
    color: #c52b30;
}

article#square-boxes section:nth-of-type(n + 5) a {
    height: 5.75em;
}

article#square-boxes > a {
    font-size: .6em;
    font-weight: normal;
    position: absolute;
    text-shadow: none;
    top: 0;
}

@media all and (min-width:40em) {

    article#square-boxes section:nth-of-type(n + 5) {
        height: 10em;
        width: calc(50% - 8em);
    }

    article#square-boxes section:nth-of-type(n + 5) img {
        height: 10em;
    }
    
    article#square-boxes section:nth-of-type(n + 5) a {
        height: 4em;
    }
    
}

@media all and (min-width:60em) {

    article#square-boxes section {
        height: 20em;
        width: calc(50% - 4em);
    }

    article#square-boxes section:nth-of-type(n + 5) {
        height: 10em;
        width: calc(25% - 8em);
    }

    article#square-boxes section img {
        height: 20em;
    }

    article#square-boxes section:nth-of-type(n + 5) img {
        height: 10em;
    }
    
    article#square-boxes section a {
        height: 8.84091em;
    }
    
    article#square-boxes section:nth-of-type(n + 5) a {
        height: 3.75em;
    }
    
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {

    article#square-boxes section img {
            height: auto;
            left: 66%;
            position: absolute;
            min-height: 100%;
            min-width: 135%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: auto;
        }
    
}

@supports (-ms-ime-align: auto) {

    article#square-boxes section img {
        height: auto;
        left: 66%;
        position: absolute;
        min-height: 100%;
        min-width: 135%;
        top: 50%;
        transform: translate(-66%, -50%);
        width: auto;
    }
    
}