/* ==========================================================================
   ULTRA-PREMIUM APP LANDING PAGE - NATIVE PHP EDITION
   Wersja: 4.0 (Awwwards Style)
   Zoptymalizowane pod kątem SEO, CLS (Core Web Vitals) i 60FPS.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (Zmienne CSS)
   Potężny system zarządzania motywem.
   -------------------------------------------------------------------------- */
   :root {
    /* Paleta Kolorów - Dark Premium */
    --app-bg-base: #030305;
    --app-bg-surface: #0a0a0f;
    --app-bg-surface-light: #15151e;
    --app-primary: #ec2a40;
    --app-primary-hover: #ff3b53;
    --app-primary-glow: rgba(236, 42, 64, 0.4);
    --app-accent: #00e5ff;
    
    /* Typografia */
    --app-text-main: #ffffff;
    --app-text-muted: #9494a0;
    --app-text-dark: #000000;
    
    /* Granice i Szkło (Glassmorphism) */
    --app-border-light: rgba(255, 255, 255, 0.08);
    --app-border-strong: rgba(255, 255, 255, 0.2);
    --app-glass-bg: rgba(10, 10, 15, 0.6);
    --app-glass-blur: blur(20px);
    
    /* Typografia - Fonty */
    --app-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --app-font-display: 'Clash Display', 'Inter', system-ui, sans-serif;
    
    /* Typografia - Skala Płynna (Fluid Typography) */
    --app-text-xs: clamp(0.75rem, 0.7vw, 0.875rem);
    --app-text-sm: clamp(0.875rem, 0.8vw, 1rem);
    --app-text-base: clamp(1rem, 1vw, 1.125rem);
    --app-text-lg: clamp(1.125rem, 1.5vw, 1.25rem);
    --app-text-xl: clamp(1.25rem, 2vw, 1.5rem);
    --app-text-2xl: clamp(1.5rem, 3vw, 2rem);
    --app-text-3xl: clamp(2rem, 4vw, 2.5rem);
    --app-text-4xl: clamp(2.5rem, 5vw, 3.5rem);
    --app-text-5xl: clamp(3rem, 6vw, 4.5rem);
    --app-text-6xl: clamp(3.5rem, 7vw, 6rem);
    
    /* Odstępy i Layout */
    --app-container-max: 1280px;
    --app-container-padding: clamp(20px, 5vw, 40px);
    --app-section-spacing: clamp(60px, 10vw, 140px);
    --app-radius-sm: 8px;
    --app-radius-md: 16px;
    --app-radius-lg: 24px;
    --app-radius-xl: 32px;
    --app-radius-pill: 9999px;
    
    /* Animacje (Krzywe Beziera jak w Apple) */
    --app-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --app-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --app-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --app-transition-fast: 0.2s var(--app-ease-out);
    --app-transition-normal: 0.4s var(--app-ease-out);
    --app-transition-slow: 0.8s var(--app-ease-out);
    
    /* Z-index (Porządek warstw) */
    --app-z-bottom: -1;
    --app-z-base: 1;
    --app-z-above: 10;
    --app-z-dropdown: 100;
    --app-z-sticky: 1000;
    --app-z-modal: 9999;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   Nowoczesny, agresywny reset przygotowujący pod gładkie animacje.
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--app-bg-base);
}

body {
    background-color: var(--app-bg-base);
    color: var(--app-text-main);
    font-family: var(--app-font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--app-transition-fast);
}

/* --------------------------------------------------------------------------
   3. SELEKCJA & SCROLLBAR
   Dbałość o detale na poziomie systemu operacyjnego.
   -------------------------------------------------------------------------- */
::selection {
    background-color: var(--app-primary);
    color: #ffffff;
    text-shadow: none;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--app-bg-base);
}

::-webkit-scrollbar-thumb {
    background: #2a2a35;
    border-radius: 6px;
    border: 3px solid var(--app-bg-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--app-text-muted);
}

/* --------------------------------------------------------------------------
   4. GLOBAL UTILITIES
   Często używane pomocnicze klasy.
   -------------------------------------------------------------------------- */
.app-container {
    width: 100%;
    max-width: var(--app-container-max);
    margin: 0 auto;
    padding: 0 var(--app-container-padding);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}




/* --------------------------------------------------------------------------
   8. WORDPRESS CONTENT (.app-description)
   Złoty standard typografii dla wpisów z the_content().
   Ten kod zabezpiecza przed rozjechaniem się strony przez klienta.
   -------------------------------------------------------------------------- */
.app-description {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--app-section-spacing) var(--app-container-padding);
    font-size: var(--app-text-lg);
    color: #c9c9d6;
    line-height: 1.8;
}

