.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.team {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
}

.team-item {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-basis: 350px;
  margin: 0 15px;
  width: 380px;
  overflow: hidden; 
  position: relative; 
  transition: all 0.4s;
  height: 600px;
}

.team-item:hover {
  flex-basis: 550px;
  margin: 0 20px;
  transform: scale(1.1); 
}

.team-item img {
  width: 100%;
  
  border-radius: 15px;
  height: 400px;
  transition: transform 0.4s;
}

.team-item:hover img {
  transform: scale(1.3); 
}

.team-item:hover .profile-contents p {
  max-height: 250px;
}

.profile {
  background-color: #222;
  position: relative;
}

.profile:before {
  content: " ";
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.95) 100%
  );
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 250px;
}

.profile-contents {
  position: absolute;
  bottom: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-contents h2 {
  font-size: 20px;
}

.profile-contents h2 span {
  display: block;
  font-size: 12px;
}

.profile_red {
  color: red;
}

.profile_blue {
  color: #8ca2b4;
}

.profile_purple {
  color: purple;
}

.profile_yellow {
  color: #fffcb4;
}

.profile-contents p {
  color: white;
  font-size: 10px;
  min-width: 140px;
  max-height: 0;
  overflow: hidden;
  transition: all 2s;
}
