.asyncGallery {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  z-index: 99999999;
  visibility: hidden;
  background-color: rgb(0 0 0 / 95%);
  transition: opacity 200ms, visibility 200ms;
}

.asyncGallery.is-visible {
  opacity: 1;
  visibility: visible;
}

.asyncGallery__Item {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: opacity 200ms, visibility 200ms;
  /* background: red; */
}

.asyncGallery__Item.is-visible {
  opacity: 1;
  visibility: visible;
}

.asyncGallery__ItemImage img {
  max-height: 80vh;
  display: block;
  margin: auto;
}
.asyncGallery__ItemDescription p{margin-top:15px;}
.asyncGallery__ItemDescription,
.asyncGallery__Loader {
  color: #fff;
}

.asyncGallery__Loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  color: #fff;
  z-index: 100;
}

.asyncGallery__Loader.is-visible {
  display: block;
}

.asyncGallery button {
  background-color: transparent;
  border: 0;
  outline: 0;
  padding: 0;
  font-size: 0;
  cursor: pointer;
}

.asyncGallery__Close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 30px;
  height: 30px;
  z-index: 1000;
  background-repeat: no-repeat;
  background-size: 30px 30px;
  background-image: url("data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNTEycHgiIHZlcnNpb249IjEuMSIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDY0IDY0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2NCA2NCI+CiAgPGc+CiAgICA8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMjguOTQxLDMxLjc4NkwwLjYxMyw2MC4xMTRjLTAuNzg3LDAuNzg3LTAuNzg3LDIuMDYyLDAsMi44NDljMC4zOTMsMC4zOTQsMC45MDksMC41OSwxLjQyNCwwLjU5ICAgYzAuNTE2LDAsMS4wMzEtMC4xOTYsMS40MjQtMC41OWwyOC41NDEtMjguNTQxbDI4LjU0MSwyOC41NDFjMC4zOTQsMC4zOTQsMC45MDksMC41OSwxLjQyNCwwLjU5YzAuNTE1LDAsMS4wMzEtMC4xOTYsMS40MjQtMC41OSAgIGMwLjc4Ny0wLjc4NywwLjc4Ny0yLjA2MiwwLTIuODQ5TDM1LjA2NCwzMS43ODZMNjMuNDEsMy40MzhjMC43ODctMC43ODcsMC43ODctMi4wNjIsMC0yLjg0OWMtMC43ODctMC43ODYtMi4wNjItMC43ODYtMi44NDgsMCAgIEwzMi4wMDMsMjkuMTVMMy40NDEsMC41OWMtMC43ODctMC43ODYtMi4wNjEtMC43ODYtMi44NDgsMGMtMC43ODcsMC43ODctMC43ODcsMi4wNjIsMCwyLjg0OUwyOC45NDEsMzEuNzg2eiIvPgogIDwvZz4KPC9zdmc+Cg==");
}

.asyncGallery__Counter {
  position: absolute;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  right: 40px;
  bottom: 40px;
}

.asyncGallery__Dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  display: flex;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  list-style-type: none;
  z-index: 1000;
}

.asyncGallery__Dots button {
  padding: 0;
 
  background-color: #fff;
  border: 0;
  outline: 0;

  width: 30px;
  height: 7px;
  border-radius: 2px;
}

.asyncGallery__Dots li {
  opacity: 0.2;
  transition: opacity 200ms;
  
}

.asyncGallery__Dots li + li {
  margin-left: 10px;
}

.asyncGallery__Dots li.is-active {
  opacity: 1;
}

.asyncGallery__Dots li.is-active button {
  width: 30px;
  height: 7px;
  border-radius: 2px;
}

.asyncGallery__Next,
.asyncGallery__Prev {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  z-index: 9999999;
  transition: transform 200ms, opacity 200ms;
  transform: translateY(-50%);
}

.asyncGallery__Next:disabled,
.asyncGallery__Prev:disabled {
  opacity: 0.2;
  cursor: default;
}

.asyncGallery__Next:before,
.asyncGallery__Prev:before {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 129 129' xmlns:xlink='http://www.w3.org/1999/xlink' enable-background='new 0 0 129 129'%3E%3Cg%3E%3Cpath d='m40.4,121.3c-0.8,0.8-1.8,1.2-2.9,1.2s-2.1-0.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.2 0-5.8 1.6-1.6 4.2-1.6 5.8,0l53.9,53.9c1.6,1.6 1.6,4.2 0,5.8l-53.9,53.9z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E%0A");
  width: 30px;
  height: 30px;
  background-repeat: no-repeat;
  background-size: 30px 30px;
}

.asyncGallery__Next {
  right: 40px;
}

.asyncGallery__Next:hover {
  transform: translateX(2px) translateY(-50%);
}

.asyncGallery__Next:before {
  transform: translate3d(-50%, -50%, 0);
}

.asyncGallery__Prev {
  left: 40px;
}

.asyncGallery__Prev:hover {
  transform: translateX(-2px) translateY(-50%);
}

.asyncGallery__Prev:before {
  transform: translate3d(-50%, -50%, 0) scale(-1);
}




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

}

.gallery .article__image {
  max-width: calc(33.333% - 0px);
  margin: 0;
  transition: opacity 200ms;
  cursor: pointer;
  margin-bottom: 15px;
}

.gallery .article__image:hover {
  opacity: 0.8;
}

.gallery .article__image img {
  max-width: 100%;
}

@media screen and (max-width: 768px) {

  .gallery .article__image {
    max-width: calc(50% - 0px);
   
}
  .asyncGallery__Close {
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    background-size: 20px;
  }

  .asyncGallery__Dots {
    bottom: 105px;
  }

  .asyncGallery__Counter {
    right: 15px;
        bottom: 65px;
        font-size: 12px;
        z-index: 99999;
  }

  .asyncGallery__Item {
    width: 100%;
  }

  .asyncGallery__ItemImage img {
    max-height: none;
    max-width: 100%;
  }

  @media screen and (max-width: 768px) {
    .asyncGallery__ItemDescription {
        padding: 0 20px;
        position: absolute;
        /* z-index: 99999; */
        width: 100%;
        /* height: 100%; */
        background: #12121275;
        /* left: 0; */
        height: 100%;
        bottom: 0;
    }
    .asyncGallery__ItemDescription p {
      font-size: 36px;
      position: absolute;
      bottom: 115px;
      /* z-index: 9999999; */
      font-weight: bold;
      width: 100%;
  }
}

  .asyncGallery__Next,
  .asyncGallery__Prev {
    display: none;
  }

  /* DEMO */
  .gallery {
    display: block;
  }

  .gallery div {
    max-width: 100%;
    margin: 10px 0 0;
  }

  .gallery div img {
    max-width: 100%;
    min-width: 100%;
  }
}