﻿.timeline {
    position: relative;
    margin: 50px auto;
    padding: 20px 0;
    max-width: 900px;
}

    .timeline::after {
        content: '';
        position: absolute;
        width: 6px;
        background: linear-gradient(to bottom, #00c6ff, #0072ff);
        top: 0;
        bottom: 0;
        left: 50%;
        margin-left: -3px;
        border-radius: 3px;
    }

.timeline-item {
    padding: 20px;
    position: relative;
    width: 50%;
}

.timeline-item-left {
    left: 0;
}

.timeline-item-right {
    left: 50%;
}

.timeline-marker {
    position: absolute;
    top: 50%; /* canh giữa */
    transform: translateY(-50%); /* đưa tâm marker đúng giữa item */
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #0072ff;
    border: 6px solid #fff;
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.timeline-item-left .timeline-marker {
    right: -75px; /* nửa marker nằm qua đường timeline */
}

.timeline-item-right .timeline-marker {
    left: -75px;
}


.timeline-content {
    border: 2px solid #0072ff; /* Thêm viền xanh */
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.4s ease;
}

    .timeline-content:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .timeline-content img {
        max-width: 100%;
        border-radius: 10px;
        margin-bottom: 15px;
    }

.timeline-date {
    font-weight: bold;
    color: #0072ff;
    margin-bottom: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 1px; /* Chuyển line timeline sang bên trái */
        margin-left: 0;
    }

    .timeline-item,
    .timeline-item-left,
    .timeline-item-right {
        width: 100%;
        left: 0;
        padding-left: 35px;
        margin-bottom: 40px;
    }

        .timeline-item-left .timeline-marker,
        .timeline-item-right .timeline-marker {
            left: 0; /* Marker nằm trái */
            right: auto;
        }

    .timeline-content {
        padding-left: 20px;
    }
}