/* Team portraits, scoped to the existing team section. */
.teamsec .teamsec-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
}

.teamsec .teamsec-card.team-profile {
  box-sizing: border-box;
  flex: 0 1 calc((100% - 72px) / 4);
  min-width: 0;
  padding: 0 0 28px;
  overflow: hidden;
}

.teamsec .team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e7f0fd;
}

.teamsec .team-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 25%;
}

.teamsec .team-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3683f0;
}

.teamsec .team-photo-placeholder > span {
  font-family: 'Roslindale Display Narrow', serif;
  font-size: clamp(64px, 6vw, 96px);
  font-weight: 400;
  line-height: 1;
}

.teamsec .team-profile > h3 {
  margin: 24px 18px 10px;
  overflow-wrap: anywhere;
}

.teamsec .team-profile > p {
  padding: 0 18px;
  overflow-wrap: anywhere;
}

.teamsec .team-profile > .team-enjoys {
  margin-top: 18px;
}

@media (max-width: 991px) {
  .teamsec .teamsec-card.team-profile {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 767px) {
  .teamsec .teamsec-grid {
    gap: 24px;
  }

  .teamsec .teamsec-card.team-profile {
    flex-basis: 100%;
    max-width: 420px;
    padding-bottom: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teamsec .teamsec-card.team-profile {
    transition: none;
  }

  .teamsec .teamsec-card.team-profile:hover {
    transform: none;
  }
}
