/**
 * NextGen 3D Slider - Frontend Styles
 * Bazowane na oryginalnym kodzie - proste i skuteczne
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;600;900&family=Open+Sans:wght@300;400&display=swap');

/* ============================================
   KRYTYCZNE STYLE DLA BODY/HTML
   Dodawane przez JavaScript
   ============================================ */

html.nextgen-slider-active,
body.nextgen-slider-active {
    overflow-x: hidden !important;
}

/* ============================================
   WRAPPER
   Musi być prosty - bez skomplikowanych hacków
   ============================================ */

.nextgen-slider-wrapper {
    /* CSS Variables */
    --nextgen-height: 100vh;
    --nextgen-accent: #00e5ff;
    --nextgen-overlay: 0.5;
    
    /* Podstawowe */
    position: relative;
    width: 100%;
    font-family: 'Open Sans', sans-serif;
    background-color: #050505;
    color: #ffffff;
}

/* ============================================
   LOADER
   ============================================ */

.nextgen-loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--nextgen-accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
}

.nextgen-loader-text {
    font-size: 2rem;
    margin-bottom: 20px;
}

.nextgen-loader-bar {
    width: 200px;
    height: 4px;
    background: #333;
    position: relative;
    overflow: hidden;
}

.nextgen-loader-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--nextgen-accent);
    animation: nextgenLoad 2s ease-in-out forwards;
}

@keyframes nextgenLoad {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ============================================
   SCROLL SPACER
   Tworzy przestrzeń do scrollowania
   ============================================ */

.nextgen-scroll-spacer {
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   VIEWPORT
   Kontener dla slajdów - używam inset zamiast width
   ============================================ */

.nextgen-viewport {
    position: fixed;
    inset: 0; /* top: 0; right: 0; bottom: 0; left: 0 */
    width: auto;
    height: auto;
    overflow: hidden;
    perspective: 1500px;
    z-index: 9990;
    background-color: #050505;
}

/* ============================================
   SLIDE (SECTION)
   Pojedynczy slajd - używam inset zamiast width
   ============================================ */

.nextgen-slide {
    position: fixed;
    inset: 0; /* top: 0; right: 0; bottom: 0; left: 0 */
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    z-index: 1;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.nextgen-slide.active {
    visibility: visible;
    opacity: 1;
    z-index: 10;
}

/* ============================================
   BACKGROUND IMAGE
   Używam viewport units z negatywnym offset
   (bez transform bo GSAP animuje transform rodzica)
   ============================================ */

.nextgen-bg-image {
    position: absolute;
    top: -5vh;
    left: -5vw;
    width: 110vw;
    height: 110vh;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   OVERLAY
   Gradient ciemności - viewport units z offset
   ============================================ */

.nextgen-overlay {
    position: absolute;
    top: -5vh;
    left: -5vw;
    width: 110vw;
    height: 110vh;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.3), 
        rgba(0, 0, 0, 0.7)
    );
    z-index: 2;
    pointer-events: none;
}

/* ============================================
   CONTENT
   Treść slajdu - DOKŁADNIE jak oryginał
   ============================================ */

.nextgen-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    transform: translateZ(60px);
    pointer-events: auto;
}

/* ============================================
   SECTION NUMBER
   Numer w rogu - DOKŁADNIE jak oryginał
   ============================================ */

.nextgen-section-number {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 4;
    font-family: 'Montserrat', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    user-select: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.nextgen-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    word-spacing: 0.2em;
}

/* Styl: Solid (domyślny - wypełniony) */
.nextgen-title-solid {
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

/* Styl: Outline (tylko obrys) */
.nextgen-title-outline {
    color: transparent;
    -webkit-text-stroke: 1px #fff;
    text-stroke: 1px #fff;
    text-shadow: none;
}

/* Styl: Outline Thick (gruby obrys) */
.nextgen-title-outline-thick {
    color: transparent;
    -webkit-text-stroke: 2px #fff;
    text-stroke: 2px #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* Styl: Shadow (z mocnym cieniem) */
.nextgen-title-shadow {
    color: #fff;
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 0, 0, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.9),
        4px 4px 0 rgba(0, 0, 0, 0.3);
}

/* Styl: Light (cienka czcionka) */
.nextgen-title-light {
    font-weight: 300;
    letter-spacing: 10px;
    color: #fff;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
}

/* Styl: Gradient */
.nextgen-title-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--nextgen-accent) 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Akcent w outline musi mieć wypełnienie */
.nextgen-title-outline .nextgen-accent-text,
.nextgen-title-outline-thick .nextgen-accent-text {
    color: var(--nextgen-accent);
    -webkit-text-stroke: 0;
    text-stroke: 0;
    -webkit-text-fill-color: var(--nextgen-accent);
}

.nextgen-accent-text {
    color: var(--nextgen-accent);
    border-bottom: 2px solid var(--nextgen-accent);
}

.nextgen-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.9);
}

/* ============================================
   BUTTON
   ============================================ */

.nextgen-btn {
    display: inline-block;
    padding: 18px 50px;
    background: var(--nextgen-accent);
    color: #000;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
}

.nextgen-btn:hover {
    transform: scale(1.1) rotateZ(-2deg);
}

/* ============================================
   SCROLL ARROW
   ============================================ */

.nextgen-scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: var(--nextgen-accent, #00e5ff);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto !important;
    user-select: none;
}

.nextgen-scroll-arrow:hover {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.1);
}

.nextgen-scroll-arrow:active {
    transform: translateX(-50%) scale(0.95);
}

.nextgen-arrow-icon {
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.nextgen-mouse-icon {
    width: 30px;
    height: 45px;
}

.nextgen-arrow-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    pointer-events: none;
}

/* Animacja Bounce */
.nextgen-arrow-bounce .nextgen-arrow-icon {
    animation: nextgenBounce 2s ease-in-out infinite;
}

@keyframes nextgenBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* Animacja Pulse */
.nextgen-arrow-pulse .nextgen-arrow-icon {
    animation: nextgenPulse 2s ease-in-out infinite;
}

@keyframes nextgenPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Animacja Fade */
.nextgen-arrow-fade .nextgen-arrow-icon {
    animation: nextgenFade 2s ease-in-out infinite;
}

@keyframes nextgenFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Animacja Slide */
.nextgen-arrow-slide .nextgen-arrow-icon {
    animation: nextgenSlide 2s ease-in-out infinite;
}

@keyframes nextgenSlide {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(15px); opacity: 0.5; }
}

/* Animacja kółka myszy */
.nextgen-mouse-wheel {
    animation: nextgenMouseWheel 2s ease-in-out infinite;
}

@keyframes nextgenMouseWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(4px); opacity: 0.3; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nextgen-section-number {
        font-size: 4rem;
        top: 20px;
        left: 20px;
    }
    
    .nextgen-btn {
        padding: 14px 35px;
    }
    
    .nextgen-content {
        padding: 0 15px;
    }
    
    .nextgen-scroll-arrow {
        bottom: 30px;
    }
    
    .nextgen-arrow-icon {
        width: 30px;
        height: 30px;
    }
    
    .nextgen-mouse-icon {
        width: 24px;
        height: 36px;
    }
}
