:root {
  --timeline-line: #eeeeee;
  --timeline-border: #d4d4d4;
  --timeline-shadow: rgba(0, 0, 0, 0.175);
  --primary: #2e6da4;
  --success: #3f903f;
  --warning: #f0ad4e;
  --danger: #d9534f;
  --info: #5bc0de;
}

/* Grundlayout der Timeline */
.timeline {
  list-style: none;
  padding: 20px 0;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--timeline-line);
  left: 50%;
  transform: translateX(-50%);
}

/* Listenelemente */
.timeline > li {
  position: relative;
  margin-bottom: 40px;
}

.timeline > li::before,
.timeline > li::after {
  content: "";
  display: table;
}

.timeline > li::after {
  clear: both;
}

/* Panels (Inhalt) */
.timeline > li > .timeline-panel {
  width: 46%;
  float: left;
  border: 1px solid var(--timeline-border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline > li > .timeline-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Panel-Pfeile */
.timeline > li > .timeline-panel::before {
  content: "";
  position: absolute;
  top: 26px;
  right: -15px;
  border-top: 15px solid transparent;
  border-left: 15px solid var(--timeline-border);
  border-bottom: 15px solid transparent;
}

.timeline > li > .timeline-panel::after {
  content: "";
  position: absolute;
  top: 27px;
  right: -14px;
  border-top: 14px solid transparent;
  border-left: 14px solid #fff;
  border-bottom: 14px solid transparent;
}

/* Timeline-Badge (Icons) */
.timeline > li > .timeline-badge {
  color: #fff;
  width: 50px;
  height: 50px;
  line-height: 50px;
  font-size: 1.4em;
  text-align: center;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #999999;
  border-radius: 50%;
  z-index: 100;
  box-shadow: 0 0 0 5px #fff;
}

/* Invertierte Timeline (rechts) */
.timeline > li.timeline-inverted > .timeline-panel {
  float: right;
}

.timeline > li.timeline-inverted > .timeline-panel::before {
  border-left: none;
  border-right: 15px solid var(--timeline-border);
  left: -15px;
  right: auto;
}

.timeline > li.timeline-inverted > .timeline-panel::after {
  border-left: none;
  border-right: 14px solid #fff;
  left: -14px;
  right: auto;
}

/* Farben der Badges */
.timeline-badge.primary { background-color: var(--primary) !important; }
.timeline-badge.success { background-color: var(--success) !important; }
.timeline-badge.warning { background-color: var(--warning) !important; }
.timeline-badge.danger  { background-color: var(--danger) !important; }
.timeline-badge.info    { background-color: var(--info) !important; }

/* Textformatierung */
.timeline-title {
  margin-top: 0;
  font-weight: 600;
  color: inherit;
}

.timeline-body > p,
.timeline-body > ul {
  margin-bottom: 0;
}

.timeline-body > p + p {
  margin-top: 5px;
}

/* Zentrierte Paginierung */
.paginationcenter {
  text-align: center;
}

/* Mobile-Optimierung */
@media (max-width: 767px) {
  .timeline::before {
    left: 25px;
    transform: none;
  }

  .timeline > li > .timeline-badge {
    left: 0;
    transform: none;
  }

  .timeline > li > .timeline-panel {
    width: calc(100% - 70px);
    float: none;
    margin-left: 70px;
  }

  .timeline > li > .timeline-panel::before,
  .timeline > li > .timeline-panel::after {
    display: none;
  }
}
