﻿/* Grunddesign der Timeline */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Die vertikale Linie in der Mitte */
.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: green; /* Deine Vereinsfarbe */
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px; /* Zentrierung */
}

/* Container für ein einzelnes Ereignis */
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%; /* Nimmt die Hälfte der Breite ein */
  box-sizing: border-box;
}

/* Abwechselnd links und rechts ausrichten (Desktop) */
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

/* Die grafischen Chronik-Punkte auf der Linie */
.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px; /* Zentriert auf der Linie für ungerade */
  background-color: #ffffff;
  border: 4px solid #2B6CB0; /* Akzentfarbe für die Punkte */
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

/* Punkt-Position für die rechten (geraden) Elemente korrigieren */
.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
}

/* Jahreszahl-Styling */
.timeline-date {
  font-weight: bold;
  font-size: 1.2rem;
  color: #0066cc;
  margin-bottom: 5px;
}

/* Der Inhaltsblock (ähnlich einer eleganten Box) */
.timeline-content {
  padding: 15px 20px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 5%);
  display: inline-block;
  text-align: left; /* Text im Inneren immer linksbündig */
  max-width: 85%;
}

/*###################MOBILE RESPONSIVE####################*/

/* Mobile-Optimierung (Smartphones) */
@media (max-width: 768px) {
  /* Linie nach links verschieben */
  .timeline::after {
    left: 31px;
  }

  /* Jedes Item nutzt nun die volle Breite */
  .timeline-item {
    width: 100%;
    padding-left: 55px;
    padding-right: 25px;
    text-align: left !important; /* Hebt das rechtsbündige Design auf */
  }

  /* Alle Items nach links ausrichten */
  .timeline-item:nth-child(even) {
    left: 0;
  }

  /* Alle Punkte auf die linke Linie setzen */
  .timeline-dot {
    left: 23px !important;
    right: auto;
  }
  
  .timeline-content {
    max-width: 100%;
  }
}