/* ==========================================================================
   Cooper Suite: Split Screen Timeline Widget Styles
   ========================================================================== */

:root {
    --ivt-accent: #C8102E;
    --ivt-text-dark: #111827;
    --ivt-text-muted: #5C5C5C;
    --ivt-line-color: #d1d5db;
    --ivt-font-family: var(--cooper-font-primary, 'Funnel Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.ivt-split-wrap {
    --cooper-frame-lateral: 60px;
    --ivt-left-col-width: 50%;
    --ivt-container-height: 100vh;
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.ivt-split-wrap.is-sticky-pin {
    height: var(--ivt-scroll-travel, 250vh);
    min-height: 250vh;
    position: relative;
    margin: 0 auto;
}

.ivt-split-wrap.is-sticky-pin .ivt-timeline-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--ivt-container-height, 100vh);
    min-height: var(--ivt-container-height, 100vh);
    max-height: var(--ivt-container-height, 100vh);
    border-radius: 0;
    box-shadow: none;
    z-index: 2;
}

.ivt-timeline-container {
    display: grid;
    grid-template-columns: var(--ivt-left-col-width, 50%) 1fr;
    background-color: #ffffff;
    height: var(--ivt-container-height, 100vh);
    min-height: var(--ivt-container-height, 100vh);
    max-height: var(--ivt-container-height, 100vh);
    width: 100%;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    font-family: var(--ivt-font-family);
    box-sizing: border-box;
}

/* Inversión de columnas (Imagen a la izquierda) */
.ivt-timeline-container.is-reversed {
    grid-template-columns: 1fr var(--ivt-left-col-width, 50%);
}

.ivt-timeline-container.is-reversed .ivt-left-col {
    order: 2;
}

.ivt-timeline-container.is-reversed .ivt-right-col {
    order: 1;
}

.ivt-timeline-container * {
    box-sizing: border-box;
}

.ivt-left-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px 50px 64px var(--cooper-frame-lateral, 60px);
    background: #ffffff;
    z-index: 2;
}

.ivt-header-block {
    max-width: 460px;
}

.ivt-eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.1px;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--ivt-accent, #C8102E);
    margin-bottom: 18px;
    font-family: var(--ivt-font-family);
}

.ivt-main-heading {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--ivt-text-dark, #111827);
    margin: 0;
    font-family: var(--ivt-font-family);
}

.ivt-nav-track-wrapper {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    transition: transform 0.2s ease, top 0.2s ease;
}

