/* ============================================================
 * STACKFOLIO · v1.0.4
 * Frontend stylesheet — scoped em .stackfolio-root
 * Estratégia: GSAP pin no .sf-card + scrub do scale no .sf-card-inner
 * Inspirado na arquitetura do Uncode (pin-spacer + sticky + row-inner-sticky)
 * ============================================================ */

.stackfolio-root,
.stackfolio-root * {
    box-sizing: border-box;
}

/* ============================================================
 * STACK ROOT — sempre 95% do viewport
 * ============================================================ */
.stackfolio-root {
    width: 95vw;
    max-width: 95vw;
    margin: 0 auto;
    padding: 20px 0 200px;
    position: relative;
}

/* ============================================================
 * CARD — recebe pin do GSAP
 * Aspect-ratio reserva espaço no fluxo (= pin-spacer do Uncode).
 * NÃO recebe transform de scale (isso vai no .sf-card-inner).
 * Z-index incremental (set via JS) garante o stacking visual.
 * ============================================================ */
.stackfolio-root .sf-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
    cursor: pointer;
}
.stackfolio-root .sf-card:last-child {
    margin-bottom: 0;
}

/* ============================================================
 * CARD INNER — recebe scrub (scale + opacity) do GSAP
 * Separado do card pra evitar conflito com pin transform.
 * = .row-inner-sticky do Uncode.
 * ============================================================ */
.stackfolio-root .sf-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: #717171;
    will-change: transform, opacity;
    transform-origin: 50% 50%;
}

.stackfolio-root .sf-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    display: block;
    max-width: none;
}

.stackfolio-root .sf-card-overlay {
    position: absolute;
    inset: 0;
    background-color: #000000;
    pointer-events: none;
    z-index: 2;
}

.stackfolio-root .sf-card-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    color: #FFFFFF;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

/* Mobile (≤760px) → 3:4 aspect ratio */
@media (max-width: 760px) {
    .stackfolio-root .sf-card {
        aspect-ratio: 3 / 4;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .stackfolio-root .sf-card { cursor: default; }
}

/* Editor Elementor — preview neutro, sem pin */
.elementor-editor-active .stackfolio-root .sf-card {
    transform: none !important;
}
