/* ==========================================================================
   Cooper Suite: Hero Section Card Widget Styles
   Architectural Stepped Notched Hero Section
   ========================================================================== */

.cooper-hsc-wrapper {
    --cooper-hsc-tab-bg: #cfcde0;
    --cooper-hsc-card-bg: #cfcde0;
    --cooper-hsc-tab-color: #0f172a;
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    box-sizing: border-box;
    font-family: var(--cooper-font-primary, 'Funnel Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    min-height: 90vh;
    min-height: 90dvh;
}

/* Section Height Modes */
.cooper-hsc-wrapper.height-fullscreen {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
}

.cooper-hsc-wrapper.height-custom {
    min-height: 90vh;
    min-height: 90dvh;
}

/* ==========================================================================
   Background Media Layer
   ========================================================================== */
.cooper-hsc-media-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.cooper-hsc-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.3s ease-out;
}

.cooper-hsc-bg-img {
    background-image: var(--cooper-hsc-bg-desktop);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

@media (max-width: 767px) {
    .cooper-hsc-bg-img.has-mobile-bg {
        background-image: var(--cooper-hsc-bg-mobile, var(--cooper-hsc-bg-desktop));
    }
}

.cooper-hsc-img-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* HTML5 MP4 Video */
.cooper-hsc-bg-video {
    overflow: hidden;
}

.cooper-hsc-video-el {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

/* YouTube Video Background */
.cooper-hsc-bg-youtube {
    overflow: hidden;
}

.cooper-hsc-yt-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Protective / Aesthetic Overlay */
.cooper-hsc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================================
   Stepped Architectural Card Anchor & Alignment
   ========================================================================== */
.cooper-hsc-card-anchor {
    position: absolute;
    bottom: var(--cooper-hsc-offset-y, 60px);
    left: var(--cooper-hsc-offset-x, var(--cooper-frame-lateral, 60px));
    z-index: 30;
    pointer-events: auto;
    display: flex;
    box-sizing: border-box;
    transform: translate(var(--cooper-hsc-tx, 0%), var(--cooper-hsc-ty, 0%));
}

/* Horizontal Position */
.cooper-hsc-wrapper.align-x-left .cooper-hsc-card-anchor {
    left: var(--cooper-hsc-offset-x, var(--cooper-frame-lateral, 60px));
    right: auto;
    --cooper-hsc-tx: 0%;
}

.cooper-hsc-wrapper.align-x-center .cooper-hsc-card-anchor {
    left: 50%;
    right: auto;
    --cooper-hsc-tx: -50%;
}

.cooper-hsc-wrapper.align-x-right .cooper-hsc-card-anchor {
    right: var(--cooper-hsc-offset-x, var(--cooper-frame-lateral, 60px));
    left: auto;
    --cooper-hsc-tx: 0%;
}

/* Vertical Position */
.cooper-hsc-wrapper.align-y-bottom .cooper-hsc-card-anchor {
    bottom: var(--cooper-hsc-offset-y, 60px);
    top: auto;
    --cooper-hsc-ty: 0%;
}

.cooper-hsc-wrapper.align-y-top .cooper-hsc-card-anchor {
    top: var(--cooper-hsc-offset-y, 60px);
    bottom: auto;
    --cooper-hsc-ty: 0%;
}

.cooper-hsc-wrapper.align-y-center .cooper-hsc-card-anchor {
    top: 50%;
    bottom: auto;
    --cooper-hsc-ty: -50%;
}

/* ==========================================================================
   The Stepped Card Structure (Tab Notch + Body)
   ========================================================================== */
.cooper-hsc-card {
    pointer-events: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    width: 520px;
    max-width: 100%;
    box-sizing: border-box;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.12));
    visibility: visible;
}

/* Animación Telón (Hero Home Standard Curtain Reveal) */
.cooper-hsc-curtain-card.cooper-hero-curtain-init {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    -webkit-clip-path: inset(100% 0 0 0);
    transform: translateY(45px);
}

.cooper-hsc-curtain-card.cooper-hero-curtain-animate {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
    transform: translateY(0);
    transition: clip-path var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-clip-path var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1),
                transform var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1),
                opacity calc(var(--cooper-hsc-anim-duration, 1100ms) * 0.42) ease-out;
}

.cooper-hsc-wrapper.tab-align-right .cooper-hsc-card {
    align-items: flex-end !important;
}

