.testimonial {
  font-size: 1.2rem;
}

.testimonial:first-of-type {
  margin-top: 6rem;
}

.testimonial__image-container {
  width: 100%;
  max-width: 40rem;
  box-shadow: 3px 3px 5px 3px rgba(0, 0, 0, 0.3);
}

#customer-1:hover .testimonial__image-container,
#customer-2:hover .testimonial__image-container {
  animation: flip 1s ease-out forwards;
}

.testimonial__image {
  width: 100%;
  vertical-align: top;
}

.testimonial__info {
  text-align: right;
  padding: 0.9rem;
}

#customer-2.testimonial {
  text-align: right;
}

#customer-2 .testimonial__info {
  text-align: left;
}

.testimonial__name {
  margin: 0.2rem;
  color: #ff5454;
  font-size: 2rem;
}

.testimonial__subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: #ccc;
}

.testimonial__subtitle a {
  color: inherit;
  text-decoration: none;
}

.testimonial__subtitle a:hover,
.testimonial__subtitle a:active {
  color: #7a7a7a;
}

.testimonial__text {
  margin: 0.2rem;
}

@media (min-width: 40rem) {
  .testimonial {
    margin: 3rem auto;
    max-width: 1500px;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  .testimonial__image-container {
    display: inline-block;
    vertical-align: middle;
    width: 66%;
  }
  .testimonial__info {
    display: inline-block;
    vertical-align: middle;
    width: 30%;
  }
}

@keyframes flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(160deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
