/**
 * assets/css/timeline.css
 *
 * Estilos de la Línea de Tiempo idénticos a Foto 2:
 * - Fondo blanco y tipografías claras.
 * - Orbes arriba de la viga horizontal con íconos vectoriales.
 * - Años y subtítulos abajo de la viga.
 * - Tarjeta oscura flotante con puntero/flecha que apunta al año seleccionado.
 * - Chips 'PROMO [AÑO]' y 'ACTIVA' / 'HISTÓRICO', botón 'CURSOS →' y sparkline.
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800;900&family=Rajdhani:wght@600;700&display=swap');

#timeline {
    position: relative;
    width: 100%;
    background: #FFFFFF !important;
    color: #0F172A !important;
    padding: 2.25rem 0 3.25rem;
    border-bottom: 1px solid #E2E8F0;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: visible !important;
}

.tl-white-header {
    max-width: 1120px;
    margin: 0 auto 1.75rem;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tl-white-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tl-white-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00E5FF;
    border-radius: 50%;
    box-shadow: 0 0 8px #00E5FF;
}

.tl-white-status {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: #94A3B8;
}

.tl-white-status .tl-cur-year {
    color: #F59E0B;
    font-weight: 800;
    margin-left: 6px;
}

.tl-stage-wrap {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.tl-stage-wrap::-webkit-scrollbar { display: none; }

.tl-track {
    position: relative;
    min-width: 780px;
    height: 165px;
}

.tl-beam-line {
    position: absolute;
    top: 76px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #E0F2FE;
    background: linear-gradient(90deg, #BAE6FD 0%, #38BDF8 60%, #F59E0B 100%);
    box-shadow: 0 1px 4px rgba(56, 189, 248, 0.25);
    z-index: 1;
}

.tl-nodes-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    z-index: 2;
}

.tl-node-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease;
    flex: 1;
}

.tl-node-col:hover {
    transform: translateY(-2px);
}

.tl-node-orb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #38BDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.tl-node-orb svg {
    width: 20px;
    height: 20px;
    color: #0284C7;
    transition: color 0.2s ease, transform 0.2s ease;
}

.tl-node-col:hover .tl-node-orb,
.tl-node-col.is-active .tl-node-orb {
    border-color: #00E5FF;
    box-shadow: 0 6px 18px rgba(0, 229, 255, 0.35);
    transform: scale(1.08);
}

.tl-node-col:hover .tl-node-orb svg,
.tl-node-col.is-active .tl-node-orb svg {
    color: #00E5FF;
}

.tl-node-col.is-current .tl-node-orb {
    border-color: #F59E0B;
    border-width: 2.5px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.tl-node-col.is-current .tl-node-orb svg {
    color: #F59E0B;
}

.tl-node-col.is-current.is-active .tl-node-orb,
.tl-node-col.is-current:hover .tl-node-orb {
    border-color: #F59E0B;
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
}

.tl-node-stem {
    width: 2px;
    height: 26px;
    background: #38BDF8;
    transition: background 0.2s ease;
}

.tl-node-col.is-current .tl-node-stem {
    background: #F59E0B;
}

.tl-node-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0284C7;
    margin-top: -1px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tl-node-col.is-current .tl-node-dot {
    background: #F59E0B;
}

.tl-node-col:hover .tl-node-dot,
.tl-node-col.is-active .tl-node-dot {
    transform: scale(1.6);
    background: #00E5FF;
    box-shadow: 0 0 8px #00E5FF;
}

.tl-node-col.is-current.is-active .tl-node-dot,
.tl-node-col.is-current:hover .tl-node-dot {
    background: #F59E0B;
    box-shadow: 0 0 10px #F59E0B;
}

.tl-node-meta {
    margin-top: 10px;
    text-align: center;
}

.tl-node-year {
    font-family: 'Orbitron', monospace;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #0F172A;
    display: block;
    line-height: 1.1;
    transition: color 0.2s ease;
}

.tl-node-col.is-active .tl-node-year {
    color: #0284C7;
}

.tl-node-col.is-current .tl-node-year {
    color: #F59E0B;
}

.tl-node-sub {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748B;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
}

/* Tarjeta flotante */
.tl-card-deck {
    position: relative;
    max-width: 1120px;
    margin: 1.25rem auto 0;
    padding: 0 1.5rem;
    min-height: 195px;
}

.tl-floating-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #0E1726;
    color: #FFFFFF;
    border-radius: 14px;
    padding: 22px 26px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
    will-change: left;
    margin-top: 14px;
}

.tl-card-arrow {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #F59E0B;
    transition: border-bottom-color 0.3s ease, left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-floating-card.theme-cyan .tl-card-arrow {
    border-bottom-color: #00E5FF;
}

.tl-card-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tl-chip-promo {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #F59E0B;
    border: 1px solid #F59E0B;
    padding: 3px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tl-chip-status {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #F59E0B;
    border: 1px solid #F59E0B;
    padding: 3px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tl-floating-card.theme-cyan .tl-chip-promo,
.tl-floating-card.theme-cyan .tl-chip-status {
    color: #00E5FF;
    border-color: #00E5FF;
}

.tl-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.tl-card-desc {
    font-size: 0.85rem;
    color: #94A3B8;
    line-height: 1.45;
    margin: 0 0 16px 0;
    min-height: 38px;
}

.tl-card-botrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tl-btn-cursos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #00E5FF;
    border: 1.5px solid #00E5FF;
    padding: 6px 16px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tl-btn-cursos:hover {
    background: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
    transform: translateY(-1px);
}

.tl-floating-card.theme-amber .tl-btn-cursos {
    color: #F59E0B;
    border-color: #F59E0B;
}

.tl-floating-card.theme-amber .tl-btn-cursos:hover {
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.tl-spark-track {
    position: relative;
    flex: 1;
    max-width: 170px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: visible;
}

.tl-spark-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #00E5FF 100%);
}

.tl-floating-card.theme-amber .tl-spark-glow {
    background: linear-gradient(90deg, transparent 0%, #F59E0B 100%);
}

.tl-spark-dot {
    position: absolute;
    right: -3px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #00E5FF;
    border-radius: 50%;
    box-shadow: 0 0 8px #00E5FF;
}

.tl-floating-card.theme-amber .tl-spark-dot {
    background: #F59E0B;
    box-shadow: 0 0 8px #F59E0B;
}

.tl-content-fade {
    animation: tl-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tl-fade-in {
    from { opacity: 0.3; transform: translateY(2px); }
    to   { opacity: 1;   transform: translateY(0); }
}

@media (max-width: 768px) {
    #timeline { padding: 1.5rem 0 2rem; }
    .tl-white-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .tl-floating-card { max-width: 100%; }
    .tl-card-deck { padding: 0 1rem; }
}
