/* ==========================================================================
   Cooper Suite: Section Box Up Widget Styles
   ========================================================================== */

.ivt-boxup-wrap {
    --cooper-frame-lateral: 60px;
    --ivt-feat-accent: #c8102e;
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* Modo Sticky Pin: Altura total en VH (200vh por defecto) para recorrido de scroll */
.ivt-boxup-wrap.is-sticky-pin {
    height: var(--ivt-scroll-travel, 200vh);
    min-height: 200vh;
    margin: 0 auto;
    position: relative;
}

.ivt-boxup-wrap.is-sticky-pin .ivt-boxup-stage {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    z-index: 2;
}

.ivt-boxup-stage {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Background image holder: COMPLETELY STATIC (Restricción 1) */
.ivt-boxup-img-holder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
    z-index: 1;
}

.ivt-boxup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: none !important;
}

/* Floating Card Container */
.ivt-boxup-card-wrapper {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

/* Card Positioning */
.ivt-boxup-wrap.pos-bottom-left .ivt-boxup-card-wrapper {
    bottom: 50px;
    left: var(--cooper-frame-lateral, 60px);
}

.ivt-boxup-wrap.pos-bottom-right .ivt-boxup-card-wrapper {
    bottom: 50px;
    right: var(--cooper-frame-lateral, 60px);
}

/* Stepped Floating Card: Animación de revelado vertical (clip-path + translateY) */
.ivt-boxup-card,
.cooper-stepped-card {
    pointer-events: auto;
    max-width: 530px;
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.16));
    will-change: clip-path, -webkit-clip-path, transform;
    /* Revelado progresivo controlado por scroll */
    -webkit-clip-path: inset(calc((1 - var(--scroll-progress, 0)) * 100%) 0 0 0);
    clip-path: inset(calc((1 - var(--scroll-progress, 0)) * 100%) 0 0 0);
    transform: translate3d(0, calc((1 - var(--scroll-progress, 0)) * 45px), 0);
}

/* Soporte nativo para CSS Scroll-Driven Animations */
@supports (animation-timeline: view()) {
    @media not (prefers-reduced-motion: reduce) {
        .ivt-boxup-wrap:not(.has-js-driver) .ivt-boxup-card,
        .ivt-boxup-wrap:not(.has-js-driver) .cooper-stepped-card {
            animation: cooperBoxUpScrollReveal linear both;
            animation-timeline: view();
            animation-range: entry 10% cover 45%;
        }

        @keyframes cooperBoxUpScrollReveal {
            from {
                clip-path: inset(100% 0 0 0);
                transform: translate3d(0, 45px, 0);
            }
            to {
                clip-path: inset(0 0 0 0);
                transform: translate3d(0, 0, 0);
            }
        }
    }
}

/* Accesibilidad: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .ivt-boxup-card,
    .cooper-stepped-card {
        clip-path: none !important;
        transform: none !important;
        animation: none !important;
    }
}

.ivt-boxup-tab {
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 28px 10px 48px;
    border-radius: 2px 2px 0 0;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.ivt-boxup-eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ivt-feat-accent);
}

.ivt-boxup-body {
    background-color: #ffffff;
    padding: 42px 48px 46px 48px;
    border-radius: 0 2px 2px 2px;
    position: relative;
    z-index: 1;
}

/* Full-Width Stepped Banner (Likova Reference Style) */
.ivt-boxup-wrap.layout-full-banner .ivt-boxup-card-wrapper {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.ivt-boxup-wrap.layout-full-banner .ivt-boxup-card {
    max-width: 100% !important;
    filter: drop-shadow(0 -10px 35px rgba(0, 0, 0, 0.08));
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.ivt-boxup-wrap.layout-full-banner .ivt-boxup-tab {
    display: inline-block;
    align-self: flex-start;
    padding: 18px 48px 14px var(--cooper-frame-lateral, 60px);
    background-color: #ffffff;
    border-radius: 4px 4px 0 0;
    margin-bottom: -1px;
}

.ivt-boxup-wrap.layout-full-banner .ivt-boxup-body {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 44px var(--cooper-frame-lateral, 60px) 48px var(--cooper-frame-lateral, 60px);
    border-radius: 0;
    width: 100%;
}

.ivt-boxup-title {
    font-size: clamp(2.2rem, 3.4vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #000000;
    margin: 0 0 16px 0;
}

.ivt-boxup-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #52525b;
    margin: 0 0 28px 0;
}

/* Two-piece Button */
.ivt-boxup-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ivt-boxup-btn-group a,
.ivt-boxup-btn-group a:hover,
.ivt-boxup-btn-group a:focus,
.ivt-boxup-btn-group a:active,
.ivt-boxup-btn-group a:visited {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    border-bottom: none !important;
    background-image: none !important;
}

.ivt-boxup-btn-group a::before,
.ivt-boxup-btn-group a::after {
    display: none !important;
    content: none !important;
}

.ivt-boxup-btn-text,
.ivt-boxup-btn-text:hover,
.ivt-boxup-btn-text:focus,
.ivt-boxup-btn-text:active,
.ivt-boxup-btn-text:visited {
    display: inline-flex;
    align-items: center;
    background-color: var(--ivt-feat-accent);
    color: #ffffff !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    border-bottom: none !important;
    font-size: 14.5px;
    font-weight: 600;
    padding: 13px 24px;
    border-radius: 2px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.25);
}

.ivt-boxup-btn-arrow,
.ivt-boxup-btn-arrow:hover,
.ivt-boxup-btn-arrow:focus,
.ivt-boxup-btn-arrow:active,
.ivt-boxup-btn-arrow:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ivt-feat-accent);
    color: #ffffff !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    border-bottom: none !important;
    width: 46px;
    height: 46px;
    border-radius: 2px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.25);
}

