/* TIMELINE */
.timeline-wrap-fix {
    display: flex;
    justify-content: center;

    .timeline-box-fix {
        position: relative;
        width: 1200px;
        max-width: 100%;
        padding: 0;

        .timeline__vertical-fix {
            position: relative;

            .timeline__bar-bg-fix,
            .timeline__bar-fill-fix {
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                top: 2px;
                width: 2px;
                z-index: 2;
                border-radius: 100px;
            }

            .timeline__bar-bg-fix {
                background: var(--c-negro);
                z-index: 2;
            }

            .timeline__bar-fill-fix {
                background: var(--c-menta-opaco);
                z-index: 2;
                height: 0;
                transition: height .25s;
            }

            .timeline__big-dot-fix {
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                width: 30px;
                height: 30px;
                background: var(--c-menta-opaco);
                z-index: 2;
                border-radius: 50%;
                box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.05);
                transform: translateY(0);
                transition: box-shadow .15s, width .2s, height .2s;
                pointer-events: none;
            }

            .timeline-list-fix {
                list-style: none;
                padding: 0;
                margin: 0;

                .timeline-item-fix {
                    display: flex;
                    align-items: center;
                    margin: 0 0 40px 0;
                    position: relative;
                    gap: 120px;

                    &:nth-child(2),
                    &:nth-child(4),
                    &:nth-child(6) {
                        flex-direction: row-reverse;
                    }

                    &:last-child {
                        margin-bottom: 0;
                    }
                }

                .timeline__punto-fix {
                    z-index: 2;
                    position: absolute;
                    left: 0;
                    right: 0;
                    top: 50%;
                    margin: 0 auto;
                    width: 22px;
                    height: 22px;
                    border-radius: 50%;
                    background: var(--c-negro);
                    color: var(--c-blanco);
                    transition: background .2s, border .15s;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 20px;
                    font-weight: 600;
                }

                .timeline-item-fix.passed .timeline__punto-fix,
                .timeline-item-fix.active .timeline__punto-fix {
                    background: var(--c-menta-opaco);
                }

                /* ── Animación de entrada de cards ── */

                /* Estado inicial: todas las cards de items impares entran desde la izquierda */
                .timeline__card-fix {
                    opacity: 0;
                    transform: translateX(-60px);
                    transition: opacity 0.5s ease, transform 0.5s ease;

                    flex: 0 0 46%;
                    background: none;
                    padding: 0;
                    min-width: 200px;
                    display: flex;
                    flex-direction: column;
                    justify-content: flex-start;
                    align-items: flex-start;
                    word-break: break-word;
                    background-color: var(--c-blanco);
                    padding: 40px;
                    border-radius: 15px;
                    box-shadow: var(--boxshadow-hover);
                }

                /* Cards de items pares (están a la derecha) entran desde la derecha */
                .timeline-item-fix:nth-child(2) .timeline__card-fix,
                .timeline-item-fix:nth-child(4) .timeline__card-fix,
                .timeline-item-fix:nth-child(6) .timeline__card-fix {
                    transform: translateX(60px);
                }

                /* Estado visible: se dispara desde JS cuando el dot llega al punto */
                .timeline__card-fix.is-visible {
                    opacity: 1;
                    transform: translateX(0);
                }

                /* ── Fin animación de entrada ── */

                .timeline__tit-fix {
                    width: 100%;
                    font-weight: 400;
                    font-size: clamp(22px, 3vw, 28px);
                    color: var(--c-azul-oscuro);
                    padding-bottom: 10px;
                    border-bottom: 1px solid var(--c-menta-opaco);
                    margin-bottom: 10px;
                }

                .timeline__txt-fix {
                    margin-top: 7px;
                }

                /* Limpiar listas y contenido WP */
                .timeline__txt-fix ul,
                .timeline__txt-fix ol {
                    padding-left: 20px;
                    margin: 7px 0;

                    li {
                        margin-bottom: 3px;

                        &:last-child {
                            margin-bottom: 0;
                        }

                        ul {
                            list-style: square;

                            li {
                                &::marker {
                                    color: var(--c-gris-oscuro-sec);
                                }
                            }
                        }
                    }
                }

            }
        }

        @media screen and (max-width: 1200px) {
            .timeline__vertical-fix {
                .timeline__img-fix {
                    height: 300px;
                }
            }
        }

        @media screen and (max-width: 767px) {
            .timeline__vertical-fix {
                .timeline__bar-bg-fix,
                .timeline__bar-fill-fix {
                    margin-left: 15px;
                }

                .timeline__big-dot-fix {
                    margin-left: 0;
                }

                .timeline-item-fix {
                    flex-direction: column !important;
                    gap: 20px !important;
                    padding-left: 45px;

                    .timeline__punto-fix {
                        margin-left: 0;
                        top: 0;
                    }

                    .timeline__img-fix {
                        height: 250px;
                        width: 100%;
                        opacity: 1;
                    }

                    /* En móvil todas las cards entran desde la izquierda */
                    .timeline__card-fix {
                        transform: translateX(-30px);
                        padding: 20px;
                    }

                    /* Anular la dirección derecha en móvil */
                    &:nth-child(2) .timeline__card-fix,
                    &:nth-child(4) .timeline__card-fix,
                    &:nth-child(6) .timeline__card-fix {
                        transform: translateX(-30px);
                    }
                }
            }
        }
    }
}
