.gallery {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	justify-content: center;
	margin: 1rem 0;
}
.gallery .gallery-item {
	margin-top: 0;
	text-align: center;
	width: 620px;
	height:620px;
	overflow: hidden;
	position: relative;
	padding: .3rem;
	margin-right: 15px;
	margin-bottom: 15px;
	border: solid 1px #e2e2e3;
	background: #000;
}
.gallery-columns-2 .gallery-item {width: 45%;height: 300px;overflow: hidden;margin-right: 15px;margin-bottom: 15px;flex-grow: 1;}
.gallery-columns-3 .gallery-item {width: 30%;height: 200px;overflow: hidden;margin-right: 10px;margin-bottom: 10px;flex-grow: 1; }
.gallery-columns-4 .gallery-item {width: 22%;height: 150px;overflow: hidden;margin-right: 10px;margin-bottom: 10px;flex-grow: 1; }
.gallery-columns-5 .gallery-item {width: 18%;height: 120px;overflow: hidden;margin-right: 5px;margin-bottom: 5px;flex-grow: 1;}
.gallery-columns-6 .gallery-item {width: 15%;height: 100px;overflow: hidden;margin-right: 5px;margin-bottom: 5px;flex-grow: 1; }
.gallery-columns-7 .gallery-item {width: 13%;height: 85px;overflow: hidden;margin-right: 5px;margin-bottom: 5px;flex-grow: 1; }

.gallery a {
	flex-grow: 1;
	flex-basis: 125px;
	max-width: 300px;
	margin: 5px;
}

.gallery img {position: absolute;left: 50%;top: 50%;height: 100%;width: auto;-webkit-transform: translate(-50%,-50%);-ms-transform: translate(-50%,-50%);transform: translate(-50%,-50%);}
.gallery img:hover {
	background: white;
}

.gallery .gallery-caption {
	font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: #fff;
	font-size: 12px;
	margin: 0;
	position: absolute;
	bottom: 0;
	left: 0;
	background-color: rgba(0,0,0,.5);
	text-align: left;
	display: none;
}

.gallery-columns-6 .gallery-item .gallery-caption, .gallery-columns-7 .gallery-item .gallery-caption {display:none;}


.gallery dl, .gallery dt { margin: 0; }
.gallery br+br { display: none; }


/****************************** MEDIA QUERIES **********************************************/

@media only screen 
and (max-width : 520px) {
	.gallery {
		flex-direction:column;
	}
	.gallery-columns-2 .gallery-item, .gallery-columns-3 .gallery-item, .gallery-columns-4 .gallery-item, .gallery-columns-5 .gallery-item, .gallery-columns-6 .gallery-item, .gallery-columns-7 .gallery-item {width:100%; height:300px;
	}
}

@media only screen 
and (max-width : 400px) {
	.gallery {
		flex-direction:column;
	}
	.gallery-columns-2 .gallery-item, .gallery-columns-3 .gallery-item, .gallery-columns-4 .gallery-item, .gallery-columns-5 .gallery-item, .gallery-columns-6 .gallery-item, .gallery-columns-7 .gallery-item {width:100%; height:230px;
	}
}