/* Pierwsza litera - Drop Cap dla efektu WOW */
.app-description > p:first-of-type::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 0.8;
    padding-right: 12px;
    padding-top: 8px;
    color: var(--app-primary);
    font-weight: 900;
    font-family: var(--app-font-display);
}

.app-description h1,
.app-description h2,
.app-description h3,
.app-description h4,
.app-description h5,
.app-description h6 {
    color: var(--app-text-main);
    font-family: var(--app-font-display);
    font-weight: 800;
    margin-top: 2.5em;
    margin-bottom: 1em;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.app-description h2 { font-size: var(--app-text-4xl); }
.app-description h3 { font-size: var(--app-text-3xl); }
.app-description h4 { font-size: var(--app-text-2xl); }

.app-description p {
    margin-bottom: 1.5em;
}

/* Linki w treści */
.app-description a {
    color: var(--app-primary);
    text-decoration: underline;
    text-decoration-color: rgba(236, 42, 64, 0.3);
    text-underline-offset: 4px;
    transition: all var(--app-transition-fast);
}

.app-description a:hover {
    text-decoration-color: var(--app-primary);
    background-color: rgba(236, 42, 64, 0.1);
}

/* Silny tekst */
.app-description strong, 
.app-description b {
    color: var(--app-text-main);
    font-weight: 700;
}

/* Obrazki dodane przez WP */
.app-description img {
    border-radius: var(--app-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin: 2em 0;
    width: 100%;
    height: auto;
}

/* Wyróżnione cytaty (Blockquotes) */
.app-description blockquote {
    position: relative;
    padding: 30px 40px;
    margin: 3em 0;
    background: var(--app-bg-surface-light);
    border-radius: var(--app-radius-lg);
    font-style: italic;
    font-size: var(--app-text-xl);
    color: var(--app-text-main);
    border-left: 4px solid var(--app-primary);
    box-shadow: inset 0 0 0 1px var(--app-border-light);
}

.app-description blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-family: var(--app-font-display);
    font-size: 80px;
    color: var(--app-primary-glow);
    line-height: 1;
}

/* Listy punktowane z customowymi strzałkami */
.app-description ul {
    list-style: none;
    margin: 2em 0 2em 1.5em;
}

.app-description ul li {
    position: relative;
    margin-bottom: 1em;
    padding-left: 30px;
}

.app-description ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--app-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--app-primary-glow);
}

.app-description ol {
    margin: 2em 0 2em 1.5em;
    padding-left: 20px;
}

.app-description ol li {
    margin-bottom: 1em;
    padding-left: 10px;
}

/* --------------------------------------------------------------------------
   9. SCREENSHOTS SECTION (.app-screenshots)
   Potężna, interaktywna karuzela dla zrzutów ekranu.
   -------------------------------------------------------------------------- */
.app-screenshots {
    padding: var(--app-section-spacing) 0;
    background: linear-gradient(to bottom, var(--app-bg-base) 0%, var(--app-bg-surface) 100%);
    overflow: hidden; /* Konieczne dla Swipera */
    position: relative;
}

.app-screenshots h2 {
    text-align: center;
    font-family: var(--app-font-display);
    font-size: var(--app-text-5xl);
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--app-text-main);
}

.appstore-swiper {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 80px; /* Miejsce na paginację */
}

/* Swiper Wrapper & Slides */
.appstore-swiper .swiper-wrapper {
    align-items: center;
}

.appstore-swiper .swiper-slide {
    max-width: 10% !important;            /* 🔥 FIX: stała mała szerokość */
    transform: scale(0.75);  /* 🔥 mniejsze tło */
    transition: all 0.3s ease;
    filter: blur(1px) brightness(0.7);
}

/* Aktywny slajd na środku */
.appstore-swiper .swiper-slide-active {
    filter: blur(0) brightness(1);
    transform: scale(1);
    z-index: 2;
}

.glightbox {
    display: block;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid var(--app-border-light);
    aspect-ratio: 9/19.5; /* Dokładne proporcje iPhone'a */
    background: #000;
}


.glightbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--app-transition-normal);
}


.appstore-swiper .swiper-slide-active .glightbox:hover::after {
    opacity: 1;
}

.appstore-swiper .swiper-slide-active .glightbox:hover img {
    transform: scale(1.05);
}

/* Stylizacja kropek paginacji (Pagination) */
.appstore-swiper .swiper-pagination {
    bottom: 20px;
}

.appstore-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--app-text-muted);
    opacity: 0.5;
    transition: all var(--app-transition-fast);
}

.appstore-swiper .swiper-pagination-bullet-active {
    width: 32px;
    border-radius: 6px;
    background: var(--app-primary);
    opacity: 1;
    box-shadow: 0 0 15px var(--app-primary-glow);
}

