/* ----- Import Fontów (Poppins) ----- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ----- CSS Variables (Motyw Jasny - Domyślny) ----- */
:root {
    --primary-color: #007aff; /* Żywy niebieski */
    --primary-color-darker: #005ecb;
    --secondary-color: #ff9500; /* Pomarańczowy akcent */
    --text-color: #2c2c2e; /* Ciemny szary tekst */
    --text-color-light: #636366; /* Jaśniejszy szary */
    --bg-color: #f2f2f7; /* Bardzo jasne tło */
    --card-bg-color: #ffffff;
    --border-color: #e5e5ea;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-hover: rgba(0, 0, 0, 0.15);

    --font-family: 'Poppins', sans-serif;
    --header-height: 70px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* ----- CSS Variables (Motyw Ciemny) ----- */
body.dark-mode {
    --text-color: #f2f2f7;
    --text-color-light: #aeaeb2;
    --bg-color: #1c1c1e; /* Ciemne tło */
    --card-bg-color: #2c2c2e; /* Tło karty w trybie ciemnym */
    --border-color: #3a3a3c;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --shadow-color-hover: rgba(0, 0, 0, 0.3);
    /* Kolory akcentów mogą pozostać te same lub zostać lekko rozjaśnione */
    --primary-color: #0a84ff;
    --primary-color-darker: #007aff;
    --secondary-color: #ff9f0a;
}

/* ----- Podstawowy Reset i Ustawienia Globalne ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px; /* Jeszcze szerszy kontener */
    margin: 0 auto;
    padding: 0 25px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color-darker);
    text-decoration: none; /* Usunięcie podkreślenia na hover */
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Usuwa potencjalny odstęp pod obrazkiem */
}

/* ----- Animacje On-Scroll (prosty przykład) ----- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Nagłówek ----- */
header {
    background: var(--card-bg-color);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

header #logo {
    font-size: 1.7rem;
    font-weight: 700;
}

header #logo a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}
/* Można dodać SVG logo */
/* header #logo img { height: 40px; margin-right: 10px; } */

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 35px; /* Większy odstęp */
}

header nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 0; /* Padding tylko góra/dół dla animowanego podkreślenia */
    font-weight: 500;
    position: relative;
    transition: color var(--transition-speed) ease;
}

header nav ul li a::after { /* Animowane podkreślenie */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: var(--primary-color);
}

header nav ul li a:hover::after,
header nav ul li a.active::after {
    width: 100%;
}

/* ----- Przycisk mobilnego menu ----- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
}

/* ----- Nawigacja Okruszkowa ----- */
.breadcrumbs-wrapper {
     background-color: transparent; /* Bez tła, tylko odstęp */
     padding: 1.5rem 0; /* Większy odstęp */
     margin-bottom: 2.5rem;
     border-bottom: 1px solid var(--border-color);
}

.breadcrumbs {
    list-style: none;
    padding: 0;
    font-size: 0.95em;
    color: var(--text-color-light);
}

.breadcrumbs li {
    display: inline;
}

.breadcrumbs li+li:before {
    content: "/";
    padding: 0 10px; /* Większy odstęp separatora */
    color: var(--text-color-light);
    opacity: 0.7;
}

.breadcrumbs li a {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumbs li a:hover {
    text-decoration: underline;
}

/* ----- Główna Treść ----- */
main {
    flex-grow: 1;
    background: var(--bg-color);
    padding: 3rem 0; /* Większy padding */
    transition: background-color var(--transition-speed) ease;
}

section {
    margin-bottom: 4rem; /* Większy margines między sekcjami */
    padding: 2rem 0;
}

main h1, main h2, main h3, main h4 {
    font-weight: 600; /* Lżejsza waga dla nagłówków */
    line-height: 1.3;
    color: var(--text-color);
}

main h1 {
    font-size: 2.8rem; /* Duży H1 */
    margin-bottom: 1.5rem;
    font-weight: 700; /* Najważniejszy nagłówek może być grubszy */
    color: var(--primary-color); /* H1 w kolorze akcentu */
}

main h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block; /* Aby border był tylko pod tekstem */
}

