*,
*::before,
*::after {
  box-sizing: border-box;
}

.wrapper {
  background: #fff;
  height: 100%;
  margin: 10px 0 10px 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.carousel {
  position: relative;
  height: 80vh;
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.carousel__item {
  display: flex;
  align-items: center;
  position: absolute;
  width: 100%;
  padding: 0 12px;
  opacity: 0;
  filter: drop-shadow(0 2px 2px #555);
  will-change: transform, opacity;
  animation: carousel-animate-vertical 27s linear infinite;
}

/* Os valores calculados do laço @for para nth-child(1) até nth-child(8) são: */
/* animation-delay: calc(3s * (i - 2)); */

.carousel__item:nth-child(1) {
  /* i=1: calc(3s * (1 - 2)) = calc(3s * -1) = -3s */
  animation-delay: calc(3s * -1);
}

.carousel__item:nth-child(2) {
  /* i=2: calc(3s * (2 - 2)) = calc(3s * 0) = 0s */
  animation-delay: calc(3s * 0);
}

.carousel__item:nth-child(3) {
  /* i=3: calc(3s * (3 - 2)) = calc(3s * 1) = 3s */
  animation-delay: calc(3s * 1);
}

.carousel__item:nth-child(4) {
  /* i=4: calc(3s * (4 - 2)) = calc(3s * 2) = 6s */
  animation-delay: calc(3s * 2);
}

.carousel__item:nth-child(5) {
  /* i=5: calc(3s * (5 - 2)) = calc(3s * 3) = 9s */
  animation-delay: calc(3s * 3);
}

.carousel__item:nth-child(6) {
  /* i=6: calc(3s * (6 - 2)) = calc(3s * 4) = 12s */
  animation-delay: calc(3s * 4);
}

.carousel__item:nth-child(7) {
  /* i=7: calc(3s * (7 - 2)) = calc(3s * 5) = 15s */
  animation-delay: calc(3s * 5);
}

.carousel__item:nth-child(8) {
  /* i=8: calc(3s * (8 - 2)) = calc(3s * 6) = 18s */
  animation-delay: calc(3s * 6);
}

.carousel__item:last-child {
  /* - (3s * 2) = -6s */
  animation-delay: calc(-3s * 2);
}

.carousel__item-head {
  border-radius: 50%;
  background-color: rgb(217, 252, 223);
  width: 90px;
  height: 90px;
  padding: 14px;
  position: relative;
  margin-right: -45px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}

.carousel__item-body {
  width: 100%;
  background-color: #fff;
  flex-shrink: 0;
  border-radius: 8px;
  padding: 16px 20px 16px 60px;
}

.carousel__img{
  height: 70px;
  border-radius: 50%;
}

.title {
  text-transform: capitalize;
  font-size: 20px;
  margin-top: 10px;
  margin-bottom: 15px; /* Adicione uma margem inferior para separar do texto */
}

@keyframes carousel-animate-vertical {
  /* slide-change-timing: 3% */
  /* animation-steps-fraction: 11.1111% */
  /* (animation-steps-fraction * 2): 22.2222% */
  /* (animation-steps-fraction * 3): 33.3333% */

  0% {
    transform: translateY(100%) scale(0.5);
    opacity: 0;
    visibility: hidden;
  }
  3%,
  11.1111% {
    transform: translateY(100%) scale(0.7);
    opacity: 0.4;
    visibility: visible;
  }
  14.1111%,
  22.2222% {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }
  25.2222%,
  33.3333% {
    transform: translateY(-100%) scale(0.7);
    opacity: 0.4;
    visibility: visible;
  }
  36.3333% {
    transform: translateY(-100%) scale(0.5);
    opacity: 0;
    visibility: visible;
  }
  100% {
    transform: translateY(-100%) scale(0.5);
    opacity: 0;
    visibility: hidden;
  }
}