/* ==========================================================================
   Step-Kop - style.css
   Warstwa na Bootstrapie 5. Bootstrap daje siatke i komponenty, tutaj jest
   caly wyglad marki.

   REGULA KOLORU - jedyna rzecz, ktora trzeba tu zrozumiec:
   zolty (#F5C518) ma na bialym kontrast 1.6:1, czyli jest nieczytelny.
   Dlatego zolty pojawia sie WYLACZNIE na grafitowym tle (11.08:1) albo jako
   tlo markera pod ciemnym tekstem. Za wszystko, co jest akcja na bialym,
   odpowiada czerwony (5.2:1). Lamiac te regule psuje sie dostepnosc strony,
   wiec przy dokladaniu nowych elementow warto ja sprawdzic.
   ========================================================================== */

:root {
    /* Baza */
    --graphite:      #16181D;   /* topbar, stopka, ciemne sekcje, naglowki */
    --graphite-soft: #23262E;   /* karty i kafelki na ciemnym tle */
    --graphite-line: #313640;   /* obramowania na ciemnym */

    /* Marka */
    --brand-yellow:  #F5C518;   /* TYLKO na ciemnym tle lub jako tlo markera */
    --brand-yellow-d:#D9AD0B;   /* hover zoltego */

    /* Akcja */
    --action-red:    #D6202B;   /* przyciski, aktywne stany, checkmarki */
    --action-red-d:  #B31721;   /* hover */
    --action-red-sf: #FDECEE;   /* delikatne tlo pod ikone/badge */

    /* Tekst i tla */
    --text:          #2B2F36;
    --text-muted:    #5C6470;
    --text-on-dark:  #A8AEB8;
    --light-bg:      #F4F5F7;
    --card-line:     #E6E8EC;

    /* Ksztalt */
    --radius:        14px;
    --radius-sm:     10px;
    --radius-pill:   999px;
    --shadow-sm:     0 2px 8px rgba(22, 24, 29, 0.06);
    --shadow:        0 10px 30px rgba(22, 24, 29, 0.08);
    --shadow-lg:     0 24px 60px rgba(22, 24, 29, 0.16);
    --ring:          0 0 0 3px rgba(214, 32, 43, 0.25);
}

/* ==========================================================================
   Baza
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    /* AOS nadaje elementom fade-left/fade-right transform: translate3d(±100px,0,0)
       ZANIM je wanimuje. Na waskim ekranie kolumny sa pelnej szerokosci, wiec te
       100px wychodzi poza prawa krawedz i przegladarka mobilna pozwala przewinac
       strone w bok. overflow-x na samym <body> tego nie zatrzymuje - dokument
       nadal sie rozciaga.

       Swiadomie 'clip', a nie 'hidden': hidden zrobilby z <html> kontener
       przewijania i zepsul sticky header. clip tylko przycina. */
    overflow-x: clip;
}

/* Sticky header nie moze zaslaniac celu kotwicy */
[id] { scroll-margin-top: 96px; }

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: #fff;
    /* Bez overflow-x. Przycinaniem zajmuje sie <html> (overflow-x: clip).
       Gdyby body mialo tu 'hidden', staloby sie kontenerem przewijania -
       a wtedy sticky header przykleja sie do niego zamiast do viewportu
       i odjezdza razem z trescia. */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--graphite);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

a { color: var(--action-red); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--action-red-d); }

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

:focus-visible {
    outline: 3px solid var(--action-red);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* Widoczny dopiero po zlapaniu focusu klawiatura */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--graphite);
    color: var(--brand-yellow);
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: var(--brand-yellow); }

/* ==========================================================================
   Uklad sekcji
   ========================================================================== */

.shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.section        { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--light { background: var(--light-bg); }
.section--dark  { background: var(--graphite); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--text-on-dark); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.is-left { margin-left: 0; text-align: left; }

.eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--action-red);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.section--dark .eyebrow { color: var(--brand-yellow); }

.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0; }

.section-head p {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: 1.08rem;
}

/* Marker: jedyne miejsce, gdzie zolty ma prawo dotknac bialego tla - lezy
   POD ciemnym tekstem, wiec kontrast liczy sie od tekstu, nie od zoltego. */
.mark {
    background-image: linear-gradient(transparent 58%, var(--brand-yellow) 58%, var(--brand-yellow) 94%, transparent 94%);
    padding: 0 .06em;
    /* Marker rozbity na dwie linie wyglada jak blad druku - fraza albo miesci sie
       w calosci, albo w calosci schodzi nizej. Przy najmniejszym rozmiarze z clamp()
       "roboty ziemne" ma ok. 235px, wiec miesci sie nawet na 320px ekranie. */
    white-space: nowrap;
}

