.gallery-head{
  text-align: center;
}

.gallery-head h5 {
  color: white;
  line-height: 1.5;
  font-size: 20px;
}

.gallery-head p {
  margin: 50px 0;
  color: white;
  font-size: 28px;
  text-transform: uppercase;
  line-height: 1.2;
}


.gallery-item__wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1rem;
  margin-top: 1rem;
}

.gallery-item__wrap a:nth-child(1) {
  grid-row: 1;
  grid-column: 1 / 3;
}
.gallery-item__wrap a:nth-child(2) {
  grid-column: 1;
  grid-row: 2 / 4;
}
.gallery-item__wrap a:nth-child(3) {
  grid-row: 2;
  grid-column: 2;
}
.gallery-item__wrap a:nth-child(4) {
  grid-row: 3;
  grid-column: 2;
}

.gallery-item__wrap a:nth-child(5) {
  grid-row: 4;
  grid-column: 1;
}

.gallery-item__wrap a:nth-child(6) {
  grid-row: 5;
  grid-column: 1;
}
.gallery-item__wrap a:nth-child(7) {
  grid-row: 4 / 6;
  grid-column: 2;
}

.gallery-item__wrap a:nth-child(8), .gallery-item__wrap a:nth-child(9), .gallery-item__wrap a:nth-child(10), .gallery-item__wrap a:nth-child(11), .gallery-item__wrap a:nth-child(12), .gallery-item__wrap a:nth-child(13), .gallery-item__wrap a:nth-child(14) {
  grid-row: auto !important;
  grid-column: auto;
}

/* SECOND LOOP GALLERY*/
.gallery-item__wrap a:nth-child(8) {
  grid-row: 1;
  grid-column: 1 / 3;
}
.gallery-item__wrap a:nth-child(9) {
  grid-column: 1;
  grid-row: 7 / 9 !important;
}
.gallery-item__wrap a:nth-child(10) {
  grid-row: 2;
  grid-column: 2;
}
.gallery-item__wrap a:nth-child(11) {
  grid-row: 3;
  grid-column: 2;
}

.gallery-item__wrap a:nth-child(12) {
  grid-row: 4;
  grid-column: 1;
}

.gallery-item__wrap a:nth-child(13) {
  grid-row: 5;
  grid-column: 1;
}
.gallery-item__wrap a:nth-child(14) {
  grid-column: 2;
  grid-row: 9 / 11 !important;
}

/* THIRD LOOP GALLERY*/
.gallery-item__wrap a:nth-child(15) {
  grid-row: 1;
  grid-column: 1 / 3;
}
.gallery-item__wrap a:nth-child(16) {
  grid-column: 1;
  grid-row: 2 / 4;
}
.gallery-item__wrap a:nth-child(17) {
  grid-row: 2;
  grid-column: 2;
}
.gallery-item__wrap a:nth-child(18) {
  grid-row: 3;
  grid-column: 2;
}

.gallery-item__wrap a:nth-child(19) {
  grid-row: 4;
  grid-column: 1;
}

.gallery-item__wrap a:nth-child(20) {
  grid-row: 5;
  grid-column: 1;
}
.gallery-item__wrap a:nth-child(21) {
  grid-row: 4 / 6;
  grid-column: 2;
}





.slider-container .tns-ovh {
  width: 90%;
  margin: 0 auto;
}
.gallery-item__wrap img:hover {
  transform: scale(1.02);
  position: relative;
  transition: linear 0.2s all;
}

.gallery-item__wrap img {
  transform: scale(1);
  position: relative;
  transition: linear 0.2s all;
  height: 100%;
  object-fit: cover;
}

.slider-container .controls .prev,
.slider-container .controls .next {
  position: absolute;
  top: calc(50% - 23px);
}

.slider-container .controls .prev img,
.slider-container .controls .next img {
  width: 24px;
  height: 46px;
}

.slider-container .controls .prev:hover,
.slider-container .controls .next:hover {
  cursor: pointer;
}

.slider-container .controls .prev {
  left: 0;
}

.slider-container .controls .next {
  right: 0;
}

@media only screen and (max-width: 899px) {
  .slider-container .controls .prev {
    left: -14px;
  }

  .slider-container .controls .next {
    right: -14px;
  }
}

.gallery-block-wrap img {
  border: 1px solid #343434;
}


.page-template-gallery .page-container {
  position: relative;
}

