.team-mate {
  background-color: transparent;
  border: 1px solid #f1f1f1;
  perspective: 1000px;
}

.team-mate-inner {
  position: relative;
  width: 100%;
  height: 400px;
  text-align: center;
  transition: transform 0.3s;
  transform-style: preserve-3d;
}

.team-mate:hover .team-mate-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
}
.card-front img,
.card-back img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-front {
  background-color: #bbb;
  color: black;
}

.card-back {
  color: white;
  transform: rotateY(180deg);
}