/* ==========================================================================
   Przyciski
   ========================================================================== */

.btn-cta, .btn-ghost, .btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease,
                transform .2s ease, box-shadow .2s ease;
}

.btn-cta {
    background: var(--action-red);
    border-color: var(--action-red);
    color: #fff;
    box-shadow: 0 6px 18px rgba(214, 32, 43, .28);
}
.btn-cta:hover {
    background: var(--action-red-d);
    border-color: var(--action-red-d);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(214, 32, 43, .36);
}

.btn-ghost {
    background: #fff;
    border-color: var(--card-line);
    color: var(--graphite);
}
.btn-ghost:hover {
    border-color: var(--graphite);
    color: var(--graphite);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: var(--graphite);
}
.btn-dark:hover {
    background: var(--brand-yellow-d);
    border-color: var(--brand-yellow-d);
    color: var(--graphite);
    transform: translateY(-2px);
}

.btn-sm { padding: 11px 22px; font-size: .94rem; }

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
    background: var(--graphite);
    color: var(--text-on-dark);
    font-size: .84rem;
    padding: 9px 0;
}

.topbar .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-tag {
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    font-size: .74rem;
}

.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-area { color: var(--text-on-dark); }

.topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-yellow);
    font-weight: 700;
    white-space: nowrap;
}
.topbar-phone:hover { color: #fff; }

@media (max-width: 991px) {
    .topbar-tag, .topbar-area { display: none; }
    .topbar .shell { justify-content: center; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--card-line);
    padding: 0;
}
.site-nav.is-stuck { box-shadow: var(--shadow-sm); }

.site-nav .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 58px; width: auto; display: block; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li > a,
.nav-toggle-sub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    font-size: .98rem;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.nav-links > li > a:hover,
.nav-toggle-sub:hover,
.nav-links > li > a[aria-current="page"] {
    color: var(--action-red);
    background: var(--action-red-sf);
}

/* Rozwijane Uslugi */
.nav-has-sub { position: relative; }

.nav-sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 290px;
    padding: 10px;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.nav-has-sub:hover .nav-sub,
.nav-has-sub:focus-within .nav-sub,
.nav-sub.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-sub a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: .95rem;
    font-weight: 500;
}
.nav-sub a:hover { background: var(--light-bg); color: var(--action-red); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

/* Obie ikony siedza w DOM na stale, a widocznosc przelacza aria-expanded.
   Podmiana innerHTML odpinala kliknieta ikone od drzewa i globalny handler
   "klikniecie poza menu" traktowal wtedy wlasne klikniecie w burgera jako
   zewnetrzne, zamykajac menu w tej samej klatce, w ktorej sie otwieralo. */
.nav-burger [data-icon="close"] { display: none; }
.nav-burger[aria-expanded="true"] [data-icon="open"]  { display: none; }
.nav-burger[aria-expanded="true"] [data-icon="close"] { display: inline; }

.nav-burger {
    display: none;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--card-line);
    border-radius: var(--radius-sm);
    color: var(--graphite);
    font-size: 1.25rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .site-nav .shell { min-height: 70px; }
    .brand img { height: 48px; }
    .nav-burger { display: inline-flex; }
    .nav-cta .btn-cta { display: none; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px 20px 22px;
        background: #fff;
        border-bottom: 1px solid var(--card-line);
        box-shadow: var(--shadow);
        display: none;
    }
    .nav-links.is-open { display: flex; }

    .nav-links > li > a, .nav-toggle-sub { width: 100%; padding: 13px 14px; }

    .nav-sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--card-line);
        border-radius: 0;
        margin: 2px 0 6px 14px;
        padding: 0 0 0 8px;
        display: none;
        min-width: 0;
    }
    .nav-sub.is-open { display: block; }

    .nav-mobile-cta { display: block !important; margin-top: 12px; }
}

.nav-mobile-cta { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: 84px 0 92px; background: #fff; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.35rem);
    margin: 0 0 22px;
}

.hero-lead {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin: 0 0 32px;
    max-width: 34em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }

.hero-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    color: var(--text-muted);
    font-size: .9rem;
}
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note i { color: var(--action-red); }

