/* ==========================================================================
   Scrollytelling - Borealflow
   ========================================================================== */


/* --- Estructura y Layout --- */

.color-wrapper {
    width: 100vw !important;
    position: relative !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    background-color: var(--bg, #f7f8f9);
    color: var(--fg, #222222);

    border-bottom: 4px solid rgba(0, 0, 0, 0.1);

    transition: background-color 0.5s ease, color 0.5s ease;
    will-change: background-color, color;
}

.sticky-section {
    height: 500vh;
    position: relative;
    width: 100%;
}

.sticky-inner {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parallax {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: filter 0.5s ease;
    will-change: transform, filter;
}

.steps-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    text-align: center;
    pointer-events: none;
}

.step {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
    width: 100%;
    will-change: opacity;
}

.step.active {
    opacity: 1;
}


/* --- Indicador de Progreso --- */

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #00d4ff;
    width: 0%;
    z-index: 99999;
    transition: width 0.1s linear;
    will-change: width;
}

@media screen and (max-width: 768px) {
    .scroll-progress-bar {
        height: 5px;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}


/* --- Colores por Paso --- */

.step[data-step="1"] { --bg: #f7f8f9; --fg: #ffffff; --tint: brightness(0.7); }
.step[data-step="2"] { --bg: #d4af37; --fg: #ffffff; --tint: sepia(1) hue-rotate(20deg) brightness(0.6); }
.step[data-step="3"] { --bg: #8b0000; --fg: #ffffff; --tint: brightness(0.6) sepia(1) hue-rotate(-50deg); }
.step[data-step="4"] { --bg: #004a59; --fg: #ffffff; --tint: brightness(0.5) sepia(1) hue-rotate(180deg); }


/* --- Correcciones para GeneratePress --- */

/* Liberar los contenedores padre que GeneratePress colapsa */
.inside-article,
.entry-content,
.content-area,
.site-content,
#content,
#primary {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Forzar la altura de la seccion de scroll */
#sticky.sticky-section {
    height: 500vh !important;
    min-height: 500vh !important;
    overflow: visible !important;
}

/* --- Tipografía de los pasos --- */
.step h1 {
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 700;
    color: var(--fg, #ffffff);
}

.step p {
    color: var(--fg, #ffffff);
    font-size: clamp(16px, 2vw, 20px);
}

/* --- Color paso 1 en blanco --- */
.step[data-step="1"] { --bg: #f7f8f9; --fg: #ffffff; --tint: brightness(0.7); }