/* --- CÀI ĐẶT CHUNG --- */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

* {
    box-sizing: border-box;
}

/* --- HEADER --- */
.main-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #2c3e50;
    margin-bottom: 10px;
}

.main-header p {
    font-size: 0.9rem;
    color: #555;
    margin: 5px 0;
}

/* --- TIMELINE CONTAINER --- */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Đường kẻ dọc ở giữa */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px; /* Độ dày đường kẻ */
    background-image: linear-gradient(to bottom, #ccc 0%, #ccc 50%, transparent 50%);
    background-size: 10px 20px; /* Tạo hiệu ứng chấm */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; /* Dịch tâm đường kẻ */
}

/* --- TIMELINE ITEM (Mỗi khối Level) --- */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Dấu chấm tròn trên đường kẻ */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 4px solid #ddd;
    top: 30px; /* Căn chỉnh vị trí dấu chấm */
    border-radius: 50%;
    z-index: 1;
}

/* Căn lề cho các khối */
.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

/* Căn vị trí dấu chấm cho từng bên */
.timeline-item.left::after {
    right: -10px; /* Đẩy dấu chấm ra giữa */
}

.timeline-item.right::after {
    left: -10px; /* Đẩy dấu chấm ra giữa */
}

/* --- NỘI DUNG BÊN TRONG KHỐI --- */
.timeline-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Để bo góc phần header */
}

.level-header {
    display: flex;
    align-items: center;
    padding: 20px;
    color: white;
}

.level-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
}

.level-header span {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-left: 15px;
    opacity: 0.9;
}

.level-body {
    padding: 20px 25px;
}

.level-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.level-body h3:first-child {
    margin-top: 0;
}

.level-body ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.level-body li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Dấu gạch đầu dòng */
.level-body li::before {
    content: '-';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #555;
}

.level-body p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 10px 0 0 0;
}

/* --- MÀU SẮC TỪNG LEVEL --- */
#level-1 .level-header {
    background-color: #3498db; /* Blue */
}

#level-2 .level-header {
    background-color: #1abc9c; /* Aqua/Teal */
}

#level-3 .level-header {
    background-color: #9b59b6; /* Purple */
}
#level-4 .level-header {
    background-color: #eddf1d; /* Purple */
}
/* --- RESPONSIVE CHO DI ĐỘNG --- */
@media screen and (max-width: 768px) {
    /* Ẩn đường kẻ dọc */
    .timeline-container::after {
        display: none;
    }

    /* Các khối chiếm 100% chiều rộng */
    .timeline-item {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Reset vị trí */
    .timeline-item.right {
        left: 0%;
    }

    /* Ẩn các dấu chấm tròn */
    .timeline-item::after {
        display: none;
    }
}