/* ==========================================================
   LÍNEA DEL TIEMPO DINÁMICA
   Estilos externos
   ========================================================== */

   .linea-tiempo-v1 {
    max-width: 1280px;
    margin: 30px auto 55px;
}


/* ==========================================================
   INTERACCIÓN V2
   ========================================================== */

.linea-tiempo-v1 .linea-tiempo-v2__progress {
    position: relative;
    width: 100%;
    margin: 0 0 16px;
    padding: 5px 0 1px;
}

.linea-tiempo-v1 .linea-tiempo-v2__progress-track {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee7f0;
}

.linea-tiempo-v1 .linea-tiempo-v2__progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #9146a2;
    transition: width .35s ease;
}

.linea-tiempo-v1 .linea-tiempo-v2__milestones {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.linea-tiempo-v1 .linea-tiempo-v2__milestone {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.linea-tiempo-v1 .linea-tiempo-v2__milestone span {
    width: 10px;
    height: 10px;
    display: block;
    border: 2px solid #bfa4c6;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px #ffffff;
    transition:
        width .2s ease,
        height .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.linea-tiempo-v1 .linea-tiempo-v2__milestone.is-passed span,
.linea-tiempo-v1 .linea-tiempo-v2__milestone.is-active span {
    border-color: #9146a2;
    background: #9146a2;
}

.linea-tiempo-v1 .linea-tiempo-v2__milestone.is-active span {
    width: 14px;
    height: 14px;
    transform: scale(1.06);
}

@media (hover: hover) and (pointer: fine) {
    .linea-tiempo-v1 .linea-tiempo-v2__milestone:hover span {
        border-color: #9146a2;
        transform: scale(1.18);
    }
}

.linea-tiempo-v1 .linea-tiempo-v2__milestone:focus-visible {
    outline: 3px solid rgba(145,70,162,.28);
    outline-offset: 2px;
    border-radius: 50%;
}

.linea-tiempo-v1 .linea-tiempo-v1__stage {
    position: relative;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav {
    position: absolute;
    top: 50%;
    z-index: 8;

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    padding: 0;
    margin: 0;

    border: 2px solid rgba(145,70,162,.82);
    border-radius: 50%;

    background: rgba(255,255,255,.94);
    color: #7d258f;

    box-shadow: 0 4px 16px rgba(0,0,0,.15);

    cursor: pointer;
    opacity: .50;

    transform: translateY(-50%);

    transition:
        opacity .2s ease,
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav--prev {
    left: 14px;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav--next {
    right: 14px;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav span {
    display: block;
    width: 12px;
    height: 12px;
    font-size: 0;
    line-height: 0;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav span::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav--prev span::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.linea-tiempo-v1 .linea-tiempo-v2__stage-nav--next span::before {
    transform: rotate(45deg);
    margin-left: -3px;
}

@media (hover: hover) and (pointer: fine) {
    .linea-tiempo-v1 .linea-tiempo-v1__stage:hover .linea-tiempo-v2__stage-nav {
        opacity: 1;
    }

    .linea-tiempo-v1 .linea-tiempo-v2__stage-nav:hover {
        background: #9146a2;
        color: #fff;
        transform: translateY(-50%) scale(1.06);
    }
}

.linea-tiempo-v1 .linea-tiempo-v1__slide.is-active {
    animation: lineaTiempoEntradaV2 .28s ease both;
}

@keyframes lineaTiempoEntradaV2 {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}



@media (prefers-reduced-motion: reduce) {
    .linea-tiempo-v1 .linea-tiempo-v2__progress-bar,
    .linea-tiempo-v1 .linea-tiempo-v2__stage-nav {
        transition: none;
    }

    .linea-tiempo-v1 .linea-tiempo-v1__slide.is-active {
        animation: none;
    }
}

.linea-tiempo-v1 .linea-tiempo-v1__topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.linea-tiempo-v1 .linea-tiempo-v1__heading {
    min-width: 0;
}

.linea-tiempo-v1 .linea-tiempo-v1__eyebrow {
    margin-bottom: 3px;
    color: #8f3aa4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.linea-tiempo-v1 .linea-tiempo-v1__active-title {
    color: #433847;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
}

.linea-tiempo-v1 .linea-tiempo-v1__counter {
    flex: 0 0 auto;
    color: #7b6f7e;
    font-size: 14px;
}

.linea-tiempo-v1 .linea-tiempo-v1__counter strong {
    color: #8f3aa4;
    font-size: 20px;
}

.linea-tiempo-v1 .linea-tiempo-v1__stage {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5dfe7;
    border-radius: 14px;
    box-shadow: 0 5px 22px rgba(0,0,0,.07);
}

.linea-tiempo-v1 .linea-tiempo-v1__slide[hidden] {
    display: none !important;
}

.linea-tiempo-v1 .linea-tiempo-v1__scroll {
    width: 100%;
    overflow: hidden;
    background: #f9f5f8;
}

.linea-tiempo-v1 .linea-tiempo-v1__image {
    width: 100%;
}

.linea-tiempo-v1 .linea-tiempo-v1__image img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

.linea-tiempo-v1 .linea-tiempo-v1__image--interactive {
    position: relative;
    cursor: zoom-in;
    outline: none;
}

.linea-tiempo-v1 .linea-tiempo-v1__image--interactive:focus-visible {
    outline: 3px solid rgba(145,70,162,.35);
    outline-offset: -3px;
}

.linea-tiempo-v1 .linea-tiempo-v2__zoom-label {
    position: absolute;
    right: 70px;
    bottom: 27px;
    z-index: 6;

    padding: 5px 10px;

    border-radius: 999px;

    background: rgba(255,255,255,.94);
    color: #7d258f;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    opacity: 0;
    pointer-events: none;

    box-shadow: 0 3px 12px rgba(0,0,0,.12);

    transform: translateX(6px);

    transition:
        opacity .2s ease,
        transform .2s ease;
}

.linea-tiempo-v1 .linea-tiempo-v2__zoom-indicator {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 6;

    width: 44px;
    height: 44px;

    border: 2px solid rgba(145,70,162,.75);
    border-radius: 50%;

    background: rgba(255,255,255,.94);
    color: #7d258f;

    opacity: .72;
    pointer-events: none;

    box-shadow: 0 3px 12px rgba(0,0,0,.14);

    transition:
        opacity .2s ease,
        transform .2s ease,
        background .2s ease;
}

/* Círculo de la lupa */
.linea-tiempo-v1 .linea-tiempo-v2__zoom-indicator::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 11px;

    width: 14px;
    height: 14px;

    border: 3px solid currentColor;
    border-radius: 50%;
}

/* Mango de la lupa */
.linea-tiempo-v1 .linea-tiempo-v2__zoom-indicator::after {
    content: "";
    position: absolute;
    top: 26px;
    left: 26px;

    width: 10px;
    height: 3px;

    border-radius: 999px;
    background: currentColor;

    transform: rotate(45deg);
    transform-origin: left center;
}

@media (hover: hover) and (pointer: fine) {
    .linea-tiempo-v1 .linea-tiempo-v1__image--interactive:hover .linea-tiempo-v2__zoom-indicator {
        opacity: 1;
        transform: scale(1.06);
    }

    .linea-tiempo-v1 .linea-tiempo-v1__image--interactive:hover .linea-tiempo-v2__zoom-label {
        opacity: 1;
        transform: translateX(0);
    }
}


.linea-tiempo-v1 .linea-tiempo-v1__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #eee7f0;
    color: #716675;
    font-size: 12px;
    line-height: 1.45;
}

.linea-tiempo-v1 .linea-tiempo-v1__note i {
    margin-top: 2px;
    color: #9146a2;
}

.linea-tiempo-v1 .linea-tiempo-v1__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
}

.linea-tiempo-v1 .linea-tiempo-v1__nav {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 15px;

    border: 1px solid #9146a2;
    border-radius: 999px;

    background: #ffffff;
    color: #7d258f;

    font-size: 13px;
    font-weight: 600;
}

.linea-tiempo-v1 .linea-tiempo-v1__nav span[aria-hidden="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10px;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-1px);
}

.linea-tiempo-v1 .linea-tiempo-v1__nav:hover {
    background: #9146a2;
    color: #fff;
}

.linea-tiempo-v1 .linea-tiempo-v1__nav:focus-visible,
.linea-tiempo-v1 .linea-tiempo-v1__image--interactive:focus-visible,
.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close:focus-visible {
    outline: 3px solid rgba(145,70,162,.30);
    outline-offset: 3px;
}










/* Modal */
.linea-tiempo-modal-v1 {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.linea-tiempo-modal-v1.is-open {
    display: flex;
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.80);
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 1600px);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(0,0,0,.30);
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__header {
    min-height: 58px;
    padding: 17px 76px 14px 20px;
    border-bottom: 1px solid #eee7f0;
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__title {
    color: #433847;
    font-size: 15px;
    font-weight: 600;
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__scroll {
    max-height: calc(92vh - 58px);
    overflow: auto;
    background: #f8f5f7;
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__image {
    display: block;
    width: 1920px;
    max-width: none;
    height: auto;
    margin: 0 auto;
}

/* X dibujada con CSS */
.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 10;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 3px solid #9146a2;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.16);
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close::before,
.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #9146a2;
    transform-origin: center;
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.linea-tiempo-modal-v1 .linea-tiempo-modal-v1__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 991px) {
    .linea-tiempo-v1 {
        margin-top: 24px;
    }

    
    .linea-tiempo-v1 .linea-tiempo-v1__nav {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .linea-tiempo-v1 .linea-tiempo-v1__topbar {
        align-items: flex-start;
    }

    
    .linea-tiempo-v1 .linea-tiempo-v2__stage-nav {
        width: 40px;
        height: 40px;
        opacity: .92;
    }

    .linea-tiempo-v1 .linea-tiempo-v2__stage-nav--prev {
        left: 8px;
    }

    .linea-tiempo-v1 .linea-tiempo-v2__stage-nav--next {
        right: 8px;
    }


    .linea-tiempo-v1 .linea-tiempo-v2__zoom-indicator {
        right: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
        opacity: .92;
    }

    .linea-tiempo-v1 .linea-tiempo-v2__zoom-label {
        display: none;
    }


    /*
     * Las piezas originales son 1920x720 y contienen bastante texto.
     * En móvil se mantiene un ancho de lectura y el usuario desplaza
     * únicamente la imagen, no toda la página.
     */
    .linea-tiempo-v1 .linea-tiempo-v1__scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .linea-tiempo-v1 .linea-tiempo-v1__image {
        width: 1000px;
    }

    .linea-tiempo-v1 .linea-tiempo-v1__image img {
        width: 1000px !important;
        max-width: none !important;
    }

    
    
    .linea-tiempo-modal-v1 {
        padding: 8px;
    }

    .linea-tiempo-modal-v1 .linea-tiempo-modal-v1__dialog {
        width: 100%;
        max-height: 94vh;
    }

    .linea-tiempo-modal-v1 .linea-tiempo-modal-v1__scroll {
        max-height: calc(94vh - 58px);
    }
}

@media (max-width: 480px) {
    .linea-tiempo-v1 .linea-tiempo-v1__active-title {
        font-size: 15px;
    }

    .linea-tiempo-v1 .linea-tiempo-v1__nav {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 12px;
    }

    }
