/* ==========================================================================
   TUNIP Side-Reveal Scroll Cards Widget Stylesheet
   ========================================================================== */

.elementor-widget-tunip-scroll-reveal-widget,
.elementor-element:has(.tunip-scroll-reveal-container) {
    overflow: visible !important;
}

.tunip-scroll-reveal-container {
    position: relative;
    width: 100%;
    background-color: #0b0d12;
    color: #ffffff;
    box-sizing: border-box;
    overflow: visible;
}

.tunip-scroll-reveal-sticky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 20px 0;
    z-index: 10;
}

.tunip-scroll-reveal-sticky.is-pinned {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
}

.tunip-scroll-reveal-sticky.is-bottom {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
}

.tunip-scroll-reveal-header-wrap {
    padding: 10px 5vw 15px;
    z-index: 2;
    pointer-events: auto;
    text-align: center;
}

.tunip-scroll-reveal-subheading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #e62e2d;
    margin-bottom: 6px;
}

.tunip-scroll-reveal-heading {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.tunip-scroll-reveal-viewport {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 10px 0;
}

.tunip-scroll-reveal-track {
    display: flex;
    align-items: stretch;
    height: 520px;
    max-height: 64vh;
    min-height: 420px;
    padding: 0 5vw;
    gap: 28px;
    will-change: transform;
    box-sizing: border-box;
}

/* Individual Card Styling */
.tunip-scroll-card {
    position: relative;
    flex: 0 0 420px;
    width: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: #141821;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

.tunip-scroll-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* Background Image & Overlay */
.tunip-scroll-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tunip-scroll-card:hover .tunip-scroll-card-bg {
    transform: scale(1.06);
}

.tunip-scroll-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.25) 0%, rgba(13, 17, 23, 0.85) 60%, rgba(13, 17, 23, 0.98) 100%);
    transition: opacity 0.4s ease;
}

.tunip-scroll-card-type-text .tunip-scroll-card-overlay {
    background: linear-gradient(145deg, #10141d 0%, #171d2a 100%);
}

/* Card Content Layout */
.tunip-scroll-card-content {
    position: relative;
    z-index: 3;
    padding: 32px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tunip-scroll-card-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tunip-scroll-card-badge {
    align-self: flex-start;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tunip-scroll-card-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.3px;
}

.tunip-scroll-card-subheading {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.4;
}

.tunip-scroll-card-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #94a3b8;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.tunip-scroll-card-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 16px;
}

.tunip-scroll-card-arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.tunip-scroll-card-arrow-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.tunip-scroll-card:hover .tunip-scroll-card-arrow-btn {
    background: #ffffff;
    color: #0b0d12;
    border-color: #ffffff;
}

.tunip-scroll-card:hover .tunip-scroll-card-arrow-btn svg {
    transform: translateX(3px);
}

/* --- HOVER REVEAL CARD MODE (IMAGE ONLY DEFAULT) --- */
.tunip-hover-reveal-card .tunip-scroll-card-overlay {
    opacity: 0 !important;
}

.tunip-hover-reveal-card .tunip-scroll-card-content {
    opacity: 0 !important;
    transform: translateY(24px) !important;
}

.tunip-hover-reveal-card:hover .tunip-scroll-card-overlay {
    opacity: 1 !important;
}

.tunip-hover-reveal-card:hover .tunip-scroll-card-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Progress Bar */
.tunip-scroll-reveal-footer {
    padding: 18px 5vw 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 100%;
}

.tunip-scroll-progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.tunip-scroll-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 4px;
    transition: width 0.05s linear;
}

@media (max-width: 991px) {
    .tunip-scroll-card {
        flex: 0 0 340px;
        width: 340px;
    }
    .tunip-scroll-card-title {
        font-size: 21px;
    }
}

@media (max-width: 767px) {
    .tunip-scroll-reveal-sticky,
    .tunip-scroll-reveal-sticky.is-pinned,
    .tunip-scroll-reveal-sticky.is-bottom {
        position: relative !important;
        height: auto !important;
        top: auto !important;
        bottom: auto !important;
        padding: 30px 0;
    }
    .tunip-scroll-reveal-track {
        height: auto;
        min-height: unset;
        max-height: unset;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
    }
    .tunip-scroll-card {
        flex: 0 0 85vw;
        width: 85vw;
        scroll-snap-align: center;
    }
    .tunip-scroll-reveal-footer {
        display: none;
    }
}

.elementor-editor-active .tunip-scroll-reveal-sticky,
.elementor-editor-active .tunip-scroll-reveal-sticky.is-pinned,
.elementor-editor-active .tunip-scroll-reveal-sticky.is-bottom {
    position: relative !important;
    height: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.elementor-editor-active .tunip-scroll-reveal-track {
    overflow-x: auto !important;
    height: auto !important;
}
