/* 
 * Scroll Step Process - Premium Frontend Styles 
 */

:root {
    --ssp-bg: #fff;
    --ssp-text-main: #1d1d1f; /* Apple-like dark */
    --ssp-text-muted: #86868b;
    --ssp-accent: #0071e3; /* Focus blue */
    --ssp-accent-glow: rgba(0, 113, 227, 0.4);
    --ssp-track-bg: #e5e5ea;
    --ssp-transition: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ssp-container {
    max-width: 900px;
    margin: 60px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ssp-text-main);
    padding: 0 20px;
}

.ssp-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
}

.ssp-timeline-wrapper {
    position: relative;
    padding-left: 40px; /* Space for the track */
}

/* Progress Line Track */
.ssp-progress-track {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 15px; /* Center of the 40px padding */
    width: 4px;
    background: var(--ssp-track-bg);
    border-radius: 2px;
    z-index: 1;
}

/* Dynamic Fill Line */
.ssp-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%; /* Updated via JS */
    background: var(--ssp-accent);
    border-radius: 2px;
    z-index: 2;
    transition: height 0.1s linear; /* Smooth fill */
    box-shadow: 0 0 10px var(--ssp-accent-glow);
}

/* Individual Steps */
.ssp-step {
    position: relative;
    padding-bottom: 60px;
    opacity: 0.4;
    transition: opacity var(--ssp-transition);
}

.ssp-step:last-child {
    padding-bottom: 0;
}

.ssp-step.is-active {
    opacity: 1;
}

/* The Node/Dot */
.ssp-step-node {
    position: absolute;
    left: -33px; /* Align dot over the track (-40px padding + 7px offset to center 16px dot on 4px track ) */
    top: 5px;
    width: 18px;
    height: 18px;
    background: var(--ssp-bg);
    border: 3px solid var(--ssp-track-bg);
    border-radius: 50%;
    z-index: 3;
    transition: all var(--ssp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssp-step.is-active .ssp-step-node {
    border-color: var(--ssp-accent);
    box-shadow: 0 0 0 4px var(--ssp-accent-glow);
    transform: scale(1.2);
}

.ssp-step.is-past .ssp-step-node {
    border-color: var(--ssp-accent);
    background: var(--ssp-accent);
}

/* Content Layout (Desktop) */
.ssp-step-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    transform: translateY(20px);
    transition: transform var(--ssp-transition);
}

.ssp-step.is-active .ssp-step-content-wrapper {
    transform: translateY(0);
}

.ssp-step-text {
    flex: 1;
    min-width: 0;
}

.ssp-step-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.ssp-step-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ssp-text-muted);
}

.ssp-step-media {
    flex: 1;
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    opacity: 0;
    transform: scale(0.95);
    transition: all var(--ssp-transition);
    /* Set an aspect ratio so it doesn't jump */
    aspect-ratio: 16 / 9;
    background: #f5f5f7;
}

.ssp-step.is-active .ssp-step-media {
    opacity: 1;
    transform: scale(1);
}

.ssp-video-wrapper {
    width: 100%;
    height: 100%;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ssp-step-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .ssp-step-media {
        max-width: 100%;
        width: 100%;
    }

    .ssp-step {
        padding-bottom: 40px;
    }
}
