/* Container chính */
.jt-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px 0;
}

/* Đường line tĩnh (màu xám nhạt) */
.jt-line-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #cbd5e1;
    transform: translateX(-50%);
    z-index: 1;
}

/* Đường line chạy theo scroll (màu xanh đậm) */
.jt-line-progress {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    background-color: #0b2b5e;
    transform: translateX(-50%);
    z-index: 2;
    height: 0%; /* JS sẽ điều khiển cái này */
    transition: height 0.1s ease-out;
}

/* Các mốc thời gian */
.jt-item {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease-out;
}

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

/* Dấu chấm trên đường line */
.jt-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: #0b2b5e;
    border-radius: 50%;
    z-index: 3;
    transition: background-color 0.3s ease;
}

/* Bố cục nội dung */
.jt-content-wrap {
    width: 45%;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Vòng tròn ảnh */
.jt-image {
    width: 120px;
    height: 120px;
    background-color: #0b2b5e;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 4;
}

.jt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Typography */
.jt-text {
    flex: 1;
}

.jt-year {
    color: #e63946;
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.jt-desc {
    color: #0b2b5e;
    font-size: 15px;
    line-height: 1.5;
}

/* -- Thiết lập vị trí So le trên Desktop -- */

/* Bên Phải (Ảnh nằm trái, text nằm phải) */
.jt-item.jt-right {
    flex-direction: row-reverse;
}
.jt-item.jt-right .jt-content-wrap {
    flex-direction: row;
    justify-content: flex-start;
}

/* Bên Trái (Text nằm trái, ảnh nằm phải) */
.jt-item.jt-left .jt-content-wrap {
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
}

/* --- Responsive cho Điện thoại --- */
@media screen and (max-width: 768px) {
    /* Đưa đường line sang mép trái và canh chuẩn */
    .jt-line-bg, .jt-line-progress {
        left: 20px !important;
        transform: none !important; 
    }
    
    /* Canh dấu chấm tròn nằm ngay giữa đường line */
    .jt-dot {
        left: 21px !important; 
        transform: translate(-50%, -50%) !important;
    }

    /* Ép tất cả các item (cả chẵn và lẻ) về 1 hướng */
    .jt-item,
    .jt-item.jt-left, 
    .jt-item.jt-right {
        flex-direction: row !important;
        justify-content: flex-start !important;
        margin-bottom: 60px !important;
    }

    /* Đẩy toàn bộ nội dung (ảnh + chữ) sang bên phải đường line */
    .jt-content-wrap,
    .jt-item.jt-left .jt-content-wrap,
    .jt-item.jt-right .jt-content-wrap {
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 60px !important; /* Chừa khoảng trống 60px bên trái cho đường line */
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    /* Tạo khoảng cách giữa ảnh và năm */
    .jt-image {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 15px !important;
    }
}