.hero-media {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Plakietka na zdjeciu - zolte na grafitowym, zgodnie z regula koloru */
.hero-badge {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-radius: var(--radius-pill);
    background: rgba(22, 24, 29, .88);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
}
.hero-badge i { color: var(--brand-yellow); }

@media (max-width: 991px) {
    .hero { padding: 56px 0 64px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-media { aspect-ratio: 16 / 10; }
}

/* ==========================================================================
   Pasek liczb
   ========================================================================== */

.stats { background: var(--graphite); padding: 44px 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat { padding: 0 8px; border-left: 1px solid var(--graphite-line); padding-left: 24px; }
.stat:first-child { border-left: 0; padding-left: 8px; }

.stat-num {
    display: block;
    color: var(--brand-yellow);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.stat-label { color: var(--text-on-dark); font-size: .92rem; }

@media (max-width: 767px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .stat:nth-child(odd) { border-left: 0; padding-left: 8px; }
}

/* ==========================================================================
   Karty (problemy, uslugi)
   ========================================================================== */

.card-grid { display: grid; gap: 24px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.tile {
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tile h3 { font-size: 1.12rem; margin: 0 0 10px; }
.tile p  { margin: 0; color: var(--text-muted); font-size: .96rem; }

a.tile { color: inherit; }
a.tile:hover, .tile--hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: #D8DCE2;
}

/* Ikona w kafelku problemu - czerwona na bladoczerwonym */
.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    background: var(--action-red-sf);
    color: var(--action-red);
    font-size: 1.2rem;
}

/* Ikona uslugi - zolta na graficie, mocniejszy akcent marki */
.tile-icon--brand { background: var(--graphite); color: var(--brand-yellow); }

/* Wariant wysrodkowany - dla kafelkow z krotka trescia (sekcja "problemy").
   text-align wystarczy na naglowek i akapit, ale nie na ikone: .tile-icon jest
   elementem flex, wiec text-align jej nie dotyczy - stad marginesy auto.
   Karty uslug zostaja do lewej: maja wiecej tekstu i link wyrownany do dolu. */
.tile--center { text-align: center; }
.tile--center .tile-icon { margin-left: auto; margin-right: auto; }
/* .tile-link jest elementem flex rozciagnietym na szerokosc karty, wiec text-align
   go nie ruszy - tresc ustawia dopiero jego wlasne justify-content. Margines gorny
   zostaje na auto, zeby strzalki nadal rownaly sie do dolu mimo roznej dlugosci tytulow. */
.tile--center .tile-link { justify-content: center; }

.tile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* auto zamiast stalej wartosci: tytuly lamia sie na rozna liczbe linii,
       a strzalki maja stac w jednym rzedzie na dole kart */
    margin-top: auto;
    padding-top: 18px;
    color: var(--action-red);
    font-weight: 600;
    font-size: .94rem;
}
a.tile:hover .tile-link { gap: 12px; }
.tile-link i { transition: transform .2s ease; }

/* Lista pozostalych uslug pod gridem */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 1px solid var(--card-line);
    color: var(--text);
    font-size: .92rem;
    font-weight: 500;
}
.chip i { color: var(--action-red); font-size: .82rem; }

@media (max-width: 991px) {
    .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Blok naprzemienny: tekst + zdjecie
   ========================================================================== */

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 96px; }

/* Odwrocenie kolejnosci bez ruszania HTML-a - kolejnosc czytania zostaje ta sama */
.feature.is-flipped .feature-media { order: -1; }

.feature h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin: 0 0 18px; }
.feature p  { color: var(--text-muted); margin: 0 0 26px; }

.check-list { list-style: none; margin: 0 0 30px; padding: 0; }
.check-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 13px;
    color: var(--text);
}
.check-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--action-red);
    font-size: .9rem;
}
.section--dark .check-list li { color: #fff; }
.section--dark .check-list li::before { color: var(--brand-yellow); }

.feature-media {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 991px) {
    .feature { grid-template-columns: 1fr; gap: 34px; }
    .feature + .feature { margin-top: 64px; }
    .feature.is-flipped .feature-media { order: 0; }
}

/* ==========================================================================
   Tabela porownawcza
   ========================================================================== */

.compare {
    width: 100%;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    overflow: hidden;
    border-collapse: collapse;
}

.compare th, .compare td {
    padding: 20px 24px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--card-line);
    font-size: .96rem;
}
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

.compare thead th { font-size: 1.02rem; font-weight: 700; padding-top: 24px; padding-bottom: 24px; }
.compare tbody th { font-weight: 600; color: var(--graphite); width: 26%; }
.compare td { color: var(--text-muted); width: 37%; }

