/*
 * Scroll Effects Block Styles
 * Styles for the custom scroll effects block with GSAP animations
 */

/* Scroll Effects Block */
.wp-block-introsmatter-scroll-effects {
    position: relative;
    /* Height is set dynamically by JavaScript: totalSlides * 100vh */
    overflow-x: hidden;
    overflow-y: visible;
    background: #FFFFFF;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    scroll-behavior: smooth;
    z-index: 10;
    isolation: isolate;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Opacity controlled by GSAP - no CSS opacity */
    pointer-events: none;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-item.active {
    /* Opacity controlled by GSAP */
    pointer-events: auto;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1512px;
    margin: 0 auto;
}

/* Left column content - will be animated by GSAP */
/* Note: GSAP's 'y' property adds to the existing translateY(-50%) transform */
.wp-block-introsmatter-scroll-effects .scroll-effects-left {
    position: absolute;
    width: 420px;
    left: 254px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #52606D;
    margin: 0;
    width: 420px;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-title {
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 60px;
    color: #111111;
    margin: 0;
    width: 420px;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-text {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #3D4751;
    margin: 0;
    width: 420px;
}

/* Next section hint at bottom - positioned inside scroll-effects-left */
.wp-block-introsmatter-scroll-effects .scroll-effects-hint {
    position: absolute;
    bottom: -240px;
    left: 0;
    z-index: 20;
    pointer-events: none;
    transform: translateY(20px);
}

.wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
    background: none;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 60px;
    color: #111111;
    text-align: left;
    box-shadow: none;
    border: none;
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.5) 0%, rgba(17, 17, 17, 0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: 420px;
    height: 60px;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Right column - static frame */
.wp-block-introsmatter-scroll-effects .scroll-effects-right {
    position: absolute;
    width: 588px;
    height: 430px;
    left: 756px;
    top: calc(50% - 430px/2);
    background: rgba(0, 0, 0, 0.001);
    box-shadow: 0px 64px 40px -32px rgba(17, 124, 140, 0.25);
    border-radius: 32px;
    overflow: hidden;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
    position: absolute;
    width: 540px;
    height: 382px;
    left: calc(50% - 540px/2);
    top: calc(50% - 382px/2);
    background: #DEFBFF;
    box-shadow: inset 0px 4px 16px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Frame stays completely static - no transforms or transitions */
    transform: none !important;
    transition: none !important;
}

/* Container for smooth fading content inside the frame */
.wp-block-introsmatter-scroll-effects .scroll-effects-content-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Individual image section within the content container */
.wp-block-introsmatter-scroll-effects .scroll-effects-image-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-image-section:first-child {
    opacity: 1;
}

/* Show only the image section with active class (controlled by GSAP) */
/* Note: GSAP controls opacity directly - this class is for state tracking only */
/* .active class is applied by JS for state management, but GSAP handles all visual properties */

.wp-block-introsmatter-scroll-effects .scroll-effects-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wp-block-introsmatter-scroll-effects .scroll-effects-placeholder {
    width: 100%;
    height: 100%;
    border: 2px dashed #E5E7E9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    text-align: center;
}

/* 1512×982 breakpoint - Desktop */
@media (max-width: 1919px) {
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        left: 128px;
    }
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        left: 50%;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-title,
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 40px;
        line-height: 48px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 18px;
        line-height: 28px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 14px;
        line-height: 20px;
    }
}

/* 1280×720 breakpoint - Smaller Desktop */
@media (max-width: 1511px) {
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        left: 128px;
    }
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        left: 50%;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-title,
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 40px;
        line-height: 48px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 18px;
        line-height: 28px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 14px;
        line-height: 20px;
    }
}

/* 1024×768 breakpoint - Large tablet/Small desktop */
@media (max-width: 1279px) {
    .wp-block-introsmatter-scroll-effects .scroll-effects-content {
        padding: 0 24px;
        gap: 48px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        flex: 0 0 390px;
        left: 24px;
        width: 390px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        flex: 0 0 440px;
        height: 321px;
        left: 55%;
        top: calc(50% - 321px / 2);
        width: 440px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
        border-radius: 32px;
        width: 400px;
        height: 291px;
        left: calc(50% - 400px / 2);
        top: calc(50% - 291px / 2);
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-title {
        font-size: 40px;
        line-height: 48px;
        width: 390px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 40px;
        line-height: 48px;
        width: 390px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 18px;
        line-height: 28px;
        width: 390px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 14px;
        line-height: 20px;
        width: 390px;
    }
}

/* 834×1194 breakpoint - Tablet Portrait */
@media (max-width: 1023px) {
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        left: 24px;
        width: 360px;
    }
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        left: 50%;
        width: 390px;
        height: 285px;
        top: calc(50% - 285px / 2);
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
        width: 390px;
        height: 285px;
        left: calc(50% - 390px / 2);
        top: calc(50% - 285px / 2);
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-image {
        width: 100%;
        height: auto;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-title,
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 40px;
        line-height: 48px;
        width: 360px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 18px;
        line-height: 28px;
        width: 360px;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 14px;
        line-height: 20px;
        width: 360px;
    }
}

