.team {
  background: var(--primary);
  color: var(--white);
}

.team__grid {
  display: grid;
  grid-auto-flow: row dense;
  grid-gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.team__grid.col3 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.team__grid.col4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.team__grid-item-photo {
  display: block;
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
  border-radius: var(--rounded-lg);
}
.team__grid-item-photo img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  -o-object-position: center;
     object-position: center;
  -o-object-fit: cover;
     object-fit: cover;
  border: 0;
}

.team__grid-item .button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .team__grid.col3 .team__grid-item-photo {
    height: 500px;
  }
  .team__grid.col4 .team__grid-item-photo {
    height: 400px;
  }
}
