.instagram-feed {
    clear: both;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 0 0 1em;
}

.instagram-feed .entry.social-post {
    width: 100%;
    max-width: 260px;
    height: auto;
    padding: 5px;
    margin: 0;
}

.instagram-feed .entry.social-post:last-child {
    padding-bottom: 5px;
}

.instagram-feed .entry.social-post a {
    display: block;
    overflow: hidden;
    position: relative;
    padding-top: 100%;
}

.instagram-feed .entry.social-post .entry-image {
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    height: 0;
    width: 100%;
    padding-bottom: 100%;
}

.instagram-feed .entry.social-post .entry-image a {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	display: block;
	cursor: pointer;
}


@media screen and ( min-width: 480px ) {

    .instagram-feed[data-perrow="2"] .entry.social-post,
    .instagram-feed[data-perrow="3"] .entry.social-post,
    .instagram-feed[data-perrow="4"] .entry.social-post {
        width: calc(100%/2);
    }

}

@media screen and ( min-width: 720px ) {

    .instagram-feed {

    }

    .instagram-feed[data-perrow="2"] .entry.social-post {
        width: calc(100%/2);
    }

    .instagram-feed[data-perrow="3"] .entry.social-post {
        width: calc(100%/3);
    }

    .instagram-feed[data-perrow="4"] .entry.social-post {
        width: calc(100%/4);
    }

}
