/* TIMELINE */
.ajax-timeline {
    min-height: 650px;
    background: #e6e2d8;
}

.timeline-content {
    background: url(/wp-content/themes/df2023/images/back_timeline.webp);
    background-color: #E7E4D9;
    background-size: cover;
    height: 650px;
    margin: 0 auto;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

.timeline-anio {
    min-width: 160px;
    height: 100%;
}

.scroll {
    width: 100%;
    /* Set the width of the container */
    height: 100%;
    overflow: scroll hidden;
    /* Hide the overflow */
    white-space: nowrap;
    /* Prevent the elements from wrapping */
    cursor: -webkit-grab;
    cursor: grab;
    /* Change the cursor to a grabbing hand */
    padding-left: 200px;
    transition: 0.5s all;
}

.scroll::-webkit-scrollbar-track {
    background-color: #b3b1a7;
}

.scroll::-webkit-scrollbar {
    width: 12px;
    background-color: #b3b1a7;
}

.scroll::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    background-color: #222;
}

/* Add cursor style when dragging */
.scroll.dragging {
    cursor: -webkit-grabbing;
    cursor: grabbing;
}

/* Individual div styles */
.timeline-anio {
    display: inline-block;
    min-width: 160px;
    /* Set the width of each div */
    height: 100px;
    /* Set the height of each div */
    margin-right: 10px;
    /* Add some space between divs */
    padding-top: 20px;
    vertical-align: top;
    width: auto;
}

.book-container {
    height: 138px;
    width: 316px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    box-shadow: 0 0 4px #00000025;
    background-color: #F5F4EF;
    border-color: #C4BCA1;
    border-radius: 5px;
    z-index: 2;
    margin-left: -45px;
    opacity: 0;
    transition: 0.5s all;
}

.book-container.visible {
    opacity: 1
}

.first-div {
    margin-left: -45px !important;
}

.book-image {
    min-width: 96px;
}

.book-content {
    margin-left: 10px;
    width: calc(100% - 104px);
    white-space: normal;
}

.book-title {
    height: 65%;
    margin-top: 10px;
    padding-right: 10px;
}

.book-image img {
    height: 138px;
    width: auto;
}

.tipo {
    font-size: 12px;
    color: #474747;
}

.timeline-info {
    font-size: 10px;
    text-decoration: underline;
    color: #000000;
}

span.pop-link a.timeline-info {
    margin-left: 0;
}

.book-title .title,
.book-title .pop-title {
    display: block;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    font-size: 16px;
    color: #000000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 18px;
}

