/* === /style/erfolge.css === */

/* === Farbvariablen === */
 /* Media Query für mobile Geräte (bis 768px Breite) */
        @media (max-width: 768px) {
            /* Wähle die Event-Blöcke innerhalb der Timeline */
            #timelineEvents .event {
                /* Füge einen unteren Außenabstand hinzu, um sie weiter auseinander zu rücken */
                margin-bottom: 2rem; /* Du kannst diesen Wert (z.B. 1.5rem, 20px, etc.) anpassen, bis der Abstand passt */
            }

            /* Optional: Wenn der letzte sichtbare Block keinen Abstand nach unten haben soll */
            #timelineEvents .event:not(.timeline-end-marker):last-of-type {
                 margin-bottom: 0; /* Entfernt den Abstand beim letzten sichtbaren Element */
            }
             /* Korrektur falls der Endmarker Abstand bekommt */
             #timelineEvents .timeline-end-marker {
                margin-bottom: 0 !important; /* Sicherstellen, dass der unsichtbare Marker keinen Abstand hat */
                height: 1px; /* Minimale Höhe, um Layout-Sprünge zu vermeiden */
                overflow: hidden; /* Inhalt verstecken */
             }
        }


:root {
  --bg-main: #2c3e50;
  --bg-header: #34495e;
  --bg-element: #1f2d3d;
  --primary-accent: #1abc9c;
  --primary-accent-hover: #16a085;
  --text-light: white;
  --text-medium: #ccc;
  --text-subtle: #bdc3c7;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-color-strong: rgba(0, 0, 0, 0.4);
}

.titleOfSite {
    max-width: 90vw;
    margin: 0 auto 5vh auto;
    background-color: #34495e;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #1abc9c;
    box-sizing: border-box;
    text-align: center;
    font-weight: 600;
    font-size: 30px;
    padding: 20px 0 20px 0;
}

@media (min-width: 1000px) {
    .titleOfSite {
        max-width: 900px;
    }
}

        html, body {
            overflow-y: auto !important; /* Erzwingt die vertikale Scrollleiste, wenn der Inhalt überläuft */
            height: auto !important;     /* Verhindert eine feste Höhe, die das Scrollen blockieren könnte */
            -webkit-overflow-scrolling: touch; /* Verbessert das Scrollgefühl auf iOS */
        }
        /* Stellt sicher, dass auch bei aktivem Cookie-Banner gescrollt werden kann */
        body.cookie-blocked {
            overflow-y: auto !important;
        }
        /* Stellt sicher, dass der Hauptinhaltsbereich nicht versehentlich das Scrollen verhindert */
        .main-content {
             overflow: visible !important; /* Verhindert, dass dieser Container Inhalt abschneidet */
        }
        
        .event_date {
            font-size: small;
            color: grey;
        }

/* === Grundlayout & Smooth Scrolling === */
html {
  scroll-behavior: smooth; /* <<< HINZUGEFÜGT für sanftes Scrollen */
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-light);
  overflow-x: hidden; /* Verhindert oft ungewolltes horizontales Scrollen */
}

.main-content {
   margin-left: auto;
   margin-right: auto;
   box-sizing: border-box;
   /* Ggf. globales max-width und padding hier oder in main.css definieren */
   /* max-width: 1200px; */
   /* padding: 1rem; */
}

/* === Counter-Sektion === */
.counters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 1rem;
  box-sizing: border-box;
}

.counter-box {
  background-color: var(--bg-element);
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  text-align: center;
  flex: 1 1 100px;
  box-shadow: 0 4px 8px var(--shadow-color);
  min-width: 70px;
  max-width: 120px;
}

.counter-box h2 {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin: 0;
  color: var(--primary-accent);
}

.counter-box p {
  margin-top: 0.25rem;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--text-medium);
}

/* === Start-Button === */
.start-button {
  display: flex;
  justify-content: center;
  margin: 1rem 0 3rem 0;
}

