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

:root {
    --primary: #3730A3;
    --primary-light: #4F46E5;
    --primary-dark: #312E81;
    --secondary: #047857;
    --secondary-light: #10B981;
    --secondary-dark: #065F46;
    --accent: #D97706;
    --dark: #111827;
    --gray: #4B5563;
    --gray-light: #6B7280;
    --light-gray: #F3F4F6;
    --white: #FFFFFF;
    --focus-ring: #2563EB;
    --error: #DC2626;
    --success: #059669;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --primary: #1e1b4b;
        --secondary: #022c22;
        --dark: #000000;
        --gray: #1f2937;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(96px + env(safe-area-inset-top, 0px));
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--white);
    font-size: 1rem;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
}

*:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

/* Tylko główny pasek nawigacji — NIE wszystkie <header> (sekcje mają <header class="section-header">) */
header[role="banner"] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 12px 0;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

header[role="banner"] .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo:hover, .logo:focus {
    color: var(--primary-dark);
}

.logo span {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.mobile-menu-btn[aria-expanded="true"] .menu-text {
    display: none;
}

.mobile-menu-btn[aria-expanded="true"]::after {
    content: "Zamknij";
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover, .main-nav a:focus {
    background: var(--light-gray);
    color: var(--primary);
}

.main-nav a[aria-current="page"] {
    background: var(--primary);
    color: var(--white);
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: pointer;
    border: none;
    min-height: 48px;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(55, 48, 163, 0.35);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(55, 48, 163, 0.45);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.35);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--secondary-dark);
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover, .btn-outline:focus {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: 12px;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-wrapper {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 16px;
        border-top: 1px solid var(--light-gray);
        margin-top: 12px;
    }

    .nav-wrapper.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 14px 16px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn {
        width: 100%;
    }
}

main {
    padding-top: calc(96px + env(safe-area-inset-top, 0px));
    position: relative;
    z-index: 0;
}


.page-header {
    padding: clamp(60px, 10vw, 100px) 0 clamp(40px, 6vw, 60px);
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
}

.page-header .lead {
    font-size: clamp(17px, 2.5vw, 20px);
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-section {
    padding: clamp(40px, 6vw, 80px) 0;
}

.content-section.alt-bg {
    background: var(--light-gray);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--dark);
    margin: 40px 0 20px;
}

.content-wrapper h2:first-child {
    margin-top: 0;
}

.content-wrapper h3 {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: var(--dark);
    margin: 32px 0 16px;
}

.content-wrapper p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 16px;
}

.content-wrapper ul, .content-wrapper ol {
    margin: 16px 0 24px 24px;
    color: var(--gray);
}

.content-wrapper li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.content-wrapper a {
    color: var(--primary);
    text-decoration: underline;
}

.content-wrapper a:hover {
    color: var(--primary-dark);
}

.info-card {
    background: var(--white);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 40px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
}

.info-card.green {
    border-left-color: var(--secondary);
}

.info-card h3 {
    margin-top: 0;
    color: var(--dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.contact-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

.contact-card .icon {
    width: 64px;
    height: 64px;
    background: rgba(55, 48, 163, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.contact-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.contact-card p {
    color: var(--gray);
    margin-bottom: 0;
}

.contact-card a {
    color: var(--primary);
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.feature-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    background: rgba(55, 48, 163, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.feature-card.green .icon {
    background: rgba(4, 120, 87, 0.1);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.65;
    margin: 0;
}

.steps-list {
    counter-reset: step;
    list-style: none;
    margin: 40px 0;
    padding: 0;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding-left: 70px;
    margin-bottom: 32px;
    min-height: 50px;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.steps-list li h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.steps-list li p {
    color: var(--gray);
    margin: 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.partner-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--light-gray);
}

.partner-card .category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 8px;
}

.partner-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.partner-card p {
    font-size: 14px;
    color: var(--gray);
    margin: 0;
}

.cta-banner {
    background: var(--primary);
    color: var(--white);
    padding: clamp(40px, 6vw, 60px);
    border-radius: 20px;
    text-align: center;
    margin: 60px 0;
}

.cta-banner h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--white);
}

.cta-banner p {
    font-size: 18px;
    margin-bottom: 24px;
    opacity: 0.95;
    color: var(--white);
}

.cta-banner .btn {
    background: var(--white);
    color: var(--primary);
}

.cta-banner .btn:hover {
    background: var(--light-gray);
}

footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    line-height: 1.7;
    max-width: 320px;
}

@media (max-width: 600px) {
    .footer-brand p {
        max-width: none;
    }
}

.footer-column h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover, .footer-column a:focus {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

@media print {
    header[role="banner"], .skip-link, .nav-buttons, .cta-banner {
        display: none;
    }

    main {
        padding-top: 0;
    }

    .page-header {
        padding: 20px 0;
    }

    .content-section {
        padding: 20px 0;
    }

    .btn {
        border: 1px solid var(--dark);
    }
}
