.gallerybox {
  padding: 120px 0;
}
.gallerybox__head {
  margin-bottom: 50px;
}
.gallerybox__head .section-title {
  margin-bottom: 10px;
}
.gallerybox__head + .gallerybox-images {
  margin-top: 50px;
}
@media screen and (max-width: 1440px) {
  .gallerybox {
    padding: 90px 0;
  }
}
@media screen and (max-width: 1023px) {
  .gallerybox {
    padding: 70px 0;
  }
}
@media screen and (max-width: 767px) {
  .gallerybox {
    padding: 50px 0;
  }
}

.gallerybox-images {
  display: block;
  -moz-column-count: 3;
       column-count: 3;
  -moz-column-gap: 20px;
       column-gap: 20px;
}
@media screen and (max-width: 1024px) {
  .gallerybox-images {
    -moz-column-gap: 16px;
         column-gap: 16px;
  }
}
@media screen and (max-width: 592px) {
  .gallerybox-images {
    -moz-column-count: 2;
         column-count: 2;
  }
}
@media screen and (max-width: 460px) {
  .gallerybox-images {
    -moz-column-count: 1;
         column-count: 1;
  }
}

.gallerybox__item {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
  -moz-column-break-inside: avoid;
       break-inside: avoid;
}
.gallerybox__item:hover figure figcaption {
  transform: scaleY(1);
  opacity: 1;
  transition: transform 0.12s ease-in-out, opacity 0.12s ease-in;
}
.gallerybox__item figure {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallerybox__item figure img {
  width: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  overflow: hidden;
  height: auto;
}
.gallerybox__item figure figcaption {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 15px;
  font-weight: 400;
  background-color: var(--highlight);
  color: #fff;
  z-index: 1;
  transform: scaleY(0);
  opacity: 0;
  transform-origin: 0 100%;
  transition: transform 0.12s ease-in-out, opacity 0.12s ease-in;
}
.gallerybox__item .gallerybox__item-video {
  display: flex;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(#fff, #fff);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-image: linear-gradient(#fff, #fff);
  mask-repeat: no-repeat;
  mask-size: cover;
  overflow: hidden;
}
.gallerybox__item .gallerybox__item-video video {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  overflow: hidden;
}
@media screen and (max-width: 1024px) {
  .gallerybox__item {
    margin-bottom: 16px;
  }
  .gallerybox__item figure figcaption {
    padding: 10px;
    font-size: 14px;
  }
}

.gallerybox-opts {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 50px;
}