.workflow-steps-row {
  margin-top: 55px;
}

.workflow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-steps::before {
  position: absolute;
  top: 100px;
  right: 0;
  left: 0;
  height: 1px;
  background-color: var(--color-text);
  content: "";
}

.workflow-step {
  position: relative;
  min-width: 0;
}

.workflow-step h3 {
  position: absolute;
  left: 50%;
  width: calc(150% - 16px);
  max-width: none;
  margin: 0;
  font-size: calc(19px * var(--type-scale));
  line-height: calc(26px * var(--type-scale));
  overflow-wrap: anywhere;
  text-align: center;
  transform: translateX(-50%);
  white-space: normal;
}

.workflow-step h3::after {
  position: absolute;
  left: 50%;
  width: 1px;
  height: 30px;
  background-color: var(--color-text);
  content: "";
  transform: translateX(-50%);
}

.workflow-step:nth-child(odd) h3 {
  top: auto;
  bottom: 152px;
}

.workflow-step:nth-child(odd) h3::after {
  top: calc(100% + 22px);
}

.workflow-step:nth-child(even) h3 {
  top: 152px;
}

.workflow-step:nth-child(even) h3::after {
  bottom: calc(100% + 22px);
}

.workflow-step:first-child h3 {
  left: 0;
  text-align: center;
  transform: none;
}

.workflow-step:last-child h3 {
  right: 0;
  left: auto;
  text-align: center;
  transform: none;
}

.workflow-step:first-child h3::before,
.workflow-step:last-child h3::before {
  position: absolute;
  top: calc(100% + 51px);
  width: 50%;
  height: 3px;
  background-color: var(--color-section-bg-light);
  content: "";
}

.workflow-step:first-child h3::before {
  left: 0;
}

.workflow-step:last-child h3::before {
  right: 0;
}

@media (max-width: 767.98px) {
  .workflow-steps-row {
    margin-top: 45px;
  }

  .workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: fit-content;
    max-width: 100%;
    min-height: 0;
    margin-right: auto;
    margin-left: auto;
    padding-left: 40px;
  }

  .workflow-steps::before {
    top: 13px;
    right: auto;
    bottom: 13px;
    left: 8px;
    width: 1px;
    height: auto;
    transform: translateX(-50%);
  }

  .workflow-step h3,
  .workflow-step:nth-child(odd) h3,
  .workflow-step:nth-child(even) h3 {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: 100%;
    text-align: left;
    transform: none;
    white-space: normal;
  }

  .workflow-step h3::after,
  .workflow-step:nth-child(odd) h3::after,
  .workflow-step:nth-child(even) h3::after {
    top: 50%;
    bottom: auto;
    left: -32px;
    width: 13px;
    height: 13px;
    border: 1px solid var(--color-text);
    border-radius: 50%;
    background-color: var(--color-text-light);
    transform: translate(-50%, -50%);
  }

  .workflow-step:first-child h3::before,
  .workflow-step:last-child h3::before {
    display: none;
  }
}
