﻿/* ========================================
    DESKTOP-ONLY CSS (1024px and above)
    Carousel/Exhibit Gallery View with Thumbnails
======================================== */
@media (min-width: 1024px) {
    /* Desktop Section Container */
    .howscreen-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 2rem 2rem 4rem;
        background: var(--bg-light);
    }

    /* Section Header */
    .howscreen-header {
        text-align: center;
        margin-bottom: 15px;
        width: 100%;
    }

    .howscreen-title {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
        font-weight: 700;
        color: var(--eco-green);
        margin: 0 0 1.5rem 0;
        letter-spacing: -0.5px;
        line-height: 1.2;
        text-align: center;
        position: relative;
    }

    .howscreen-container {
        width: 100%;
        max-width: 1600px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        min-height: auto;
    }

    /* Thumbnails Sides */
    .howscreen-thumbnails-side {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 2rem;
        width: 220px;
        height: 100%;
        flex-shrink: 0;
        padding-top: 0;
    }

    .howscreen-thumbnails-left {
        order: -1;
        align-self: flex-start;   /* move this column to the top of the container */
        margin-top: 0px;        /* tweak this value until you like the position */
    }

    .howscreen-thumbnails-right {
      order: 3;
      align-self: flex-start;   /* move this column to the top of the container */
      margin-top:0px;        /* tweak this value until you like the position */
    }

    /* Thumbnail Item Container */
    .howscreen-thumbnail-item {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        flex: 0 0 auto;
        text-align: center;

    }

    .howscreen-thumbnail-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--eco-green);
        margin: 0;
        letter-spacing: -0.3px;
    }

    /* Thumbnail */
    .howscreen-thumbnail {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        border-radius: 16px;
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .howscreen-thumbnail:hover {
        transform: scale(1.08);
        border-color: var(--eco-green);
        box-shadow: 0 12px 32px rgba(5, 111, 55, 0.25);
    }

    .howscreen-thumbnail.active {
        border-color: var(--eco-green);
        box-shadow: 0 14px 40px rgba(5, 111, 55, 0.4);
        transform: scale(1.1);
    }

    .howscreen-thumbnail-image {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        z-index: 1;
    }

    .howscreen-thumbnail video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .howscreen-thumbnail:hover video,
    .howscreen-thumbnail.active video {
        opacity: 1;
    }

    .howscreen-thumbnail-label {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top:0;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        padding: 0.6rem;
        font-size: 0.8rem;
        font-weight: 600;
        text-align: center;
        z-index: 3;
    }

    /* Exhibit Gallery Layout */
    .howscreen-exhibit {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    /* Exhibit Frame (Carousel Container) */
    .howscreen-exhibit-frame {
        position: relative;
        width: 100%;
        max-width: 720px;
        aspect-ratio: 16/9;
        background: #fff;
        border-radius: 24px;
        border: 2px solid transparent;
        background-clip: padding-box;
        box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        display: flex;
        flex-direction: column;
    }

    .howscreen-exhibit-frame::before {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 24px;
        padding: 2px;
        background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-accent) 100%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        z-index: -1;
        opacity: 0.6;
        transition: opacity 0.3s ease;
    }

    .howscreen-exhibit-frame:hover {
        box-shadow: 0 35px 85px rgba(5, 111, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .howscreen-exhibit-frame:hover::before {
        opacity: 1;
    }

    /* Zoom Button */
    .howscreen-zoom-btn {
        position: absolute;
        top: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-accent) 100%);
        color: #fff;
        border: 2px solid #fff;
        font-size: 22px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 28px rgba(5, 111, 55, 0.45);
        z-index: 5;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .howscreen-zoom-btn::before {
        content: "🔍";
    }

    .howscreen-zoom-btn:hover {
        transform: translateX(-50%) scale(1.18);
        box-shadow: 0 14px 36px rgba(5, 111, 55, 0.6);
    }

    /* Carousel 3D Wrapper */
    .howscreen-carousel-wrapper {
        width: 100%;
        height: 100%;
        position: relative;
        background: #1a1a1a;
    }

    .howscreen-carousel-inner {
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* Carousel Slides */
    .howscreen-carousel-slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        transform: scale(0.93);
        transition: opacity 0.45s ease, transform 0.45s ease;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        color: #fff;
        gap: 0;
        overflow: hidden;
    }

    .howscreen-carousel-slide.active {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }

    /* Video Container */
    .howscreen-carousel-video-container {
        flex: 1;
        height: 100%;
        border-radius: 0;
        overflow: hidden;
        background: #0a0a0a;
        box-shadow: none;
    }

    .howscreen-carousel-video {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

    /* Slide Text Content - Separate Container */
    .howscreen-carousel-text-container {
        width: 100%;
        max-width: 720px;
        background: #fff;
        padding: 2.5rem 2rem;
        border-radius: 0 0 24px 24px;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .howscreen-carousel-text-content {
        text-align: center;
        font-size: 16px;
        line-height: 1.7;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .howscreen-carousel-step-number {
        font-size: 0.9rem;
        letter-spacing: 2px;
        text-transform: uppercase;
        opacity: 0.85;
        margin: 0;
        color: var(--eco-blue);
        font-weight: 700;
        background: rgba(75, 161, 248, 0.1);
        padding: 0.6rem 1.2rem;
        border-radius: 20px;
        border: 1px solid rgba(75, 161, 248, 0.2);
        display: inline-block;
    }

    .howscreen-carousel-step-title {
        font-size: 1.8rem;
        margin: 0;
        color: var(--eco-green);
        font-weight: 800;
        letter-spacing: -0.7px;
    }

    .howscreen-carousel-step-description {
        font-size: 1rem;
        color: var(--text-light);
        line-height: 1.8;
        max-width: 100%;
        text-align: justify;
    }

    /* Step-specific colors */
    .howscreen-carousel-slide:nth-child(1) .howscreen-carousel-step-title { color: var(--eco-green); }
    .howscreen-carousel-slide:nth-child(2) .howscreen-carousel-step-title { color: var(--eco-accent); }
    .howscreen-carousel-slide:nth-child(3) .howscreen-carousel-step-title { color: var(--eco-blue); }
    .howscreen-carousel-slide:nth-child(4) .howscreen-carousel-step-title { color: var(--eco-dark-green); }

    /* Navigation Controls */
    .howscreen-carousel-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-top: 24px;
    }

    .howscreen-carousel-nav-btn {
        border: 2px solid var(--eco-green);
        background: transparent;
        color: var(--eco-green);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 16px rgba(5, 111, 55, 0.25);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        font-weight: 600;
    }

    .howscreen-carousel-nav-btn:hover {
        background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-accent) 100%);
        color: #fff;
        transform: translateY(-4px);
        box-shadow: 0 10px 28px rgba(5, 111, 55, 0.4);
        border-color: transparent;
    }

    /* Indicator Dots */
    .howscreen-carousel-indicators {
        display: flex;
        gap: 10px;
    }

    .howscreen-carousel-indicator-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 2px solid var(--eco-green);
        background: transparent;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .howscreen-carousel-indicator-dot:hover {
        transform: scale(1.35);
        background: var(--eco-green);
        box-shadow: 0 0 10px rgba(5, 111, 55, 0.4);
    }

    .howscreen-carousel-indicator-dot.active {
        background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-accent) 100%);
        box-shadow: 0 0 12px rgba(5, 111, 55, 0.6);
        border-color: transparent;
    }

    /* Section Header */
    .howscreen-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .howscreen-title {
        font-size: clamp(2rem, 3.5vw, 2.8rem);
        font-weight: 800;
        color: var(--eco-green);
        margin: 0;
        letter-spacing: -0.5px;
    }

    /* Zoom Modal */
    .howscreen-zoom-modal {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.98);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        backdrop-filter: blur(5px);
    }

    .howscreen-zoom-modal.open {
        display: flex;
    }

    .howscreen-zoom-modal-content {
        width: 90%;
        max-width: 1100px;
    }

    .howscreen-zoom-modal-content video {
        width: 100%;
        height: auto;
        border-radius: 18px;
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
        max-height: 85vh;
    }

    .howscreen-zoom-modal-close {
        position: fixed;
        top: 24px;
        right: 32px;
        font-size: 36px;
        color: #fff;
        cursor: pointer;
        background: rgba(5, 111, 55, 0.3);
        border: 2px solid var(--eco-green);
        padding: 8px 16px;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 1001;
        font-weight: 300;
        line-height: 1;
    }

    .howscreen-zoom-modal-close:hover {
        background: var(--eco-green);
        color: #fff;
        transform: scale(1.15);
    }
}