.page-template-gallery .page-container::after{
  content: '';
  position: absolute;
  width: 100%;
  height: 10.2rem;
  bottom: 0;
  background-color: #343434;
}
/*
.no-show {
  display: none;
}

.gallery-block-wrap .col-span-2 img {
	object-fit: cover;
	height: 700px;
	width: 100%;
	object-fit: center;
}
.gallery-block-wrap .row-span-2 {
	display: flex;
}
.gallery-block-wrap .row-span-2 img {
	object-fit: cover;
	height: 100%;
  width: 100%;
	object-fit: center;
}

.gallery-block-wrap .image-right-top img {
	object-fit: cover;
	width: 100%;
	height: 350px;
	object-fit: center;
}
.gallery-block-wrap .image-right-bottom img {
	object-fit: cover;
	width: 100%;
	height: 350px;
	object-fit: center;
}
.gallery-block-wrap .grid {
  grid-gap: 0.5rem;
}
@media screen and (max-width: 900px) {
  .gallery-block-wrap .row-span-2, .gallery-block-wrap .col-span-2, .gallery-block-wrap .image-right-top, .gallery-block-wrap .image-right-bottom {
    grid-column: span 2 / span 2;
  }
  .gallery-block-wrap .col-span-2 img, .gallery-block-wrap .row-span-2 img {
    height: 350px;
  }
  .gallery-block-wrap .col-span-2 .js-gallery, .gallery-block-wrap .col-span-2 .js-gallery a , .gallery-block-wrap .row-span-2 .js-gallery, .gallery-block-wrap .row-span-2 .js-gallery a {
    width: 100%;
  }
}
*/


.gallery-block-wrap .js-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-height: 350px;
}
.gallery-block-wrap .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1rem;
  margin-top: 1rem;
}

.gallery-block-wrap .js-gallery:nth-child(1) {
  grid-row: 1;
  grid-column: 1 / 3;
}
.gallery-block-wrap .js-gallery:nth-child(1) img {
  max-height: 800px;
}
.gallery-block-wrap .js-gallery:nth-child(2) {
  grid-column: 1;
  grid-row: 2 / 4;
}
.gallery-block-wrap .js-gallery:nth-child(3) {
  grid-row: 2;
  grid-column: 2;
}
.gallery-block-wrap .js-gallery:nth-child(4) {
  grid-row: 3;
  grid-column: 2;
}
.gallery-block-wrap .js-gallery:nth-child(2) img {
  max-height: 720px;
}
.gallery-block-wrap .js-gallery:nth-child(5) {
  grid-row: 4;
  grid-column: 1;
}
.gallery-block-wrap .js-gallery:nth-child(7) img {
  max-height: 720px;
}
.gallery-block-wrap .js-gallery:nth-child(6) {
  grid-row: 5;
  grid-column: 1;
}
.gallery-block-wrap .js-gallery:nth-child(7) {
  grid-row: 4 / 6;
  grid-column: 2;
}
.no-show {
  display: none;
}

.gallery-block-wrap .grid:not(.active) {
  display: none;
}

.btn-gallery {
  z-index: 999;
  position: relative;
  z-index: 15;
  background-color: #343434;
  height: auto;
  width: auto;
  color: rgb(255, 255, 255);
  text-decoration: none;
  white-space: nowrap;
  min-height: 0px;
  min-width: 0px;
  max-height: none;
  max-width: none;
  text-align: left;
  line-height: 23px;
  letter-spacing: 0px;
  font-size: 21px;
  font-weight: 300;
  border: 1px solid #fff;
  background-color: transparent;
  text-transform: uppercase;
  padding: 22px 45px;
  transition: all .4s;
  position: relative;
  box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.15);
  color: #fff;
  transform-origin: 50% 50% 0px;
  opacity: 1;
  transform: translate(0px);
  visibility: visible;
  border-radius: 0px;
  margin-top: 20px;
}

.btn-gallery:hover {
  background-color: #fff;
  color: #333;
}

.btn-gallery.d-none {
  display: none;
}
/* References section gallery image fix */

.partial-section-references .tns-horizontal.tns-subpixel > .tns-item {
  /*
  width: calc(8.33334%) !important;
  */
  width: 99%;
}

@media only screen and (max-width: 899px) {
  .partial-section-references .inner {
    padding-left: 0;
    padding-right: 0;
  }

    .partial-section-references .tns-ovh {
      margin: 0;
      width: 100%;
    }

    .partial-section-references .controls .prev {
      left: 0;
      z-index: 1001;
      background-color: rgba(0, 0, 0, 0.4);
      padding: .5rem;
    }

    .partial-section-references:not(.section--dark-grey) .controls .prev img,
    .partial-section-references:not(.section--dark-grey) .controls .next img {
      -webkit-filter: invert(1);
      filter: invert(1);
    }

    .partial-section-references .controls .next {
      right: 0;
      z-index: 1001;
      background-color: rgba(0, 0, 0, 0.4);
      padding: .5rem;
    }
}
