#gallery {
  padding-top: 80px;
  padding-bottom: 40px;

  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow: hidden !important;
}

.border-b-gallery {
  margin-top: 46px;
}

.running-text {
  display: flex;
  gap: 40px;
  align-items: center;
  white-space: nowrap;
  /* -webkit-animation: scroll 30s linear infinite;
  animation: scroll 30s linear infinite; */
  text-transform: uppercase;
}

.running-text-outter {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.running-text img,
.running-text picture img {
  width: 16px;
  height: 16px;
}

.gallery-slick {
  display: flex;
  justify-content: space-between;
  gap: 17px;
  padding: 0 40px;
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-slick img,
.gallery-slick picture img {
  max-width: 213px;
  max-height: 260px;
  width: 213px;
  height: 260px;
  border-radius: 16px;
  -o-object-fit: cover;
  object-fit: cover;
}

.gallery-slick .active-gallery-image img,
.gallery-slick .active-gallery-image picture img {
  max-width: 671px;
  max-height: 650px;
  height: 650px;
  width: 100%;
}

.gallery-functionality {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gallery-functionality > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-functionality span {
  line-height: 110%;
  font-size: 64px;
  font-family: "Moderat";
  font-weight: 300;
  letter-spacing: 0em;
}

.gallery-functionality button {
  background-color: transparent;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.gallery-functionality button svg {
  width: 100%;
  height: 100%;
  color: #141313;
  transition: 0.3s ease all;
}

.gallery-functionality button:hover svg {
  color: var(--grey);
  transition: 0.3s ease all;
}

.image-change-div {
  display: flex;
  gap: 16px;
}

.gallery-slick img {
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

.gallery-slick img.fading {
  opacity: 0.5;
}

.count-wrapper {
  transition: 1s ease all;
  opacity: 1;
}

.count-wrapper.fading {
  opacity: 0;
}

.gallery-slick-mobile {
  display: none;
}

.running-text p.big-text {
  text-wrap: unset;
}

.gallery-buttons-container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 40px;
}

.gallery-button a {
  background: transparent;
  border: 1px solid var(--black-total);
  color: var(--black-total);
  padding: 12px 60px;
  text-transform: uppercase;

  cursor: pointer;
  transition: all 0.5s;
}

.gallery-button a:hover {
  background: var(--black-total);
  color: var(--white);
  transition: all 0.5s;
}

@media screen and (max-width: 1100px) {
  .first-gallery-image {
    display: none;
  }
}

@media screen and (max-width: 950px) {
  .gallery-slick img,
  .gallery-slick picture img {
    width: 150px;
    height: 200px;
  }

  .gallery-slick .active-gallery-image picture img {
    height: 350px;
    width: 350px;
  }
}

@media screen and (max-width: 767px) {
  .border-b-gallery {
    margin-top: 0;
  }

  .mobile-gallery-images img,
  .mobile-gallery-images picture {
    height: 100%;
  }

  .gallery-slick {
    display: none;
  }

  .gallery-slick-mobile {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  #gallery {
    padding: 48px 16px 48px 16px;
    gap: 24px;
  }

  .running-text > p {
    font-size: 40px;
    line-height: 110%;
    letter-spacing: -0.04em;
  }

  .running-text > img,
  .running-text picture {
    width: 8px;
    height: 8px;
  }

  .gallery-slick-mobile .slick-slide {
    margin-right: 16px;
    border-radius: 16px;
    height: 324px;
    max-width: 90vw;
    -o-object-fit: cover;
    object-fit: cover;
  }

  .gallery-slick-mobile .slick-slide img,
  .gallery-slick-mobile .slick-slide picture {
    object-fit: cover;
  }

  .mobile-gallery-indicator {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-right: 16px;
  }

  .image-counter {
    white-space: nowrap;
  }

  .gallery-progress-wrapper {
    width: 100%;
    height: 2px;
    background: var(--grey);
    position: relative;
    overflow: hidden;
  }

  .gallery-progress-bar {
    background: var(--black);
    position: absolute;
    height: 2px;
    top: 0;
    left: 0;
    width: 0;
    transition: 0.5s ease all;
  }

  .running-text {
    gap: 16px;
  }

  .gallery-buttons-container {
    display: flex;
    flex-direction: column;
  }

   .gallery-button:nth-child(1) a{
    color: var(--white) !important;
    background-color: var(--black-total);
   }

    .gallery-button:nth-child(1) a:hover{
    color: var(--black-total) !important;
    background-color: var(--white);
   }

  .gallery-button {
    width: 100%;
  }

  .gallery-button a {
    display: block;
    width: 100%;
    text-transform: uppercase;
    text-align: center;
    justify-content: center;
  }
}

@-webkit-keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 1rem));
  }
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 1rem));
  }
}
