/* Center team cards; horizontal practice-lead blocks keep their Figma layout. */
.nf-home .nf-profile-card:not(.nf-page-senior-expert) .nf-profile-portrait {
  align-self: center;
  margin-inline: auto;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) .nf-profile-portrait .elementor-widget-container {
  text-align: center;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) .nf-profile-portrait img {
  margin-inline: auto;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) :is(.nf-profile-name, .nf-profile-role, .nf-profile-heading) {
  align-self: stretch;
  width: 100%;
  text-align: center;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) :is(.nf-profile-name, .nf-profile-role, .nf-profile-heading) :is(p, .elementor-heading-title) {
  text-align: center;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) .nf-profile-biography {
  align-self: stretch;
  width: 100%;
  text-align: left;
}

.nf-home .nf-profile-card:not(.nf-page-senior-expert) .elementor-widget.nf-profile-link {
  align-self: center;
  margin-inline: auto;
}

/* Share one track per profile field across each visible team row. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 768px) {
    .nf-home.nf-page--the-firm .nf-page-team-row {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nf-home.nf-page--the-firm .nf-page-team-row > .nf-profile-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: subgrid;
      grid-row: span 5;
      width: auto;
    }

    .nf-home.nf-page--the-firm .nf-page-team-row > .nf-profile-card > .nf-profile-link {
      grid-row: 5;
    }
  }

  @media (min-width: 1200px) {
    .nf-home.nf-page--the-firm .nf-page-team-row {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
}

.nf-home .nf-profile-link .elementor-button-content-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nf-home .nf-profile-link .elementor-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  margin: 0;
}

.nf-home .nf-profile-link .elementor-button-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}
