/**
 * dailybuddy Content Timeline Styles
 */

.dailybuddy-timeline-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Vertical Timeline */
.dailybuddy-timeline-vertical {
    padding: 20px 0;
}

.dailybuddy-timeline {
    position: relative;
    padding: 50px 0;
}

/* Timeline Line - clipped to start and end at bulletpoints */
.dailybuddy-timeline-line {
    position: absolute;
    left: 50%;
    top: 50px;
    bottom: 50px;
    width: 2px;
    background-color: #e5e5e5;
    transform: translateX(-50%);
}

.dailybuddy-timeline-item {
    position: relative;
    margin-bottom: 0;
    padding: 30px 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.dailybuddy-timeline-item:first-child {
    padding-top: 0;
}

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

/* Timeline Marker - centered vertically to content */
.dailybuddy-timeline-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.dailybuddy-timeline-icon {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 3px solid #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 16px;
    transition: all 0.3s ease;
    border-style: solid;
}

.dailybuddy-timeline-icon i,
.dailybuddy-timeline-icon svg {
    display: block;
}

.dailybuddy-timeline-item:hover .dailybuddy-timeline-icon {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(52, 152, 219, 0.1);
}

/* Timeline Content */
.dailybuddy-timeline-item-content {
    position: relative;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: calc(50% - 40px);
    transition: all 0.3s ease;
}

.dailybuddy-timeline-item:nth-child(odd) .dailybuddy-timeline-item-content {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
}

.dailybuddy-timeline-item:nth-child(even) .dailybuddy-timeline-item-content {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
}

.dailybuddy-timeline-item-content:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* No arrow - removed as requested */

/* Timeline Item Elements */
.dailybuddy-timeline-item-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
}

.dailybuddy-timeline-item-image {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.dailybuddy-timeline-item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.dailybuddy-timeline-item-image:hover img {
    transform: scale(1.05);
}

.dailybuddy-timeline-item-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.4;
}

.dailybuddy-timeline-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dailybuddy-timeline-item-title a:hover {
    color: #3498db;
}

.dailybuddy-timeline-item-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

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

.dailybuddy-timeline-read-more {
    margin-top: 15px;
}

.dailybuddy-timeline-read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dailybuddy-timeline-read-more-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Horizontal Timeline */
.dailybuddy-timeline-horizontal .dailybuddy-timeline {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 60px 20px 20px 20px; /* Extra padding oben für die Linie */
    scroll-behavior: smooth;
    align-items: stretch; /* Alle Items gleiche Höhe */
    position: relative;
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-line {
    position: absolute;
    left: 40px; /* Feste Position am ersten Bulletpoint */
    right: auto;
    top: 40px; /* Linie oben auf Höhe der Bulletpoints */
    bottom: auto;
    width: auto; /* Wird dynamisch per JavaScript gesetzt */
    height: 2px;
    transform: none;
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-item {
    flex: 0 0 300px;
    margin-right: 30px;
    margin-bottom: 0;
    padding: 0;
    flex-direction: column;
    display: flex;
    align-items: stretch; /* Content nimmt volle Höhe */
    position: relative;
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-item:last-child {
    margin-right: 0;
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-marker {
    position: absolute;
    left: 50%; /* Horizontal in der Mitte der Content-Box */
    top: 80px; /* Auf Höhe der Linie */
    transform: translateX(-50%);
    margin-bottom: 0;
    flex-shrink: 0;
    z-index: 10; /* Marker über der Linie */
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-item-content {
    width: 100%;
    text-align: center;
    height: 100%; /* Nimmt volle verfügbare Höhe */
    display: flex;
    flex-direction: column;
    margin-top: 60px; /* Platz für den Bulletpoint oben */
}

.dailybuddy-timeline-horizontal .dailybuddy-timeline-item-content::before {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .dailybuddy-timeline-line {
        left: 30px;
    }

    .dailybuddy-timeline-marker {
        left: 30px;
        transform: translateX(-50%);
    }

    .dailybuddy-timeline-item {
        padding-left: 80px;
    }

    .dailybuddy-timeline-item-content {
        width: 100%;
        text-align: left !important;
    }

    .dailybuddy-timeline-item:nth-child(odd) .dailybuddy-timeline-item-content,
    .dailybuddy-timeline-item:nth-child(even) .dailybuddy-timeline-item-content {
        margin-left: 0;
        margin-right: 0;
    }

    .dailybuddy-timeline-item-content::before {
        left: -15px !important;
        right: auto !important;
        border-width: 10px 15px 10px 0 !important;
        border-color: transparent #fff transparent transparent !important;
    }

    .dailybuddy-timeline-horizontal .dailybuddy-timeline-item {
        flex: 0 0 280px;
        min-height: 400px; /* Mindesthöhe auf Mobile */
    }
}

@media (max-width: 480px) {
    .dailybuddy-timeline-item-title {
        font-size: 18px;
    }

    .dailybuddy-timeline-item-content {
        padding: 20px;
    }

    .dailybuddy-timeline-horizontal .dailybuddy-timeline-item {
        flex: 0 0 250px;
        margin-right: 20px;
        min-height: 380px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dailybuddy-timeline-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.dailybuddy-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.dailybuddy-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.dailybuddy-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.dailybuddy-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.dailybuddy-timeline-item:nth-child(5) { animation-delay: 0.5s; }
