.education {
    h2 {
        margin: 40px 0 20px 0;
    }

    .timeline {
        position: relative;
        margin: 20px auto;
        padding: 20px;
        width: 90%;
        max-width: 800px;
    }

    .timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        width: 4px;
        background-color: #f53b57;
        top: 0;
        bottom: 0;
        margin-left: -2px;
    }

    .timeline-item {
        padding: 20px;
        position: relative;
        width: 50%;
        margin-bottom: 50px;
    }

    .timeline-item.left {
        left: 0;
    }

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

    .timeline-item::before {
        content: '';
        position: absolute;
        top: 25px;
        right: -6px;
        width: 12px;
        height: 12px;
        background-color: white;
        border: 4px solid #f53b57;
        border-radius: 50%;
        z-index: 1;
    }

    .timeline-item.right::before {
        left: -6px;
    }

    .timeline-content {
        background-color: white;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        text-align: left;
    }

    .timeline-date {
        font-size: 18px;
        color: #f53b57;
        font-weight: bold;
        display: block;
        margin-bottom: 10px;
    }

    .timeline-content h2 {
        font-size: 20px;
        margin-bottom: 5px;
        text-align: left;
    }

    .timeline-content p {
        font-size: 16px;
        color: #555;
    }
}

/* Responsive Timeline */
@media (max-width: 1024px) {
    .education .timeline {
        width: 95%;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .education .timeline::before {
        left: 20px;
        /* Move vertical line to the left */
        margin-left: 0;
    }

    .education .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 20px;
        margin-bottom: 40px;
    }

    .education .timeline-item.left,
    .education .timeline-item.right {
        left: 0;
        /* Both sides collapse into one */
    }

    .education .timeline-item::before {
        top: 20px;
        left: 6px;
        /* Dots align with the vertical line */
        right: auto;
    }

    .education .timeline-item.right::before {
        left: 6px;
        /* Override for right items */
    }

    .education .timeline-content {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .education h2 {
        font-size: 1.6em;
        margin: 30px 0 15px 0;
    }

    .education .timeline-date {
        font-size: 16px;
    }

    .education .timeline-content h2 {
        font-size: 18px;
    }

    .education .timeline-content p {
        font-size: 14px;
    }

    .education .timeline-item {
        padding-left: 40px;
        padding-right: 15px;
    }

    .education .timeline-item::before {
        left: 6px;
    }
}