/* Organizacja CSS w warstwy kaskadowe */
@layer reset, base, tokens, components, utilities;

@layer tokens {
    :root {
        /* Kolory główne */
        --primary-color: #1e3a8a; /* Ciemny niebieski - kolor główny */
        --secondary-color: #3b82f6; /* Średni niebieski - kolor drugorzędny */
        --accent-color: #38bdf8; /* Jasny niebieski - kolor akcentujący */
        
        /* Kolory neutralne */
        --dark-color: #1e293b; /* Ciemny szary niemal czarny */
        --light-color: #f8fafc; /* Jasny szary niemal biały */
        --gray-color: #64748b; /* Średni szary */
        
        /* Specjalne kolory */
        --success-color: #10b981; /* Zielony - sukces */
        --error-color: #ef4444; /* Czerwony - błąd */
        
        /* Relative colors - odcienie kolorów głównych */
        --primary-light: color-mix(in oklab, var(--primary-color) 70%, white);
        --primary-lighter: color-mix(in oklab, var(--primary-color) 40%, white);
        --primary-dark: color-mix(in oklab, var(--primary-color) 70%, black);
        --secondary-light: color-mix(in oklab, var(--secondary-color) 70%, white);
        --accent-light: color-mix(in oklab, var(--accent-color) 70%, white);
        
        /* Czcionki */
        --heading-font: 'Montserrat', sans-serif;
        --body-font: 'Open Sans', sans-serif;
        
        /* Odstępy */
        --spacing-xs: 0.5rem;
        --spacing-sm: 1rem;
        --spacing-md: 2rem;
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
        
        /* Przejścia */
        --transition-fast: all 0.2s ease;
        --transition-normal: all 0.3s ease;
        --transition-slow: all 0.5s ease;
        
        /* Cienie */
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
        
        /* Zaokrąglenia */
        --border-radius-sm: 4px;
        --border-radius-md: 8px;
        --border-radius-lg: 16px;
        --border-radius-full: 9999px;
    }
}

@layer reset {
    *, *::before, *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        font-size: 62.5%; /* 1rem = 10px */
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--light-color);
    }

    body {
        font-family: var(--body-font);
        font-size: 1.6rem;
        line-height: 1.7;
        color: var(--dark-color);
        background-color: var(--light-color);
        overflow-x: hidden;
    }

    ul {
        list-style: none;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    button, 
    input, 
    select, 
    textarea {
        font-family: inherit;
        font-size: inherit;
    }

    button {
        cursor: pointer;
        background: none;
        border: none;
    }
}

@layer base {
    /* ----- KLASY UŻYTKOWE ----- */
    .container {
        width: 100%;
        max-width: 120rem;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
        container-type: inline-size;
    }

    .section {
        padding: var(--spacing-xl) 0;
        scroll-margin-top: 40px;
    }

    /* Dodatkowy padding dla stron głównych sekcji (nie na stronie głównej) */
    body:not([data-page="index"]) .section:first-of-type {
        padding-top: calc(var(--spacing-xl) + 6rem);
    }

    .section-header {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }

    .section-header h2 {
        font-family: var(--heading-font);
        font-size: 3.6rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: var(--spacing-xs);
        text-wrap: balance;
    }

    .underline {
        height: 4px;
        width: 6rem;
        background-color: var(--accent-color);
        margin: 0 auto;
    }

    .bg-light {
        background-color: #f1f5f9;
    }

    .bg-dark {
        background-color: var(--dark-color);
        color: var(--light-color);
    }
}

