.timeline {
    position: relative;
    max-width: 1600px;
    margin: 50px auto;
    padding: 0 20px;
}

/* Línea central */

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--amarillo-general);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

/* Elemento */

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease;
}

/* Elemento al finalizar la animación */

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Elementos impares */

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

/* Elementos pares */

.timeline-item:nth-child(even) {
    left: 50%;
}

/* Circulos */

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--amarillo-general);
    border: 4px solid #f9f5f0;
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

/* Circulos pares */

.timeline-item:nth-child(odd)::after {
    right: -13.2px;
}

/* Circulos impares */

.timeline-item:nth-child(even)::after {
    left: -14.2px;
}

/* Título del elemento */

.timeline-content h3 {
    margin-top: 0;
    color: var(--amarillo-general);
    font-size: 2.5rem;
}

/* Texto del elemento */

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content p {
    margin-top: 10px;
    line-height: 2.5rem;
    font-size: 1.8rem;
}

/* Imagen del elemento */

.timeline-img {
    width: 100%;
    border-radius: 5px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        text-align: left !important;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-item::after {
        left: 21px !important;
    }
    .timeline-content h3 {
        font-size: 2.0rem;
    }
    .timeline-content p {
        line-height: 2.2rem;
        font-size: 1.5rem;
    }
}

/* Ajustes para pantallas muy pequeñas (móviles) */
@media (max-width: 576px) {

    .timeline {
        padding: 0;
    }

    .timeline::after {
        left: 18px;
    }

    .timeline-content h3 {
        font-size: 1.8rem;
    }

    .timeline-content p {
        line-height: 2.5rem;
        font-size: 1.4rem;
    }

    .timeline-img img {
        font-size: 1.4rem;
    }

}