/* =========================
   TIMELINE LAYOUT
========================= */
.timeline-section {
  padding: 40px 24px 80px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding: 20px 0;
}

/* Die durchgehende vertikale Linie auf der linken Seite */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px; /* Abstand vom linken Rand */
  width: 4px;
  background: rgba(210, 105, 30, 0.2); /* Leicht transparentes Chocolate */
  border-radius: 2px;
}

/* =========================
   EINZELNE STATIONEN
========================= */
.timeline-item {
  position: relative;
  margin-bottom: 48px;

  /* Startzustand für die Animation: Unsichtbar und leicht nach unten verschoben */
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* Wenn das JS die Klasse 'visible' hinzufügt, sliden sie rein */
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Der Punkt auf der Linie --- */
.timeline-dot {
  position: absolute;
  left: 12px; /* Perfekt zentriert über der 4px Linie (20px - halbe Punktbreite) */
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 4px solid chocolate;
  z-index: 2;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
}

/* Leuchtet auf, wenn beim Scrollen sichtbar */
.timeline-item.visible .timeline-dot {
  background: chocolate;
  box-shadow: 0 0 12px rgba(210, 105, 30, 0.6);
}

/* --- Der Ast nach rechts --- */
.timeline-branch {
  position: absolute;
  left: 32px; /* Startet direkt neben dem Punkt */
  top: 9px; /* Mittig zum Punkt */
  width: 30px;
  height: 3px;
  background: chocolate;
  z-index: 1;

  /* Animation: Wächst von links nach rechts */
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s ease 0.3s; /* 0.3s Verzögerung, wartet auf die Box */
}

.timeline-item.visible .timeline-branch {
  transform: scaleX(1);
}

/* --- Die Text-Box --- */
.timeline-content {
  margin-left: 76px; /* Platz für Linie, Punkt und Ast */
  background: white;
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border-left: 4px solid transparent;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
  border-left-color: chocolate;
  transform: translateX(4px);
}

/* Texte in der Box */
.timeline-date {
  display: inline-block;
  font-family: "ArchivoBlack-Regular", sans-serif;
  color: chocolate;
  font-size: 0.9rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  color: #111;
}

.timeline-content p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}
/* =========================
   ÜBERSCHRIFT
========================= */
.titel {
  position: sticky;
  top: calc(6vh + 13px); /* Bleibt passend unter der Navigation stehen */
  
  /* Der Fade-Effekt: Oben 100% Weiß, nach unten fließend transparent */
  background: linear-gradient(to bottom, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
  
  /* Wir geben nach unten hin mehr Padding (60px), das ist unsere "Fade-Zone" */
  padding: 16px 0 80px 0; 
  margin: 0;
  
  z-index: 10;
  text-align: center;
  
  /* Wichtig: Hebt den alten Glas-Effekt auf, falls noch Reste da sind */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Anpassung für Handys */

/* =========================
   MOBILE ANSICHT
========================= */
@media (max-width: 768px) {
  .timeline::before {
    left: 10px; /* Linie etwas weiter nach links rutschen */
  }
  .timeline-dot {
    left: 2px;
  }
  .timeline-branch {
    left: 22px;
    width: 20px;
  }
  .timeline-content {
    margin-left: 54px;
    padding: 20px;
  }
  .titel {
    top: 80px;
    font-size: 1.8rem;
  }
}
