.timeline {
    position: relative;
    max-width: 900px;
    margin: auto;
    padding: 0px;
    padding-bottom: 0px;
    background-color: transparent;
}

/* Connecting Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #2c3e50; /* Dark blue line */
    z-index: 0;
    transform: translateX(-50%);
}

/* Timeline Item Styles */
.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    padding: 0 30px;
    width: 100%;
}

/* Timeline Items on the Left */
.timeline-item.left {
    flex-direction: row-reverse;
}

/* Timeline Dot (circle) */
.timeline-dot {
    width: 25px;
    height: 25px;
    background-color: #e74c3c; /* Red dot */
    border-radius: 50%;
    position: absolute;
    left: 50%;
    margin-left: -12px;
    z-index: 1;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

/* Timeline Content Box */
.timeline-content {
    background-color: #fff; /* White background for the box */
    border: 2px solid #ffffff; /* Red border for contrast */
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Deeper shadow */
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect for timeline content */
.timeline-content:hover {
    transform: translateY(-8px); /* Slight lift on hover */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover */
}

/* Left-Side Content */
.timeline-item.left .timeline-content {
    margin-right: 50px;
    background: #fff; /* Keep the background white */
}

/* Right-Side Content */
.timeline-item.right .timeline-content {
    margin-left: 50px;
    background: #fff; /* Keep the background white */
}

.timeline .bottom-content {
    position: relative;
    bottom: 0; /* Posisi absolut di bawah */
    left: 50%; /* Posisikan di tengah secara horizontal */
    transform: translateX(-50%); /* Koreksi agar benar-benar di tengah */
    text-align: center; /* Teks berada di tengah */
    display: inline-block; /* Supaya lebar menyesuaikan isi */
    z-index: 1; /* Pastikan elemen berada di atas */
}

/* Kotak Konten */
.timeline .bottom-content .timeline-content {
    background-color: #ffffff; /* Warna putih untuk kotak */
    border: 2px solid #ffffff; /* Garis tipis untuk kontras */
    padding: 10px 20px 10px; /* Jarak dalam kotak */
    border-radius: 12px; /* Sudut membulat */   
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: inline-block; /* Lebar menyesuaikan isi */
}

/* Garis Penghubung ke Konten Bawah */
.timeline .bottom-content::before {
    content: '';
    position: absolute;
    top: -60px; /* Jarak dari elemen konten */
    left: 50%;
    transform: translateX(-50%);
    height: 0px; /* Panjang garis */
    width: 4px; /* Ketebalan garis */
    background-color: #2c3e50; /* Warna garis */
    z-index: -1; /* Di bawah konten */
}

/* Responsiveness: Stack timeline items for small screens */
@media (max-width: 768px) {
    .timeline {
        padding-bottom: 0px; /* Tambahkan ruang ekstra untuk konten bawah */
    }

    .timeline-item {
        flex-direction: column; /* Tumpuk konten secara vertikal */
        align-items: center; /* Pastikan konten berada di tengah */
        padding: 0;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin: 0; /* Hapus margin samping */
    }

    .timeline-dot {
        left: 50%;
        transform: translateX(-50%); /* Pusatkan titik di tengah */
    }

    .timeline-content {
        margin: 0 auto; /* Pusatkan konten */
        max-width: 100%; /* Pastikan konten penuh di layar kecil */
    }

    .bottom-content {
        position: static; /* Ubah dari absolut ke statis pada layar kecil */
        margin: auto; /* Pusatkan dan beri jarak */
        text-align: center; /* Pusatkan teks */
        display: block;
    }

    .bottom-content::before {
        display: none; /* Hilangkan garis penghubung pada layar kecil */
    }
}

