.row.grey-background:has(.team-grid) {
  background: #fff !important;
  padding: 72px 24px 96px !important;
}

.team-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 !important;
}

.team-grid .team-element {
  position: relative;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 1.25rem;
  aspect-ratio: 462 / 600;
  background: #1a2c3e;
}

.team-grid .team-element figure,
.team-grid .team-element .snip1577 {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  overflow: hidden;
}

.team-grid .team-element img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-grid .team-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 88px 16px 20px;
  background: linear-gradient(to top, #1a2c3e 0%, rgba(26, 44, 62, 0.55) 42%, transparent 100%);
  color: #fff;
  text-align: center;
  transform: translateY(2.7rem);
  transition: transform 0.5s ease;
}

.team-grid .team-element:hover .team-content,
.team-grid .team-element:focus-within .team-content {
  transform: translateY(0.85rem);
}

.team-grid .team-content h3,
.team-grid .team-content h4 {
  margin: 0 !important;
  color: #fff !important;
  font-family: Montserrat, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.team-grid .team-content h3 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.team-grid .team-content h4 {
  margin-top: 6px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  transition: margin-top 0.5s ease;
}

.team-grid .team-element:hover .team-content h4,
.team-grid .team-element:focus-within .team-content h4 {
  margin-top: 2px !important;
}

.team-grid .team-content a {
  display: inline-block;
  margin-top: 2.85rem;
  color: #fff !important;
  font-family: Montserrat, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0;
  transition: opacity 0.5s ease, margin-top 0.5s ease;
}

.team-grid .team-element:hover .team-content a,
.team-grid .team-element:focus-within .team-content a {
  opacity: 1;
  margin-top: 0.45rem;
}

@media (hover: none) {
  .team-grid .team-element:hover .team-content,
  .team-grid .team-element:focus-within .team-content {
    transform: translateY(2.7rem);
  }

  .team-grid .team-element:hover .team-content h4,
  .team-grid .team-element:focus-within .team-content h4 {
    margin-top: 6px !important;
  }

  .team-grid .team-element:hover .team-content a,
  .team-grid .team-element:focus-within .team-content a {
    opacity: 0;
    margin-top: 2.85rem;
  }

  .team-grid .team-element.is-inview .team-content {
    transform: translateY(0.85rem);
  }

  .team-grid .team-element.is-inview .team-content h4 {
    margin-top: 2px !important;
  }

  .team-grid .team-element.is-inview .team-content a {
    opacity: 1;
    margin-top: 0.45rem;
  }
}

@media (max-width: 980px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .row.grey-background:has(.team-grid) {
    padding: 48px 16px 64px !important;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}
