@keyframes carousel {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes carouselInverted {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(0%);
  }
}

.section-testimonials {
  background: $color-white;
  overflow: hidden;
}

.testimonials-row {
  display: inline-flex;
  flex-direction: row;
  transform: translateX(-50%);

  @media screen and (min-width: 48em) {
    transform: translateX(-29%);
  }
}

.testimonials-row--items {
  display: inline-block;
  position: relative;
  will-change: transform;

  @media screen and (max-width: 48em) {
    animation: carouselInverted 30s linear infinite;
  }
}

@media screen and (max-width: 48em) {
  .testimonials-row:nth-child(even) .testimonials-row--items {
    animation: carousel 30s linear infinite;
  }
}

.section-testimonials:hover,
.section-testimonials:focus {
  .testimonials-row--items {
    animation-play-state: paused;
  }
}

.testimonials-row--wrapper {
  align-items: flex-start;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-around;
}

.row-1 .testimonials-row--wrapper {
  align-items: flex-end;
}

.testimonial-card {
  background: $color-light-grey;
  border-radius: 3px;
  display: inline-block;
  flex: 0 0 260px;
  height: auto;
  margin: 1rem;
  padding: 1rem;
  text-decoration: none;
  transition: transform 0.35s ease;
  width: 260px;

  &:hover {
    transform: scale(1.06);
  }

  .meta {
    display: flex;
    font-size: 0.9rem;

    .avatar {
      background: $color-grey;
      border-radius: 3px;
      height: 2rem;
      margin-right: 1rem;
      width: 2rem;
    }

    .user-info {
      margin-right: 1rem;

      span {
        display: block;
        line-height: 1.35;
      }

      .name {
        font-weight: 600;
      }
    }

    .platform {
      margin-left: auto;

      img {
        filter: grayscale(0.8) contrast(1);
        height: 1rem;
      }
    }
  }

  .content {
    font-size: 0.9rem;
    margin-top: 0.25rem;
  }
}