.nunmber {
    font-size: 12px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-price {
    display: flex;
    flex-direction: row;
    color: #000000
}

.book-value,
.pop-value {
    font-size: 16px;
    font-weight: bold;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
}

.book-price div {
    width: 50%;
}

.book-btn {
    text-align: center;
}

.book-btn a {
    border: 1px solid #A4131D;
    background-color: #A4131D;
    color: #ffffff !important;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    padding: 5px 14px;
}

.grid-dist {
    display: flex;
    flex-direction: row;
    position: relative;
    margin-left: -150px;
}

.anio-pos {
    position: absolute;
    top: -20px;
}

.anio-line {
    height: 600px;
    width: 3px;
    background-color: #C4BCA1;
    position: relative;
}

.anio-line:after {
    content: '';
    border-radius: 7px;
    width: 9px;
    height: 9px;
    background-color: #C4BCA1;
    display: block;
    position: absolute;
    bottom: 0;
    left: -3px;
}

.line-number {
    margin-left: -50%;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    font-size: 12px;
}

.pos-1 {
    margin-left: -140px;
}

.pos-2 {
    margin-top: 144px;
    margin-left: -150px;
}

.pos-3 {
    margin-top: 288px;
    margin-left: -150px;
}

.epocas-container {
    position: relative;
    height: auto;
    background-color: #A4131D;
    width: auto;
    overflow: auto;
    display: table;
    margin-left: -153px;
    z-index: 1;
}

.epoca-content {
    display: inline-block;
    flex-direction: row;
    color: #FFFFFF;
    padding: 4px 10px 3px 20px;
    font-size: 14px;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
}

.epoca-line {
    height: 670px;
    width: 3px;
    background-color: #C4BCA1;
    position: absolute;
    z-index: 0;
    bottom: 0;
    margin-left: -20px;
}

.epoca-sticky {
    display: inline-block;
    min-width: 130px;
    width: auto;
    position: -webkit-sticky;
    position: sticky;
    left: -130px;
}

.sub-epocas-container {
    margin-top: 340px;
    position: relative;
    height: 100px;
    width: auto;
    overflow: auto;
    display: table;
    z-index: 1;
    margin-left: -147px;
}

.sub-epoca-content {
    height: 26px;
    display: inline-block;
    color: #FFFFFF;
    padding: 3px 10px 1px 20px;
    font-size: 10px;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    position: absolute;
    background: #D34035;
    line-height: 18px;
    border-left: 1px solid #000000;
}

.sub-epoca-sticky {
    display: block;
    width: 130px;
    position: -webkit-sticky;
    position: sticky;
    left: -130px;
}

.custom-select {
    position: relative;
    width: 250px;
    cursor: pointer;
    z-index: 5;
}

.custom-select .selected-option {
    background-color: #E7E4D9;
    padding: 5px;
    border: 1px solid #ccc;
    display: block;
    border-radius: 5px;
}

.custom-select .selected-option img {
    display: none;
}

.custom-select .options {
    display: none;
    position: absolute;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    background: #fff;
    height: 350px;
    overflow: scroll;
}

.custom-select .options li {
    padding: 5px;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    font-size: 12px;
    color: #000000;
}

.custom-select .options li.parent-epoca {
    border-top: 1px solid #E7E4D9;
    border-bottom: 1px solid #E7E4D9;
    font-size: 14px;
}

.custom-select .options li .sel-arrow {
    color: #909090 !important;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
}

.custom-select .options li.sel {
    color: #A4131D;
}

.custom-select .options li:hover {
    background: #f0f0f0;
    cursor: pointer;
}

.select-epocas {
    display: flex;
    flex-direction: row;
    right: 0;
    justify-content: center;
    align-items: center;
    top: 0;
}

.label-epoca {
    line-height: 18px;
    padding-right: 5px;
    font-family: "Roboto Slab", Georgia, "Times New Roman", serif !important;
    color: #000000;
}

.book-image img.lazy {
    opacity: 0;
    display: block;
    transition: opacity 0.5s ease-in-out;
}

.book-image {
    background: url('/wp-content/themes/df2023/images/loading-gif.gif');
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.timeline-content .epoca-content {
    background-color: #A4131D;
}

.timeline-content .epocas-container {
    margin-top: 450px;
}

.timeline-content .position- {
    display: none;
}

.ajax-timeline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ajax-timeline-loading:before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    height: 10px;
    width: 10%;
    background-color: #FFF;
    -webkit-animation: loader-4 .8s cubic-bezier(0, 0, .03, .9) infinite;
    animation: loader-4 .8s cubic-bezier(0, 0, .03, .9) infinite;
}

@-webkit-keyframes loader-4 {

    0%,
    44%,
    88.1%,
    100% {
        transform-origin: left;
    }

    0%,
    100%,
    88% {
        transform: scaleX(0);
    }

    44.1%,
    88% {
        transform-origin: right;
    }

    33%,
    44% {
        transform: scaleX(1);
    }
}

@keyframes loader-4 {

    0%,
    44%,
    88.1%,
    100% {
        transform-origin: left;
    }

    0%,
    100%,
    88% {
        transform: scaleX(0);
    }

    44.1%,
    88% {
        transform-origin: right;
    }

    33%,
    44% {
        transform: scaleX(1);
    }
}

@media all and (min-width: 980px) {
    .container-timeline > div > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media all and (max-width: 980px) {
    .container-timeline {
        height: auto;
    }

    .timeline-area #page-container {
        overflow: hidden;
    }

    .container-timeline h2 {
        display: none;
    }

    .select-epocas {
        position: absolute;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-width: 100vw;
        width: 100vw;
        display: inline;
        right: initial;
        top: initial;
        padding: 10px 0 30px;
    }

    .arrow-left {
        position: absolute;
        width: 30px;
        height: 30px;
        z-index: 6;
        left: 0;
        margin-left: -8%;
        cursor: pointer;
        margin-top: -32px;
    }

    .arrow-left img {
        width: 24px;
        height: auto;
        transform: rotate(-180deg);
    }

    .arrow-right {
        position: absolute;
        width: 30px;
        height: 30px;
        z-index: 6;
        right: 0;
        margin-right: -9%;
        cursor: pointer;
        margin-top: -32px;
    }

    .arrow-right img {
        width: 24px;
        height: auto;
    }

    .label-epoca {
        display: none;
    }

    .custom-select {
        position: relative;
        width: 100%;
        text-align: center;
        border-radius: 0;
    }

    .custom-select .selected-option {
        background-color: #A4131D;
        color: #ffffff;
        padding: 8px 0;
        font-size: 17px;
        border-radius: 0;
    }

    .custom-select .selected-option img {
        display: inline-block;
        margin-left: 10px;
    }

    .custom-select .options {
        width: 100%;
    }

    .custom-select .options li {
        width: 100%;
        text-align: left;
        padding-left: 15px;
    }

    .timeline-mobile {
        display: flex;
        flex-direction: row;
        height: auto;
        width: 100%;
        margin-top: 31px;
        min-height: calc(100vh - 150px);
        overflow: hidden;
    }

    .timeline-anio {
        width: 100%;
        height: auto;
        padding-top: 10px;
    }

    .col-blank {
        width: 90px;
    }

    .col-books {
        width: calc(100% - 90px);
        background-color: #E7E4D9;
    }

    .book-container {
        height: 73px;
        min-width: 266px;
        margin-left: 10px;
        position: relative;
        width: 95%;
    }

    .book-content {
        margin-left: 0px;
        width: calc(100% - 74px);
        overflow: hidden;
    }

    .book-image {
        min-width: 50px;
        padding: 8px;
    }

    .book-image img {
        height: 57px;
        width: auto;
    }

    .book-title {
        margin-top: 7px;
    }

    .book-title .title,
    .book-title .pop-title {
        font-size: 14px;
        line-height: 18px;
    }

    .book-mobile .book-btn {
        display: none;
    }

    .line-number {
        margin-left: -65px;
        margin-top: -13px;
    }

    .nunmber {
        display: inline-block;
        font-size: 12px;
        width: 45px;
        text-align: center;
    }

    .anio-pos {
        top: 0;
        margin-left: -12px;
    }

    .anio-line {
        height: 2px;
        width: 100vh;
        background-color: #C4BCA1;
        position: relative;
        margin-top: 40px;
    }

    .anio-line:after {
        bottom: -3px;
    }

    .grid-dist {
        margin-left: 0px;
        flex-direction: column;
        gap: 10px;
    }

    .go-out {
        display: none;
    }

    .content-pop-up {
        position: fixed;
        z-index: 10;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: none;
    }

    .pop-up {
        position: absolute;
        bottom: 0;
        z-index: 11;
        background: #ffffff;
        border-top-right-radius: 7px;
        border-top-left-radius: 7px;
        height: 210px;
        display: flex;
        flex-direction: column;
        width: 360px;
        padding: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .pop-up-content {
        display: flex;
        flex-direction: row;
    }

    .pop-up-image {
        padding: 2px;
        width: 30%;
    }

    .pop-up-text {
        position: relative;
        padding-left: 10px;
        width: 70%;
    }

    .pop-up-text .book-title {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding-top: 7px;
        margin-top: 0;
    }

    .close-pop-up {
        position: absolute;
        right: 0;
        top: 0;
    }

    .pop-up-button .button {
        display: block !important;
    }

    .pop-value {
        color: #000000;
    }

    .arrow-left {
        display: none;
    }

    .arrow-right {
        display: none;
    }

    .mob-epoca .anio-line {
        margin-top: 6px;
    }
}

.timeline-cover-image {
    background-image: url('/wp-content/uploads/2025/04/Captura-de-pantalla-2025-04-05-075236.webp');
    background-repeat: repeat-x;
    background-position: 0 0;
    background-size: cover;
    -webkit-animation: moverFondo 120s linear infinite;
    animation: moverFondo 120s linear infinite;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    mix-blend-mode: multiply;
    -webkit-filter: blur(3px);
    filter: blur(3px);
}

@-webkit-keyframes moverFondo {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

@keyframes moverFondo {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

#timeline-cover {
    height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    position: relative;
    background-color: #E7E4D9;
}

.timeline-cover-content {
    z-index: 1;
}

#timeline-cover div.timeline-cover-button > a {
    background: #d34035;
    color: #FFF !important;
    padding: 5px 20px;
    display: inline-block;
    border-radius: 4px;
    margin-top: 2em;
}

#timeline-cover .timeline-cover-text p {
    color: #222;
    margin-top: 1em;
}