main h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color); /* H3 w głównym kolorze tekstu */
}

main p {
    margin-bottom: 1.3rem;
    color: var(--text-color-light);
    font-size: 1.05rem; /* Lekko większy font dla paragrafów */
    max-width: 75ch; /* Lepsza czytelność */
}

main ul, main ol {
    margin-left: 20px;
    margin-bottom: 1.3rem;
    padding-left: 20px;
    color: var(--text-color-light);
}

main ul li, main ol li {
    margin-bottom: 0.8rem;
    padding-left: 10px; /* Wcięcie dla punktora */
    position: relative;
}

main ul li::before { /* Custom bullet point */
    content: '';
    position: absolute;
    left: -5px;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* ----- Hero Section (Homepage) ----- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('placeholder-hero.jpg') no-repeat center center/cover; /* Placeholder - ZMIEŃ OBRAZEK */
    color: #ffffff;
    padding: 8rem 0;
    text-align: center;
    margin-bottom: 4rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius); /* Zaokrąglenie na dole */
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    border-bottom: none; /* Usunięcie bordera dla H1 w hero */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.3rem;
    color: #f2f2f7;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    opacity: 0.9;
}

/* ----- Feature / Service Cards ----- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; /* Większy odstęp */
}

.card {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color-hover);
}

.card .icon { /* Placeholder dla ikony */
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    /* display: inline-block; */
}

.card h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.card p {
    color: var(--text-color-light);
    font-size: 1rem;
    margin-bottom: 1.5rem; /* Odstęp przed przyciskiem/linkiem */
    max-width: none; /* Reset max-width dla kart */
    text-align: left;
}

.card a.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}
.card a.read-more::after {
    content: '→';
    position: absolute;
    left: 100%;
    margin-left: 5px;
    transition: transform var(--transition-speed) ease;
}
.card a.read-more:hover::after {
    transform: translateX(5px);
}

/* ----- Case Study ----- */
.case-study {
    background-color: var(--card-bg-color);
    padding: 35px; /* Więcej paddingu */
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color); /* Akcent po lewej */
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.case-study:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-color-hover);
}

.case-study h3 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
}

.case-study strong {
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}
.case-study .korzysci-case span {
    font-weight: 700;
    color: var(--secondary-color); /* Użycie koloru akcentu */
    font-size: 1.1rem;
}

/* ----- Etapy Audytu (Timeline Style) ----- */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before { /* Linia czasowa */
    content: '';
    position: absolute;
    left: 20px; /* Pozycja linii */
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    padding-left: 60px; /* Odstęp od linii */
    margin-bottom: 3rem;
}

.timeline-item::before { /* Kropka na linii */
    content: '';
    position: absolute;
    left: 10px; /* Wyśrodkowanie kropki na linii */
    top: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color); /* Otoczka dla lepszego wyglądu */
    z-index: 1;
}

.timeline-item h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: var(--primary-color);
}

/* ----- Przyciski CTA ----- */
.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 14px 30px; /* Większy padding */
    text-decoration: none;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3); /* Delikatny cień w kolorze przycisku */
}

.cta-button:hover {
    background-color: var(--primary-color-darker);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.4);
}

.cta-button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}


/* ----- Formularz Kontaktowy ----- */
.contact-columns {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Formularz szerszy */
    gap: 3rem;
    align-items: start; /* Wyrównanie do góry */
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color-light);
    font-size: 0.9rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 14px 18px; /* Większy padding w polach */
    margin-bottom: 1.5rem; /* Większy odstęp */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--card-bg-color); /* Tło pola jak karty */
    color: var(--text-color);
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15); /* Delikatny focus glow */
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}
.contact-form .consent-label { /* Specjalny styl dla etykiety zgody */
    display: inline;
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-left: 5px;
}