/* Hide desktop elements on mobile/tablet */
@media (max-width: 1023px) {
    .howscreen-section {
        display: none !important;
    }

    .howscreen-zoom-modal {
        display: none !important;
    }
}

        /* ========================================
           MOBILE/TABLET-ONLY CSS (1023px and below)
           Vertical scrolling video segments
        ======================================== */
        @media (max-width: 1023px) {
            /* Mobile Process Section */
            .hwphone-process-section {
                display: block;
                padding: 2rem 0;
                 overflow: hidden;

            }

            /* Mobile Process Header */
            .hwphone-process-header {
                text-align: center;
                margin-bottom: 3rem;
                padding: 0 1rem;
            }

            .hwphone-process-title {
                font-size: clamp(1.8rem, 5vw, 2.5rem);
                font-weight: 700;
                color: var(--eco-green);
                margin: 0 0 1rem;
                letter-spacing: -0.5px;
                position: relative;
            }

            .hwphone-process-title::after {
                content: '';
                position: absolute;
                bottom: -8px;
                left: 50%;
                transform: translateX(-50%);
                width: 60px;
                height: 3px;
                background: linear-gradient(90deg, var(--eco-green) 0%, var(--eco-accent) 100%);
                border-radius: 2px;
            }

            /* Mobile Segments Container */
            .hwphone-segments-container {
                max-width: 100%;
                margin: 0 auto;
                padding: 0 1rem;
            }

            /* Mobile Text Segments */
            .hwphone-text-segment {
                width: 100%;
                min-height: 300px;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 3rem 1rem;
                position: relative;
            }

            /* Mobile Video Segments */
            .hwphone-video-segment {
                width: 100%;
                min-height: 400px;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 3rem 1rem;
                position: relative;
            }

            /* Mobile Segment Content */
            .hwphone-segment-content {
                max-width: 500px;
                width: 100%;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                text-align: center;
                gap: 2rem;
            }

            /* Mobile Video Container */
            .hwphone-video-container {
                position: relative;
                width: 100%;
                max-width: 90vw;
                aspect-ratio: 16/9;
                border: 3px solid var(--eco-green);
                border-radius: 20px;
                overflow: hidden;
                box-shadow: 0 8px 30px rgba(5, 111, 55, 0.15);
                /* Animation states */
                opacity: 0;
                transform: translateX(100px) scale(0.8);
                transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            }

            /* Mobile Video Element */
            .hwphone-process-video {
                width: 100%;
                height: 100%;
                object-fit: contain;
                display: block;
            }

            /* Mobile Text Content */
            .hwphone-step-text {
                width: 100%;
                max-width: 85vw;
                /* Animation states */
                opacity: 0;
                transform: translateX(-100px) scale(0.8);
                transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            }

            .hwphone-step-number {
                font-size: 1rem;
                font-weight: 800;
                color: var(--eco-blue);
                margin-bottom: 1rem;
                text-transform: uppercase;
                letter-spacing: 3px;
                opacity: 0.9;
                background: rgba(75, 161, 248, 0.1);
                padding: 0.8rem 1.5rem;
                border-radius: 25px;
                border: 2px solid rgba(75, 161, 248, 0.2);
                display: inline-block;
            }

            .hwphone-step-title {
                font-size: clamp(2.2rem, 6vw, 3.2rem);
                font-weight: 900;
                color: var(--eco-green);
                margin-bottom: 1rem;
                line-height: 1.1;
                letter-spacing: -1px;
            }

            .hwphone-step-description {
                font-size: clamp(1.1rem, 3.5vw, 1.3rem);
                line-height: 1.7;
                color: var(--text-light);
                font-weight: 400;
                text-align: justify;
            }

            /* Mobile Animation Classes - DIRECTIONAL */
            .hwphone-step-text.animate-in {
                opacity: 1;
                transform: translateX(0) scale(1);
            }

            .hwphone-video-container.animate-in {
                opacity: 1;
                transform: translateX(0) scale(1);
            }

            /* Text animates OUT to the LEFT (same direction it came from) */
            .hwphone-step-text.animate-out {
                opacity: 0;
                transform: translateX(-150px) scale(0.7);
                transition: all 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53);
            }

            /* Video animates OUT to the RIGHT (same direction it came from) */
            .hwphone-video-container.animate-out {
                opacity: 0;
                transform: translateX(150px) scale(0.7);
                transition: all 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53);
            }

            /* Mobile Background Colors for 8 Segments */
            .hwphone-segment:nth-child(1) { background: transparent; }
            .hwphone-segment:nth-child(2) { background: transparent; }
            .hwphone-segment:nth-child(3) { background: transparent; }
            .hwphone-segment:nth-child(4) { background: transparent; }
            .hwphone-segment:nth-child(5) { background: transparent; }
            .hwphone-segment:nth-child(6) { background: transparent; }
            .hwphone-segment:nth-child(7) { background: transparent; }
            .hwphone-segment:nth-child(8) { background: transparent; }

            /* Mobile Step Title Colors */
            .hwphone-segment:nth-child(1) .hwphone-step-title,
            .hwphone-segment:nth-child(2) .hwphone-step-title { color: var(--eco-green); }
            .hwphone-segment:nth-child(3) .hwphone-step-title,
            .hwphone-segment:nth-child(4) .hwphone-step-title { color: var(--eco-accent); }
            .hwphone-segment:nth-child(5) .hwphone-step-title,
            .hwphone-segment:nth-child(6) .hwphone-step-title { color: var(--eco-blue); }
            .hwphone-segment:nth-child(7) .hwphone-step-title,
            .hwphone-segment:nth-child(8) .hwphone-step-title { color: var(--eco-dark-green); }

            /* Mobile Scroll Indicator */
            .mobile-scroll-indicator {
                position: fixed;
                bottom: 30px;
                left: 50%;
                transform: translateX(-50%);
                z-index: 100;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 8px;
                opacity: 0;
                visibility: hidden;
                transition: all 0.8s ease;
                pointer-events: none;
            }

            .mobile-scroll-indicator.show {
                opacity: 1;
                visibility: visible;
            }

            .mobile-scroll-text {
                font-size: 0.9rem;
                font-weight: 600;
                color: var(--eco-green);
                text-transform: uppercase;
                letter-spacing: 1px;
                text-align: center;
                margin-bottom: 5px;
            }

            .mobile-scroll-arrow {
                width: 30px;
                height: 30px;
                border: 2px solid var(--eco-green);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                background: rgba(255, 255, 255, 0.9);
                backdrop-filter: blur(10px);
                animation: pulseArrow 2s ease-in-out infinite;
            }

            .mobile-scroll-arrow::before {
                content: '';
                width: 8px;
                height: 8px;
                border-right: 2px solid var(--eco-green);
                border-bottom: 2px solid var(--eco-green);
                transform: rotate(45deg);
                margin-top: -2px;
            }

            @keyframes pulseArrow {
                0%, 100% {
                    transform: scale(1);
                    box-shadow: 0 0 0 0 rgba(5, 111, 55, 0.4);
                }
                50% {
                    transform: scale(1.1);
                    box-shadow: 0 0 0 10px rgba(5, 111, 55, 0);
                }
            }

            /* Tablet Specific Adjustments (768px - 1023px) */
            @media (min-width: 768px) {
                .hwphone-text-segment { min-height: 350px; padding: 4rem 2rem; }
                .hwphone-video-segment { min-height: 450px; padding: 4rem 2rem; }
                .hwphone-segment-content { max-width: 600px; gap: 2.5rem; }
                .hwphone-video-container { max-width: 70vw; border-radius: 25px; }
                .hwphone-step-text { max-width: 75vw; }
                .hwphone-step-number { padding: 1rem 2rem; font-size: 1.1rem; }
                .hwphone-step-description { font-size: clamp(1.2rem, 3vw, 1.4rem); line-height: 1.8; }
            }

            /* Small Mobile Adjustments (480px and below) */
            @media (max-width: 480px) {
                .hwphone-text-segment { min-height: 250px; padding: 2rem 1rem; }
                .hwphone-video-segment { min-height: 300px; padding: 2rem 1rem; }
                .hwphone-segment-content { max-width: 100%; gap: 1.5rem; }
                .hwphone-video-container { max-width: 95vw; border-radius: 15px; border-width: 2px; }
                .hwphone-step-text { max-width: 90vw; }
                .hwphone-step-number { font-size: 0.9rem; padding: 0.6rem 1.2rem; letter-spacing: 2px; margin-bottom: 0.8rem; }
                .hwphone-step-description { font-size: clamp(1rem, 4vw, 1.2rem); line-height: 1.6; }
                .mobile-scroll-indicator { bottom: 20px; }
                .mobile-scroll-text { font-size: 0.8rem; }
                .mobile-scroll-arrow { width: 25px; height: 25px; }
                .mobile-scroll-arrow::before { width: 6px; height: 6px; }
            }
        }

        /* Hide mobile section on desktop */
        @media (min-width: 1024px) {
            .hwphone-process-section {
                display: none !important;
            }
            
            /* Hide mobile scroll indicator on desktop */
            .mobile-scroll-indicator {
                display: none !important;
                visibility: hidden !important;
                opacity: 0 !important;
                pointer-events: none !important;
            }
            
            /* Ensure desktop theater overlay is available on desktop */
            .desktop-theater-overlay {
                display: flex;
            }
        }