/* Kolumna Step-Kop podswietlona zoltym - ciemny tekst na jasnym tle */
.compare .col-us { background: #FFFCEF; color: var(--text); }
.compare thead .col-us { color: var(--graphite); }
.compare .col-us::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--action-red);
    margin-right: 10px;
    font-size: .84rem;
}
.compare thead .col-us::before { content: none; }

.compare .col-them::before {
    content: "\f068";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #B9BFC8;
    margin-right: 10px;
    font-size: .74rem;
}

.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 767px) {
    .compare { min-width: 640px; }
    .compare th, .compare td { padding: 16px 18px; font-size: .9rem; }
}

/* ==========================================================================
   Proces 01-02-03
   ========================================================================== */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
}

.step { text-align: center; position: relative; }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--graphite);
    color: var(--brand-yellow);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

/* Kreska laczaca kroki - tylko miedzy nimi, nie za ostatnim */
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 33px;
    left: calc(50% + 48px);
    width: calc(100% - 96px);
    height: 1px;
    background: var(--card-line);
}

.step h3 { font-size: 1.1rem; margin: 0 0 10px; }
.step p  { color: var(--text-muted); margin: 0; font-size: .96rem; }

@media (max-width: 767px) {
    .steps { grid-template-columns: 1fr; gap: 36px; }
    .step:not(:last-child)::after { display: none; }
}

/* ==========================================================================
   Obszar dzialania
   ========================================================================== */

.area-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.area-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--graphite-soft);
    border: 1px solid var(--graphite-line);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    transition: border-color .2s ease, transform .2s ease;
}
.area-item:hover { border-color: var(--brand-yellow); transform: translateY(-3px); }
.area-item i { color: var(--brand-yellow); }

@media (max-width: 767px) { .area-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .area-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Galeria realizacji - przeniesiona z LBM i przemalowana
   ========================================================================== */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.gallery-tile {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-tile:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform .4s ease;
}
.gallery-tile:hover .gallery-img { transform: scale(1.04); }

/* Tagi kategorii na zdjeciu */
.gallery-tags {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100% - 24px);
    pointer-events: none;   /* klikniecie gdziekolwiek na kafelku otwiera lightbox */
}

.gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    background: var(--cat-color, var(--graphite));
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.gallery-tag i { font-size: .7rem; }

/* Podpis pod zdjeciem */
.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 18px 16px;
    background: linear-gradient(transparent, rgba(22, 24, 29, .88));
    color: #fff;
    font-weight: 600;
    font-size: .96rem;
    pointer-events: none;
}

@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-tag { font-size: .66rem; padding: 3px 9px; }
}

/* Filtry kategorii */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 1px solid var(--card-line);
    color: var(--text);
    font-size: .93rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.gallery-filter:hover, .gallery-filter:focus-visible { border-color: var(--graphite); }
.gallery-filter.is-active {
    background: var(--cat-color, var(--graphite));
    border-color: var(--cat-color, var(--graphite));
    color: #fff;
}
.gallery-filter.is-active i { color: #fff; }
.gallery-filter i { color: var(--cat-color, var(--text-muted)); font-size: .85rem; }

/* "Wszystkie" na zolto - ciemny tekst, bo bialy na zoltym to 1.6:1 */
.gallery-filter-all.is-active {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: var(--graphite);
}
.gallery-filter-all.is-active i,
.gallery-filter-all.is-active .gallery-filter-count { color: var(--graphite); }

.gallery-filter-count {
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: rgba(22, 24, 29, .08);
    font-size: .78rem;
    font-weight: 700;
}
.gallery-filter.is-active .gallery-filter-count { background: rgba(255, 255, 255, .22); }

.gallery-empty {
    margin: 40px 0 0;
    text-align: center;
    color: var(--text-muted);
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 14, .93);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
#lightbox.active { display: flex; }

#lightbox-frame { position: relative; line-height: 0; animation: zoomIn .25s ease; }

#lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(0, 0, 0, .8);
    display: block;
}

#lightbox-tags { top: 16px; right: 16px; }
#lightbox-tags .gallery-tag { font-size: .82rem; padding: 6px 14px; }

