*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  background-color: #030712;
}

.wrapper {
  margin-top: 2rem;
  width: 90%;
  max-width: 1536px;
  margin-inline: auto;
  height: 125px;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1) 20%,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0)
  );
}

@keyframes scrollLeft {
  to {
    left: -250px;
  }
}

@keyframes scrollRight {
  to {
    right: -250px;
  }
}

.itemLeft,
.itemRight {
  width: 250px;
  height: 125px;
  border-radius: 6px;
  position: absolute;
  animation-timing-function: linear;
  animation-duration: 60s;
  animation-iteration-count: infinite;
  background-size: 250px 125px;
  background-position: no-repeat;
}

.item1 {
  background-image: url("image1.png");
}
.item2 {
  background-image: url("image2.png");
}
.item3 {
  background-image: url("image3.png");
}
.item4 {
  background-image: url("image4.png");
}
.item5 {
  background-image: url("image5.png");
}
.item6 {
  background-image: url("image6.png");
}
.item7 {
  background-image: url("image1.png");
}
.item8 {
  background-image: url("image2.png");
}

.item9 {
  background-image: url("image3.png");
}
.item10 {
  background-image: url("image4.png");
}
.item11 {
  background-image: url("image5.png");
}
.item12 {
  background-image: url("image6.png");
}
.item13 {
  background-image: url("image1.png");
}
.item14 {
  background-image: url("image2.png");
}
.item15 {
  background-image: url("image3.png");
}
.item16 {
  background-image: url("image4.png");
}

.itemLeft {
  left: max(calc(250px * 8), 100%);
  animation-name: scrollLeft;
}

.itemRight {
  right: max(calc(250px * 8), calc(100% + 250px));
  animation-name: scrollRight;
}

.item1 {
  animation-delay: calc(60s / 8 * (8 - 1) * -1);
}

.item2 {
  animation-delay: calc(60s / 8 * (8 - 2) * -1);
}

.item3 {
  animation-delay: calc(60s / 8 * (8 - 3) * -1);
}

.item4 {
  animation-delay: calc(60s / 8 * (8 - 4) * -1);
}

.item5 {
  animation-delay: calc(60s / 8 * (8 - 5) * -1);
}

.item6 {
  animation-delay: calc(60s / 8 * (8 - 6) * -1);
}

.item7 {
  animation-delay: calc(60s / 8 * (8 - 7) * -1);
}

.item8 {
  animation-delay: calc(60s / 8 * (8 - 8) * -1);
}

.item9 {
  animation-delay: calc(60s / 8 * (8 - 1) * -1);
}

.item10 {
  animation-delay: calc(60s / 8 * (8 - 2) * -1);
}

.item11 {
  animation-delay: calc(60s / 8 * (8 - 3) * -1);
}

.item12 {
  animation-delay: calc(60s / 8 * (8 - 4) * -1);
}

.item13 {
  animation-delay: calc(60s / 8 * (8 - 5) * -1);
}

.item14 {
  animation-delay: calc(60s / 8 * (8 - 6) * -1);
}

.item15 {
  animation-delay: calc(60s / 8 * (8 - 7) * -1);
}

.item16 {
  animation-delay: calc(60s / 8 * (8 - 8) * -1);
}

.wrapper:nth-of-type(3) .itemLeft {
  left: max(calc(250px * 8), 100%);
}