/* ----- Dane Kontaktowe ----- */
.contact-details {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.contact-details h2 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none; /* Usuń border dla H2 w tym bloku */
}
.contact-details p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
    max-width: none;
}
 .contact-details strong {
    min-width: auto; /* Reset min-width */
    display: inline; /* Etykieta w linii */
    font-weight: 600;
    color: var(--text-color);
    margin-right: 8px;
}
#map {
    height: 250px;
    background: var(--border-color); /* Prosty placeholder */
    margin-top: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-light);
    font-style: italic;
    overflow: hidden; /* Na wypadek osadzenia iframe */
}

/* ----- Stopka ----- */
footer {
    background: var(--text-color); /* Ciemniejsza stopka */
    color: var(--bg-color); /* Jaśniejszy tekst w stopce */
    padding: 3rem 0;
    margin-top: auto;
    font-size: 0.95em;
    border-top: 3px solid var(--primary-color);
}
footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
footer p {
    margin: 0;
    color: var(--text-color-light); /* Szary tekst w stopce */
}
footer a {
    color: #ffffff; /* Biały dla linków w stopce */
    font-weight: 500;
}
footer a:hover {
    color: var(--primary-color);
}
.footer-links a {
    margin-left: 15px;
}

/* ----- Przycisk Dark Mode ----- */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem; /* Rozmiar ikony */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 1001;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, transform 0.2s ease;
}
.dark-mode-toggle:hover {
    transform: scale(1.1);
}


/* ----- Responsywność ----- */

@media (max-width: 991.98px) {
    html { font-size: 15px; } /* Dostosowanie bazowego rozmiaru fontu */
    main h1 { font-size: 2.5rem; }
    main h2 { font-size: 1.8rem; }
    .hero-section h1 { font-size: 3rem; }
    .hero-section p { font-size: 1.2rem; }
    .contact-columns { grid-template-columns: 1fr; } /* Kolumny pod sobą */
    .timeline::before { left: 15px; } /* Linia bliżej krawędzi */
    .timeline-item { padding-left: 50px; }
    .timeline-item::before { left: 5px; }
}

@media (max-width: 767.98px) {
    html { font-size: 14px; }
    header { height: auto; min-height: 60px; padding: 10px 0; }
    header .container { flex-wrap: wrap; }
    header nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        background-color: var(--card-bg-color); /* Tło dla mobilnego menu */
        box-shadow: 0 5px 10px var(--shadow-color);
        position: absolute;
        top: 100%; /* Pod nagłówkiem */
        left: 0;
        border-top: 1px solid var(--border-color);
    }
    header nav.active {
        max-height: 80vh; /* Wysokość menu */
        overflow-y: auto; /* Scroll jeśli potrzeba */
    }
    header nav ul {
        flex-direction: column;
        padding: 1rem 0;
    }
    header nav ul li {
        margin-left: 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
     header nav ul li:last-child {
        border-bottom: none;
     }
    header nav ul li a {
        display: block; /* Link na całą szerokość */
        padding: 15px 20px;
    }
    header nav ul li a::after { display: none; } /* Ukryj animowane podkreślenie w mobile */
    .menu-toggle { display: block; }

    main { padding: 2rem 0; }
    main h1 { font-size: 2.2rem; }
    main h2 { font-size: 1.6rem; }
    .hero-section { padding: 6rem 0; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.1rem; }
    .card-grid { gap: 1.5rem; }
    footer .container { justify-content: center; text-align: center; }
    .footer-links { margin-top: 1rem; }
    .footer-links a { margin: 0 10px; }
}

@media (max-width: 575.98px) {
    .container { padding: 0 15px; }
    main h1 { font-size: 2rem; }
    main h2 { font-size: 1.5rem; }
    .cta-button { padding: 12px 25px; font-size: 0.9rem; }
    .hero-section { padding: 5rem 0; }
     .hero-section h1 { font-size: 2.2rem; }
    .timeline::before { left: 10px; }
    .timeline-item { padding-left: 40px; }
    .timeline-item::before { width: 15px; height: 15px; left: 2.5px; }
}