.s-fp-gallery {
  padding: 50px 0;
  background-size: cover;
  background-position: center center;
}
.s-fp-gallery .title .title {
  color: #00001a;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 40px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  padding: 4px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .box-gallery {
  display: flex;
  justify-content: center;
  position: relative;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .box-gallery a {
  width: 100%;
  height: 100%;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .box-gallery a img {
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .box-gallery::before {
  position: absolute;
  width: 100%;
  height: 100%;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .caption {
  pointer-events: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .caption .title {
  color: #fff;
  position: relative;
  transition: all 0.2s ease-in-out;
  overflow: hidden;
  font-size: 1.5rem;
  font-weight: 700;
}
@media screen and (max-width: 550px) {
  .s-fp-gallery .box-gallary-fp .gallary-fp-item .caption .title {
    font-size: 1rem;
  }
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item:hover > span {
  opacity: 1;
  margin: 0;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span {
  position: absolute;
  z-index: 11;
  transition: all 0.4s ease;
  opacity: 0;
  margin: 30px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:first-of-type {
  left: 3px;
  top: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(2) {
  right: 0px;
  top: 0px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(2):before {
  right: 3px;
  top: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(2):after {
  right: 3px;
  top: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(3) {
  bottom: 0px;
  left: 0px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(3):before {
  bottom: 3px;
  left: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(3):after {
  bottom: 3px;
  left: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(4) {
  bottom: 0px;
  right: 0px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(4):before {
  bottom: 3px;
  right: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:nth-of-type(4):after {
  bottom: 3px;
  right: 3px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:before {
  content: "";
  width: 70px;
  height: 10px;
  position: absolute;
  background: #fff;
  pointer-events: none;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item > span:after {
  content: "";
  width: 10px;
  height: 70px;
  position: absolute;
  background: #fff;
  pointer-events: none;
}
@media screen and (max-width: 550px) {
  .s-fp-gallery .box-gallary-fp .gallary-fp-item {
    padding: 2px !important;
    aspect-ratio: 1/1;
  }
  .s-fp-gallery .box-gallary-fp .gallary-fp-item span {
    opacity: 1 !important;
    margin: 0 !important;
  }
  .s-fp-gallery .box-gallary-fp .gallary-fp-item span:before {
    content: "";
    width: 30px;
    height: 3px;
  }
  .s-fp-gallery .box-gallary-fp .gallary-fp-item span:after {
    content: "";
    width: 3px;
    height: 30px;
  }
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .flip-animate {
  perspective: 1000px;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .flip-animate span {
  position: relative;
  display: inline-block;
  padding: 0;
  transition: transform 0.4s;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item .flip-animate span::before {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  content: attr(hover);
  transition: color 0.3s;
  transform: rotateX(-90deg);
  transform-origin: 50% 0;
  text-align: center;
}
.s-fp-gallery .box-gallary-fp .gallary-fp-item:hover .flip-animate span, .s-fp-gallery .box-gallary-fp .gallary-fp-item:focus .flip-animate span {
  transform: rotateX(89deg) translateY(-22px);
}
@media screen and (max-width: 550px) {
  .s-fp-gallery {
    padding: 30px 8px !important;
  }
  .s-fp-gallery .title .title {
    font-size: 20px;
    margin-bottom: 1rem;
  }
}
