/* Toques mínimos, priorizando utilidades de Bootstrap */
.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 1rem 2rem rgba(0,0,0,.08); }

/* Suaviza los banners/portadas (opcional) */
.card > .card-img { filter: saturate(1.05); }

/* Línea de tiempo moderna */
:root {
    --tl-line-color: rgba(25,135,84,1);           /* bs-success */
    --tl-line-fade: rgba(25,135,84,.28);
    --tl-dot-color: var(--tl-line-color);
    --tl-ring-color: rgba(25,135,84,.15);
    --tl-gap: 24px;
    --tl-radius: 16px;
}

/* Base móvil: línea a la izquierda, tarjetas apiladas */
.timeline {
    position: relative;
    margin-left: .25rem;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--tl-line-fade) 0%, var(--tl-line-color) 60%, var(--tl-line-fade) 100%);
}
.timeline-item {
    position: relative;
    padding-left: 56px;
    margin-bottom: 28px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: 6px;
    top: .45rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tl-dot-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 6px var(--tl-ring-color);
}

.timeline-card {
    border-radius: var(--tl-radius);
    overflow: hidden;
}
.timeline-card .card-body {
    padding: 1.1rem 1.25rem;
}
.timeline-card:hover {
    border-color: rgba(25,135,84,.22);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* Animación de aparición sutil (sin desplazamientos bruscos) */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.reveal.is-inview { opacity: 1; transform: none; }

/* md+: línea central y tarjetas alternadas izquierda/derecha */
@media (min-width: 768px) {
    .timeline {
        margin-left: 0;
        padding: 0 var(--tl-gap);
    }
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
    }
    .timeline-item {
        padding-left: 0;
        display: grid;
        grid-template-columns: 1fr 4px 1fr;
        column-gap: var(--tl-gap);
        align-items: start;
    }
    .timeline-dot {
        position: relative;
        left: auto; top: .45rem;
        grid-column: 2;
        justify-self: center;
    }
    .timeline-card {
        grid-column: 1;
        max-width: 560px;
        justify-self: end;
    }
    .timeline-item:nth-child(even) .timeline-card {
        grid-column: 3;
        justify-self: start;
    }
}

/* Tarjetas: tipografía sutil */
.timeline-card h4 { letter-spacing: .2px; }
.timeline-card .badge {
    --bs-badge-padding-x: .6em;
    --bs-badge-padding-y: .36em;
    font-weight: 600;
}

/* Helpers (opcional) */
.card-hover { transition: box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { box-shadow: 0 10px 24px rgba(0,0,0,.06); border-color: rgba(25,135,84,.18); }
