<style>
.timeline-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.timeline {
    display: flex;
    transition: transform 0.6s ease;
}

.timeline-item {
    flex: 0 0 20%; /* 4 korttia näkyvissä */
    box-sizing: border-box;
    padding: 0.5rem;
}

.timeline-card {
    background-color: #f8f9fa;
    border-radius: 1rem;
    box-shadow: 0 0 8px rgba(0,0,0,0.05);
    padding: 1rem;
    height: 100%;
    text-align: center;
}

.timeline-controls {
    text-align: center;
    margin-top: 1rem;
}

.timeline-controls button {
    margin: 0 0.5rem;
}

.timeline-icon {
    display: grid;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #2563eb;
    color: #2563eb;
    font-size: 1.3rem;
    margin: 0 auto 1rem auto;
    place-items: center;       /* keskittää sekä pysty- että vaakasuunnassa */
    position: relative;
    z-index: 3;
}

.timeline-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: .5rem;
}
.timeline-title {
    font-weight: 600;
    color: #0d6efd;
    font-size: 1rem;
    margin-bottom: .3rem;
}
.timeline-subtitle {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: .5rem;
}
.timeline-content {
    font-size: 0.85rem;
    color: #212529;
}
</style>