#lightbox-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    /* To jest <p>, a Bootstrap daje kazdemu akapitowi margin-bottom: 1rem.
       Przy bottom: 0 ten margines odpychal podpis o 16px w gore, przez co pod
       gradientem zostawal pasek golego zdjecia, a zaokraglone rogi podpisu nie
       trafialy w rogi fotki. Zerujemy margines - podpis siada na krawedzi. */
    margin: 0;
    padding: 38px 24px 18px;
    /* Gradient trzyma sie dolu zamiast rozmywac sie przez cala wysokosc:
       do 35% praktycznie przezroczysty, nizej szybko dochodzi do pelnego krycia. */
    background: linear-gradient(to bottom,
        rgba(10, 11, 14, 0) 0%,
        rgba(10, 11, 14, .45) 35%,
        rgba(10, 11, 14, .92) 100%);
    border-radius: 0 0 var(--radius) var(--radius);
    color: #fff;
    font-weight: 600;
    line-height: 1.5;
}

#lightbox-close {
    position: fixed;
    top: 18px;
    right: 26px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    font-size: 2.2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 2;   /* zeby tag nigdy nie wjechal pod krzyzyk */
    transition: color .2s;
}
#lightbox-close:hover { color: var(--brand-yellow); }

@keyframes zoomIn {
    from { transform: scale(.9); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

/* ==========================================================================
   Kontakt
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }

.contact-card {
    padding: 30px 28px;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.contact-card + .contact-card { margin-top: 20px; }

.contact-row { display: flex; gap: 16px; align-items: flex-start; }
.contact-row + .contact-row { margin-top: 22px; }

.contact-row .ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--graphite);
    color: var(--brand-yellow);
    font-size: 1.05rem;
}

/* Byly to h4 tuz po h2 sekcji - Lighthouse slusznie zglaszal przeskoczony poziom
   naglowka (heading-order). Teraz h3, zgodnie z hierarchia strony. */
.contact-row h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin: 4px 0 4px; font-weight: 600; }
.contact-row p  { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--graphite); }
.contact-row a  { color: var(--graphite); }
.contact-row a:hover { color: var(--action-red); }
.contact-row small { display: block; font-weight: 400; color: var(--text-muted); font-size: .88rem; margin-top: 2px; }

/* Formularz */
.form-card {
    padding: 36px 34px;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-card h3 { font-size: 1.3rem; margin: 0 0 6px; }
.form-card > p { color: var(--text-muted); margin: 0 0 26px; font-size: .96rem; }

.field { margin-bottom: 20px; }
/* Tylko wlasna etykieta pola. Bez '>' ta regula lapie tez .topic w srodku
   .topic-grid i - majac wyzsza specyficznosc - zbija im display:flex do block. */
.field > label { display: block; margin-bottom: 8px; font-weight: 600; font-size: .92rem; color: var(--graphite); }
.field .req { color: var(--action-red); }

.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--card-line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--action-red);
    box-shadow: var(--ring);
}

