﻿.timeline-section {
    padding: 60px 0;
}

.timeline-curve {
    position: absolute;
    top: 50%;
    right: 0;
    width: 97%;
    height: 300px;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.timeline-section .idx_ttl {
    text-align: center;
}

.timeline-main {
    position: relative;
    padding: 60px 0;
}

.milestone {
    width: 18%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Định dạng chấm tròn */
.dot {
    width: 40px;
    height: 40px;
    border: 3px solid #1a3a2a;
    border-radius: 50%;
    margin: 20px 0;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.5);
    align-content: center;
}

.inner-dot {
    width: 28px;
    height: 28px;
    background: var(--mcolor);
    border-radius: 50%;
    margin: auto;
}

/* Định dạng hình ảnh */
.milestone img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Định dạng văn bản */
.milestone h3 {
    font-size: 32px;
    margin: 10px 0;
    color: var(--scolor);
    text-align: center;
    font-family: var(--f-utm);
}

.milestone p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: #444;
    text-align: justify;
}

/* Tùy chỉnh vị trí để tạo hiệu ứng lượn sóng */
.milestone:nth-child(odd) {
    transform: translateY(50px);
}

.milestone:nth-child(even) {
    transform: translateY(-88px);
	    flex-direction: column-reverse;
}

/* Căn chỉnh lại các khối nội dung dựa trên hướng */
.milestone:nth-child(odd) .content-top {
    margin-bottom: 30px;
}

.milestone:nth-child(odd) .content-bottom {
    text-align: left;
}
/* Căn lề trái giống hình */

.milestone:nth-child(even) .content-top {
    text-align: left;
    margin-bottom: 30px;
}

.milestone:nth-child(even) .content-bottom {
    margin-top: 30px;
}

/* Responsive đơn giản cho màn hình nhỏ */
@media (max-width: 900px) {
    .timeline-curve {
		position: absolute;
		top: 47%;
        right: 0;
        width: 100%;
        height: 78%;
		transform: translateY(-50%);
		z-index: 1;
    }

    .timeline-container {
        flex-direction: column;
    }

    .milestone {
        margin-bottom: 50px;
        transform: none !important;
    }
}
@media (max-width: 768px) {
	.milestone {
		width: 100%;
		align-items: flex-start;
		flex-direction: row;
		gap: 15px;
		justify-content: space-between;
	}
	.milestone .content-top {
		width: 30%;
	}
	.milestone .content-bottom {
	    width: 50%;	
	}
	.milestone:nth-child(1) .content-bottom {
		width: 45%;
	}
	.milestone:nth-child(1) .dot {
	    position: relative;
		left: -15px;
	}
	.milestone:nth-child(2) .content-bottom p {
		text-align: start;
	}
	.milestone:nth-child(2) .dot {
	    position: relative;
		left: -10px;
	}
	
	.milestone:nth-child(3) .content-bottom {
		width: 44%;
	}
	
	.milestone:nth-child(3){
		justify-content: flex-end;
	}
	.milestone:nth-child(4){
		justify-content: flex-end;
	}
	.milestone:nth-child(4) {
		justify-content: center;
	}
	.milestone:nth-child(4) .content-top {
		width: 50%;
	}
	.milestone:nth-child(4) .content-bottom {
		width: 34%;
	}
	.milestone:nth-child(4) .content-bottom p {
		text-align: start;
	}
	.milestone:nth-child(5){
		justify-content: flex-end;
	}
	.milestone:nth-child(5) .content-bottom {
		width: 47%;
	}
	.milestone:nth-child(even) {
		flex-direction: row-reverse;
	}
	.milestone:nth-child(even) .content-bottom {
		margin-top: 0;
	}
	.milestone h3 {
		font-size: 24px;
	}
	.milestone p {
		font-size: 14px;
	}

	.dot {
		width: 32px;
		height: 32px;
	}
	.inner-dot {
		width: 22px;
		height: 22px;
	}
}