/* Notch Tab */
.cooper-hsc-tab {
    background-color: var(--cooper-hsc-tab-bg, var(--cooper-hsc-card-bg, #cfcde0));
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 16px 36px 14px 36px;
    border-radius: 2px 2px 0 0;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

.cooper-hsc-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--cooper-hsc-tab-color, #0f172a);
    line-height: 1.2;
    letter-spacing: -0.1px;
    margin: 0;
}

/* Card Body */
.cooper-hsc-body {
    background-color: var(--cooper-hsc-card-bg, #cfcde0);
    padding: 38px 46px 44px 46px;
    border-radius: 0 2px 2px 2px;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

.cooper-hsc-wrapper.tab-align-right .cooper-hsc-body {
    border-radius: 2px 0 2px 2px;
}

/* ==========================================================================
   Content Typography & Elements inside Card
   ========================================================================== */
.cooper-hsc-eyebrow-wrap {
    margin: 0;
    padding: 0;
}

.cooper-hsc-eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.1px;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.3;
}

.cooper-hsc-title-wrap {
    margin: 0;
    padding: 0;
}

.cooper-hsc-title {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.05;
    color: #0f172a;
    letter-spacing: -1px;
    margin: 0 0 16px 0;
}

.cooper-hsc-desc-wrap {
    margin: 0;
    padding: 0;
}

.cooper-hsc-desc {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: #475569;
    margin: 0;
    max-width: 440px;
}

/* CTA Button */
.cooper-hsc-btn-wrap {
    margin-top: 14px;
    display: flex;
}

.cooper-hsc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #c8102e;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.2px;
    padding: 12px 24px;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.cooper-hsc-btn:hover {
    background-color: #a60d24;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25);
}

.cooper-hsc-btn-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   Keyframe Entrance Animations (Non-blocking, card always ends at opacity 1)
   ========================================================================== */
@keyframes cooperHscFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cooperHscSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cooperHscZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Trigger animation only on live site when .is-animated class is added (only if not using JS curtain reveal) */
body:not(.elementor-editor-active) .cooper-hsc-wrapper.is-animated.anim-fade_up .cooper-hsc-card:not(.cooper-hsc-curtain-card) {
    animation: cooperHscFadeUp var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

body:not(.elementor-editor-active) .cooper-hsc-wrapper.is-animated.anim-slide_up .cooper-hsc-card:not(.cooper-hsc-curtain-card) {
    animation: cooperHscSlideUp var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

body:not(.elementor-editor-active) .cooper-hsc-wrapper.is-animated.anim-zoom_in .cooper-hsc-card:not(.cooper-hsc-curtain-card) {
    animation: cooperHscZoomIn var(--cooper-hsc-anim-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .cooper-hsc-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Responsive Breakpoints: Widescreen (>= 1920px) — Fluid vw (People Scale)
   ========================================================================== */
@media (min-width: 1920px) {
    .cooper-hsc-card {
        width: 32vw;
    }

    .cooper-hsc-badge {
        font-size: 0.9vw;
        letter-spacing: -0.1px;
    }

    .cooper-hsc-eyebrow {
        font-size: 0.9vw;
        letter-spacing: -0.1px;
    }

    .cooper-hsc-title {
        font-size: 3.5vw;
        line-height: 1.05;
    }

    .cooper-hsc-desc {
        font-size: 1.1vw;
        line-height: 1.3;
        max-width: 100%;
    }

    .cooper-hsc-btn {
        font-size: 0.9vw;
        letter-spacing: -0.2px;
        padding: 0.7vw 1.4vw;
    }
}

/* ==========================================================================
   Responsive Breakpoints: Tablet (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .cooper-hsc-card {
        width: 480px;
    }

    .cooper-hsc-badge,
    .cooper-hsc-eyebrow {
        font-size: 14px;
    }

    .cooper-hsc-title {
        font-size: 38px;
    }

    .cooper-hsc-desc {
        font-size: 17px;
    }

    .cooper-hsc-btn {
        font-size: 16px;
    }

    .cooper-hsc-body {
        padding: 32px 36px 36px 36px;
    }
}

/* ==========================================================================
   Responsive Breakpoints: Mobile (<= 767px)
   Matches reference screenshot media_1793818740650_e2dcb659.jpg
   ========================================================================== */
@media (max-width: 767px) {
    .cooper-hsc-wrapper {
        min-height: 80vh;
        min-height: 80dvh;
    }

    .cooper-hsc-wrapper.dock-mobile {
        align-items: flex-end;
    }

    .cooper-hsc-wrapper.dock-mobile .cooper-hsc-card-anchor,
    .elementor-widget-cooper_hero_section_card .cooper-hsc-wrapper.dock-mobile .cooper-hsc-card-anchor {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        --cooper-hsc-tx: 0%;
        --cooper-hsc-ty: 0%;
        transform: none;
        padding: 0 var(--cooper-hsc-offset-x, var(--cooper-frame-lateral, 4vw)) var(--cooper-hsc-offset-y, 20px) var(--cooper-hsc-offset-x, var(--cooper-frame-lateral, 4vw));
        box-sizing: border-box;
        justify-content: center;
    }

    
    .cooper-hsc-card {
        width: 100%;
        max-width: 100%;
        filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
    }

    .cooper-hsc-tab {
        padding: 12px 24px 10px 24px;
    }

    .cooper-hsc-badge {
        font-size: 3.5vw;
        letter-spacing: -0.1px;
    }

    .cooper-hsc-body {
        padding: 28px 24px 32px 24px;
    }

    .cooper-hsc-eyebrow {
        font-size: 3.5vw;
        letter-spacing: -0.1px;
        margin-bottom: 10px;
    }

    .cooper-hsc-title {
        font-size: 8vw;
        line-height: 1.1;
        margin-bottom: 12px;
    }

    .cooper-hsc-desc {
        font-size: 4.4vw;
        line-height: 1.35;
        letter-spacing: -0.1px;
        margin-bottom: 0;
    }

    .cooper-hsc-btn {
        width: 100%;
        font-size: 4.2vw;
        letter-spacing: -0.2px;
        padding: 3vw 5vw;
    }
}


/* Elementor Editor Guarantees */
body.elementor-editor-active .cooper-hsc-card-anchor,
body.elementor-editor-active .cooper-hsc-card,
body.elementor-editor-active .cooper-hsc-tab,
body.elementor-editor-active .cooper-hsc-body {
    opacity: 1 !important;
    visibility: visible !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}
