/* ============================================================
   fux_sitepackage_hsgm — CE „Zeitleiste“ (fux_zeitleiste).
   Geladen per f:asset.css aus dem Element-Template, damit das Element in
   jedem Layout gestaltet ist (Auftrag 2026-10-21; vorher in about.css).

   Quelle: _prototypes/hsgm-about-page.html + css/about.css
   (timeline-section), Werte unveraendert aus about.css uebernommen.
   WCAG: Jahr #0051a3 auf #e6f0fa (6,73:1), Text #6e6e73 auf #fff;
   ohne Einblend-Bewegung; ab < 768 px einspaltig (Reflow 320 px).
   ============================================================ */

.timeline-section {
    --timeline-surface: var(--gray-quaternary, #f5f5f7);
    --timeline-text: var(--gray-primary, #1d1d1f);
    --timeline-muted: var(--gray-secondary, #6e6e73);
    --timeline-line: var(--gray-tertiary, #d2d2d7);
    --timeline-blue: var(--hsgm-blue, #0066cc);
    --timeline-blue-dark: var(--hsgm-blue-dark, #0051a3);
    color: var(--timeline-text);
    padding: var(--space-section, 5rem) 0;
    background: var(--timeline-surface);
}

.timeline-section .section-title {
    margin: 0 0 3rem;
    font-size: var(--font-size-h2, clamp(1.75rem, 3.5vw, 2.5rem));
    font-weight: 700;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 62.5rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

/* Mittellinie (Dekoration) */
.timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1rem;
    width: 2px;
    content: '';
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
    box-sizing: border-box; /* width 50 % inkl. Abstand, sonst Ueberbreite */
    margin: 0 0 2rem;
    padding-left: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Punkt auf der Linie (Dekoration) */
.timeline-item::before {
    position: absolute;
    top: 1.75rem;
    left: calc(1rem + 1px);
    width: 16px;
    height: 16px;
    content: '';
    background: var(--timeline-blue);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
}

.timeline-content {
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.timeline-title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.timeline-year {
    display: block;
    width: fit-content;
    margin: 0 0 0.5rem;
    padding: 0.125rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--timeline-blue-dark);
    background: #e6f0fa;
    border-radius: 2rem;
}

.timeline-text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--timeline-muted);
}

/* ab 768 px: abwechselnd links/rechts der Mittellinie wie im Prototyp */
@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding: 0 3rem 0 0;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding: 0 0 0 3rem;
    }

    .timeline-item::before {
        left: 100%;
    }

    .timeline-item:nth-child(even)::before {
        left: 0;
    }

    /* rechtsbuendig nur Jahr und Titel, Fliesstext bleibt linksbuendig
       (A11y-Review 2026-10-12, Lesbarkeit) */
    .timeline-item:nth-child(odd) .timeline-title {
        text-align: right;
    }

    .timeline-item:nth-child(odd) .timeline-year {
        margin-left: auto;
    }
}

@media (forced-colors: active) {
    .timeline::before,
    .timeline-item::before {
        background: CanvasText;
        border-color: Canvas;
    }

    .timeline-content,
    .timeline-year {
        border: 1px solid CanvasText;
    }
}
