/* npc/how-it-works: numbered steps with photos. Section padding comes from .npc-how-it-works in core.css. */

.npc-hiw__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 52px;
}
/* The intro zone's wrapper must not swallow the gap between title and subtitle. */
.npc-hiw__head > .npc-zone { display: contents; }

.npc-hiw__eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--npc-primary);
}

.npc-hiw__title {
  margin: 0;
  font-family: var(--npc-font-heading);
  font-size: var(--npc-title-size);
  font-weight: var(--npc-title-weight);
  line-height: 1.2;
  color: var(--npc-heading);
}

.npc-hiw__subtitle {
  margin: 0;
  font-size: 1.125rem;
  font-weight: var(--npc-subtitle-weight);
  color: var(--npc-text-muted);
}

.npc-hiw__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--npc-hiw-cols, 3), minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.npc-hiw.is-steps-2 { --npc-hiw-cols: 2; }
.npc-hiw.is-steps-4 { --npc-hiw-cols: 4; }

/* Dashed path joining the numbers, drawn at the photos' bottom edge */
.npc-hiw__steps::before {
  content: "";
  position: absolute;
  top: 236px;
  left: calc(100% / var(--npc-hiw-cols, 3) / 2);
  right: calc(100% / var(--npc-hiw-cols, 3) / 2);
  border-top: 2px dashed color-mix(in srgb, var(--npc-primary) 35%, transparent);
}

.npc-hiw__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.npc-hiw__media {
  width: 100%;
  margin: 0;
}

/* Two classes: core.css sets `.npc-page-content__body img { height: auto }` */
.npc-hiw .npc-hiw__img {
  display: block;
  width: 100%;
  height: 236px;
  object-fit: cover;
  border-radius: var(--npc-card-radius);
}

.npc-hiw__number {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--npc-primary);
  color: var(--npc-btn-color);
  font-family: var(--npc-font-heading);
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--npc-card-bg);
}

.npc-hiw__step.has-image .npc-hiw__number { margin-top: -46px; }

.npc-hiw__step-title {
  margin: 4px 0 0;
  font-family: var(--npc-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--npc-heading);
}

.npc-hiw__step-text {
  margin: 0;
  max-width: 300px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--npc-text-muted);
}

.npc-hiw__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 52px;
}

.npc-hiw__phone {
  color: var(--npc-text-muted);
}

.npc-hiw__phone a {
  font-weight: 600;
  color: var(--npc-primary);
}

/* Editor only: Bootstrap's .btn base is not loaded in the editor canvas */
.editor-styles-wrapper .npc-hiw .btn {
  display: inline-block;
  padding: var(--npc-btn-pad);
  border-radius: var(--npc-btn-radius);
  text-decoration: none;
}

@media (max-width: 767px) {
  .npc-hiw__steps { grid-template-columns: 1fr; gap: 36px; }
  .npc-hiw__steps::before { display: none; }
  .npc-hiw .npc-hiw__img { height: 200px; }
}

/* Classic step with an icon and no photo */
.npc-how-it-works__image-wrap.is-icon-only { display: flex; justify-content: center; margin-bottom: 12px; }

/* Classic design: step photos share one shape, so cards line up whatever photos were picked (block output only; the ACF section is untouched).
   The shape is the first photo's (--npc-hiw-ratio from render.php / editor.js), so a theme's round or tall photos keep theirs. */
.wp-block-npc-how-it-works .npc-how-it-works__image { display: block; width: 100%; aspect-ratio: var(--npc-hiw-ratio, 4 / 3); object-fit: cover; }

/* A zone's phone link reads "or call …", as the old second link did. */
.npc-hiw__phone-link[href^="tel:"]::before { content: "or call "; }
