/* Figma 8:299 / 111:3232. Load after the Home, pages and shared-card styles. */
.nf-home .nf-expertise-refined,
.nf-home.nf-inner .nf-expertise-refined {
  width: 100%;
  padding: 100px max(24px, calc((100% - 1240px) / 2));
  background: var(--nf-beige);
}

.nf-home .nf-expertise-refined > :is(.nf-inner, .nf-page-content) {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  gap: 40px;
}

.nf-home .nf-expertise-refined .nf-refinement-section-title {
  width: 100%;
  color: var(--nf-green);
  font: 600 44px / 49px var(--nf-font);
  letter-spacing: -.02em;
}

.nf-home.nf-inner .nf-expertise-refined .nf-refinement-offer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

/* Equal offer heights retain the client's accepted exception to Figma. */
.nf-home.nf-inner .nf-refinement-offer-row > .nf-refinement-card {
  align-self: stretch;
  width: auto;
  height: auto;
  padding: 32px;
}

.nf-home .nf-expertise-refined .nf-refinement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 24px;
  background: var(--nf-pale);
}

.nf-home .nf-expertise-refined .nf-refinement-card--image {
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.nf-home .nf-expertise-refined .nf-refinement-card-copy {
  flex: 1 0 auto;
  gap: 24px;
  padding: 32px;
}

.nf-home .nf-expertise-refined .nf-refinement-card-title {
  width: 100%;
  color: var(--nf-green);
  font: 600 28px / 34px var(--nf-font);
}

.nf-home .nf-expertise-refined .nf-refinement-card-description {
  width: 100%;
  color: var(--nf-muted);
  font: 400 18px / 27px var(--nf-font);
}

.nf-home .nf-expertise-refined .nf-refinement-action-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  min-width: 0;
  padding: 0;
}

.nf-home .nf-expertise-refined--home .nf-refinement-card-copy > .nf-refinement-action-row {
  margin-block-start: auto;
}

@media (min-width: 1024px) {
  @supports (grid-template-rows: subgrid) {
    .nf-home .nf-expertise-refined--home .nf-refinement-card--image {
      display: grid;
      grid-row: span 4;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: subgrid;
    }

    .nf-home .nf-expertise-refined--home .nf-refinement-card-copy {
      display: grid;
      grid-row: span 3;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: subgrid;
    }

    .nf-home .nf-expertise-refined--home .nf-refinement-card-copy > .nf-refinement-action-row {
      margin-block-start: 0;
    }
  }
}

.nf-home .nf-expertise-refined .nf-refinement-action-link {
  flex: 0 1 auto;
  align-self: flex-start;
  width: auto;
  max-width: calc(100% - 48px);
  color: var(--nf-green);
  font: 600 16px / 22px var(--nf-font);
}

.nf-home .nf-expertise-refined .nf-refinement-action-link .elementor-button {
  display: inline-flex;
  justify-content: flex-start;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  text-align: left;
  white-space: normal;
}

.nf-home .nf-expertise-refined .nf-refinement-action-arrow {
  flex: 0 0 24px;
  align-self: flex-start;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.nf-home .nf-expertise-refined .nf-refinement-action-arrow img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* The existing CTA remains a native anchor. Its card is the containing block. */
.nf-home .nf-expertise-refined :is(
  .nf-refinement-card-copy,
  .nf-refinement-card-copy > .e-con-inner,
  .nf-refinement-action-row,
  .nf-refinement-action-row > .e-con-inner,
  .nf-refinement-action-link,
  .nf-refinement-action-link > .elementor-widget-container,
  .nf-refinement-action-link .elementor-button-wrapper,
  .nf-refinement-action-link .elementor-button
) {
  position: static;
}

.nf-home .nf-expertise-refined .nf-refinement-action-link .elementor-button::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  content: "";
}

.nf-home .nf-expertise-refined .nf-refinement-card-title a {
  position: relative;
  z-index: 2;
}

.nf-home .nf-expertise-refined .nf-refinement-card:focus-within {
  outline: 2px solid var(--nf-green);
  outline-offset: 5px;
}

.nf-home .nf-expertise-refined .nf-refinement-card:hover .elementor-button-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Three native office articles stay in the contact promise column. */
.nf-home .nf-home-offices {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.nf-home .nf-home-office {
  gap: 8px;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--nf-muted);
  background: transparent;
}

.nf-home .nf-home-office-title {
  width: 100%;
  color: var(--nf-mint);
  font: 600 22px / 28px var(--nf-font);
}

.nf-home .nf-home-office-address {
  width: 100%;
  color: var(--nf-beige);
  font: 400 18px / 27px var(--nf-font);
}

.nf-home .nf-home-office-address .elementor-button {
  display: inline-flex;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nf-home .nf-home-office-address .elementor-button:hover {
  color: var(--nf-mint);
}

@media (min-width: 1200px) {
  .nf-home .nf-expertise-refined .nf-refinement-card--image {
    min-height: 595px;
  }

  @supports (grid-template-rows: subgrid) {
    .nf-home .nf-expertise-refined--home .nf-practice-grid {
      min-height: 595px;
      grid-auto-rows: auto auto 1fr auto;
    }
  }

  .nf-home .nf-expertise-refined .nf-practice-image,
  .nf-home .nf-expertise-refined .nf-practice-image img {
    width: 100%;
    height: 298px;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .nf-home .nf-expertise-refined,
  .nf-home.nf-inner .nf-expertise-refined {
    padding: 64px 48px;
  }
}

@media (max-width: 1023px) {
  .nf-home .nf-expertise-refined--home .nf-practice-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .nf-home .nf-expertise-refined,
  .nf-home.nf-inner .nf-expertise-refined {
    padding: 24px;
  }

  .nf-home .nf-expertise-refined .nf-refinement-section-title {
    font-size: 28px;
    line-height: 34px;
  }

  .nf-home.nf-inner .nf-expertise-refined .nf-refinement-offer-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
