/* Scroll Image Text Sections - Main Styles */

.scroll-sections-container {
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.scroll-sections-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
}

/* Left Side - Images */
.scroll-images-container {
    position: sticky;
    top: 120px;
    height: calc(100vh - 240px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    align-self: start;
    z-index: 1;
}

.scroll-image-item {
    position: absolute;
    width: 100%;
    max-width: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s 0.8s;
    pointer-events: none;
    top: 50%;
    left: 50%;
}

.scroll-image-item.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    z-index: 2;
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s 0s;
}

.scroll-image-item img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.scroll-image-item .placeholder-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Center - Vertical Stepper */
.scroll-stepper {
    position: sticky;
    top: 120px;
    height: calc(100vh - 240px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    width: 100%;
    align-self: start;
    z-index: 1;
}

.stepper-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
}

.stepper-progress {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: #fff;
    height: 0%;
    transition: height 0.05s linear;
    z-index: 1;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 1 !important;
    visibility: visible !important;
}

.stepper-step {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #000;
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.stepper-step.active {
    border-color: #fff;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.stepper-step.active .stepper-number {
    color: #000;
}

.stepper-number {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    transition: color 0.4s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Right Side - Text Sections */
.scroll-text-container {
    position: relative;
    align-self: start;
}

.scroll-text-item {
    position: relative;
    padding: 0;
    opacity: 1;
    transform: none;
    transition: none;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 0;
    max-height: none;
    overflow: visible;
}

.scroll-text-item:last-child {
    margin-bottom: 0;
}

.scroll-text-item.active {
    opacity: 1;
    transform: none;
}

.text-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 500;
}

.text-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.text-content {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin: 0 0 80px 0;
    max-width: 600px;
}

.scroll-text-item:last-child .text-content {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .scroll-sections-wrapper {
        grid-template-columns: 1fr 60px 1fr;
        gap: 40px;
    }
    
    .text-title {
        font-size: 40px;
    }
}

@media (max-width: 968px) {
    .scroll-sections-container {
        padding: 60px 20px;
    }
    
    .scroll-sections-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .scroll-images-container {
        position: relative;
        top: 0;
        height: auto;
        min-height: 400px;
        margin-bottom: 40px;
    }
    
    .scroll-image-item {
        position: relative;
        max-width: 100%;
    }
    
    .scroll-stepper {
        position: relative;
        top: 0;
        height: auto;
        flex-direction: row;
        justify-content: center;
        padding: 20px 0;
        margin: 40px 0;
    }
    
    .stepper-line {
        width: 100%;
        height: 2px;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }
    
    .stepper-progress {
        width: 33.33%;
        height: 4px;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }
    
    .scroll-text-container {
        min-height: auto;
    }
    
    .scroll-text-item {
        position: relative;
        top: 0;
        padding: 40px 0;
        min-height: auto;
    }
    
    .text-title {
        font-size: 32px;
    }
}

@media (max-width: 640px) {
    .scroll-sections-container {
        padding: 40px 15px;
    }
    
    .text-title {
        font-size: 28px;
    }
    
    .text-content {
        font-size: 16px;
    }
    
    .stepper-step {
        width: 40px;
        height: 40px;
    }
    
    .stepper-number {
        font-size: 16px;
    }
}

/* Mobile Layout - Image above text, no scroll animation */
@media (max-width: 768px) {
    .scroll-sections-container {
        padding: 40px 20px;
        background-color: transparent !important;
    }
    
    .scroll-sections-wrapper {
        grid-template-columns: 1fr !important;
        gap: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Hide stepper on mobile */
    .scroll-stepper {
        display: none !important;
    }
    
    /* Images container - make it flow with flexbox */
    .scroll-images-container {
        position: relative !important;
        top: 0 !important;
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 0 !important;
        order: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Text container - make it flow with flexbox */
    .scroll-text-container {
        position: relative !important;
        top: 0 !important;
        order: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Pair each image with its text section using order */
    .scroll-image-item[data-section="1"] {
        order: 1;
    }
    .scroll-text-item[data-section="1"] {
        order: 2;
    }
    .scroll-image-item[data-section="2"] {
        order: 3;
    }
    .scroll-text-item[data-section="2"] {
        order: 4;
    }
    .scroll-image-item[data-section="3"] {
        order: 5;
    }
    .scroll-text-item[data-section="3"] {
        order: 6;
    }
    
    /* Make wrapper a flex container to allow ordering across children */
    .scroll-sections-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    /* Extract items from their containers for ordering */
    .scroll-images-container,
    .scroll-text-container {
        display: contents;
    }
    
    .scroll-image-item {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        top: auto !important;
        left: auto !important;
        transition: none !important;
        margin-bottom: 40px !important;
    }
    
    .scroll-image-item img {
        border-radius: 35px !important;
        box-shadow: none !important;
        width: 100%;
    }
    
    .scroll-text-item {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        padding: 0 !important;
        margin-bottom: 40px !important;
        display: block !important;
    }
    
    .scroll-text-item:last-child {
        margin-bottom: 0 !important;
    }
    
    .text-label {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.6);
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 20px;
        font-weight: 500;
    }
    
    .text-title {
        font-size: 30px !important;
        background: linear-gradient(270deg, #5a606c, #ffffff 50%, #5a606c);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent !important;
        font-weight: 900 !important;
        margin: 0 0 20px 0;
    }
    
    .text-content {
        font-size: 16px !important;
        color: #fff !important;
        line-height: 1.8;
        margin: 0 0 0 0 !important;
        opacity: .9 !important;
    }
    
    /* Apply gradient background to text items */
    .scroll-text-item {
        background: radial-gradient( 900px 600px at 20% 85%, #e58b3c 0%, #b84a2f 35%, transparent 70% ), radial-gradient( 1000px 700px at 85% 65%, #4f5bd5 0%, #6a5acd 40%, transparent 72% ), radial-gradient( 800px 500px at 50% 15%, #2b1a3d 0%, #0f0f12 55%, transparent 75% ), radial-gradient( 600px 400px at 40% 60%, rgba(207,193,126,0.45) 0%, rgba(207,193,126,0.18) 35%, transparent 70% ), #0f0f12;
        padding: 40px !important;
        border-radius: 25px;
    }
    
    /* Apply gradient background to image items */
    .scroll-image-item {
        background: radial-gradient( 900px 600px at 20% 85%, #e58b3c 0%, #b84a2f 35%, transparent 70% ), radial-gradient( 1000px 700px at 85% 65%, #4f5bd5 0%, #6a5acd 40%, transparent 72% ), radial-gradient( 800px 500px at 50% 15%, #2b1a3d 0%, #0f0f12 55%, transparent 75% ), radial-gradient( 600px 400px at 40% 60%, rgba(207,193,126,0.45) 0%, rgba(207,193,126,0.18) 35%, transparent 70% ), #0f0f12;
        padding: 40px !important;
        border-radius: 25px;
    }
    
    .scroll-image-item img {
        border-radius: 35px;
        box-shadow: none !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

