/* =============================================================================
   STEP BY STEP BLOCK (Progression Path)
   Figma: College › Progression Path (node 1213:3179)
   ============================================================================= */

.step-by-step {
  /* Arrow zone between cards: 20px gap + 32px arrow + 20px gap */
  --steps-arrow-zone: 72px;

  background-color: var(--wp--preset--color--brand-900, #35377a);
  font-family: 'Inter', sans-serif;
}

.step-by-step__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding-top: 64px;
  padding-bottom: 64px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.step-by-step__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 950px;
  text-align: center;
  color: var(--wp--preset--color--white, #ffffff);
  word-break: break-word;
}

.step-by-step .step-by-step__heading {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: 40px;
  font-weight: 600;
  line-height: 52px;
}

.step-by-step .step-by-step__description {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

/* ── Steps row / slider ─────────────────────────────────────────────────── */

.step-by-step__slider {
  --steps-visible: var(--steps-visible-desktop, 5);
  /* Card width so that exactly N cards + (N-1) arrow zones fill the row */
  --steps-card-width: calc((100% - (var(--steps-visible) - 1) * var(--steps-arrow-zone)) / var(--steps-visible));

  width: 100%;
}

.step-by-step .step-by-step__track {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.step-by-step__track::-webkit-scrollbar {
  display: none;
}

.step-by-step .step-by-step__item {
  display: flex;
  align-items: stretch;
  flex: 0 0 calc(var(--steps-card-width) + var(--steps-arrow-zone));
  margin: 0;
  padding: 0;
  scroll-snap-align: start;
}

.step-by-step .step-by-step__item:last-child {
  flex-basis: var(--steps-card-width);
}

.step-by-step__card {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  /* Figma's 1px stroke sits inside its 24px padding: 23px + 1px border */
  padding: 23px;
  border: 1px solid #6e79e6;
  border-radius: 16px;
  background-color: var(--wp--preset--color--brand-950, #232351);
}

.step-by-step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background-color: var(--wp--preset--color--brand-600, #5354d8);
  color: var(--wp--preset--color--white, #ffffff);
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
}

.step-by-step__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  word-break: break-word;
}

.step-by-step .step-by-step__title {
  margin: 0;
  color: var(--wp--preset--color--white, #ffffff);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.step-by-step .step-by-step__subtitle {
  margin: 0;
  color: var(--wp--preset--color--brand-400, #8a9aef);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.step-by-step__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--steps-arrow-zone);
  align-self: center;
}

.step-by-step__arrow img {
  display: block;
  width: 32px;
  height: 32px;
}

/* ── Slider navigation (only shown when the row overflows) ──────────────── */

.step-by-step__nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.step-by-step__nav[hidden] {
  display: none;
}

.step-by-step__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #6e79e6;
  border-radius: 24px;
  background-color: var(--wp--preset--color--brand-950, #232351);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.step-by-step__nav-btn img {
  display: block;
  width: 24px;
  height: 24px;
}

.step-by-step__nav-btn--prev img {
  transform: scaleX(-1);
}

.step-by-step__nav-btn:hover:not(:disabled) {
  background-color: var(--wp--preset--color--brand-600, #5354d8);
}

.step-by-step__nav-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--white, #ffffff);
  outline-offset: 2px;
}

.step-by-step__nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
  .step-by-step__slider {
    --steps-visible: var(--steps-visible-tablet, 3);
  }
}

@media (max-width: 767px) {
  .step-by-step {
    --steps-arrow-zone: 56px;
  }

  .step-by-step__inner {
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .step-by-step .step-by-step__heading {
    font-size: 28px;
    line-height: 36px;
  }

  .step-by-step__slider {
    --steps-visible: var(--steps-visible-mobile, 1);
  }

  .step-by-step__arrow img {
    width: 24px;
    height: 24px;
  }

  .step-by-step__nav {
    margin-top: 32px;
  }
}
