/* =========================================================
   SIFENCY ADVANCED PARALLAX — CREATIVE STYLES
   All original rules preserved + new effect rules appended.
   ========================================================= */

.sifency-parallax-container {
    width: 100%;
    position: relative;
    display: block;
}

.sifency-parallax-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    will-change: clip-path, transform;
    height: 70vh;
}

.sifency-parallax-media {
    position: absolute;
    left: 0;
    width: 100%;
    object-fit: cover;
    object-position: center center;
    will-change: transform;
    pointer-events: none;
    z-index: 1;
}

.sifency-parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background-color: transparent;
}

.sifency-parallax-container .elementor-widget {
    z-index: 3;
    position: relative;
}

/* ── Marquee ──────────────────────────────────────────────── */
.sifency-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    contain: paint;
}

.sifency-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
}

.sifency-marquee-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.sifency-marquee-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 0.5em;
    flex-shrink: 0;
}

.sifency-marquee-text {
    font-size: 80px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

.sifency-marquee-style-stroke {
    color: transparent !important;
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: #000;
}

.sifency-marquee-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sifency-marquee-icon svg,
.sifency-marquee-icon i {
    font-size: 0.7em;
}

/* ── Text Reveal ──────────────────────────────────────────── */
.sifency-text-reveal-wrapper {
    width: 100%;
    position: relative;
}

.sifency-text-reveal {
    margin: 0;
    padding: 0;
    perspective: 400px;
}

.sifency-reveal-word {
    display: inline-block;
    will-change: opacity, transform;
    white-space: nowrap;
}

.sifency-reveal-char {
    display: inline-block;
    will-change: opacity, transform;
}

/* ── Stacked Cards ────────────────────────────────────────── */
.sifency-stack-container {
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

.sifency-stack-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: 100vh;
}

.sifency-stack-card {
    position: absolute;
    width: 100%;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    will-change: transform, scale;
    overflow: hidden;
}

.sifency-stack-content {
    position: relative;
    z-index: 2;
}

.sifency-stack-title {
    margin: 0 0 15px 0;
    color: #111;
}

.sifency-stack-desc {
    margin: 0;
    color: #444;
    font-size: 1.1rem;
    line-height: 1.6;
}

.sifency-stack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    will-change: opacity;
}

@media (max-width: 768px) {
    .sifency-stack-card {
        height: 70vh;
    }
}

/* ── Scroll Progress ──────────────────────────────────────── */
.sifency-scroll-progress-wrapper {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    will-change: transform;
}

.sifency-scroll-progress-wrapper.sifency-clickable {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sifency-scroll-progress-wrapper.sifency-clickable:hover {
    transform: scale(1.1);
}

.sifency-type-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 30px;
}

.sifency-progress-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.sifency-type-circle .sifency-progress-track,
.sifency-type-circle .sifency-progress-fill {
    fill: none;
    stroke-width: 4px;
    stroke-linecap: round;
}

.sifency-progress-text {
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

.sifency-type-circle.sifency-pos-bottom-right {
    bottom: 0;
    right: 0;
}

.sifency-type-circle.sifency-pos-bottom-left {
    bottom: 0;
    left: 0;
}

.sifency-type-circle.sifency-pos-top-right {
    top: 0;
    right: 0;
}

.sifency-type-circle.sifency-pos-top-left {
    top: 0;
    left: 0;
}

.sifency-type-hbar {
    left: 0;
    width: 100%;
    height: 4px;
}

.sifency-type-hbar.sifency-pos-top {
    top: 0;
}

.sifency-type-hbar.sifency-pos-bottom {
    bottom: 0;
}

.sifency-type-hbar .sifency-progress-track {
    width: 100%;
    height: 100%;
}

.sifency-type-hbar .sifency-progress-fill {
    width: 100%;
    height: 100%;
    will-change: transform;
}

.sifency-type-vbar {
    top: 0;
    height: 100%;
    width: 4px;
}

.sifency-type-vbar.sifency-pos-top-right,
.sifency-type-vbar.sifency-pos-bottom-right {
    right: 0;
}

.sifency-type-vbar.sifency-pos-top-left,
.sifency-type-vbar.sifency-pos-bottom-left {
    left: 0;
}

.sifency-type-vbar .sifency-progress-track {
    width: 100%;
    height: 100%;
}

.sifency-type-vbar .sifency-progress-fill {
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* ── Trail / Cursor ───────────────────────────────────────── */
.sifency-trail-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.sifency-trail-area {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.sifency-trail-text {
    position: relative;
    z-index: 5;
    pointer-events: none;
    mix-blend-mode: difference;
}

.sifency-trail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--trail-img-width, 250px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transform: translate(-50%, -50%);
    pointer-events: none;
    will-change: transform, opacity;
}

/* ── Draggable ────────────────────────────────────────────── */
.sifency-draggable-wrapper {
    display: inline-block;
    cursor: grab;
    will-change: transform;
    z-index: 50;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.sifency-pos-absolute {
    position: absolute !important;
}

.sifency-draggable-wrapper.sifency-is-dragging {
    cursor: grabbing !important;
}

.sifency-draggable-inner {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.sifency-draggable-wrapper.sifency-is-dragging .sifency-draggable-inner {
    transform: scale(0.92);
    transition: transform 0.1s ease-out;
}

.sifency-draggable-content {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.sifency-draggable-img {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* =============================================================
   🆕 NEW EFFECT STYLES
   ============================================================= */

/* ── Shutter Transition ───────────────────────────────────── */
/*
   The JS creates .sifency-shutter dynamically inside
   .sifency-parallax-wrapper. These rules ensure correct
   stacking and overflow containment.
*/
.sifency-shutter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
    pointer-events: none;
    overflow: hidden;
    display: flex;
}

/* Vertical blind (default direction) */
.sifency-shutter[style*="flex-direction: column"]>div,
.sifency-shutter--vertical>div {
    transform-origin: top center;
}

/* Horizontal blind */
.sifency-shutter[style*="flex-direction: row"]>div,
.sifency-shutter--horizontal>div {
    transform-origin: left center;
}

/* ── Pixel Grid Transition ────────────────────────────────── */
/*
   .sifency-pixel-grid is built dynamically by JS.
   Each cell starts with a background-image slice.
*/
.sifency-pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    display: grid;
    /* grid-template columns/rows set inline by JS */
}

.sifency-pixel-cell {
    width: 100%;
    height: 100%;
    will-change: opacity, transform;
    /* Prevent sub-pixel gaps between cells */
    outline: 0.5px solid transparent;
}

/* ── Disintegration Scatter ───────────────────────────────── */
/*
   html2canvas clones are appended as <canvas> siblings.
   These rules ensure they render identically in position.
*/
.sifency-parallax-wrapper>canvas.capture-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform, opacity;
    /* Prevent native drag ghost */
    -webkit-user-drag: none;
    user-drag: none;
}

/* ── ScrollSmoother depth helper ─────────────────────────── */
/*
   When ScrollSmoother is active, media elements tagged with
   data-speed are moved by the ScrollSmoother plugin itself.
   by adding a specificity override on the wrapper flag.
*/
.sifency-parallax-container[data-scroll-smoother="true"] .sifency-parallax-media {
    /* Let ScrollSmoother drive the vertical movement;
       disable the manual top / height sizing since depth
       is applied differently via data-speed */
    will-change: transform;
}