.gallery {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 50px 0 80px 0;
  overflow: hidden;

}

.gallery__text {
  font-size: 20px;
  line-height: 28px;
  color: #777;
}

.galler__beauty-logo {
  max-width: 100%;
}

.gallery__text-desktop a,
.gallery__text-mobile a {
  font-weight: 700;
}

.gallery__text-mobile {
  display: none;
  font-size: 20px;
  line-height: 28px;
  color: #777;

}

.gallery__grid {
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 210px 210px;
  gap: 16px;
  grid-auto-rows: 210px;
  position: relative;
  animation: 0.7s customBounce ease 0s both;
}

@keyframes customBounce {
  0% {
    gap: 80px;
  }

  20% {
    gap: 50px;
  }

  40% {
    gap: 30px;
  }

  70% {
    gap: 20px;
  }

  100% {
    grid-gap: 16px;
  }
}

.gallery__grid-item {
  color: #fff;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery__grid-item img {
  width: 100%;
  height: 100%;
  box-shadow: rgba(3, 8, 20, 0.1) 0px 0.15rem 0.5rem,
    rgba(2, 8, 20, 0.1) 0px 0.075rem 0.175rem;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gallery__grid-item--1 {
  grid-column: 1/3;
}

.gallery__grid-item--4 {
  grid-column: 4/6;
  grid-row: 1/3;
}



.gallery__close {
  position: absolute;
  right: 20px;
  top: 20px;
  transition: 0.3s;
  background-image: url(../images/gallery/close-menu_white.svg);
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
}

.gallery__close:hover,
.gallery__close:focus {
  cursor: pointer;
}


.gallery__next,
.gallery__prev {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  background-image: url('../images/home-page/slider/arrow.png');
  background-color: #EFEFEF;
  background-size: 28px;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  top: 50%;
}

.gallery__next:hover,
.gallery__prev:hover {
  background-color: #E0C6C4;
}

.gallery__prev {
  left: 10px;

}

.gallery__next {
  right: 10px;
  transform: rotate(180deg);
}

.gallery__modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: auto;
  background-color: rgba(242, 234, 231, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 12;
  animation-name: zoom;
  animation-duration: 0.6s;
  overflow: hidden;
}

.gallery__modal img {
  margin: auto;
  display: block;
  max-width: 640px;
  max-height: 80%;
  object-fit: contain;
  -o-object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gallery__modal--content {
  margin: auto;
  display: block;
  max-width: 700px;
  max-height: 80%;
  object-fit: contain;
  -o-object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.6s;
  border-radius: 20px;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}



@media screen and (max-width: 1024px) {
  .gallery {
    padding: 50px 0 40px 0;
  }


}

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

  .gallery__text-desktop {
    display: none;
  }

  .gallery__text-mobile {
    display: block;
  }

  .gallery__modal img {
    max-width: 70%;
  }

  .gallery__next,
  .gallery__prev {
    width: 36px;
    height: 36px;
    background-size: 18px;
  }

  .hero__dots--gallery-left-bottom,
  .hero__dots--gallery-right-top {
    display: none;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 197px;
    grid-auto-rows: 197px;
    padding: 26px 0 10px 0;
  }

  .gallery__grid-item--2 {
    grid-column: 1/2;
    grid-row: 2;
  }

  .gallery__grid-item--3 {
    grid-row: 3;
  }

  .gallery__grid-item--4 {
    grid-column: 1/3;
    grid-row: 4/6;
  }


}