.ivt-boxup-btn-group:hover .ivt-boxup-btn-text,
.ivt-boxup-btn-group:hover .ivt-boxup-btn-arrow {
    background-color: #a80c25;
}

.ivt-boxup-btn-arrow svg {
    transition: transform 0.2s ease;
}

.ivt-boxup-btn-group:hover .ivt-boxup-btn-arrow svg {
    transform: translateX(3px);
}

/* ==========================================================================
   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-boxup-stage {
        max-height: none;
    }
    .ivt-boxup-card {
        max-width: 620px;
    }
    .ivt-boxup-title {
        font-size: 3.2rem;
    }
}

/* Tablet Portrait (1024px and below) */
@media (max-width: 1024px) {
    .ivt-boxup-wrap {
        --cooper-frame-lateral: 40px;
    }
    .ivt-boxup-stage {
        height: 100vh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
    }
    .ivt-boxup-wrap.pos-bottom-left .ivt-boxup-card-wrapper {
        bottom: 35px;
        left: var(--cooper-frame-lateral, 40px);
    }
    .ivt-boxup-wrap.pos-bottom-right .ivt-boxup-card-wrapper {
        bottom: 35px;
        right: var(--cooper-frame-lateral, 40px);
    }
    .ivt-boxup-body {
        padding: 34px 38px 38px 38px;
    }
}

/* Mobile Portrait (767px and below) */
@media (max-width: 767px) {
    .ivt-boxup-wrap {
        --cooper-frame-lateral: 16px;
    }
    .ivt-boxup-wrap.is-sticky-pin {
        height: var(--ivt-scroll-travel, 200vh);
        min-height: 200vh;
        margin: 0 auto;
    }
    .ivt-boxup-wrap.is-sticky-pin .ivt-boxup-stage {
        position: sticky;
        top: 0;
        height: 100vh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        width: 100%;
        border-radius: 0;
    }
    .ivt-boxup-stage {
        height: 100vh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        width: 100%;
        border-radius: 0;
    }

    .ivt-boxup-img-holder {
        position: absolute;
        top: 0 !important;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none !important;
    }

    .ivt-boxup-card-wrapper {
        position: absolute;
        bottom: 24px !important;
        left: var(--cooper-frame-lateral, 16px) !important;
        right: var(--cooper-frame-lateral, 16px) !important;
        top: auto !important;
        transform: none !important;
        width: auto;
    }

    .ivt-boxup-card {
        max-width: 100%;
        filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.2));
    }

    .ivt-boxup-tab {
        padding: 10px 18px 8px 18px;
    }

    .ivt-boxup-body {
        padding: 22px 20px 24px 20px;
    }

    .ivt-boxup-title {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    .ivt-boxup-desc {
        font-size: 13.5px;
        margin-bottom: 18px;
    }

    .ivt-boxup-btn-text {
        font-size: 13px;
        padding: 10px 16px;
    }

    .ivt-boxup-btn-arrow {
        width: 38px;
        height: 38px;
    }
}

.ivt-boxup-wrap[data-parallax="false"] .ivt-boxup-card,
.ivt-boxup-wrap[data-parallax="false"] .cooper-stepped-card {
    clip-path: none !important;
    -webkit-clip-path: none !important;
    transform: none !important;
}

.ivt-boxup-wrap[data-parallax="false"] .ivt-boxup-img-holder {
    top: 0 !important;
    height: 100% !important;
    transform: none !important;
}

.ivt-boxup-wrap[data-parallax="false"] .ivt-boxup-card-wrapper {
    transform: none !important;
}