@layer components {
    /* ----- COOKIE BANNER ----- */
    .cookie-banner {
        position: fixed;
        left: 50%;
        bottom: 2rem;
        transform: translateX(-50%);
        width: min(960px, calc(100% - 2rem));
        background: rgba(30, 58, 138, 0.9);
        color: #fff;
        padding: 1rem 1.25rem;
        border-radius: 10px;
        box-shadow: var(--shadow-md);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        z-index: 1100;
        backdrop-filter: blur(4px);
    }

    .cookie-text {
        margin: 0;
        font-size: 1.4rem;
        line-height: 1.5;
    }

    .cookie-text a { color: var(--accent-color); text-decoration: underline; }

    .cookie-accept {
        white-space: nowrap;
        padding: 0.6rem 1.2rem;
        border-radius: 8px;
        border: 2px solid #fff;
        background: transparent;
        color: #fff;
        font-weight: 600;
        transition: var(--transition-normal);
    }

    .cookie-actions { display: flex; gap: 0.8rem; }

    .cookie-reject {
        white-space: nowrap;
        padding: 0.6rem 1.2rem;
        border-radius: 8px;
        border: 2px solid #fff;
        background: #fff;
        color: var(--primary-color);
        font-weight: 600;
        transition: var(--transition-normal);
    }

    .cookie-accept:hover {
        background: #fff;
        color: var(--primary-color);
    }

    @media screen and (max-width: 576px) {
        .cookie-banner {
            flex-direction: column;
            align-items: stretch;
        }
        .cookie-accept { width: 100%; }
    }
    /* ----- WYBÓR PODSTRON ----- */
    .page-selector {
        width: 100%;
        height: 100vh; /* Pełna wysokość ekranu */
        min-height: 500px; /* Minimalna wysokość */
        display: flex;
        position: relative;
        overflow: hidden;
        z-index: 1; /* Upewniamy się, że sekcja ma odpowiedni z-index */
    }
    
    .page-option {
        flex: 1;
        height: 100%;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        transition: flex 0.7s cubic-bezier(0.61, 0.07, 0.23, 0.89);
    }
    
    .page-option:hover {
        flex: 1.5;
    }
    
    .page-option-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        transition: transform 0.7s ease, filter 0.7s ease;
        filter: brightness(0.7);
    }
    
    .page-option:hover .page-option-bg {
        transform: scale(1.05);
        filter: brightness(0.9);
    }
    
    .page-option-content {
        position: absolute;
        top: 50%; /* Wyśrodkowanie w pionie */
        left: 0;
        width: 100%;
        padding: 4rem;
        color: white;
        z-index: 2;
        transform: translateY(-50%) translateY(20px); /* Wyśrodkowanie z przesunięciem dla efektu */
        opacity: 0.9;
        transition: transform 0.5s ease, opacity 0.5s ease;
        text-align: center; /* Wyśrodkowanie tekstu */
        background: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%); /* Gradient na środku */
    }
    
    .page-option:hover .page-option-content {
        transform: translateY(-50%); /* Zachowujemy wyśrodkowanie w pionie */
        opacity: 1;
    }
    
    .page-option-content h2 {
        font-size: 3.2rem;
        font-weight: 700;
        margin-bottom: 1rem;
        font-family: var(--heading-font);
    }
    
    .page-option-content p {
        font-size: 1.6rem;
        max-width: 400px;
        margin: 0 auto 2rem;
        text-align: center;
    }
    
    .page-option-btn {
        display: inline-block;
        padding: 1rem 2rem;
        background-color: var(--accent-color);
        color: white;
        border-radius: 4px;
        font-weight: 600;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.5s ease 0.1s;
    }
    
    .page-option:hover .page-option-btn {
        transform: translateY(0);
        opacity: 1;
    }
    
    .page-option-btn:hover {
        background-color: white;
        color: var(--primary-color);
    }
    
    /* Animacja przejścia */
    .page-transition {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--primary-color);
        z-index: 9999;
        transform: translateX(-100%);
        pointer-events: none;
    }
    
    .page-transition.active {
        animation: pageTransition 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    }
    
    @keyframes pageTransition {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(0);
        }
    }
    
    @media screen and (max-width: 768px) {
        .page-selector {
            flex-direction: row; /* Obrazy obok siebie */
            height: auto;
            min-height: 50vh; /* Zmniejszona wysokość */
        }
        
        .page-option {
            height: 50vh;
            min-height: 250px; /* Mniejsza minimalna wysokość */
            flex: 1; /* Równe proporcje */
            width: 50%; /* Połowa szerokości */
        }
        
        .page-option-content {
            padding: 1rem;
            opacity: 1; /* Zawsze widoczna treść */
            transform: translateY(-50%); /* Zachowujemy wyśrodkowanie */
        }
        
        .page-option-content h2 {
            font-size: 1.8rem; /* Mniejsza czcionka */
            margin-bottom: 0.5rem;
        }
        
        .page-option-content p {
            font-size: 1.2rem; /* Mniejsza czcionka */
            margin: 0 auto 1rem;
            text-align: center;
            display: none; /* Ukrywamy opis na bardzo małych ekranach */
        }
        
        .page-option-btn {
            opacity: 1; /* Zawsze widoczny przycisk */
            transform: translateY(0);
            padding: 0.7rem 1.5rem; /* Mniejszy przycisk */
            font-size: 1.2rem; /* Mniejsza czcionka */
        }
    }
    
    /* ----- PRZYCISKI ----- */
    .btn-primary {
        display: inline-block;
        background-color: var(--primary-color);
        color: white;
        font-family: var(--heading-font);
        font-weight: 600;
        padding: 1.2rem 2.4rem;
        border-radius: var(--border-radius-md);
        transition: var(--transition-normal);
        border: 2px solid var(--primary-color);
        position: relative;
        overflow: hidden;
        z-index: 1;
    }

    .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background-color: var(--primary-light);
        transition: var(--transition-normal);
        z-index: -1;
    }

    .btn-primary:hover::before {
        width: 100%;
    }

    .btn-primary:hover {
        color: white;
    }

    .btn-secondary {
        display: inline-block;
        background-color: transparent;
        color: var(--primary-color);
        font-family: var(--heading-font);
        font-weight: 600;
        padding: 1.2rem 2.4rem;
        border-radius: var(--border-radius-md);
        transition: var(--transition-normal);
        border: 2px solid var(--primary-color);
    }

    .btn-secondary:hover {
        background-color: var(--primary-color);
        color: white;
    }

    /* ----- NAVBAR ----- */
    #navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: rgba(30, 58, 138, 0.75);
        z-index: 1000;
        padding: 1.5rem 0;
        transition: var(--transition-normal);
        backdrop-filter: blur(5px);
    }

    #navbar.scrolled {
        padding: 1rem 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    #navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo a {
        font-family: var(--heading-font);
        font-size: 2.0rem;
        font-weight: 700;
        color: white;
        transition: var(--transition-normal);
    }

    #navbar.scrolled .logo a {
        font-size: 1.9rem;
    }

    .nav-menu {
        display: flex;
        align-items: center;
    }

    .nav-link {
        color: white;
        font-family: var(--heading-font);
        font-weight: 500;
        font-size: 1.8rem;
        padding: 0.5rem 1.5rem;
        position: relative;
        transition: var(--transition-normal);
    }

    .nav-link--compact { white-space: nowrap; }

    /* Desktop: menu w dwóch wierszach, jeśli potrzebne */
    @media screen and (min-width: 992px) {
        #navbar .container {
            flex-wrap: wrap;
            align-items: center;
        }
        .nav-menu {
            flex: 1 1 auto;
            justify-content: flex-end;
            flex-wrap: wrap;
            column-gap: 0.4rem;
            row-gap: 0.2rem;
            margin-top: 0;
        }
        .nav-menu li { margin: 0; }
    }

    #navbar.scrolled .nav-link {
        padding: 0.5rem 1.2rem;
    }

    .nav-link {
        position: relative;
        transition: color 0.3s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--accent-color);
    }

    .menu-toggle {
        display: none;
        color: white;
        font-size: 2.4rem;
        cursor: pointer;
        z-index: 1001;
        transition: var(--transition-normal);
    }

    #navbar.scrolled .menu-toggle {
        font-size: 2.2rem;
    }
    
    /* ----- HERO SECTION ----- */
    .hero {
        height: 100vh;
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
        color: var(--light-color);
        view-timeline-name: --hero-scroll;
        view-timeline-axis: block;
    }

    .hero-content {
        max-width: 80rem;
        text-align: left;
    }

    .hero-content h1 {
        font-family: var(--heading-font);
        font-size: 4.8rem;
        font-weight: 700;
        margin-bottom: var(--spacing-xs);
        color: var(--accent-color);
        transform: translateY(20px);
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards 0.2s;
        text-wrap: balance;
    }

    .hero-content h2 {
        font-family: var(--heading-font);
        font-size: 3.2rem;
        font-weight: 500;
        margin-bottom: var(--spacing-sm);
        color: var(--light-color);
        transform: translateY(20px);
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards 0.4s;
        text-wrap: balance;
    }

    .hero-content p {
        font-size: 1.8rem;
        margin-bottom: var(--spacing-md);
        max-width: 60rem;
        transform: translateY(20px);
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards 0.6s;
    }

    .hero-content .btn-primary {
        transform: translateY(20px);
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards 0.8s;
    }

    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ----- O FIRMIE ----- */
    .about-grid {
        display: grid;
        grid-template-columns: 1fr 2fr; /* 1/3 obraz, 2/3 tekst */
        gap: var(--spacing-lg);
        align-items: center;
    }

    /* zmniejszenie logo/obrazu w sekcji O firmie o 50% */
    .about-image .about-img {
        width: 100%; /* pełna szerokość kolumny obrazu przy układzie 1/3-2/3 */
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }



    .about-text h3 {
        font-family: var(--heading-font);
        font-size: 2.8rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: var(--spacing-xs);
        text-wrap: balance;
    }

    .about-text h4 {
        font-family: var(--heading-font);
        font-size: 2rem;
        font-weight: 500;
        color: var(--secondary-color);
        margin-bottom: var(--spacing-sm);
    }

    .about-text p {
        margin-bottom: var(--spacing-sm);
    }

    .stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }

    .stat-item {
        text-align: center;
        padding: var(--spacing-sm);
        border-radius: var(--border-radius-md);
        background-color: white;
        box-shadow: var(--shadow-sm);
        transition: var(--transition-normal);
    }

    .stat-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

    .stat-item i {
        font-size: 2.4rem;
        color: var(--primary-color);
        margin-bottom: var(--spacing-xs);
    }

    .stat-item h4 {
        font-family: var(--heading-font);
        font-size: 2.4rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }

    .stat-item p {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    /* ----- USŁUGI ----- */
    section#uslugi {
        background-color: #f8fafc;
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    section#uslugi .section-header h2 {
        color: #3c4a87;
    }

    section#uslugi .underline {
        background-color: #4299e1;
    }

    .services-visual {
        margin: 2rem 0 3rem;
        border-radius: var(--border-radius-lg);
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        width: 100%;
    }

    .services-visual img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
        max-height: 420px;
    }
    
    section#uslugi .section-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .services-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* ZAWSZE 3 kolumny na desktop */
        gap: 2rem;
        margin-top: 3rem;
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Enhanced Lists for Service Pages */
    .steps-list {
        list-style: none;
        counter-reset: step-counter;
        padding-left: 0;
        margin: 2rem 0;
    }

    .steps-list li {
        counter-increment: step-counter;
        position: relative;
        padding: 1.5rem 0 1.5rem 4rem;
        border-left: 2px solid var(--accent-color);
        margin-left: 2rem;
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(80, 200, 120, 0.05));
        border-radius: 0 8px 8px 0;
        margin-bottom: 1rem;
        line-height: 1.6;
        transition: var(--transition-normal);
    }

    .steps-list li:hover {
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 200, 120, 0.1));
        transform: translateX(5px);
    }

    .steps-list li::before {
        content: counter(step-counter);
        position: absolute;
        left: -2rem;
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
        color: white;
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
        box-shadow: var(--shadow-md);
    }

    /* CTA Buttons Container for Service Pages */
    .cta-buttons {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 4rem;
    }

    @media screen and (max-width: 576px) {
        .cta-buttons {
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }
    }

    /* Tablet - 2 kolumny */
    @media screen and (max-width: 991px) {
        .services-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
    }

    /* Mobile - 1 kolumna */
    @media screen and (max-width: 576px) {
        .services-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
            max-width: 400px;
        }
    }

    .service-card {
        background-color: white;
        padding: var(--spacing-md);
        border-radius: var(--border-radius-lg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        text-align: center;
        transition: var(--transition-normal);
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 1;
        height: 100%;
    }

    .service-card-content {
        display: grid;
        grid-template-rows: auto auto 1fr auto;
        grid-template-columns: 1fr;
        justify-items: center;
        height: 100%;
    }

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    }

    .service-card .icon {
        font-size: 4.5rem;
        color: var(--primary-color);
        margin-bottom: var(--spacing-md);
    }

    .service-card h3 {
        font-family: var(--heading-font);
        font-size: 2rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: var(--spacing-sm);
        text-wrap: balance;
    }

    .service-card p {
        font-size: 1.45rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.55;
    }

    .service-footer { display: none; }

    .service-tag {
        display: inline-block;
        background-color: var(--primary-lighter);
        color: var(--primary-dark);
        font-size: 1.2rem;
        font-weight: 500;
        padding: 0.5rem 1.2rem;
        border-radius: var(--border-radius-full);
    }

    /* CTA wariant 1 */
    .service-card--cta { display: block; text-decoration: none; color: inherit; }
    .service-card--cta .service-cta {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        margin-top: auto;
        padding: .7rem 1.0rem; /* węższy, tylko pod tekst+strzałkę */
        border-radius: 10px;
        background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
        color: #fff; /* biały tekst */
        font-weight: 700;
        letter-spacing: .2px;
        transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
        box-shadow: 0 6px 18px rgba(0,0,0,.12);
    }
    .service-card--cta:hover .service-cta { box-shadow: 0 10px 24px rgba(0,0,0,.16); }
    .service-card--cta:hover .service-cta i { transform: translateX(4px); }
    .service-card--cta .service-cta i { transition: var(--transition-normal); }

    /* ----- NASZE PODEJŚCIE ----- */
    /* Wariant 3: tabs + accordion */
    .services-tabs { max-width: 1200px; }
    .tabs { display: none; gap: .6rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
    .tab { background: color-mix(in oklab, var(--primary-color) 10%, white); color: var(--primary-dark); border: 0; padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; cursor: pointer; }
    .tab[aria-selected="true"] { background: var(--primary-color); color: white; }
    .tab-panels { display: none; background: white; border-radius: var(--border-radius-md); padding: 2rem; box-shadow: var(--shadow-sm); }
    .tab-panel[hidden] { display: none !important; }

    .services-accordion details { background: white; border-radius: var(--border-radius-md); padding: 1.2rem 1.6rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
    .services-accordion summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .8rem; }

    @media screen and (min-width: 992px) {
      .tabs { display: flex; }
      .tab-panels { display: block; }
      .services-accordion { display: none; }
    }
    .approach-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 0;
    }

    .approach-intro {
        position: relative;
    }

    .approach-image {
        float: right;
        width: 420px;
        max-width: 45%;
        margin: 0 0 1.5rem 2rem; /* odstęp pod i na lewo, by tekst opływał także od dołu */
    }

    .approach-img {
        width: 100%;
        height: auto;
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-md);
        object-fit: cover;
        max-height: 460px;
        display: block;
    }

    .approach-intro h3,
    .approach-full h3 {
        color: var(--primary-color);
        margin-top: 2rem;
        margin-bottom: 1.2rem;
        font-weight: 600;
        text-wrap: balance;
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .approach-intro h3:first-child,
    .approach-full h3:first-child {
        margin-top: 0;
    }

    .approach-intro p,
    .approach-full p {
        margin-bottom: 1.5rem;
        line-height: 1.6;
        font-size: 1.6rem;
    }

    .approach-intro p:last-child,
    .approach-full p:last-child {
        margin-bottom: 0;
    }

    .approach-full {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1rem 0;
        clear: both; /* upewnia się, że kolejne bloki zaczynają się pod floatem */
    }

    @media screen and (max-width: 991px) {
        .approach-image {
            float: none;
            width: 100%;
            max-width: 540px;
            margin: 0 auto 1.5rem auto;
            display: block;
        }
        .approach-intro {
            text-align: left;
        }
        .approach-img { max-height: 360px; }
        
        .approach-full {
            padding: 1rem;
            text-align: center;
        }
    }

    /* ----- DLACZEGO MY ----- */
    .features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .feature-card {
        background-color: white;
        border-radius: var(--border-radius-md);
        padding: 2.5rem;
        box-shadow: var(--shadow-md);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        overflow: hidden;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .feature-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 0;
        background-color: var(--primary-color);
        transition: height 0.3s ease;
    }

    .feature-card:hover::before {
        height: 100%;
    }

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.1),
            0 8px 16px rgba(0, 0, 0, 0.1),
            0 16px 32px rgba(0, 0, 0, 0.08);
    }

    .feature-card i {
        font-size: 2.8rem;
        color: var(--primary-color);
        margin-bottom: 1.5rem;
    }

    .feature-card h3 {
        color: var(--primary-color);
        margin-bottom: 1.2rem;
        font-weight: 600;
        text-wrap: balance;
        font-size: 2rem;
        line-height: 1.3;
    }

    .feature-card p {
        line-height: 1.6;
        margin-bottom: 0;
        font-size: 1.5rem;
    }

    /* ----- FAQ ----- */
    .faq-container {
        max-width: 900px;
        margin: 0 auto;
    }

    .faq-item {
        background-color: white;
        border-radius: var(--border-radius-md);
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-md);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        overflow: hidden;
        border-left: 4px solid transparent;
    }

    .faq-item:hover {
        transform: translateY(-3px);
    }

    .faq-item.active {
        border-left: 4px solid var(--primary-color);
    }

    .faq-question {
        padding: 2rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.3s ease;
    }

    .faq-question:hover {
        background-color: color-mix(in oklab, var(--primary-color) 5%, white);
    }

    .faq-item h3 {
        color: var(--primary-color);
        margin-bottom: 0;
        font-weight: 600;
        font-size: 2.2rem;
        text-wrap: balance;
        flex: 1;
        line-height: 1.3;
    }

    .faq-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background-color: var(--primary-lighter);
        color: var(--primary-color);
        transition: transform 0.3s ease, background-color 0.3s ease;
        margin-left: 1.5rem;
        flex-shrink: 0;
    }

    .faq-toggle i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .faq-item.active .faq-toggle {
        background-color: var(--primary-color);
        color: white;
    }

    .faq-item.active .faq-toggle i {
        transform: rotate(135deg);
    }

    .faq-answer {
        height: 0;
        padding: 0 2rem;
        overflow: hidden;
        transition: height 0.3s ease;
        opacity: 0;
    }

    .faq-item.active .faq-answer {
        height: auto;
        padding: 0 2rem 2rem;
        opacity: 1;
        transition: height 0.3s ease, opacity 0.3s ease 0.1s;
    }

    .faq-answer p {
        line-height: 1.6;
        margin: 0;
        font-size: 1.6rem;
        padding-top: 1rem;
    }

    .cta-subtext {
        font-size: 1.4rem;
        color: var(--gray-color);
        margin-top: 0.5rem;
    }

    /* ----- CTA ----- */
    .cta-container {
        text-align: center;
        margin: 3rem 0 1rem;
    }

    .cta-text {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: var(--primary-color);
        text-wrap: balance;
    }

    /* ----- LONGTAIL SECTIONS (onepager SEO) ----- */
    .service-longtail { margin: 3rem 0; }
    .service-longtail h2 {
        font-family: var(--heading-font);
        font-size: 2.4rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }
    .service-longtail h3 { font-size: 1.8rem; color: var(--primary-color); margin-top: 1.4rem; }
    .service-longtail p { margin: 0.6rem 0; }

    /* ----- KONTAKT ----- */
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr; /* tylko jedna kolumna, żeby kontener kafelków był pełnej szerokości */
        gap: var(--spacing-lg);
    }

    .contact-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 kafelki obok siebie */
        gap: var(--spacing-md);
        height: 100%;
    }

    .contact-item {
        background-color: white;
        padding: var(--spacing-md);
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-sm);
        text-align: center;
        transition: var(--transition-normal);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        aspect-ratio: auto; /* znosimy sztywne proporcje */
        height: 100%;
        min-height: 160px;
    }

    .contact-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

    .contact-item i {
        font-size: 2.8rem;
        color: var(--primary-color);
        margin-bottom: var(--spacing-sm);
    }

    .contact-item h3 {
        font-family: var(--heading-font);
        font-size: 1.8rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: var(--spacing-xs);
    }

    .contact-item p {
        margin: 0;
        line-height: 1.4;
    }

    /* usunięto mapę - style niepotrzebne */

    /* ----- FOOTER ----- */
    footer {
        background-color: var(--dark-color);
        color: var(--light-color);
        padding: var(--spacing-lg) 0 var(--spacing-sm);
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        align-items: flex-start;
        margin-bottom: var(--spacing-lg);
    }

    .footer-col h4 {
        font-family: var(--heading-font);
        font-weight: 700;
        font-size: 2rem;
        color: var(--accent-color);
        margin-bottom: var(--spacing-sm);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .footer-contact,
    .footer-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny po 4 linki */
        column-gap: var(--spacing-lg);
    }

    .footer-contact li,
    .footer-nav li {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0.8rem;
        font-size: 1.6rem;
    }

    .footer-contact li i {
        color: var(--accent-color);
        width: 22px;
        text-align: center;
    }

    .footer-nav li a {
        color: var(--light-color);
        opacity: 0.9;
        transition: var(--transition-normal);
    }

    .footer-nav li a:hover {
        color: var(--accent-color);
        opacity: 1;
    }

    .footer-divider {
        height: 4px;
        width: 60px;
        background-color: rgba(255, 255, 255, 0.25);
        margin: 0 auto var(--spacing-sm);
    }

    .footer-bottom {
        text-align: center;
        padding-top: var(--spacing-sm);
        opacity: 0.9;
    }

    @media screen and (max-width: 768px) {
        .footer-grid {
            grid-template-columns: 1fr;
        }

        .footer-nav {
            grid-template-columns: 1fr; /* 1 kolumna na mniejszych ekranach */
        }
    }

    /* ----- POWRÓT NA GÓRĘ ----- */
    .back-to-top {
        position: fixed;
        bottom: 3rem;
        right: 3rem;
        width: 5rem;
        height: 5rem;
        background-color: var(--primary-color);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        box-shadow: var(--shadow-md);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        z-index: 999;
    }

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background-color: var(--secondary-color);
    }
}

