.gallery.flex {
	flex-wrap: wrap;
}

.gallery-item {
	position: relative;
	margin-bottom: 0.57%;
	margin-right: 0.57%;
	width: 12%;
}

.gallery-item:nth-child(8n) {
	margin-right: 0;
}

.gallery-item img {
	width: 100%;
	height: auto;
}

.gallery-item .lightbox-link .caption.hide {
	display: none;
}

.uth-lightbox {
	display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 99999;
}

.uth-lightbox-content {
	position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.uth-lightbox img {
	width: 100%;
    height: auto;
}

.caption-counter {
	background-color: #000000;
	color: #ffffff;
	font-size: 14px;
	left: 50%;
	max-width: 100%;
	padding: 10px 30px;
	position: absolute;
  	text-align: center;
  	transform: translateX(-50%);
  	width: 800px;  	 	
}

.uth-lightbox .close,
.uth-lightbox .prev,
.uth-lightbox .next {
	position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 70px;
    color: #fff;
    text-decoration: none;
    padding: 10px;
}

.uth-lightbox .close {
	top: 50px;
    right: 10px;
}

.uth-lightbox .prev {
	left: 10px;
}

.uth-lightbox .next {
	right: 10px;
}

@media (max-width: 1150px) {
	.uth-lightbox .close,
	.uth-lightbox .prev,
	.uth-lightbox .next {
		font-size: 50px;
	}		
}	

@media (max-width: 767.98px) {
	.gallery-item {
		margin-bottom: 0.5;
		margin-right: 0.5%;
		width: 19.5%;
	}
	
	.gallery-item:nth-child(5n) {
		margin-right: 0.5%;
	}
	
	.gallery-item:nth-child(8n) {
		margin-right: 0.5%;
	}
}

@media (max-width: 650px) {
	.uth-lightbox-content {	
	  max-width: 100%;
	  max-height: 100%;
	  width: 90%;
	}
}