/* ============================================================
   ESTILOS LÍNEA DE TIEMPO INTERACTIVA (CARRETE VERTICAL)
   ============================================================ */

/* 1. CONTENEDOR PRINCIPAL */
.tm-viewport {
    position: relative;
    width: 100%;
    height: 650px;
    /* Altura fija necesaria para que el JS calcule el centro */
    overflow: hidden;
    background: #000;
    /* Fondo de seguridad */
    font-family: sans-serif;
}

/* 2. CAPA DE FONDO (IMAGEN Y COLOR MULTIPLY) */
.tm-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tm-bg-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(20%);
    /* Opcional: un poco de dramatismo */
    transition: background-image 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-bg-overlay {
    position: absolute;
    inset: 0;
    /*mix-blend-mode: multiply;*/
    transition: background-color 0.8s ease;
    opacity: 0.89;
    /* Ajusta la intensidad del color aquí */
}

/* 3. INTERFAZ DE USUARIO (ENCIMA DEL FONDO) */
.tm-interface {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100%;
}

/* 4. COLUMNA IZQUIERDA: NAVEGACIÓN (LOS AÑOS) */
.tm-nav-window {
    width: 35%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Oculta los años que se salen del carrete */
}

/* La línea vertical blanca (Fija en el centro de la ventana) */
.tm-nav-window::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    /*background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 1) 15%,
            rgba(255, 255, 255, 1) 85%,
            rgba(255, 255, 255, 0) 100%);*/
    background-color: #000;
    z-index: 5;
}

/* El Riel que se mueve con JS */
.tm-nav-rail {
    position: absolute;
    width: 100%;
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 60px;
    /* Distancia entre el año y la línea */
}

/* Estilo individual de los años */
.tm-tab {
    font-size: 20px;
    color: #000;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.5s ease;
    position: relative;
    line-height: 1;
    white-space: nowrap;
    margin: 15px 0px;
}

/* Año seleccionado (Gigante) */
.tm-tab.tm-active {
    font-size: 60px;
    /* Tamaño impacto */
    font-weight: 500;
    color: #000;
    letter-spacing: -3px;
}

/* El punto sobre la línea que se mueve con el año */
.tm-tab::after {
    content: '';
    position: absolute;
    right: -55px;
    /* Ajuste para que caiga sobre la línea de 2px */
    top: 50%;
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.4s ease;
    z-index: 6;
}

.tm-tab.tm-active::after {
    width: 20px;
    height: 20px;
    right: -59px;
}

/* 5. COLUMNA DERECHA: CONTENIDO (LOS TEXTOS) */
.tm-content-window {
    width: 65%;
    height: 100%;
    display: flex;
    align-items: center;
    /* Mantiene el texto centrado verticalmente */
    padding-left: 40px;
}

.tm-pane {
    display: none;
    /* Se controla con JS fadeIn() */
    color: #000;
    max-width: 600px;
}

.tm-pane h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.tm-pane p {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Animación de entrada para el texto */
.tm-pane.tm-active {
    display: block;
    animation: slideInText 0.8s ease forwards;
}

@keyframes slideInText {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 6. RESPONSIVE (Móviles) */
@media (max-width: 768px) {
    .tm-viewport {
        height: 500px;
    }

    .tm-nav-window {
        width: 40%;
    }

    .tm-content-window {
        width: 60%;
        padding: 0 30px;
    }

    .tm-tab.tm-active {
        font-size: 60px;
    }

    .tm-tab::after {
        right: -36px;
    }

    .tm-tab.tm-active::after {
        right: -40px;
    }
}