/* CTA wariant 1 */
.service-card--cta { display: block; text-decoration: none; color: inherit; }
.service-card--cta .service-cta {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-top: auto;
    justify-self: center; /* wyśrodkowanie w kafelku (grid item) */
    padding: .7rem 1.0rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    font-weight: 700;
    letter-spacing: .2px;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.service-card--cta:hover .service-cta i { transform: translateX(4px); }
.service-card--cta .service-cta i { transition: var(--transition-normal); }

@layer utilities {
    /* ----- ANIMACJE DLA ELEMENTÓW ----- */
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        animation-timeline: scroll();
        animation-range: entry 10% cover 30%;
    }

    .animate-on-scroll.animate {
        opacity: 1;
        transform: translateY(0);
    }

    /* Opóźnienie dla elementów */
    .stat-item:nth-child(1),
    .service-card:nth-child(1),
    .contact-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .stat-item:nth-child(2),
    .service-card:nth-child(2),
    .contact-item:nth-child(2) {
        transition-delay: 0.2s;
    }

    .stat-item:nth-child(3),
    .service-card:nth-child(3),
    .contact-item:nth-child(3) {
        transition-delay: 0.3s;
    }

    .service-card:nth-child(4),
    .contact-item:nth-child(4) {
        transition-delay: 0.4s;
    }
    
    /* Dostępność */
    @media (prefers-reduced-motion: reduce) {
        .animate-on-scroll {
            animation: none;
            transition: none;
        }
        
        .hero-content h1,
        .hero-content h2,
        .hero-content p,
        .hero-content .btn-primary {
            animation: none;
            opacity: 1;
            transform: none;
        }
        
        html {
            scroll-behavior: auto;
        }
    }
}

