/* Kontener - pełny ekran, bez paska przewijania wewnątrz */
.nm-juicy-stage {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: #000; /* Fallback */
}

/* Slajd - zawsze na pełny ekran, jeden na drugim */
.nm-juicy-slide {
    position: absolute;
    inset: 0; /* top, left, right, bottom = 0 */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* Domyślnie ukryte w PHP, GSAP to obsłuży */
}

/* --- WARSTWY --- */

/* Napis - POPRAWIONY */
.nm-juicy-big-text {
    position: absolute;
    
    /* --- METODA CENTROWANIA (GSAPoodporna) --- */
    inset: 0;            /* To ustawia top:0, left:0, right:0, bottom:0 */
    margin: auto;        /* To centruje element wewnątrz tych zer */
    width: max-content;  /* Tekst ma swoją szerokość */
    height: max-content;
    
    /* TU BYŁ BŁĄD - USUNĄŁEM top: auto i left: auto */
    /* Te dwie linijki kasowały działanie inset: 0 */

    transform: none;     /* Wyłączamy transform w CSS, oddajemy go w pełni GSAPowi */

    /* Reszta Twoich stylów bez zmian */
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
    transition: color 0.3s, opacity 0.3s;
}

/* Warstwy Napisu */
.nm-juicy-slide.text-back .nm-juicy-big-text { z-index: 1; }
.nm-juicy-slide.text-front .nm-juicy-big-text { z-index: 10; mix-blend-mode: overlay; }

/* Owoc */
.nm-juicy-fruit-img {
    position: relative;
    z-index: 5; /* Pomiędzy back a front */
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nm-juicy-fruit-img img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 25px 50px rgba(0,0,0,0.4));
}

/* Opis */
.nm-juicy-desc {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20; /* Zawsze na wierzchu */
    text-align: center;
    padding: 20px 40px;
    width: 90%;
}

/* --- STYLE PUDEŁEK OPISU --- */

/* 1. Szkło */
.nm-juicy-desc.style-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* 2. Czysty */
.nm-juicy-desc.style-clean {
    background: transparent !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 3. Solid */
.nm-juicy-desc.style-solid {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 4. Ramka */
.nm-juicy-desc.style-border {
    background: transparent !important;
    border: 2px solid #fff;
    border-radius: 0;
}

/* 5. Neon */
.nm-juicy-desc.style-neon {
    background: rgba(0,0,0,0.6);
    border: 1px solid #fff;
    box-shadow: 0 0 10px #fff, inset 0 0 10px #fff;
    border-radius: 15px;
}
/* --- RESPONSIVE STYLE (Czysty CSS, bez hackowania) --- */
@media (max-width: 991px) {
    .nm-juicy-slide {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 40px 20px;
    }
    .nm-juicy-big-text {
        font-size: 10vw !important; /* Mniejszy tekst */
        position: static; /* Wyłącz pozycjonowanie absolutne */
        transform: none;
        margin-bottom: 20px;
    }
    .nm-juicy-fruit-img {
        width: 60vw;
        margin-bottom: 20px;
    }
    .nm-juicy-desc {
        position: static; /* Wyłącz pozycjonowanie absolutne */
        transform: none;
        width: 100%;
    }
}
/* --- FIX SPECJALNY DLA iPHONE (iOS) --- */
/* Ten kod zadziała TYLKO na iPhone/iPad. Android go zignoruje. */
@supports (-webkit-touch-callout: none) {

    /* 1. Zabijamy "Szkło" (Backdrop Filter) - Główny powód BLURA */
    .nm-juicy-desc, 
    .nm-juicy-desc.style-glass {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(20, 20, 20, 0.9) !important; /* Ciemne tło zamiast szkła */
    }

    /* 2. Zabijamy Cienie pod owocem - Drugi powód BLURA przy scrollowaniu */
    .nm-juicy-fruit-img img {
        filter: none !important;
        -webkit-filter: none !important;
        box-shadow: none !important;
    }

    /* 3. Uproszczenie tekstu - Jeśli używasz efektu 'Cinema' (blur), to go wyłączamy na iOS */
    .nm-juicy-big-text {
        filter: none !important; 
        text-shadow: none !important;
        /* Opcjonalnie: mix-blend-mode czasem psuje iOS, odkomentuj jeśli dalej są błędy */
        /* mix-blend-mode: normal !important; */
    }

    /* 4. Fix na skaczący pasek adresu (dvh) TYLKO dla iOS */
    .nm-juicy-stage {
        height: 100dvh !important; 
    }
}