/* ==========================================================================
   Steps section
   ========================================================================== */

.steps {
  --steps-w: 1440px;
  --steps-h: 663px;
  --steps-radius: 50px;
  --steps-yellow: #FAB72A;
  --steps-pad-top: 48px;
  --steps-pad-bottom: 50px;
  --steps-title-h: 72px;
  --steps-title-gap: 32px; /* 48 + 72 + 32 + 461 + 50 = 663 */
  --steps-grid-w: 1338px;
  --steps-grid-h: 461px;
  --steps-gap: 30px;
  --step-card-w: 312px;
  --step-card-h: 461px;
  --steps-pad-x: 51px; /* (1440 − 1338) / 2 — centers grid in panel */
  --step-img-w: 312px;
  --step-img-h: 250px;
  --step-img-top: 80px;
  --step-img-left: 0;
  --step-body-w: 312px;
  --step-body-h: 131px;
  --step-body-top: 330px; /* img top 80 + img height 250 */
  --step-body-pad: 15px;
  --step-body-gap: 5px;
  --step-body-radius: 24px;
  --step-card-radius: 20px;
  --steps-cb-overlap: 150px;
  position: relative;
  z-index: 5;
  background: transparent;
  padding: 0 18px; /* override .section vertical padding */
  margin-bottom: calc(-1 * var(--steps-cb-overlap));
  overflow: visible;
}

.steps-wrap {
  width: var(--steps-w);
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* Figma panel: 1440×663 */
.steps-card {
  width: 100%;
  height: var(--steps-h);
  min-height: var(--steps-h);
  max-height: var(--steps-h);
  margin: 0 auto;
  background: var(--steps-yellow);
  border-radius: var(--steps-radius);
  padding: var(--steps-pad-top) var(--steps-pad-x) var(--steps-pad-bottom);
  box-sizing: border-box;
  overflow: visible;
}

.steps-title {
  text-align: center;
  font-family: 'Gilroy-ExtraBoldItalic', var(--display);
  font-weight: 400;
  font-style: italic; /* italic is in the Gilroy-ExtraBoldItalic face */
  font-size: 54px;
  line-height: 72px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #00274e;
  margin: 0 0 var(--steps-title-gap);
  min-height: var(--steps-title-h);
}

.steps-grid {
  width: var(--steps-grid-w);
  max-width: 100%;
  height: var(--steps-grid-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, var(--step-card-w));
  justify-content: center;
  gap: var(--steps-gap);
  align-items: stretch;
  overflow: visible;
}

.step-card {
  width: var(--step-card-w);
  max-width: 100%;
  height: var(--step-card-h);
  margin: 0;
  overflow: visible;
  text-align: center;
}

.step-card__shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: visible;
}

.step-card__badge {
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: .78rem;
  padding: 8px 22px;
  border-radius: 999px;
  transform: translateX(-50%);
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(11, 27, 52, .12);
}

/* Figma image: 312×250, top 80px, canvas left 342, opacity 1 */
.step-card__media {
  position: absolute;
  top: var(--step-img-top);
  left: var(--step-img-left);
  width: var(--step-img-w);
  height: var(--step-img-h);
  overflow: hidden;
  background: #e8edf5;
  border-radius: var(--step-card-radius) var(--step-card-radius) 0 0;
  opacity: 1;
  z-index: 1;
}

.step-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Figma white body: 312×131 at top 330, pad 15, gap 5, bottom radius 24 */
.step-card__body {
  position: absolute;
  top: var(--step-body-top);
  left: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--step-body-gap);
  width: var(--step-body-w);
  max-width: 100%;
  height: var(--step-body-h);
  min-height: var(--step-body-h);
  padding: var(--step-body-pad);
  background: #fff;
  border-radius: 0 0 var(--step-body-radius) var(--step-body-radius);
  opacity: 1;
}

.step-card__body h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.step-card__body p {
  font-size: .84rem;
  color: var(--navy);
  opacity: .82;
  line-height: 1.45;
  margin: 0;
  max-width: 100%;
  text-align: center;
}

/* ------------------------------- Responsive ------------------------------- */

@media (max-width: 1480px) {
  .steps {
    --steps-cb-overlap: 110px;
  }
}

@media (max-width: 1320px) {
  .steps {
    padding: 0 18px;
  }

  .steps-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .steps-grid {
    width: 100%;
    height: auto;
    margin: 0 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
  }

  .step-card {
    width: 100%;
    height: auto;
    min-height: var(--step-card-h);
  }

  .step-card__media,
  .step-card__body {
    position: static;
    width: 100%;
    height: auto;
    left: auto;
    top: auto;
  }

  .step-card__shell {
    display: flex;
    flex-direction: column;
  }

  .step-card__media {
    min-height: var(--step-img-h);
  }

  .step-card__body {
    min-height: var(--step-body-h);
    flex: 1 1 auto;
  }
}

@media (max-width: 1024px) {
  .steps {
    --step-img-w: 100%;
    --step-img-h: 190px;
    --step-img-left: 0;
    --step-img-top: 0;
    --step-body-h: auto;
    --steps-gap: 24px;
    --steps-cb-overlap: 80px;
  }

  .step-card__body {
    flex: 1 1 auto;
    height: auto;
    min-height: 120px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-card {
    padding: 32px 28px 36px;
    border-radius: 32px;
  }

  .steps-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    line-height: 1.25;
    min-height: 0;
  }

  .step-card {
    min-height: 400px;
  }
}

@media (max-width: 600px) {
  .steps {
    --step-img-h: 180px;
    --steps-gap: 18px;
    --steps-cb-overlap: 50px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-card {
    padding: 28px 20px 32px;
    border-radius: 24px;
  }

  .steps-title {
    font-size: 1.45rem;
    line-height: 1.2;
  }

  .step-card {
    min-height: 360px;
  }
}
