/* ======================
   Timeline / Blog
   ====================== */

body.timeline-page {
    background-color: var(--tl-bg-color, #f0f3f9);
    color: var(--tl-card-text, #444);
}

/* Falls ein Hintergrundbild gesetzt ist, eine leichte Aufhellung darüberlegen, damit die Karten gut lesbar bleiben */
body.timeline-page[style*="background-image"]::before,
body.timeline-page.has-bg-image::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    z-index: 0;
}

.timeline-main {
    position: relative;
    z-index: 1;
    padding: 120px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Intro-Header */
.timeline-intro {
    text-align: center;
    margin-bottom: 80px;
}

.timeline-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--tl-accent-color, #3a5688);
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 500;
}

.timeline-headline {
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 300;
    color: var(--tl-card-text, #222);
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.timeline-subtitle {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--tl-card-text, #555);
    opacity: 0.85;
}

/* Die Timeline-Hülle */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* Die vertikale Linie in der Mitte */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tl-line-color, #c5cfdf);
    transform: translateX(-50%);
    z-index: 1;
}

/* Der animierte Fortschritts-Verlauf */
.timeline-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--tl-accent-color, #3a5688), transparent);
    transition: height 0.1s linear;
    opacity: 0.7;
}

.timeline-items {
    position: relative;
    z-index: 2;
}

/* Ein Timeline-Eintrag */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 30px 50px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-left {
    left: 0;
    padding-right: 70px;
}

.timeline-right {
    left: 50%;
    padding-left: 70px;
}

/* Initiale Slide-Richtung pro Seite */
.timeline-left { transform: translateX(-30px) translateY(20px); }
.timeline-right { transform: translateX(30px) translateY(20px); }
.timeline-left.is-visible,
.timeline-right.is-visible { transform: translateX(0) translateY(0); }

/* Runde Bubble auf dem Zeitstrahl */
.timeline-bubble {
    position: absolute;
    top: 35px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--tl-card-bg, #fff);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 0 0 4px var(--tl-card-bg, #fff);
    z-index: 3;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline-left .timeline-bubble {
    right: -35px;
}

.timeline-right .timeline-bubble {
    left: -35px;
}

.timeline-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18), 0 0 0 4px var(--tl-card-bg, #fff);
}

/* Sanftes Atmen */
.timeline-bubble::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--tl-accent-color, #3a5688);
    opacity: 0;
    animation: bubble-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bubble-pulse {
    0%, 100% { opacity: 0; transform: scale(0.9); }
    50%      { opacity: 0.3; transform: scale(1.05); }
}

.timeline-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.timeline-bubble:hover img {
    transform: scale(1.15);
}

.timeline-bubble-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-accent-color, #3a5688);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Karten */
.timeline-card {
    background: var(--tl-card-bg, #fff);
    color: var(--tl-card-text, #444);
    padding: 28px 32px;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

/* Kleiner Pfeil/Verbindung zur Bubble */
.timeline-left .timeline-card::after,
.timeline-right .timeline-card::after {
    content: '';
    position: absolute;
    top: 50px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.timeline-left .timeline-card::after {
    right: -16px;
    border-left-color: var(--tl-card-bg, #fff);
}

.timeline-right .timeline-card::after {
    left: -16px;
    border-right-color: var(--tl-card-bg, #fff);
}

/* Kategorie-Tags */
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.timeline-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    background: color-mix(in srgb, var(--tl-accent-color, #3a5688) 12%, transparent);
    color: var(--tl-accent-color, #3a5688);
    font-weight: 600;
}

/* Karten-Inhalt */
.timeline-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.timeline-card-title a {
    color: var(--tl-accent-color, #3a5688);
    text-decoration: none;
    transition: opacity 0.2s;
}

.timeline-card-title a:hover {
    opacity: 0.7;
}

.timeline-card-date {
    font-size: 0.85rem;
    opacity: 0.55;
    margin-bottom: 16px;
}

.timeline-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

.timeline-card-excerpt p {
    margin: 0;
}

.timeline-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tl-accent-color, #3a5688);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.timeline-readmore .arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.timeline-readmore:hover {
    gap: 12px;
}

.timeline-readmore:hover .arrow {
    transform: translateX(4px);
}

/* Leere Timeline */
.timeline-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--tl-card-text, #555);
    opacity: 0.7;
}

/* ======================
   Responsive Timeline
   ====================== */

/* Tablet — alles auf eine Spalte */
@media (max-width: 900px) {
    .timeline-main {
        padding: 100px 16px 60px;
    }

    .timeline-intro {
        margin-bottom: 50px;
    }

    .timeline-line {
        left: 35px;
        transform: none;
    }

    .timeline-item,
    .timeline-left,
    .timeline-right {
        width: 100%;
        left: 0;
        padding: 20px 0 20px 80px;
        margin-bottom: 20px;
    }

    .timeline-left .timeline-bubble,
    .timeline-right .timeline-bubble {
        left: 0;
        right: auto;
    }

    .timeline-bubble {
        width: 60px;
        height: 60px;
        top: 25px;
    }

    /* Pfeil immer links */
    .timeline-left .timeline-card::after {
        right: auto;
        left: -16px;
        border-left-color: transparent;
        border-right-color: var(--tl-card-bg, #fff);
    }

    /* Slide nur von rechts auf Mobil */
    .timeline-left,
    .timeline-right {
        transform: translateX(20px) translateY(20px);
    }

    .timeline-left.is-visible,
    .timeline-right.is-visible {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {
    .timeline-main {
        padding: 90px 12px 40px;
    }

    .timeline-line {
        left: 25px;
    }

    .timeline-item,
    .timeline-left,
    .timeline-right {
        padding-left: 60px;
    }

    .timeline-bubble {
        width: 48px;
        height: 48px;
        top: 22px;
    }

    .timeline-left .timeline-bubble,
    .timeline-right .timeline-bubble {
        left: 0;
        transform: translateX(0);
    }

    .timeline-card {
        padding: 20px 22px;
    }

    .timeline-card-title {
        font-size: 1rem;
    }

    .timeline-headline {
        margin-bottom: 18px;
    }
}
