.timeline {
  position: relative;
  max-width: 1024px;
  margin: auto;
  padding: 20px 0;
}

/* Mittellinie */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: #333;
}

/* Gerade Einträge */
.entry:nth-child(even) .content {
  background: #b9a3a0;
}

/* Ungerade Einträge */
.entry:nth-child(odd) .content {
  background: #dcd1cf;
}

/* Entry als Flex */
.entry {
  display: flex;
  justify-content: flex-end; /* Standard: rechts */
  align-items: center;
  margin: 20px 0;
  position: relative;
}

/* linke Einträge umdrehen */
.entry.left {
  justify-content: flex-start;
}

/* Content Box */
.entry .content {
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 45%;
}

.entry.left .content {
  transform: translateX(-20px);
}

.entry.right .content {
  transform: translateX(20px);
}

/* Punkt in der Mitte */
.entry::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: white;
  border: 4px solid #333;
  border-radius: 50%;
  z-index: 2;
}

/* gemeinsame Basis für Verbindungslinie */
.entry::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 2px;
  background: #333;
  z-index: 1;
}

.entry.left::before {
  right: 50%;
  width: calc(5% - 20px);
  transform: translateY(-50%);
}

.entry.right::before {
  left: 50%;
  width: calc(5% - 20px);
  transform: translateY(-50%);
}

/* Jahr */
.year {
  font-weight: bold;
  margin-bottom: 10px;
}

@media (max-width: 979px) {
  /* Linie nach links */
  .timeline::before {
    left: 20px;
    transform: none;
  }

   .entry::before {
    display:none;
  }

  .entry.left .content {
    transform: translateX(0px);
  }

  .entry.right .content {
    transform: translateX(0px);
  }
  /* alles untereinander */
  .entry,
  .entry.left,
  .entry.right {
    justify-content: flex-start;
  }

  /* Content nimmt volle Breite */
  .entry .content {
    width: calc(100% - 60px);
    margin-left: 40px;
  }

  /* Punkt an Linie ausrichten */
  .entry::after {
    left: 10px;
    transform: translateY(-50%);
  }
}