.start-button a {
  background-color: var(--primary-accent);
  color: var(--text-light);
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 8px var(--shadow-color-strong);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.start-button a:hover {
  background-color: var(--primary-accent-hover);
  transform: translateY(-2px);
}

/* === Timeline === */
.timeline {
  position: relative;
  display: flex;
  /* Reihenfolge von unten (alt) nach oben (neu) */
  flex-direction: column-reverse;
  gap: 3rem;
  max-width: 1000px; /* Maximale Breite */
  margin: 0 auto; /* Zentriert */
  /* Innenabstand (1rem links/rechts für Mindestabstand Inhalt) */
  padding: 4rem 1rem 0;
  box-sizing: border-box; /* Stellt sicher, dass Padding max-width nicht sprengt */
}

/* SVG Pfad für die Verbindungslinie */
svg.connector-path {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  /* height wird von JS gesetzt */
  z-index: 0;
  pointer-events: none;
  overflow: visible; /* Wichtig, damit Linie nicht abgeschnitten wird */
}

.connector-path path {
  stroke: var(--primary-accent);
  stroke-width: 3;
  stroke-dasharray: 8, 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(26, 188, 156, 0.4));
  fill: none;
}

/* Einzelnes Event in der Timeline */
.event {
  position: relative;
  background-color: var(--bg-element);
  padding: 1.5rem;
  border-radius: 10px;
  width: calc(50% - 3rem); /* Breite relativ zur Timeline-Hälfte */
  box-shadow: 0 6px 12px var(--shadow-color-strong);
  z-index: 1; /* Vor der Linie */
  box-sizing: border-box;
  display: flex; /* Für Bild und Text nebeneinander */
  gap: 15px;
  align-items: flex-start;
}

.event.left {
  align-self: flex-start; /* Links im Flex-Container */
  margin-right: auto;
}

.event.right {
  align-self: flex-end; /* Rechts im Flex-Container */
  margin-left: auto;
  flex-direction: row-reverse; /* Bild nach rechts */
}

.event-image-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--primary-accent);
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  flex-shrink: 0; /* Verhindert Schrumpfen */
}

.event-image-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Container für den Text neben dem Bild */
.event-content {
 flex-grow: 1; /* Nimmt verfügbaren Platz ein */
}

.event h3 {
  color: var(--primary-accent);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.event p {
  color: var(--text-subtle);
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  margin-top: 0;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.event-data {
  margin-top: 0.8rem;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--text-medium);
  word-spacing: 5px; /* Verbessert Lesbarkeit der Emojis */
}

/* Textausrichtung je nach Seite */
.event.right .event-content {
  text-align: right;
}
.event.left .event-content {
  text-align: left;
}

/* Unsichtbarer End-Marker */
.timeline-end-marker {
  visibility: hidden;
  position: relative;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  border: none !important;
  overflow: hidden;
  width: 90%; /* Nimmt Breite für Layoutberechnung ein */
  max-width: calc(50% - 3rem);
  box-sizing: border-box;
  align-self: center;
  z-index: -1;
}
.timeline-end-marker * {
  display: none;
}

/* === Verbesserte Mobil-Ansicht für Timeline === */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
  }

  .timeline {
    padding: 3rem 1rem 0;
    gap: 2.5rem;
    flex-direction: column-reverse;
    overflow: visible;
  }

  #timelineEvents .event {
    width: 90%;
    margin: 0 auto 2rem auto;
    padding: 1rem;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
  }

  #timelineEvents .event:last-of-type:not(.timeline-end-marker) {
    margin-bottom: 0;
  }

  .event.left,
  .event.right {
    align-self: center;
    width: 90%;
    flex-direction: column;
    margin: 0 auto;
  }

  .event .event-image-container {
    margin-bottom: 10px;
    width: 55px;
    height: 55px;
  }

  .event .event-content,
  .event.right .event-content {
    text-align: center;
  }

  .timeline-end-marker {
    width: 90%;
    max-width: 90%;
    height: 1px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden;
    visibility: hidden;
    box-sizing: border-box;
  }

  .timeline-end-marker * {
    display: none;
  }
}
