/* ============================================================
 * WKHL Timeline - Basis-Styling
 * Farben werden ueber Elementor-Controls gesetzt und
 * ueberschreiben die Defaults hier per Inline-Style.
 * ============================================================ */

.timeline-container-custom {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.timeline-wrapper-custom {
    position: relative;
}

.timeline-line-horizontal-custom {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, transparent, #E2001A, transparent);
}

.timeline-line-vertical-custom {
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #E2001A, #E2001A, rgba(182, 79, 48, 0.5));
    display: block;
}

.timeline-grid-custom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.timeline-item-custom {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInCustom 0.6s ease forwards;
}

.timeline-item-custom:nth-child(1) {
    animation-delay: 0ms;
}

.timeline-item-custom:nth-child(2) {
    animation-delay: 200ms;
}

.timeline-item-custom:nth-child(3) {
    animation-delay: 400ms;
}

.timeline-item-custom:nth-child(4) {
    animation-delay: 600ms;
}

.timeline-item-custom:nth-child(5) {
    animation-delay: 800ms;
}

.timeline-item-custom:nth-child(6) {
    animation-delay: 1000ms;
}

@keyframes fadeInCustom {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-desktop-custom {
    display: none;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.timeline-circle-custom {
    width: 16px;
    height: 16px;
    background: #E2001A;
    border-radius: 50%;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 8px white, 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.timeline-card-custom {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #A7A8AA;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    height: 100%;
}

.timeline-card-custom:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.timeline-year-custom {
    display: inline-flex;
    background: linear-gradient(135deg, #E2001A, rgba(182, 79, 48, 0.8));
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 10px rgba(182, 79, 48, 0.3);
    flex-shrink: 0;
}

.timeline-year-custom span {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.timeline-title-custom {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.4;
    flex-shrink: 0;
}

.timeline-card-custom:hover .timeline-title-custom {
    color: #E2001A;
}

.timeline-description-custom {
    color: #666;
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
    flex-grow: 1;
}

.timeline-mobile-custom {
    display: flex;
    gap: 16px;
    position: relative;
}

.timeline-mobile-circle-container-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.timeline-mobile-circle-custom {
    width: 20px;
    height: 20px;
    background: #E2001A;
    border-radius: 50%;
    margin-top: 32px;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 8px white, 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-mobile-card-custom {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #A7A8AA;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.timeline-mobile-year-custom {
    display: inline-flex;
    background: linear-gradient(135deg, #E2001A, rgba(182, 79, 48, 0.8));
    color: white;
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(182, 79, 48, 0.3);
}

.timeline-mobile-year-custom span {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.timeline-mobile-title-custom {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.timeline-mobile-description-custom {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

@media (min-width: 768px) {
    .timeline-grid-custom {
        grid-template-columns: repeat(3, 1fr);
        gap: 48px;
        align-items: stretch;
    }

    .timeline-line-vertical-custom {
        display: none;
    }

    .timeline-desktop-custom {
        display: flex;
    }

    .timeline-mobile-custom {
        display: none;
    }

    .timeline-item-custom {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .timeline-line-horizontal-custom {
        display: none;
    }
}