/* 640×480 breakpoint - Small Tablet */
@media (max-width: 833px) {
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-container {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        overflow: hidden !important;
        /* Ensure content is properly clipped */
        will-change: transform;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        /* Ensure items are properly contained */
        will-change: transform, opacity;
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-item.prev {
        opacity: 0;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-content {
        position: relative;
        width: 100%;
        height: 100%;
        max-width: 1512px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 270px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        position: absolute;
        left: calc(50% + 10px);
        width: 280px;
        height: 200px;
        top: calc(50% - 200px / 2);
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
        position: absolute;
        width: 250px;
        height: 180px;
        left: calc(50% - 250px / 2);
        top: calc(50% - 180px / 2);
    }

    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 12px;
        line-height: 18px;
        width: 270px;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-title {
        font-size: 26px;
        line-height: 34px;
        width: 270px;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 26px;
        line-height: 34px;
        width: 270px;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 14px;
        line-height: 22px;
        width: 270px;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint {
        bottom: -180px;
    }
}

/* 639px and below - Mobile: Stack columns */
@media (max-width: 639px) {
    .wp-block-introsmatter-scroll-effects {
        position: relative;
        overflow-x: hidden;
        overflow-y: visible;
        /* Height is set dynamically by JavaScript - do not override */
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-container {
        position: relative !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-item {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100%;
        opacity: 1;
        pointer-events: auto;
        margin-bottom: 2rem;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-content {
        position: relative;
        width: 100%;
        height: auto;
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem 16px;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        order: 1;
        flex: 0;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: 240px;
        order: 2;
        margin: 0 auto;
        flex: 0;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
        position: relative;
        width: 100%;
        height: 248px;
        left: auto;
        top: auto;
        transform: none;
        border-radius: 16px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-content-container {
        position: relative !important;
    }
    
    /* Override the :first-child opacity rule on mobile */
    .wp-block-introsmatter-scroll-effects .scroll-effects-image-section:first-child {
        opacity: 0 !important;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 11px;
        line-height: 16px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-title {
        font-size: 24px;
        line-height: 32px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 24px;
        line-height: 32px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 14px;
        line-height: 22px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        opacity: 1;
        margin-top: 1rem;
    }
    
    /* On mobile (639px and smaller), only show the corresponding image for each section */
    .wp-block-introsmatter-scroll-effects .scroll-effects-image-section.mobile-hidden {
        display: none !important;
        opacity: 0 !important;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-image-section.mobile-visible {
        display: flex !important;
        opacity: 1 !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: 100% !important;
        visibility: visible !important;
    }
}

/* Extra small mobile - max-width: 374px */
/* @media (max-width: 374px) {
    .wp-block-introsmatter-scroll-effects {
        position: relative;
        overflow-x: hidden;
        overflow-y: visible;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-container {
        position: relative !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-item {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100vh;
        opacity: 1;
        pointer-events: auto;
        margin-bottom: 2rem;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-content {
        position: relative;
        width: 100%;
        height: auto;
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem 12px;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-left {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        order: 1;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-right {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: 200px;
        order: 2;
        margin: 0 auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-image-frame {
        position: relative;
        width: 100%;
        height: 100%;
        left: auto;
        top: auto;
        transform: none;
        border-radius: 12px;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-subtitle {
        font-size: 10px;
        line-height: 14px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-title {
        font-size: 20px;
        line-height: 28px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint-content {
        font-size: 20px;
        line-height: 28px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-text {
        font-size: 13px;
        line-height: 20px;
        width: 100%;
        height: auto;
    }
    
    .wp-block-introsmatter-scroll-effects .scroll-effects-hint {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        opacity: 1;
        margin-top: 1rem;
    }
} */

