/* Scoped to the staff sections on the home and About pages. */
.team-section > .container {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.row.team-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0 0;
}

.team-grid > [class*="col-"] {
  grid-column: span 4;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  padding-bottom: 0 !important;
}

.team-grid > .col-md-3 {
  grid-column: span 3;
}

.team-grid > [class*="col-"] > a {
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  border-radius: 0;
  text-decoration: none;
}

.team-grid .service-card-style2 {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 26px;
  overflow: hidden;
  border: 5px solid #a8a8a8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 6px 22px rgba(17, 35, 82, 0.06);
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.team-grid .service-card-style2:hover {
  border: 5px solid #a8a8a8;
  box-shadow: 0 10px 28px rgba(17, 35, 82, 0.11);
}

.team-grid > [class*="col-"] > a:hover .service-card-style2,
.team-grid > [class*="col-"] > a:focus-visible .service-card-style2,
.team-grid .service-card-style2:has(a[href]):hover,
.team-grid .service-card-style2:has(a[href]:focus-visible) {
  border-color: #263b72;
}

.team-grid a:focus-visible {
  outline: 3px solid #4780b5;
  outline-offset: 4px;
  border-radius: 0;
}

.team-grid .service-card-style2-photo {
  overflow: hidden;
  background: #f3f6f8;
  border-bottom: 1px solid #edf1f5;
}

.team-grid .service-card-style2-photo picture {
  display: block;
}

.team-grid .service-card-style2-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.team-grid .service-card-style2 .service-card-name {
  margin: 22px 20px 0;
  padding-top: 0 !important;
  color: #112352;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: none !important;
  overflow-wrap: break-word;
}

.team-grid .service-card-style2 .service-card-name span {
  display: inline-block;
  margin-top: 9px;
  color: #40749f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.team-grid .service-card-style2 .team-card-specialty {
  margin: 18px 20px 0;
  padding-top: 16px;
  border-top: 1px solid #e6edf3;
  color: #263b52;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.team-grid .service-card-style2 .team-card-details {
  margin: 8px 20px 0;
  color: #596b7b;
  font-size: 14px;
  line-height: 1.65;
}

.team-grid .service-card-name,
.team-grid .service-card-name span,
.team-grid .team-card-specialty,
.team-grid .team-card-details {
  overflow-wrap: anywhere;
}

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

  .team-grid > [class*="col-"] {
    grid-column: span 1;
  }
}

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

  .team-grid > [class*="col-"] {
    grid-column: span 1;
    max-width: 380px;
    justify-self: center;
  }

  .team-grid .service-card-style2 .service-card-name,
  .team-grid .service-card-style2 .team-card-specialty,
  .team-grid .service-card-style2 .team-card-details {
    margin-right: 16px;
    margin-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-grid .service-card-style2 {
    transition: none;
  }
}