.ivt-nav-track {
    --ivt-btn-height: 44px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ivt-nav-line {
    position: absolute;
    right: 7.5px;
    top: calc(var(--ivt-btn-height, 44px) / 2);
    bottom: calc(var(--ivt-btn-height, 44px) / 2);
    width: 1px;
    background-color: var(--ivt-line-color, #d1d5db);
    z-index: 1;
    display: block;
    pointer-events: none;
}

.ivt-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.ivt-nav-item {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

button.ivt-nav-btn,
[type="button"].ivt-nav-btn,
.ivt-nav-btn,
button.ivt-nav-btn:hover,
button.ivt-nav-btn:focus,
button.ivt-nav-btn:active,
[type="button"].ivt-nav-btn:hover,
[type="button"].ivt-nav-btn:focus,
[type="button"].ivt-nav-btn:active,
.ivt-nav-btn:hover,
.ivt-nav-btn:focus,
.ivt-nav-btn:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    height: 44px;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none;
    border-bottom: none;
}

.ivt-nav-btn:focus-visible {
    outline: none !important;
}

.ivt-year-text {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    letter-spacing: 0.01em;
    text-align: right;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
    text-decoration: none;
    font-family: var(--ivt-font-family);
}

.ivt-nav-item.is-active .ivt-year-text {
    color: var(--ivt-accent, #C8102E);
    font-size: 20px;
    font-weight: 700;
}

.ivt-marker-slot {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.ivt-marker-square {
    display: block;
    width: 5px;
    height: 5px;
    background-color: #9ca3af;
    position: relative;
    z-index: 3;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ivt-nav-item.is-active .ivt-marker-square {
    background-color: var(--ivt-accent, #C8102E);
    width: 8px;
    height: 8px;
}


.ivt-details-wrapper {
    position: relative;
    max-width: 480px;
    min-height: 140px;
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: start;
    transition: left 0.2s ease, margin-top 0.2s ease, max-width 0.2s ease;
}

.ivt-detail-card {
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: none !important;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.ivt-detail-card.is-active {
    opacity: 1;
    visibility: visible;
    transform: none !important;
    pointer-events: auto;
}

.ivt-detail-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--ivt-text-dark, #111827);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
    font-family: var(--ivt-font-family);
}

.ivt-detail-desc {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: var(--ivt-text-muted, #5C5C5C);
    margin: 0;
    font-family: var(--ivt-font-family);
}

.ivt-right-col {
    position: relative;
    overflow: hidden;
    height: 100%;
    background-color: #0f172a;
}

.ivt-gallery-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

.ivt-gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
    z-index: 1;
}

.ivt-gallery-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.ivt-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==========================================================================
   PC Only (>= 1025px): Vertical Bottom-to-Top Curtain Image Transition
   ========================================================================== */
@media (min-width: 1025px) {
    .ivt-gallery-slide {
        transform: none !important;
        transition: none !important;
        will-change: clip-path, -webkit-clip-path;
    }

    .ivt-gallery-slide.is-prev {
        opacity: 1;
        visibility: visible;
        transform: none !important;
        z-index: 2;
    }

    .ivt-gallery-slide.is-active {
        opacity: 1;
        visibility: visible;
        transform: none !important;
        z-index: 3;
    }
}

/* ==========================================================================
   Elementor Active Breakpoints Adaptations
   - Widescreen: min-width: 1920px
   - Tablet Portrait: max-width: 1024px
   - Mobile Portrait: max-width: 767px
   ========================================================================== */

/* Widescreen (1920px and above) */
@media (min-width: 1920px) {
    .ivt-nav-track {
        --ivt-btn-height: 64px;
    }
    .ivt-left-col {
        padding: 80px 70px 80px var(--cooper-frame-lateral, 60px);
    }
    .ivt-header-block {
        max-width: 560px;
    }
    .ivt-eyebrow {
        font-size: 16px;
    }
    .ivt-main-heading {
        font-size: 66px;
        line-height: 1.1;
    }
    .ivt-detail-title {
        font-size: 26px;
    }
    .ivt-detail-desc {
        font-size: 24px;
    }
}

/* Tablet Portrait (1024px and below) */
@media (max-width: 1024px) {
    .ivt-split-wrap {
        --cooper-frame-lateral: 40px;
    }

    .ivt-eyebrow {
        font-size: 14px;
    }

    .ivt-main-heading {
        font-size: 38px;
    }

    .ivt-detail-title {
        font-size: 20px;
    }

    .ivt-detail-desc {
        font-size: 18px;
    }

    .ivt-timeline-container,
    .ivt-timeline-container.is-reversed {
        grid-template-columns: 1fr;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        max-height: none;
    }

    .ivt-timeline-container.is-reversed .ivt-left-col,
    .ivt-timeline-container.is-reversed .ivt-right-col {
        order: initial;
    }

    .ivt-left-col {
        padding: 44px var(--cooper-frame-lateral, 40px) 40px var(--cooper-frame-lateral, 40px);
    }

    .ivt-nav-track-wrapper {
        position: static;
        transform: none;
        margin: 28px 0;
    }

    .ivt-nav-track {
        align-items: flex-start;
    }

    .ivt-nav-line {
        display: none;
    }

    .ivt-nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
    }

    .ivt-nav-item {
        width: auto;
    }

    .ivt-nav-btn {
        background: #f3f4f6;
        padding: 8px 16px;
        border-radius: 20px;
        flex-direction: row-reverse;
        gap: 8px;
        height: auto;
    }

    .ivt-nav-item.is-active .ivt-nav-btn {
        background: rgba(200, 16, 46, 0.1);
    }

    .ivt-nav-item.is-active .ivt-year-text {
        font-size: 15px;
    }

    .ivt-right-col {
        height: 420px;
    }
}

/* Mobile Stack: hidden on desktop/tablet */
.ivt-mobile-stack {
    display: none;
}

/* Mobile Portrait (767px and below) */
@media (max-width: 767px) {
    .ivt-split-wrap {
        --cooper-frame-lateral: 4vw;
    }

    /* Disable sticky scroll on mobile */
    .ivt-split-wrap.is-sticky-pin {
        height: auto !important;
        min-height: 0 !important;
    }

    .ivt-split-wrap.is-sticky-pin .ivt-timeline-container {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .ivt-timeline-container {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 auto;
        border-radius: 0;
        background-color: #ffffff;
    }

    /* Hide desktop left-col and right-col on mobile */
    .ivt-left-col,
    .ivt-right-col {
        display: none !important;
    }

    /* Show mobile stacked cards */
    .ivt-mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: #ffffff;
        padding: 30px var(--cooper-frame-lateral, 20px) 40px var(--cooper-frame-lateral, 20px);
    }

    .ivt-mobile-header {
        margin-bottom: 24px;
    }

    .ivt-mobile-header .ivt-eyebrow {
        font-size: 3.5vw;
        margin-bottom: 12px;
    }

    .ivt-mobile-header .ivt-main-heading {
        font-size: 8vw;
        line-height: 1.1;
    }

    .ivt-mobile-card {
        display: flex;
        flex-direction: column;
        padding: 24px 0 32px 0;
    }

    .ivt-mobile-card:first-child,
    .ivt-mobile-header + .ivt-mobile-card {
        padding-top: 0;
    }

    .ivt-mobile-card + .ivt-mobile-card {
        border-top: none;
    }

    .ivt-mobile-card-text {
        display: flex;
        flex-direction: column;
        padding-bottom: 16px;
    }

    .ivt-mobile-card-year {
        display: block;
        font-size: 6vw;
        font-weight: 700;
        color: var(--ivt-accent, #C8102E);
        line-height: 1.15;
        letter-spacing: -0.01em;
        margin-bottom: 4px;
        font-family: var(--ivt-font-family);
    }

    .ivt-mobile-card-title {
        margin: 0 0 8px 0;
        font-size: 5.5vw;
        font-weight: 500;
        color: var(--ivt-text-dark, #111827);
        line-height: 1.2;
        letter-spacing: -0.5px;
        font-family: var(--ivt-font-family);
    }

    .ivt-mobile-card-desc {
        margin: 0;
        font-size: 4.6vw;
        line-height: 1.4;
        letter-spacing: -0.3px;
        color: var(--ivt-text-muted, #5C5C5C);
        font-family: var(--ivt-font-family);
    }

    .ivt-mobile-card-img {
        width: 100%;
        overflow: hidden;
        border-radius: 0;
    }

    .ivt-mobile-card-img img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
        object-position: center;
    }
}
