.stepper {
  display: flex;
  flex-direction: column;
  align-items: start;
  position: relative;
}

.step-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step {
  width: 35px;
  height: 35px;
  background-color: #0a9928;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  z-index: 1;
  flex-shrink: 0;
}

.line {
  width: 3px;
  margin: 0.8rem auto;
}

.green-line {
  background-color: #0a9928;
  height: 128px;
}

/* Desktop Line Heights - Default */
.red-line-1 {
  background-color: #0a9928;
  height: 353px;
}

.red-line-2 {
  border-left: 3px dotted red;
  height: 260px;
}

.red-line-2-completed {
  background-color: #0a9928;
  height: 260px;
}

.red-line-3 {
  border-left: 3px dotted red;
  height: 112px;
}

.red-line-3-completed {
  background-color: #0a9928;
  height: 112px;
}

.red-line-4 {
  border-left: 3px dotted red;
  height: 112px;
}

.red-line-4-completed {
  background-color: #0a9928;
  height: 112px;
}

.red-line-5 {
  border-left: 3px dotted red;
  min-height: 203px;
}

.red-line-5-completed {
  background-color: #0a9928;
  height: 203px;
}

/* 📱 TABLET & SMALL LAPTOPS: 1024px - 1366px */
@media (min-width: 1024px) and (max-width: 1366px) {
  .green-line {
    height: 140px;
  }

  .red-line-1 {
    height: 420px;
  }

  .red-line-2,
  .red-line-2-completed {
    height: 280px;
  }

  .red-line-3,
  .red-line-3-completed {
    height: 125px;
  }

  .red-line-4,
  .red-line-4-completed {
    height: 125px;
  }

  .red-line-5,
  .red-line-5-completed {
    height: 220px;
  }
}

/* 💻 MEDIUM SCREENS: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .green-line {
    height: 150px;
  }

  .red-line-1 {
    height: 480px;
  }

  .red-line-2,
  .red-line-2-completed {
    height: 300px;
  }

  .red-line-3,
  .red-line-3-completed {
    height: 135px;
  }

  .red-line-4,
  .red-line-4-completed {
    height: 135px;
  }

  .red-line-5,
  .red-line-5-completed {
    height: 240px;
  }
}

/* 📱 MOBILE & TABLETS: Below 768px - Horizontal Layout */
@media (max-width: 767px) {
  .stepper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
  }

  .step-container {
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
  }

  .step {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .line {
    width: 22px;
    height: 3px;
    margin: 0 5px;
  }

  .green-line {
    background-color: #0a9928;
    border: none;
    width: 22px;
    height: 3px;
  }

  .red-line-1 {
    background-color: #0a9928;
    border: none;
    width: 22px;
    height: 3px;
  }

  .red-line-2,
  .red-line-2-completed {
    border-left: none;
    border-top: 3px dotted red;
    width: 22px;
    height: 3px;
  }

  .red-line-2-completed {
    background-color: #0a9928;
    border-top: none;
  }

  .red-line-3,
  .red-line-3-completed {
    border-left: none;
    border-top: 3px dotted red;
    width: 22px;
    height: 3px;
  }

  .red-line-3-completed {
    background-color: #0a9928;
    border-top: none;
  }

  .red-line-4,
  .red-line-4-completed {
    border-left: none;
    border-top: 3px dotted red;
    width: 22px;
    height: 3px;
  }

  .red-line-4-completed {
    background-color: #0a9928;
    border-top: none;
  }

  .red-line-5,
  .red-line-5-completed {
    border-left: none;
    border-top: 3px dotted red;
    width: 22px;
    height: 3px;
    min-height: 3px;
  }

  .red-line-5-completed {
    background-color: #0a9928;
    border-top: none;
  }
}

/* 📱 EXTRA SMALL MOBILE: Below 480px */
@media (max-width: 479px) {
  .step {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .line {
    width: 18px;
    margin: 0 3px;
  }

  .green-line,
  .red-line-1,
  .red-line-2,
  .red-line-2-completed,
  .red-line-3,
  .red-line-3-completed,
  .red-line-4,
  .red-line-4-completed,
  .red-line-5,
  .red-line-5-completed {
    width: 18px;
  }
}

/* 🖥️ LARGE SCREENS: Above 1366px */
@media (min-width: 1367px) and (max-width: 1600px) {
  .green-line {
    height: 135px;
  }

  .red-line-1 {
    height: 380px;
  }

  .red-line-2,
  .red-line-2-completed {
    height: 270px;
  }

  .red-line-3,
  .red-line-3-completed {
    height: 118px;
  }

  .red-line-4,
  .red-line-4-completed {
    height: 118px;
  }

  .red-line-5,
  .red-line-5-completed {
    height: 210px;
  }
}

/* 🖥️ EXTRA LARGE SCREENS: Above 1600px */
@media (min-width: 1601px) {
  .green-line {
    height: 128px;
  }

  .red-line-1 {
    height: 353px;
  }

  .red-line-2,
  .red-line-2-completed {
    height: 260px;
  }

  .red-line-3,
  .red-line-3-completed {
    height: 112px;
  }

  .red-line-4,
  .red-line-4-completed {
    height: 112px;
  }

  .red-line-5,
  .red-line-5-completed {
    height: 203px;
  }
}