/* Repeated cards share their row's natural height; content never needs clipping. */
.nf-home :is(
  .nf-reassurance-grid,
  .nf-practice-grid,
  .nf-credential-grid,
  .nf-team-grid,
  .nf-step-grid,
  .nf-insight-grid
) {
  align-items: stretch;
}

.nf-home :is(
  .nf-reassurance-grid,
  .nf-practice-grid,
  .nf-credential-grid,
  .nf-team-grid,
  .nf-step-grid,
  .nf-insight-grid
) > .e-con {
  align-self: stretch;
  height: auto;
}

/* Inner-page rows include the team, services, offers, values and approach cards. */
.nf-home.nf-inner .nf-page-row {
  align-items: stretch;
}

.nf-home.nf-inner .nf-page-row > .nf-page-flex {
  align-self: stretch;
  height: auto;
}

.nf-home.nf-inner .nf-credentials-grid {
  align-items: stretch;
}

.nf-home.nf-inner .nf-credentials-grid > .nf-page-case {
  align-self: stretch;
  height: auto;
}

.nf-home.nf-detail .nf-detail-facts {
  align-items: stretch;
}

.nf-home.nf-detail .nf-detail-facts > .nf-detail-fact {
  align-self: stretch;
  height: auto;
}

/* Relevant experience can contain one, two or three rows of three cards. */
.nf-home .nf-experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

.nf-home .nf-experience-grid > .nf-experience-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: min-content;
  max-height: none;
  aspect-ratio: auto;
  padding: 32px;
  background: var(--nf-white);
  overflow-wrap: anywhere;
}

.nf-home .nf-experience-card > :is(p, h3) {
  margin: 0;
  max-width: 100%;
}

.nf-home .nf-experience-card > .nf-experience-meta {
  color: var(--nf-muted);
  font: 600 16px / 22px var(--nf-font);
}

.nf-home .nf-experience-card > .nf-h3 {
  color: var(--nf-green);
  font: 600 28px / 34px var(--nf-font);
}

.nf-home .nf-experience-card > .nf-body {
  color: var(--nf-ink);
  font: 400 18px / 27px var(--nf-font);
}

/* Keep the profile action visible, keyboard accessible and aligned across cards. */
.nf-home .elementor-widget.nf-profile-link {
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
}

.nf-home .nf-person > .nf-profile-link,
.nf-home.nf-inner .nf-page-team-row > .nf-page-flex > .nf-profile-link {
  margin-top: auto;
}

.nf-home a.nf-profile-link,
.nf-home .nf-profile-link .elementor-button,
.nf-home.nf-inner .nf-page-button.nf-profile-link .elementor-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nf-green);
  font: 600 16px / 24px var(--nf-font);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  white-space: normal;
}

.nf-home a.nf-profile-link:focus-visible,
.nf-home .nf-profile-link .elementor-button:focus-visible {
  outline: 2px solid var(--nf-green);
  outline-offset: 4px;
}

@media (hover: hover) {
  .nf-home a.nf-profile-link:hover,
  .nf-home .nf-profile-link .elementor-button:hover,
  .nf-home.nf-inner .nf-page-button.nf-profile-link .elementor-button:hover {
    color: var(--nf-muted);
    text-decoration-thickness: 2px;
  }
}

@media (min-width: 768px) {
  .nf-home .nf-experience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
}

@media (min-width: 1200px) {
  .nf-home .nf-experience-grid > .nf-experience-card {
    aspect-ratio: 1;
  }
}
