/* ---------------------------------------
   Gallery Custom Post Type 
----------------------------------------*/

.gallery-posts {
	max-width: 100%;
	display: block;
	margin: 0 auto!important;
}

.gallery-images {
	width: 22.99%!important;
	display: inline-block!important;
	vertical-align: text-top;
	margin: .5%!important;
  position: relative;
}

.gallery-images a img {
	width: 95%;
	height: 170px;
	object-fit: cover!important;
	margin: 5px auto;
	box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}

.image {
  opacity: 1;
  display: block;
  width: 95%;
  height: auto;
  transition: .5s ease;
  backface-visibility: hidden;
}

.middle {
  transition: .5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
}

.gallery-images:hover .image {
	filter: grayscale(100%) brightness(30%);
}

.gallery-images:hover .middle {
  opacity: 1;
}

.text {
  color: white;
  font-size: 1.86em;
  padding: 16px 32px;
}

@media only screen and (max-width: 899px), only screen and (max-device-width: 400px) {
	
	.gallery-images {
	width: 43.99%!important;
}
}

@media only screen and (max-width: 399px), only screen and (max-device-width: 200px) {
	
	.gallery-images {
		width: 95%!important;
		display: block!important;
		margin-bottom: 5%!important;
}
}

/* -- Pagination -- */

.gallery-pagination {
	display: block!important;
	margin: 5% auto!important;
}
 
.gallery-pagination li {
    display: inline;
	border-bottom: 0px!important;
}

.gallery-pagination .span {
	border: 1px solid #e1e1e1!important;
	background: #e1e1e1!important;
    padding: 12px;
}

.gallery-pagination li a,
.gallery-pagination li.active a,
.gallery-pagination li.disabled {
	color: #535353;
    padding: 12px;
    padding: 0.75rem;
    text-decoration:none;
}

@media only screen and (max-width: 1024px), only screen and (max-device-width: 960px) {
	
	.gallery-pagination {
		margin: 5.8% 2.5%!important;
}
}