html {
    scroll-behavior: smooth;
    scroll-padding-top: 160px;
}

body {
    font-family: 'Georgia', serif;
    background-color: #f7f3f0;
    margin: 0;
    padding-top: 150px;
    /* Verhindert horizontales Scrollen durch vergrößerte Bilder */
    overflow-x: hidden; 
}

.main-header {
    position: fixed;
    top: 0; width: 100%;
    background: rgba(255, 250, 245, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px dashed #d6b4a1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.decade-nav a {
    text-decoration: none;
    color: #7a5e51;
    background: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    margin: 0 5px;
    border: 1px solid #e0d0c5;
    transition: 0.3s;
    font-weight: bold;
    font-size: 0.9rem;
}

.decade-nav a:hover {
    background: #b30000;
    color: white;
    border-color: #b30000;
}

/* --- DER ECHTE ROTE FADEN --- */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    /* Extra Platz unten, damit das letzte Element auch in die Mitte kann */
    padding-bottom: 50vh; 
}

.timeline::after {
    content: '';
    position: absolute;
    width: 8px;
    left: 50%;
    top: 0; bottom: 0;
    margin-left: -4px;
    background: repeating-linear-gradient(
        45deg, #b30000, #b30000 2px, #ff3333 2px, #ff3333 4px
    );
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3), -1px 0px 3px rgba(0,0,0,0.2);
    border-radius: 10px;
    z-index: 1;
}

.group-title {
    text-align: center;
    color: #b30000;
    margin: 120px 0 80px; /* Mehr Abstand */
    font-size: 2.5rem;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* --- DAS ELEMENT (Basis für JS-Animation) --- */
.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Abstand zwischen den Elementen (etwa halbe Bildschirmhöhe) */
    margin-bottom: 50vh; 
    position: relative;
    z-index: 2;
    
    /* Startwerte (werden gleich von JS überschrieben, aber gut als Fallback) */
    opacity: 0.3;
    /* Wir lassen eine weiche Transition nur für Opacity und Filter */
    transition: opacity 0.2s ease-out, filter 0.2s ease-out;
    /* WICHTIG: Keine Transition auf 'transform' hier, das macht JS! */
}

/* Diese Klasse nutzen wir nur noch für den Knoten in der Mitte */
.timeline-item.center-focus::before {
     /* Wenn es GENAU in der Mitte ist, leuchtet der Knoten auf */
     transform: translate(-50%, -50%) scale(1.3);
     box-shadow: 0 0 15px #ff3333;
}

.image-area, .text-area {
    width: 42%;
}

.image-area img {
    width: 100%;
    border-radius: 4px;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: block;
}

.text-area {
    background: white;
    padding: 30px;
    border-radius: 2px;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.08);
}

.year {
    font-size: 2.8rem;
    font-weight: bold;
    color: #b30000;
    display: block;
    margin-bottom: 10px;
}

/* Der Knoten am Faden */
.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    background: radial-gradient(circle, #ff6666, #990000);
    border-radius: 50%;
    left: 50%; top: 50%;
    /* Standardgröße */
    transform: translate(-50%, -50%) scale(0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Mobile Optimierung */
@media (max-width: 768px) {
    .timeline::after { left: 30px; }
    .timeline-item { flex-direction: column !important; margin-bottom: 50vh; }
    .image-area, .text-area { width: 85%; margin-left: 60px; }
    .timeline-item::before { left: 30px; }
    .image-area { margin-bottom: 20px; }
}