.timeline-row {
  display: flex;
  flex-wrap: wrap; /* pozwala kafelkom przechodzić do nowego wiersza */
  gap: 40px;
  position: relative;
}

/* każdy krok */
.step {
  position: relative;
  flex: 1 1 150px; /* równomierne szerokości i możliwość wrapu */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #1b1b1b;
  color: #e0e0e0;
  padding: 10px 10px;
  border-radius: 20px;
  border: 2px solid var(--main-color);
  text-align: center;
  cursor: pointer;
  z-index: 1;
  transition: all 0.3s ease;
}

/* opis kroku */
.step .desc {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  margin-top: 8px;
  color: #cfcfcf;
}

.step:hover .desc {
  max-height: 100px;
  opacity: 1;
}

.step:not(:last-child)::before {
  content: "➤"; /* strzałka Unicode */
  position: absolute;
  top: 50%;
  right: -50px; /* trochę dalej od kafelka niż linia */
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--main-color);
  z-index: 1;
}
/* linia między kafelkami */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  color: var(--main-color);
  top: 50%;
  right: -50px; /* przesunięcie w prawo o połowę gap */
  width: 50px; /* długość odcinka linii między kafelkami */
  height: 4px;
  background-color: var(--main-color);
  z-index: 0;
  transform: translateY(-50%);
  border-radius: 2px;
  font-size: 1.2rem;
}

/* ostatni krok rzędu - opcjonalna strzałka */
.step:last-child::after {
  content: "➤";
  position: absolute;
  top: 50%;
  right: -25px; /* miejsce na strzałkę */
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--main-color);
  z-index: 1;
}

.future {
  top: 50px;
}

/* responsywność */
@media (max-width: 800px) {
  .timeline-row {
    flex-direction: column;
    gap: 15px;
  }
  .step:not(:last-child)::after,
  .step:last-child::after {
    display: none; /* linia i strzałka znikają w pionie */
  }
}