/* Kafelki wyboru tematu - zamiast zwyklego selecta */
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.topic {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    border: 1px solid var(--card-line);
    border-radius: var(--radius-sm);
    font-size: .93rem;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic .dot {
    flex: none;
    width: 16px;
    height: 16px;
    border: 2px solid #C6CBD3;
    border-radius: 50%;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.topic:hover { border-color: #C6CBD3; }
.topic:has(input:checked) { border-color: var(--action-red); background: var(--action-red-sf); }
.topic:has(input:checked) .dot { border-color: var(--action-red); box-shadow: inset 0 0 0 3px var(--action-red); }
.topic:has(input:focus-visible) { outline: 3px solid var(--action-red); outline-offset: 2px; }

.form-consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.form-consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--action-red); }
.form-consent label { font-size: .84rem; color: var(--text-muted); line-height: 1.55; font-weight: 400; }

/* Pole-pulapka. Nazwa celowo neutralna - "hp-field" w zrodle strony
   bylo czytelna podpowiedzia dla bota, ktore pole pominac. */
.form-extra {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Komunikat po wyslaniu formularza. Renderuje go PHP nad polami, zeby byl widoczny
   od razu po powrocie z przekierowania - stad margines na dole, nie na gorze. */
.form-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 22px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: .94rem;
    line-height: 1.5;
}
.form-status i { margin-top: .2em; flex: none; }
.form-status.is-ok   { background: #E9F7EF;               color: #17603A; }
.form-status.is-err  { background: var(--action-red-sf);  color: #8E1119; }
.form-status.is-warn { background: #FFF4D6;               color: #7A5300; }

@media (max-width: 991px) {
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .form-card { padding: 28px 22px; }
}
@media (max-width: 480px) { .topic-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Pas CTA przed stopka
   ========================================================================== */

.cta-band { background: var(--brand-yellow); padding: 56px 0; }

.cta-band .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 6px; color: var(--graphite); }
.cta-band p  { margin: 0; color: #5A4C08; font-weight: 500; }
.cta-band .btn-cta { background: var(--graphite); border-color: var(--graphite); box-shadow: none; }
.cta-band .btn-cta:hover { background: #000; border-color: #000; }

/* ==========================================================================
   Stopka
   ========================================================================== */

.site-footer { background: var(--graphite); color: var(--text-on-dark); padding: 72px 0 0; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
    gap: 44px;
    padding-bottom: 52px;
}

/* Logo ma czarny napis, wiec na graficie znikneloby - siedzi na bialym kafelku */
.footer-logo {
    display: inline-block;
    padding: 10px 14px;
    background: #fff;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.footer-logo img { height: 62px; width: auto; display: block; }

.site-footer p { font-size: .93rem; line-height: 1.7; margin: 0 0 16px; }

.footer-grid h2 {
    color: #fff;
    font-size: .78rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin: 6px 0 20px;
    font-weight: 700;
}

.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 11px; }
.footer-list a { color: var(--text-on-dark); font-size: .94rem; }
.footer-list a:hover { color: var(--brand-yellow); }

.footer-contact a { color: #fff; font-weight: 600; }
.footer-contact a:hover { color: var(--brand-yellow); }

.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--graphite-soft);
    border: 1px solid var(--graphite-line);
    color: var(--text-on-dark);
}
.footer-social a:hover { background: var(--brand-yellow); border-color: var(--brand-yellow); color: var(--graphite); }

.footer-bottom {
    border-top: 1px solid var(--graphite-line);
    padding: 22px 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .87rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-on-dark); }
.footer-bottom a:hover { color: var(--brand-yellow); }
.footer-bottom-links { display: flex; gap: 22px; flex-wrap: wrap; }

@media (max-width: 991px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: flex-start; }
}

/* ==========================================================================
   Naglowek podstrony
   ========================================================================== */

.page-head { background: var(--graphite); padding: 62px 0 66px; }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 0 0 14px; }
.page-head p  { color: var(--text-on-dark); margin: 0; max-width: 46em; font-size: 1.05rem; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: .87rem; color: var(--text-on-dark); }
.crumbs a { color: var(--brand-yellow); }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { opacity: .5; }

/* ==========================================================================
   Strony tekstowe (polityka prywatnosci, 404)
   ========================================================================== */

.legal { padding: 72px 0 88px; }
.legal .shell { max-width: 820px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 14px; }
.legal p, .legal li { color: var(--text); font-size: .99rem; }
.legal ul { padding-left: 22px; margin-bottom: 18px; }
.legal li { margin-bottom: 8px; }
.legal-updated { color: var(--text-muted); font-size: .9rem; margin-bottom: 32px; }

.notfound { text-align: center; padding: 110px 0 120px; }
.notfound .code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 700; color: var(--brand-yellow); line-height: 1; letter-spacing: -0.04em; }
.notfound h1 { margin: 10px 0 16px; }
.notfound p { color: var(--text-muted); margin: 0 auto 32px; max-width: 40em; }

/* ==========================================================================
   AOS - wylaczone przy preferencji ograniczenia ruchu
   ========================================================================== */

/* AOS ustawia fade-left/fade-right na translate3d(+-100px,0,0) zanim wanimuje
   element. Te 100px miesci sie dopiero wtedy, gdy obok .shell zostaje tyle luzu:

       prawa krawedz tresci = W/2 + 570   (shell max 1180, padding 20)
       po transformacji     = W/2 + 670
       wystaje, gdy  W/2 + 670 > W   ->   W < 1340px

   Ponizej ~1340px poziomy wjazd wystaje ZAWSZE, wiec zamieniamy go na pionowy.
   Prog 1399px daje zapas. Dzieki temu poprawnosc nie zalezy od overflow-x: clip
   (brak wsparcia w Safari < 16) - ten zostaje juz tylko jako druga linia obrony.

   :not(.aos-animate) pilnuje, zeby regula dotyczyla wylacznie stanu poczatkowego
   - pozycji docelowej AOS nie ruszamy. */
@media (max-width: 1399px) {
    [data-aos="fade-left"]:not(.aos-animate),
    [data-aos="fade-right"]:not(.aos-animate) {
        transform: translate3d(0, 30px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-aos] { opacity: 1 !important; transform: none !important; }
}
