body.noscroll {
  overflow: hidden;
}
.gallery {
  padding: 0 5% 10% 5%;
}
.gallery ul {
  position: relative;
  height: 100%;
  padding: 0px;
}
.gallery ul li {
  display: inline-block;
  width: 24%;
  /* height: 260px; */
  list-style: none;
  vertical-align: top;
  overflow: hidden;
  margin: auto;
  /* background: #fff; */
  /* text-align: center; */
}
.gallery ul li h3 {
  display: block;
  color: #666;
  width: 90%;
  font-size: 1em;
  margin: 10px auto 0px;
}
.gallery ul li a {
  display: block;
}
.gallery ul li .thumbnail {
  position: relative;
  overflow: hidden;
  /* height: 200px; */
  padding: 15px;
  /* border-radius: 0px; */
  /* background: RGBA(0, 0, 0, 0.05); */
  /* border: solid 1px RGBA(0, 0, 0, 0.15); */
  margin: 0px 0.5%;
}
.gallery ul li .thumbnail::before {
  padding-top: 100%;
  content: "";
  display: block;
}
.gallery ul li .thumbnail img {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  max-width: 100%;
  margin: auto;
  transform: scale(1.4);
  object-fit: cover;
}
.gallery ul li .thumbnail img:hover {
  opacity: 1;
  cursor: pointer;
}
.gallery .lightbox {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9881000000;
  display: none;
}
.gallery .lightbox a {
  text-decoration: none;
}
.gallery .lightbox .caption {
  display: none;
  color: #FFF;
  position: absolute;
  bottom: 0px;
  text-align: center;
  z-index: 999999;
  width: 60%;
  height: 8%;
  left: 50%;
  margin-left: -30%;
  line-height: 1.3em;
}
.gallery .lightbox .light_prev,
.gallery .lightbox .light_next {
  position: absolute;
  top: 50%;
  margin-top: -20px;
  left: 0px;
  width: 80px;
  height: 30px;
  line-height: 30px;
  font-size: 15px;
  color: #000;
  z-index: 999;
  text-align: center;
  background: #ffb547;
  transition: 0.3s ease-out;
}
.gallery .lightbox .light_next {
  right: 0px;
  left: auto;
}
.gallery .lightbox .light_prev:hover,
.gallery .lightbox .light_next:hover {
  background: #FFF;
  color: #000;
  cursor: pointer;
}
.gallery .lightbox .light_close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 80px;
  height: 30px;
  color: #FFF;
  line-height: 30px;
  font-size: 15px;
  z-index: 999;
  background: rgba(0, 0, 0, 0.8);
  transition: 0.3s ease-out;
  text-align: center;
}
.gallery .lightbox .light_close:hover {
  background: #FFF;
  color: #000;
  cursor: pointer;
}
.gallery .lightbox img {
  max-width: 80vw;
  max-height: 80vh;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

@media (max-width: 767px) {
  .gallery ul li {
    width: 90%;
    display: block;
    margin: 0px auto;
    min-height: 260px;
    height: auto;
  }
  .gallery ul li .thumbnail {
    height: auto;
  }
  .gallery ul li .thumbnail img {
    object-fit: cover;
    width: 100%;
  }

  .gallery ul li h3 {
    text-align: center;
  }

  .gallery .lightbox img {
    max-width: 100vw;
    max-height: 100vh;
  }

  .gallery .lightbox .caption {
    width: 80%;
    height: 50px;
    bottom: 50px;
    overflow: hidden;
    display: block;
    margin-left: -40%;
    text-align: center;
  }
}
