    /* =========================================
           ZMIENNE GLOBALNE I RESET
        ========================================= */
        :root {
            --purple: #6528f7;
            --purple-hover: #541fd1;
            --purple-light: rgba(101, 40, 247, 0.05);
            --green: #00d084;
            --dark: #0f172a;
            --gray-text: #475569;
            --border: #e2e8f0;
            --bg-glass: rgba(255, 255, 255, 0.95);
        }

        body {
            margin: 0;
            font-family: 'Inter', sans-serif;
            background-color: #f8fafc;
            height: 200vh; /* Do testowania scrolla */
            overflow-x: hidden;
        }

        ul { list-style: none; margin: 0; padding: 0; }
        a { text-decoration: none; color: inherit; }
        * { box-sizing: border-box; }

        /* =========================================
           HEADER GŁÓWNY
        ========================================= */
        .site-header {
            position: fixed;
            top: 0; left: 0; width: 100%;
            background: var(--bg-glass);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
            z-index: 1000;
        }

        .header-container {
            /* POPRAWKA: Mniejsza szerokość, żeby przybliżyć logo i linki do środka */
            max-width: 1150px; 
            margin: 0 auto;
            padding: 0 20px;
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative; /* Kluczowe do poprawnego Mega Menu */
        }

        .logo img {
            height: 40px;
            width: auto;
            display: block;
        }

        /* =========================================
           NAWIGACJA DESKTOP
        ========================================= */
        .main-nav {
            display: flex;
            align-items: center;
            height: 100%;
        }

        .nav-list {
            display: flex;
            align-items: center;
            gap: 32px;
            height: 100%;
        }

        .nav-item {
            height: 100%;
            display: flex;
            align-items: center;
        }

        .has-dropdown { position: relative; } /* Tylko dla małego menu WIEDZA */
        /* Mega menu NIE MA position: relative, by centrować się do całego headera */

        .nav-link {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 6px;
            transition: color 0.3s ease;
            cursor: pointer;
            height: 100%;
        }

        .nav-link:hover, .nav-item:hover > .nav-link { color: var(--purple); }
        .nav-link svg.chevron { width: 16px; height: 16px; transition: transform 0.3s ease; }
        .nav-item:hover .nav-link svg.chevron { transform: rotate(180deg); }

        .btn-contact {
            background: var(--dark);
            color: #fff;
            padding: 10px 24px;
            border-radius: 8px;
            transition: background 0.3s, transform 0.3s;
            height: auto;
        }
        .btn-contact:hover {
            background: var(--purple); color: #fff; transform: translateY(-2px);
        }

        /* =========================================
           MEGA MENU (OFERTA) - POPRAWIONE POZYCJONOWANIE
        ========================================= */
        .mega-menu {
            position: absolute;
            top: 80px; /* Startuje równo pod headerem */
            left: 0; right: 0;
            margin: 0 auto; /* Centruje względem węższego .header-container */
            width: 100%;
            background: #ffffff;
            border: 1px solid var(--border);
            border-radius: 0 0 20px 20px; /* Zaokrąglone tylko na dole */
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
            opacity: 0;
            visibility: hidden;
            transform: translateY(15px);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            pointer-events: none;
            overflow: hidden;
        }

        /* Pokazywanie na desktopie po najechaniu */
        @media (min-width: 1025px) {
            .nav-item:hover .mega-menu {
                opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
            }
        }

        .mega-menu-main {
            width: 320px;
            background: #f8fafc;
            padding: 40px 30px;
            border-right: 1px solid var(--border);
            flex-shrink: 0;
        }

        .mega-menu-title {
            font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.8rem;
            text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8;
            margin-bottom: 20px; font-weight: 700;
        }

        .main-offer-card {
            display: flex; align-items: flex-start; gap: 16px; padding: 16px;
            border-radius: 12px; transition: background 0.3s ease; margin-bottom: 12px;
        }
        .main-offer-card:hover { background: #ffffff; box-shadow: 0 10px 20px rgba(0,0,0,0.03); }
        .main-offer-icon {
            width: 40px; height: 40px; background: var(--purple-light); border-radius: 10px;
            display: flex; justify-content: center; align-items: center; color: var(--purple); flex-shrink: 0;
        }
        .main-offer-text h4 { margin: 0 0 4px 0; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--dark); font-size: 1.05rem; }
        .main-offer-text p { margin: 0; font-size: 0.85rem; color: var(--gray-text); line-height: 1.4; }

        .mega-menu-grid { flex: 1; padding: 40px; }
        .audits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
        
        .audit-item {
            display: flex; align-items: center; gap: 10px; font-size: 0.85rem;
            color: var(--gray-text); padding: 8px; border-radius: 8px; transition: all 0.2s ease;
        }
        .audit-item svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; transition: transform 0.2s ease; }
        .audit-item:hover { background: var(--purple-light); color: var(--purple); font-weight: 500; }
        .audit-item:hover svg { color: var(--purple); transform: scale(1.1); }

        /* =========================================
           ZWYKŁY DROPDOWN (WIEDZA)
        ========================================= */
        .dropdown-menu {
            position: absolute;
            top: 80px; left: 50%; transform: translateX(-50%) translateY(15px);
            width: 300px; background: #ffffff; border: 1px solid var(--border);
            border-radius: 16px; box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
            opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 16px; pointer-events: none;
        }

        @media (min-width: 1025px) {
            .nav-item.has-dropdown:hover .dropdown-menu {
                opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto;
            }
        }

        .dropdown-item {
            display: flex; align-items: center; gap: 12px; padding: 12px 16px;
            border-radius: 8px; transition: background 0.3s; color: var(--dark);
            font-weight: 500; font-size: 0.95rem;
        }
        .dropdown-item svg { width: 20px; height: 20px; color: var(--purple); }
        .dropdown-item:hover { background: var(--purple-light); color: var(--purple); }

        /* =========================================
           PRZYCISK MOBILE (HAMBURGER)
        ========================================= */
        .mobile-toggle {
            display: none; background: transparent; border: none; cursor: pointer;
            padding: 10px; color: var(--dark);
        }
        .mobile-toggle svg { width: 28px; height: 28px; transition: transform 0.3s ease; }

        /* =========================================
           RESPONSYWNOŚĆ (MOBILE)
        ========================================= */
        @media (max-width: 1024px) {
            .mobile-toggle { display: block; }
            
            .main-nav {
                position: fixed; top: 80px; left: 0; width: 100%; height: calc(100vh - 80px);
                background: #ffffff; flex-direction: column; align-items: flex-start;
                padding: 20px; overflow-y: auto;
                transform: translateX(100%); transition: transform 0.3s ease-in-out;
            }
            .main-nav.is-open { transform: translateX(0); }

            .nav-list { flex-direction: column; width: 100%; align-items: flex-start; gap: 0; height: auto; }
            
            .nav-item { width: 100%; flex-direction: column; align-items: flex-start; height: auto; border-bottom: 1px solid var(--border); }
            .nav-item:last-child { border-bottom: none; margin-top: 20px; }
            
            .nav-link { width: 100%; padding: 20px 0; justify-content: space-between; }
            .btn-contact { text-align: center; justify-content: center; width: 100%; }

            /* Reset Mega Menu dla Mobile */
            .mega-menu {
                position: static; width: 100%; transform: none; opacity: 1; visibility: visible;
                box-shadow: none; border: none; border-radius: 0; flex-direction: column;
                display: none; /* Ukryte domyślnie na mobile */
                margin: 0; padding-bottom: 20px;
            }
            .mega-menu.is-open { display: flex; } /* Pokazywane przez JS */

            .mega-menu-main { width: 100%; border-right: none; padding: 20px 10px; background: transparent; }
            .mega-menu-grid { padding: 10px; }
            .audits-grid { grid-template-columns: 1fr; gap: 10px; } /* Jedna kolumna na telefonie */

            /* Reset Dropdown dla Mobile */
            .dropdown-menu {
                position: static; width: 100%; transform: none; opacity: 1; visibility: visible;
                box-shadow: none; border: none; padding: 0 0 20px 0;
                display: none;
            }
            .dropdown-menu.is-open { display: block; }
        }
        /* =========================================
   POPRAWKA: NAPRAWA ROZJECHANEGO MENU NA MOBILE
========================================= */
@media (max-width: 1024px) {
    /* 1. Reset wysokości - usuwa gigantyczne dziury między elementami */
    .site-header .nav-link,
    .site-header .nav-item,
    .site-header .nav-list {
        height: auto !important;
        min-height: 0 !important;
    }
    
    /* 2. Wymuszenie układu blokowego (wyłącza zgubne rozciąganie flexboxa) */
    .site-header .nav-list,
    .site-header .nav-item {
        display: block !important;
        width: 100% !important;
    }

    /* 3. Naprawa rozwiniętego Mega Menu */
    .site-header .mega-menu.is-open {
        display: block !important; /* Zamiana na blok naprawia pionowe rozciąganie */
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* 4. Dostosowanie marginesów wewnętrznych dla telefonów */
    .site-header .mega-menu-main {
        padding: 10px 5px 20px 5px !important;
        border-bottom: 1px solid var(--border) !important;
    }

    .site-header .mega-menu-grid {
        padding: 20px 5px 10px 5px !important;
    }

    /* 5. Ciasniejsze upakowanie usług, by lepiej wyglądały na małym ekranie */
    .site-header .main-offer-card {
        padding: 12px 10px !important;
        margin-bottom: 8px !important;
    }

    .site-header .audit-item {
        padding: 10px 5px !important;
    }
    
    /* 6. Naprawa mniejszego Dropdowna "Wiedza" */
    .site-header .dropdown-menu {
        padding: 10px 5px !important;
    }
}



/* =========================================
   FIX: STICKY HEADER I Z-INDEX (MENU NA WIERZCHU)
========================================= */

/* 1. Neutralizacja nadrzędnego kontenera Astry (żeby nie blokował Fixed i warstw) */
header#masthead, 
.site-header.ast-primary-header-custom-builder {
    position: static !important;
    z-index: 999998 !important;
    overflow: visible !important;
    transform: none !important; /* To blokowało bycie Sticky! */
}

/* 2. Nasz Header na absolutnym szczycie warstw i ZAWSZE przyklejony */
.custom-saas-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999999 !important; /* Przebija fioletową sekcję */
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* 3. Mega Menu i Dropdown muszą mieć najwyższy możliwy priorytet */
.custom-saas-header .mega-menu,
.custom-saas-header .dropdown-menu {
    z-index: 9999999 !important; /* Przebija wszystko na stronie */
}

/* =========================================
   TWARDY RESET: NAPRAWA MENU MOBILNEGO
========================================= */
@media (max-width: 1024px) {
    /* 1. Zabijamy flexboxa, który na siłę centruje menu na środku ekranu */
    .custom-saas-header .main-nav {
        display: block !important; /* Wymuszenie układu od góry do dołu */
        padding-top: 20px !important;
        overflow-y: auto !important;
    }

    /* 2. Twardy reset wysokości dla listy i elementów (usuwa wielkie dziury) */
    .custom-saas-header .nav-list,
    .custom-saas-header .nav-item {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .custom-saas-header .nav-item {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    /* 3. Linki z powrotem mają normalną wysokość (strzałka po prawej) */
    .custom-saas-header .nav-link {
        display: flex !important; 
        justify-content: space-between !important;
        align-items: center !important;
        padding: 18px 0 !important;
        height: auto !important;
    }

    /* 4. Naprawa Mega Menu i Dropdowna (usuwa ukryte marginesy) */
    .custom-saas-header .mega-menu,
    .custom-saas-header .dropdown-menu {
        position: static !important;
        transform: none !important;
        display: none !important; /* Domyślnie chowa podmenu */
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Włączenie po kliknięciu strzałki */
    .custom-saas-header .mega-menu.is-open,
    .custom-saas-header .dropdown-menu.is-open {
        display: block !important;
        padding-bottom: 20px !important;
    }

    /* 5. Ciasne upakowanie usług wewnątrz (żeby łatwo się scrollowało) */
    .custom-saas-header .mega-menu-main {
        padding: 15px 5px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-right: none !important;
        background: transparent !important;
    }

    .custom-saas-header .mega-menu-grid {
        padding: 15px 5px !important;
    }

    .custom-saas-header .main-offer-card {
        padding: 10px !important;
        margin-bottom: 5px !important;
    }

    .custom-saas-header .audit-item {
        padding: 10px 0 !important;
    }
    
    .custom-saas-header .dropdown-item {
        padding: 12px 0 !important;
    }
    
    /* Naprawa przycisku "Kontakt" żeby nie był wielkim blokiem na całą stronę */
    .custom-saas-header .btn-contact {
        justify-content: center !important;
        margin-top: 10px !important;
    }
}



/* =========================================
   FIX: ODBLOKOWANIE KLIKNIĘĆ NA MOBILE
========================================= */
@media (max-width: 1024px) {
    .custom-saas-header .mega-menu,
    .custom-saas-header .dropdown-menu,
    .custom-saas-header .mega-menu.is-open,
    .custom-saas-header .dropdown-menu.is-open {
        pointer-events: auto !important; /* Zdejmuje "niewidzialną tarczę" blokującą dotyk */
    }
    
    /* Upewniamy się, że same linki też są interaktywne */
    .custom-saas-header a {
        pointer-events: auto !important;
    }
}