.mb-image-gallery-container,
.mb-image-gallery-container * {
	box-sizing: border-box;
}

.mb-image-gallery-container {
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-flow: row wrap;
	flex-flow: row wrap;
	-ms-flex-direction: row; /* IE10*/
	-ms-flex-wrap: wrap; /* IE10*/
}

.mb-image-gallery-container:after {
	content: "";
	flex-grow: 100000000;
}

.mb-image-gallery-column {
	-webkit-box-flex: auto;
	-moz-box-flex: auto;
	-webkit-flex: auto;
	-ms-flex: auto;
	flex: auto;
	width: calc(25% - 10px);
	margin: 5px;
	position: relative;
	overflow: hidden;
}

.mb-image-gallery-column:before {
	content: "";
    display: block;
    padding-top: 80%;
}

.mb-image-gallery-column img {
	position: absolute;
	top: 50%;
	left: 50%;
	-ms-transform: translate(-50%, -50%);
	-webkit-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}

/* Flexbox is not supported in <IE10
- Activate the styles below to override the flexbox properties and display the images with a fixed/percentage width */

/*.lt-ie10 .mb-image-gallery-container {
	display: block;
}

.lt-ie10 .mb-image-gallery-column {
	display: inline-block;
	float: left;
	width: 22%;
	margin: 1.5%;
}*/

.imagelightbox-arrow {
	width: 70px;
	height: 20%;
	vertical-align: middle;
	position: fixed;
	z-index: 10001;
	top: 50%;
	-ms-transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
	cursor: pointer;
}

.imagelightbox-arrow:after {
	content:"";
	position: absolute;
	top: 50%;
	left: 50%;
	border: 2px solid #000;
	width: 20px;
	height: 20px;
	-ms-transform: translate(-50%, -50%) rotate(45deg);
	-webkit-transform: translate(-50%, -50%) rotate(45deg);
	transform: translate(-50%, -50%) rotate(45deg);
	-ms-transform-origin: 50% 50%;
	-webkit-transform-origin: 50% 50%;
	-moz-transform-origin: 50% 50%;
	transform-origin: 50% 50%;
}

.imagelightbox-arrow-right {
	right: 0;
}

.imagelightbox-arrow-left {
	left: 0;
}

.imagelightbox-arrow-right:after {
	border-left: none;
	border-bottom: none;
}

.imagelightbox-arrow-left:after {
	border-right: none;
	border-top: none;
}

#imagelightbox-caption {
	text-align: center;
	color: #fff;
	background: #000;
	background: rgba(0,0,0,.8);
	position: fixed;
	z-index: 10001;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px;
}

#imagelightbox-caption a:link,
#imagelightbox-caption a:visited {
	color: inherit;
	display: inline-block;
	margin-left: 7px;
	text-decoration: underline;
}

#imagelightbox {
    position: fixed;
    z-index: 9999;
    -ms-touch-action: none;
    touch-action: none;
}

#imagelightbox-overlay {
	background: #fff;
	background: rgba(255,255,255,.9);
	position: fixed;
	z-index: 9998;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
 }

#imagelightbox-loading {
	position: fixed;
	z-index: 10003;
	top: 50%;
	left: 50%;
}

#imagelightbox-loading .fa {
	font-size: 24px;
}

#imagelightbox-loading,
#imagelightbox-overlay,
#imagelightbox-close,
#imagelightbox-caption,
#imagelightbox-nav,
.imagelightbox-arrow {
	-webkit-animation: fade-in .5s ease-in-out;
	animation: fade-in .5s ease-in-out;
}

@-webkit-keyframes fade-in {
	from	{ opacity: 0; }
	to		{ opacity: 1; }
}
@keyframes fade-in {
from	{ opacity: 0; }
to		{ opacity: 1; }
}

@media (max-width : 500px) {
	.mb-image-gallery-column {
		width: calc(50% - 10px);
	}
	
	.imagelightbox-arrow {
		width: 40px;
	}
	
	.imagelightbox-arrow:after {
		width: 10px;
		height: 10px;
	}
}