/* ==========================================================
   VARIABLES
   ========================================================== */

.crono-wrapper {
    --crono-linea: #c0d1ff;
    --crono-amarillo: #ffb71b;
    --crono-texto: #263e6b;
    --crono-fecha: #f2a000;
    --crono-grosor-linea: 4px;
}

/* ==========================================================
   ESCRITORIO
   ========================================================== */

.crono-desktop {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.crono-desktop-inner {
    position: relative;
    width: 100%;
    min-width: 1100px;
    overflow: hidden;
}

/* ==========================================================
   LÍNEA SVG
   ========================================================== */

.crono-linea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.crono-linea path {
    fill: none;
    stroke: var(--crono-linea);
    stroke-width: var(--crono-grosor-linea);
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================
   NODOS
   ========================================================== */

.crono-node {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 2;
}

/* ==========================================================
   HITOS
   ========================================================== */

.crono-punto {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--crono-amarillo);
    border: 3px solid #ffffff;
    box-sizing: border-box;
    z-index: 5;
}

.crono-fecha {
    position: absolute;
    left: 50%;
    bottom: 25px;
    width: 150px;
    transform: translateX(-50%);
    text-align: center;
    color: var(--crono-fecha);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
}

.crono-titulo {
    position: absolute;
    left: 50%;
    top: 25px;
    width: 150px;
    transform: translateX(-50%);
    text-align: center;
    color: var(--crono-texto);
    font-size: 14px;
    line-height: 1.28;
    font-weight: 600;
}

/* ==========================================================
   AÑOS
   ========================================================== */

.crono-anio {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--crono-amarillo);
    color: #002f62;
    font-size: 25px;
    line-height: 1;
    font-weight: 800;
    box-sizing: border-box;
    z-index: 5;
}

/* ==========================================================
   HITOS EN CURVAS
   ========================================================== */

.crono-node--curva-derecha .crono-fecha,
.crono-node--curva-izquierda .crono-fecha {
    left: 50%;
    right: auto;
    bottom: 14px;
    width: 150px;
    transform: translateX(-50%);
    text-align: center;
    background: #ffffff;
    padding: 4px 8px;
    box-sizing: border-box;
    z-index: 4;
}

.crono-node--curva-derecha .crono-titulo,
.crono-node--curva-izquierda .crono-titulo {
    left: 50%;
    right: auto;
    top: 14px;
    width: 150px;
    transform: translateX(-50%);
    text-align: center;
    background: #ffffff;
    padding: 6px 8px;
    box-sizing: border-box;
    z-index: 4;
}

/* ==========================================================
   MÓVIL
   ========================================================== */

.crono-mobile {
    display: none;
}

@media (max-width: 767px) {

    .crono-desktop {
        display: none;
    }

    .crono-mobile {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding-left: 11vw;
        scroll-padding-right: 11vw;
        overscroll-behavior-x: contain;
        scrollbar-width: auto;
        padding-bottom: 14px;
        box-sizing: border-box;
    }

    .crono-mobile::-webkit-scrollbar {
        height: 8px;
    }

    .crono-mobile::-webkit-scrollbar-track {
        background: #eeeeee;
        border-radius: 10px;
    }

    .crono-mobile::-webkit-scrollbar-thumb {
        background: var(--crono-linea);
        border-radius: 10px;
    }

    .crono-mobile-track {
        display: flex;
        width: max-content;
        padding-left: 11vw;
        padding-right: 11vw;
        box-sizing: content-box;
    }

    .crono-mobile-item {
        position: relative;
        flex: 0 0 78vw;
        width: 78vw;
        height: 255px;
        scroll-snap-align: center;
        scroll-snap-stop: normal;
        box-sizing: border-box;
    }

    .crono-mobile-item:not(:last-child)::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 125px;
        width: 100%;
        height: var(--crono-grosor-linea);
        background: var(--crono-linea);
        transform: translateY(-50%);
    }

    .crono-mobile-punto {
        position: absolute;
        left: 50%;
        top: 125px;
        width: 24px;
        height: 24px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: var(--crono-amarillo);
        border: 3px solid #ffffff;
        z-index: 3;
        box-sizing: border-box;
    }

    .crono-mobile-fecha {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 72px;
        text-align: center;
        color: var(--crono-fecha);
        font-size: 14px;
        line-height: 1.2;
        font-weight: 500;
    }

    .crono-mobile-titulo {
        position: absolute;
        left: 20px;
        right: 20px;
        top: 155px;
        text-align: center;
        color: var(--crono-texto);
        font-size: 14px;
        line-height: 1.3;
        font-weight: 600;
    }

    .crono-mobile-anio {
        position: absolute;
        left: 50%;
        top: 125px;
        width: 90px;
        height: 90px;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--crono-amarillo);
        color: #002f62;
        font-size: 25px;
        line-height: 1;
        font-weight: 800;
        z-index: 4;
        box-sizing: border-box;
    }
}