/* Dodaj fallback dla przeglądarek bez wsparcia dla subgrid */
@layer utilities {
    @supports not (grid-template-rows: subgrid) {
        .service-card {
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        
        .service-card-content {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }
        
        .service-footer {
            margin-top: auto;
        }
    }
}

/* Dodajemy style dla animacji zamykania FAQ */
.faq-item.closing .faq-answer {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.faq-item.closing .faq-toggle {
    background-color: var(--primary-lighter);
    color: var(--primary-color);
}

/* ----- MEDIA QUERIES ----- */
@layer utilities {


    @media screen and (max-width: 991px) {
        html {
            font-size: 55%;
        }
        
        .hero-content h1 {
            font-size: 3.8rem;
        }
        
        .hero-content h2 {
            font-size: 2.8rem;
        }
        
        .about-grid,
        .project-slide {
            grid-template-columns: 1fr;
            gap: var(--spacing-md);
        }
        
        .about-image {
            order: -1;
        }
        
        .contact-grid {
            grid-template-columns: 1fr;
            gap: var(--spacing-md);
        }
        
        .contact-info {
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
        }
        
        .contact-item {
            aspect-ratio: 1 / 1;
        }
    }

    @media screen and (max-width: 768px) {
        .menu-toggle {
            display: block;
        }
        
        .nav-menu {
            display: flex;
            position: fixed;
            top: 0;
            right: 0;
            height: auto;
            width: auto;
            max-width: 300px;
            background-color: rgba(30, 58, 138, 0.75);
            flex-direction: column;
            justify-content: flex-start;
            padding: 8rem 2rem 2rem;
            align-items: center;
            transform: translateX(100%);
            opacity: 0;
            visibility: hidden;
            transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
            z-index: 1000;
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
            border-radius: 0 0 0 10px;
            backdrop-filter: blur(5px);
        }
        
        .nav-menu.active {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
            transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear;
        }
        
        .nav-link {
            color: white !important;
            font-size: 1.8rem;
            padding: 0.8rem 1.5rem;
            margin: 0.4rem 0;
            width: 100%;
            text-align: center;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--accent-color) !important;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }
        
        /* Dodatkowe style dla menu mobilnego */
        body.menu-open {
            overflow: hidden;
        }
        
        .menu-toggle {
            position: relative;
            z-index: 1001;
            background: transparent;
            border: none;
            outline: none;
            padding: 10px;
            cursor: pointer;
        }
        
        .menu-toggle:hover {
            color: var(--accent-color);
        }
        
        /* Overlay dla menu mobilnego */
        .menu-overlay {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0s linear 0.3s;
        }

        .menu-overlay.active {
            opacity: 1;
            visibility: visible;
            transition: opacity 0.3s ease, visibility 0s linear;
        }
        
        /* Pozostałe style dla widoku mobilnego */
        .stats,
        .contact-info {
            grid-template-columns: 1fr;
            grid-template-rows: auto;
        }
        
        .contact-item {
            aspect-ratio: auto;
            padding: var(--spacing-sm);
            height: auto;
            min-height: 150px;
        }
        
        .hero-content h1 {
            font-size: 3.0rem;
        }
        
        .hero-content h2 {
            font-size: 2.4rem;
        }
        
        .section-header h2 {
            font-size: 3rem;
        }
        
        .features-grid {
            grid-template-columns: 1fr;
        }
        
        .feature-card, .faq-item {
            padding: 1.5rem;
        }
        
        .faq-question {
            padding: 1.5rem;
        }
        
        .faq-item h3 {
            font-size: 1.8rem;
        }
        
        .approach-container {
            padding: 1rem;
            flex-direction: column;
            align-items: center;
        }
        
        .approach-intro {
            order: 2;
            width: 100%;
            max-width: 100%;
        }
        
        .approach-image {
            order: 1;
            width: 100%;
            max-width: 500px;
        }
        
        .approach-full {
            padding: 1rem;
            text-align: center;
        }
    }

    @media screen and (max-width: 576px) {
        .hero-content h1 {
            font-size: 2.5rem;
        }
        
        .hero-content h2 {
            font-size: 2.2rem;
        }
        
        .footer-content {
            flex-direction: column;
            gap: var(--spacing-sm);
            text-align: center;
        }
        
        /* Style dla sekcji wyboru podstron na bardzo małych ekranach */
        .page-option-content h2 {
            font-size: 1.5rem; /* Jeszcze mniejsza czcionka */
        }
        
        .page-option-btn {
            padding: 0.5rem 1rem; /* Jeszcze mniejszy przycisk */
            font-size: 1rem;
        }
        
        .approach-container {
            padding: 0.5rem;
        }
        
        .approach-full {
            padding: 0.5rem;
            text-align: center;
        }
    }
} 