/* --------------------------------------------------------------------------
   10. LEGAL DOCS TABS (.app-docs)
   Moduł Polityki i Regulaminu zamknięty w zgrabnych zakładkach.
   -------------------------------------------------------------------------- */
.app-docs {
    padding: var(--app-section-spacing) var(--app-container-padding);
    max-width: 900px;
    margin: 0 auto;
}

/* Nawigacja Tabsów */
.app-docs .tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    padding: 8px;
    background: var(--app-bg-surface);
    border-radius: var(--app-radius-pill);
    border: 1px solid var(--app-border-light);
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    padding: 14px 32px;
    border-radius: var(--app-radius-pill);
    font-size: var(--app-text-base);
    font-weight: 600;
    color: var(--app-text-muted);
    transition: all var(--app-transition-fast);
    position: relative;
}

.tab-btn:hover {
    color: var(--app-text-main);
}

.tab-btn.active {
    color: var(--app-text-main);
    background: var(--app-primary);
    box-shadow: 0 8px 20px var(--app-primary-glow);
}

/* Treść Tabsów */
.tab-content {
    background: var(--app-bg-surface);
    border: 1px solid var(--app-border-light);
    border-radius: var(--app-radius-xl);
    padding: clamp(30px, 5vw, 60px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    min-height: 300px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--app-transition-normal), transform var(--app-transition-normal);
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tabFadeIn 0.5s var(--app-ease-out) forwards;
}

@keyframes tabFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Ostylowanie zawartości WordPress wewnątrz zakładek prawnych */
.docs-content {
    font-size: var(--app-text-sm);
    color: #a0a0b0;
    line-height: 1.7;
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
    color: var(--app-text-main);
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.docs-content p {
    margin-bottom: 1.2em;
}

.docs-content a {
    color: var(--app-primary);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. CERTIFICATES SECTION (.app-certificates)
   Zwiększenie zaufania dzięki perfekcyjnym kafelkom.
   -------------------------------------------------------------------------- */
.app-certificates {
    padding: var(--app-section-spacing) var(--app-container-padding);
    background: var(--app-bg-base);
    text-align: center;
}

.app-certificates h2 {
    font-family: var(--app-font-display);
    font-size: var(--app-text-4xl);
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--app-text-main);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.cert-item {
    background: var(--app-bg-surface);
    border: 1px solid var(--app-border-light);
    border-radius: var(--app-radius-lg);
    padding: 40px 20px;
    font-size: var(--app-text-lg);
    font-weight: 700;
    color: var(--app-text-muted);
    transition: all var(--app-transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

/* Płynny gradient na obramowaniu przy najeżdżaniu */
.cert-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--app-radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background var(--app-transition-normal);
}

.cert-item:hover {
    transform: translateY(-10px);
    color: var(--app-text-main);
    background: var(--app-bg-surface-light);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.cert-item:hover::before {
    background: linear-gradient(135deg, var(--app-primary), var(--app-accent));
}

/* --------------------------------------------------------------------------
   12. ANIMATIONS ENGINE (Kluczowe Klatki)
   Silnik płynnych animacji ładujących.
   -------------------------------------------------------------------------- */
@keyframes appFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 var(--app-primary-glow); }
    70% { box-shadow: 0 0 0 20px rgba(236, 42, 64, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 42, 64, 0); }
}

@keyframes floatElement {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE DESIGN (Media Queries)
   Pixel-perfect na każdym urządzeniu.
   -------------------------------------------------------------------------- */

/* Tablety i małe laptopy */
@media (max-width: 1024px) {
    .game-banner.single-app-banner {
        padding-top: 100px;
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablety pionowo & duże telefony */
@media (max-width: 768px) {
    .app-docs .tabs {
        flex-direction: column;
        width: 100%;
        border-radius: var(--app-radius-md);
    }
    
    .tab-btn {
        width: 100%;
        border-radius: var(--app-radius-sm);
    }
    
    .ios-button, 
    .android-button {
        width: 100%;
        max-width: 320px;
    }
    
    .app-description {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .app-description > p:first-of-type::first-letter {
        font-size: 3rem;
    }
    
    .appstore-swiper .swiper-slide {
        /* Mniejsze slajdy na telefonach */
        width: 60vw;
    }
}

/* Małe smartfony */
@media (max-width: 480px) {
    .game-banner.single-app-banner {
        padding-top: 80px;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .app-description blockquote {
        padding: 20px;
        font-size: var(--app-text-lg);
    }
    
    .app-description blockquote::before {
        font-size: 50px;
        top: -10px;
        left: 10px;
    }
    
    .tab-content {
        padding: 20px;
    }
}

/* Redukcja animacji dla osób z preferencjami (A11Y) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}