﻿/* CONTENEDOR timeline horizontal (desktop) y vertical (mobile) */
.timeline {
    position: relative;
    max-width: 1150px;
    margin: 0 auto 50px;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    /* Línea horizontal para desktop */
    .timeline::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 2.5%;
        right: .5%;
        height: 4px;
        background-color: #e0e0e0;
        border-radius: 2px;
        transform: translateY(-50%);
        z-index: 1;
    }

/* Evento */
.timeline-event {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 20px 25px 25px 25px;
    width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    cursor: default;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-left: 15px;
}

/* Icono como marcador */
.timeline-icon {
    position: absolute;
    top: 50%;
    left: -22px; /* ajusta según tamaño */
    transform: translateY(-50%);
    font-size: 28px;
    color: #757575;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    border: 3px solid #e0e0e0; /* 👈 borde del icono */
    z-index: 11;
}

/* Animación pulse */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(33, 150, 243, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}

.timeline-event.active {
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.5);
    transform: scale(1.05);

    cursor:pointer;
}

    .timeline-event.active .timeline-icon {
        color: #2196f3;
        border-color: #2196f3;
        animation: pulse 2s infinite;
    }

.timeline-title {
    font-weight: 700;
    font-size: 1rem;
    color: #212121;
    margin-bottom: 6px;
}

.timeline-date {
    font-size: 0.9rem;
    color: #616161;
}

/* RESPONSIVE */

/* En móviles: vertical, línea pasa por el centro de los iconos */
@media (max-width: 700px) {
    .timeline {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
        padding-right: 0;
        max-width: 360px;
    }

        /* Línea vertical centrada sobre los iconos */
        .timeline::before {
            top: 0;
            left: 32px; /* 👈 alineada al centro del icono */
            width: 4px;
            height: 100%;
            transform: none;
            border-radius: 2px;
        }

    .timeline-event {
        width: 100%;
        padding: 12px 20px 12px 70px;
        margin-left: 0;
        margin-bottom: 25px;
        text-align: left;
    }

    .timeline-icon {
        top: 18px;
        left: 20px; /* 👈 centrado con la línea */
        transform: none;
        font-size: 24px;
        padding: 4px;
        border: 3px solid #e0e0e0;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.85rem;
    }
}
