/* =====================================================================
   Grafoto — Design System (Barlow + Premium Black/Green)
   =====================================================================
   Font: Barlow 300, 400, 500, 600, 700
   Primary:  #2ECC71  (zielony — main brand)
   Accent:   #f1c40f  (żółty — akcent)
   Mobile-first
   ===================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --primary:        #2ECC71;
    --primary-dark:   #27AE60;
    --primary-light:  #58D68D;
    --primary-soft:   rgba(46, 204, 113, 0.08);
    --accent:         #f1c40f;
    --accent-dark:    #d4ac0d;

    --text:           #1a1d23;
    --text-soft:      #4a5160;
    --text-muted:     #8a93a6;
    --text-invert:    #ffffff;

    --bg:             #ffffff;
    --bg-soft:        #f8f9fa;
    --bg-muted:       #f1f3f5;
    --bg-dark:        #0a0d12;
    --bg-dark-soft:   #161a22;

    --border:         #e9ecef;
    --border-strong:  #ced4da;

    --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:         0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl:      0 24px 60px rgba(0, 0, 0, 0.12);

    --radius-sm:      6px;
    --radius:         12px;
    --radius-lg:      20px;
    --radius-xl:      28px;

    --transition:     200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:400ms cubic-bezier(0.4, 0, 0.2, 1);

    --container:      1240px;
    --container-narrow: 880px;

    --font-sans:      'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --header-h:       72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: clip; /* 'clip' nie tworzy kontenera scrolla (inaczej niż 'hidden') — window scroll-events działają */
    padding-top: var(--header-h);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); font-weight: 600; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--text-soft); }
strong, b { font-weight: 700; }
small { font-size: 0.875rem; color: var(--text-muted); }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--text-soft); }
.eyebrow {
    display: inline-block; font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--primary); margin-bottom: 1rem;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }

/* ---------- Layout ---------- */
.container       { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow{ width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.25rem; }
.section         { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-sm      { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-dark    { background: var(--bg-dark); color: var(--text-invert); }
.section-dark p  { color: rgba(255,255,255,0.78); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-invert); }
.section-soft    { background: var(--bg-soft); }

/* ---------- Grid ---------- */
.grid           { display: grid; gap: 1.5rem; }
.grid-2         { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3         { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4         { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (min-width: 768px) {
    .grid { gap: 2rem; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
    transition: all var(--transition);
    cursor: pointer; white-space: nowrap;
    border: 2px solid transparent;
    text-decoration: none;
}
.btn-primary {
    color: #fff;
    /* Nowoczesny zielony przycisk: subtelny diagonalny gradient + miękki, kolorowy cień */
    background: linear-gradient(135deg, #34d77f 0%, var(--primary) 45%, var(--primary-dark) 100%);
    box-shadow: 0 6px 20px -6px rgba(46,204,113,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover {
    color: #fff; transform: translateY(-2px); filter: brightness(1.04);
    box-shadow: 0 12px 30px -8px rgba(46,204,113,0.7), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-accent { background: var(--accent); color: var(--text); box-shadow: 0 4px 14px rgba(241,196,15,0.35); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); color: var(--text); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--text); }
.btn-outline:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { background: var(--bg-soft); color: var(--primary); transform: translateY(-2px); }
.btn-lg { padding: 1.125rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: 0.625rem 1.125rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
/* Domyślnie (samá góra): belka niewidoczna — tylko logo i linki są widoczne na hero.
   Po przewinięciu (.scrolled) wjeżdża Liquid Glass na całą szerokość. */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    border: 0;
    box-shadow: none;
    transition: box-shadow 0.35s ease;
}
/* WAŻNE: szkło (backdrop-filter) jest na ::before, NIE na .site-header.
   Inaczej backdrop-filter na rodzicu robi z niego kontener dla position:fixed
   dzieci — i mobilne menu (.nav-main) zapadało się po przewinięciu strony. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    opacity: 0; transition: opacity 0.35s ease;
    background-color: rgba(14,18,26,0.42);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.015));
    backdrop-filter: blur(26px) saturate(185%);
    -webkit-backdrop-filter: blur(26px) saturate(185%);
}
.site-header.scrolled::before,
body.hdr-solid .site-header::before { opacity: 1; }
.site-header.scrolled,
body.hdr-solid .site-header { box-shadow: 0 8px 30px rgba(0,0,0,0.18); }
/* Podstrony bez ciemnego hero (np. pojedynczy wpis/realizacja): odsuń treść spod stałego paska */
body.hdr-solid { padding-top: var(--header-h); }
body.hdr-solid .section:first-of-type,
body.hdr-solid article.section:first-of-type { padding-top: clamp(1.5rem, 4vw, 3rem); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 0.625rem; font-weight: 700; font-size: 1.25rem; color: var(--text); }
.brand-mark { width: 36px; height: 36px; }
.brand:hover { color: var(--primary); }
.brand-logo { height: 23px; width: auto; display: block; filter: brightness(0) invert(1); }
@media (max-width: 560px) { .brand-logo { height: 19px; } }

.nav-main { display: flex; align-items: center; gap: 0.25rem; }
.nav-main > li { position: relative; }
.nav-main a {
    display: inline-flex; align-items: center; padding: 0.625rem 0.9rem;
    font-weight: 500; font-size: 0.95rem; color: var(--text-soft);
    border-radius: var(--radius-sm);
}
.nav-main a.active, .nav-main a:hover { color: var(--primary); background: var(--primary-soft); }

/* Tekst nawigacji na szklanej kapsule — biały (desktop) */
.site-header .nav-main > li > a { color: rgba(255,255,255,0.86); }
.site-header .nav-main > li > a.active,
.site-header .nav-main > li > a:hover { color: #fff; background: rgba(255,255,255,0.14); }
.site-header .lang-switcher__btn { color: rgba(255,255,255,0.86); }
.site-header .lang-switcher__btn:hover { color: #fff; background: rgba(255,255,255,0.14); }
.site-header .nav-toggle { color: #fff; }
.submenu a { color: var(--text-soft); }
.nav-main .has-submenu > a::after {
    content: ''; width: 6px; height: 6px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); margin-left: 0.4rem; margin-top: -2px;
    transition: transform var(--transition);
}
.nav-main .has-submenu:hover > a::after { transform: rotate(-135deg); margin-top: 2px; }
.submenu {
    position: absolute; top: 100%; left: 0; min-width: 240px;
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 0.5rem;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all var(--transition);
}
.has-submenu:hover .submenu, .has-submenu:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 0.625rem 0.875rem; border-radius: var(--radius-sm); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-switcher { position: relative; }
.lang-switcher__btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600; color: var(--text-soft);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.lang-switcher__btn:hover { background: var(--bg-muted); color: var(--primary); }
.lang-switcher__dropdown {
    position: absolute; top: 100%; right: 0; min-width: 160px; margin-top: 0.25rem;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all var(--transition);
}
.lang-switcher.open .lang-switcher__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switcher__dropdown a {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.lang-switcher__dropdown a.active, .lang-switcher__dropdown a:hover { background: var(--primary-soft); color: var(--primary); }

/* Mobile nav */
.nav-toggle {
    display: none; width: 44px; height: 44px;
    border-radius: var(--radius-sm); align-items: center; justify-content: center;
    color: var(--text);
}
.nav-toggle span {
    display: block; width: 22px; height: 2px; background: currentColor;
    position: relative; transition: all var(--transition);
}
.nav-toggle span::before, .nav-toggle span::after {
    content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor;
    transition: all var(--transition);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; color: #fff; }
    .nav-main {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
        flex-direction: column; gap: 0; align-items: stretch;
        /* Liquid Glass: półprzezroczyste ciemne szkło z rozmyciem tła strony */
        background:
            radial-gradient(120% 60% at 100% 0%, rgba(46,204,113,0.14), transparent 60%),
            linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 30%),
            rgba(12,16,22,0.62);
        backdrop-filter: blur(32px) saturate(180%);
        -webkit-backdrop-filter: blur(32px) saturate(180%);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 60px rgba(0,0,0,0.45);
        padding: 1.25rem 1.25rem 2rem;
        transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-main.open { transform: translateX(0); }
    .nav-main > li { border-bottom: 1px solid rgba(255,255,255,0.06); }
    .nav-main > li:last-child { border-bottom: 0; }
    .nav-main a {
        display: flex; align-items: center;
        padding: 1.05rem 0.5rem;
        font-size: 1.075rem; font-weight: 500;
        border-radius: 0; background: transparent;
    }
    .site-header .nav-main > li > a { color: #fff; }
    .site-header .nav-main > li > a.active,
    .site-header .nav-main > li > a:hover { color: var(--primary); background: transparent; }
    .nav-main .has-submenu > a::after {
        margin-left: auto; width: 8px; height: 8px;
        border-right: 1.5px solid rgba(255,255,255,0.55); border-bottom: 1.5px solid rgba(255,255,255,0.55);
    }
    .submenu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        background: transparent; padding: 0; margin: 0;
        max-height: 0; overflow: hidden;
        transition: max-height 0.32s ease;
    }
    .submenu a {
        padding: 0.75rem 1.25rem; font-size: 0.98rem; color: rgba(255,255,255,0.72);
        border-left: 2px solid rgba(255,255,255,0.08);
    }
    .submenu a:hover { color: #fff; border-left-color: var(--primary); background: transparent; }
    .has-submenu.open .submenu { max-height: 600px; padding-bottom: 0.5rem; }
    .has-submenu.open > a::after { transform: rotate(-135deg); margin-top: 4px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(ellipse at top right, rgba(46, 204, 113, 0.08), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(241, 196, 15, 0.06), transparent 60%),
        var(--bg);
    overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 992px) { .hero__inner { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.hero__title { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.05; margin-bottom: 1.5rem; }
.hero__title em { font-style: normal; color: var(--primary); position: relative; display: inline-block; }
.hero__title em::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 12px;
    background: rgba(46, 204, 113, 0.18); z-index: -1; border-radius: 4px;
}
.hero__lead { font-size: 1.2rem; line-height: 1.6; color: var(--text-soft); margin-bottom: 2rem; max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 460px; }
.hero__stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.hero__stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.hero__visual {
    position: relative; aspect-ratio: 4/5; border-radius: var(--radius-xl);
    overflow: hidden; box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #1a1d23, #0a0d12);
}
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
    position: absolute; top: 1.5rem; left: 1.5rem; z-index: 2;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
    padding: 0.5rem 1rem; border-radius: 100px;
    font-size: 0.8rem; font-weight: 600; color: var(--text);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.hero__badge::before {
    content: ''; width: 8px; height: 8px; background: var(--primary); border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}

/* ---------- Card ---------- */
.card {
    background: #fff; border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__media { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-muted); }
.card__media img,
.card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); display: block; }
.card:hover .card__media img,
.card:hover .card__media video { transform: scale(1.05); }
.card__body { padding: 1.25rem 1.5rem 1.5rem; }
.card__category {
    display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--primary); margin-bottom: 0.5rem;
}
.card__title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--primary); }
.card__excerpt { font-size: 0.9rem; color: var(--text-soft); line-height: 1.55; }
.card__meta { display: flex; gap: 0.75rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.75rem; }

/* Feature card */
.feature {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem;
    transition: all var(--transition);
}
.feature:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__icon {
    width: 52px; height: 52px; border-radius: var(--radius);
    background: var(--primary-soft); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature__title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature__text { font-size: 0.92rem; color: var(--text-soft); line-height: 1.55; }

/* Testimonial */
.testimonial {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem;
    border: 1px solid var(--border); position: relative;
}
.testimonial::before {
    content: '\201C'; position: absolute; top: 0.6rem; left: 1.5rem;
    font-size: 4rem; line-height: 0.8; color: var(--primary); opacity: 0.16;
    font-family: Georgia, 'Times New Roman', serif; font-weight: 700; pointer-events: none;
}
.testimonial__rating { color: var(--accent); margin-bottom: 0.75rem; }
.testimonial__content { font-size: 1rem; line-height: 1.6; color: var(--text-soft); margin-bottom: 1.5rem; padding-top: 1.5rem; }
.testimonial__author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-muted); }
.testimonial__name { font-weight: 600; font-size: 0.95rem; }
.testimonial__position { font-size: 0.82rem; color: var(--text-muted); }

/* Clients grid */
.clients-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: center;
}
@media (min-width: 640px) { .clients-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .clients-grid { grid-template-columns: repeat(6, 1fr); } }
.clients-grid__item {
    aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
    padding: 1rem; opacity: 0.55; filter: grayscale(100%);
    transition: all var(--transition);
}
.clients-grid__item:hover { opacity: 1; filter: grayscale(0); }
.clients-grid__item img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.form-control {
    width: 100%; padding: 0.875rem 1rem;
    background: #fff;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.95rem; color: var(--text);
    transition: all var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(46,204,113,0.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 140px; resize: vertical; font-family: inherit; }
.form-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.88rem; color: var(--text-soft); }
.form-check input { margin-top: 0.25rem; accent-color: var(--primary); }
.form-error { color: #dc3545; font-size: 0.82rem; margin-top: 0.25rem; }
.form-success { background: rgba(46,204,113,0.1); color: var(--primary-dark); padding: 1rem; border-radius: var(--radius-sm); }
.form-fail    { background: rgba(220,53,69,0.1); color: #b91c1c; padding: 1rem; border-radius: var(--radius-sm); }

/* ---------- Filter chips ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 100px;
    background: var(--bg-soft); color: var(--text-soft);
    font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition);
    border: 1.5px solid transparent;
}
.chip:hover { background: var(--primary-soft); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; }
.chip__count { opacity: 0.65; font-size: 0.78rem; }

/* ---------- FAQ accordion ---------- */
.faq-item {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 0.75rem; overflow: hidden;
    transition: all var(--transition);
}
.faq-item.open { border-color: var(--primary); box-shadow: var(--shadow); }
.faq-q {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; font-weight: 600; font-size: 1rem;
    cursor: pointer; width: 100%; text-align: left; color: var(--text);
}
.faq-q::after {
    content: ''; width: 11px; height: 11px; flex-shrink: 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform var(--transition);
    color: var(--text-muted); margin-left: 1rem;
}
.faq-item.open .faq-q::after { transform: rotate(-135deg); color: var(--primary); }
.faq-a {
    max-height: 0; overflow: hidden;
    padding: 0 1.5rem;
    transition: max-height var(--transition), padding var(--transition);
}
.faq-item.open .faq-a { max-height: 1000px; padding: 0 1.5rem 1.5rem; }
.faq-a p { color: var(--text-soft); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem;
}
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span:not(:last-child)::after { content: '/'; margin-left: 0.5rem; opacity: 0.5; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-dark); color: rgba(255,255,255,0.7);
    padding: 4rem 0 1.5rem;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-grid {
    display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.92rem; line-height: 1.6; margin-bottom: 1.25rem; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.07);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.footer-social a:hover { background: var(--primary); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
    font-size: 0.85rem;
}

/* ---------- Lightbox / Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.gallery__item {
    aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
    cursor: pointer; background: var(--bg-muted);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.gallery__item:hover img { transform: scale(1.05); }

.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(8,10,12,0.97);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    display: none; flex-direction: column;
    opacity: 0; transition: opacity 0.3s var(--ease-out);
    touch-action: none;
}
.lightbox.open { display: flex; opacity: 1; }
/* scena — zdjęcie prezentowane oryginalnie (contain, bez kadrowania) */
.lightbox__stage {
    flex: 1; min-height: 0; position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: calc(3.75rem + env(safe-area-inset-top)) 1rem 0.5rem;
}
.lightbox__img {
    max-width: min(96vw, 1600px); max-height: 100%;
    width: auto; height: auto; object-fit: contain;
    border-radius: 4px; box-shadow: 0 24px 70px rgba(0,0,0,0.55);
    opacity: 0; transform: scale(0.985);
    transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out);
    -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.lightbox__img.is-loaded { opacity: 1; transform: scale(1); }
/* spinner ładowania */
.lightbox__spinner {
    position: absolute; top: 50%; left: 50%; width: 38px; height: 38px;
    margin: -19px 0 0 -19px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2); border-top-color: #fff;
    opacity: 0; pointer-events: none; animation: lb-spin 0.8s linear infinite;
}
.lightbox__spinner.is-on { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
/* pasek: podpis + licznik */
.lightbox__bar {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.85rem 1.5rem calc(0.85rem + env(safe-area-inset-bottom));
    color: rgba(255,255,255,0.75); font-size: 0.9rem;
}
.lightbox__caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__counter { flex: none; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; color: rgba(255,255,255,0.85); }
.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next,
.lightbox.is-single .lightbox__counter { display: none; }
/* przyciski */
.lightbox__close, .lightbox__prev, .lightbox__next {
    position: absolute; z-index: 2; width: 48px; height: 48px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background var(--transition), transform var(--transition);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox__close svg, .lightbox__prev svg, .lightbox__next svg { width: 24px; height: 24px; }
.lightbox__close { top: calc(1rem + env(safe-area-inset-top)); right: 1rem; }
.lightbox__prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.22); }
.lightbox__prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox__next:hover { transform: translateY(-50%) scale(1.08); }
@media (max-width: 640px) {
    /* na telefonie nawigacja swipe'em — strzałki dyskretne, większy obszar dotyku */
    .lightbox__prev, .lightbox__next { width: 44px; height: 44px; background: rgba(255,255,255,0.06); }
    .lightbox__prev { left: 0.4rem; } .lightbox__next { right: 0.4rem; }
    .lightbox__stage { padding-left: 0.4rem; padding-right: 0.4rem; }
    .lightbox__img { max-width: 100vw; border-radius: 0; }
    .lightbox__bar { justify-content: center; gap: 1.5rem; font-size: 0.82rem; }
    .lightbox__caption { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .lightbox, .lightbox__img { transition: opacity 0.2s linear; }
    .lightbox__img { transform: none; }
}

/* ---------- Calculator modal ---------- */
.calc-modal {
    position: fixed; inset: 0; z-index: 1200; display: none;
    align-items: center; justify-content: center; padding: clamp(0.5rem, 3vw, 2.5rem);
}
.calc-modal.open { display: flex; }
.calc-modal__backdrop {
    position: absolute; inset: 0; background: rgba(10,13,18,0.7);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: fadeInBackdrop 0.3s ease;
}
@keyframes fadeInBackdrop { from { opacity: 0; } to { opacity: 1; } }
.calc-modal__dialog {
    position: relative; width: min(1100px, 100%); height: min(92vh, 980px);
    background: #fff; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,0.5);
    animation: calcPop 0.4s var(--transition);
    transform-origin: center;
}
@keyframes calcPop { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.calc-modal__close {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3;
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(10,13,18,0.55); backdrop-filter: blur(8px); color: #fff;
    display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.calc-modal__close:hover { background: var(--primary); transform: rotate(90deg); }
.calc-modal__close svg { width: 20px; height: 20px; }
.calc-modal__loader {
    position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1rem;
    color: var(--text-muted); font-size: 0.95rem; background: var(--bg-soft);
}
.calc-modal__spinner {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.calc-modal__frame { position: relative; z-index: 2; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity 0.4s ease; }
.calc-modal__frame.loaded { opacity: 1; }
body.calc-open { overflow: hidden; }

/* ---------- Utilities ---------- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mt-4 { margin-top: 2rem !important; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { margin-bottom: 0.75rem; }
.section-title p  { color: var(--text-soft); font-size: 1.05rem; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-soft) 50%, var(--bg-muted) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Lazy fade-in */
.lazy-image { opacity: 0; transition: opacity var(--transition-slow); }
.lazy-image.loaded { opacity: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: all var(--transition-slow); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Print */
@media print {
    .site-header, .site-footer, .nav-toggle, .lang-switcher { display: none !important; }
    body { padding-top: 0; }
}

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

/* Realizacja: meta w hero (typy usług + miasto/rok) */
.folio-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.folio-meta__type { background: rgba(46,204,113,.18); border: 1px solid rgba(46,204,113,.55); color: #fff; padding: .3rem .85rem; border-radius: 100px; font-size: .85rem; font-weight: 600; }
.folio-meta__item { color: rgba(255,255,255,.78); font-size: .9rem; }

/* Realizacja: CTA z edytowalnym tłem */
.x-cta-portfolio { position: relative; overflow: hidden; }
.x-cta-portfolio__bg { position: absolute; inset: 0; z-index: 0; }
.x-cta-portfolio__bg img, .x-cta-portfolio__img, .x-cta-portfolio__bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-cta-portfolio__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,13,18,.9), rgba(46,204,113,.6)); }

/* Realizacje: rozdzielone filtry — segment (rodzaj usługi) vs tagi (branża) */
.folio-filters { display: flex; flex-direction: column; gap: 1.4rem; align-items: center; margin-bottom: 2.75rem; }
.folio-filters__group { display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.folio-filters__label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
/* Segmentowany przełącznik */
.seg { display: inline-flex; background: var(--bg-muted); border-radius: 100px; padding: 4px; gap: 2px; }
.seg__btn { padding: .55rem 1.3rem; border-radius: 100px; font-size: .9rem; font-weight: 600; color: var(--text-soft); transition: all var(--transition); white-space: nowrap; }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-on { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(46,204,113,.3); }
/* Tagi branż */
.tagwrap { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; max-width: 820px; }
.tag { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; font-size: .85rem; font-weight: 500; color: var(--text-soft); cursor: pointer; transition: all var(--transition); }
.tag:hover { border-color: var(--primary); color: var(--text); }
.tag.active { background: var(--text); border-color: var(--text); color: #fff; }
.tag__count { font-size: .72rem; opacity: .7; }

/* Ikony inline (helper icon()) na froncie */
.ic { display: inline-block; vertical-align: -0.15em; }

/* Karta realizacji: logo klienta po prawej */
.card--folio .card__body { display: flex; justify-content: space-between; align-items: flex-start; gap: .85rem; }
.card--folio .card__info { min-width: 0; flex: 1; }
.card__client { width: 48px; height: 48px; object-fit: contain; flex: none; opacity: .92; border-radius: 6px; }

/* Zdjęcia wstawione w treść (WYSIWYG) */
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.25rem 0; }

/* Odznaka „Opinia z Google" (biała ikona G) */
.g-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.85); }
.g-badge__g { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; flex: none; }
a.g-badge--link { transition: color var(--transition); }
a.g-badge--link:hover { color: #fff; }
.testimonial .g-badge { color: var(--text-muted); }
.testimonial .g-badge__g { background: #1a1d23; color: #fff; }

/* Realizacje — filtry na mobile: segment nie może być ucinany (scroll w poziomie) */
@media (max-width: 600px) {
    .folio-filters__group { width: 100%; }
    .seg {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        scrollbar-width: none;
    }
    .seg::-webkit-scrollbar { display: none; }
    .seg { padding: 3px; }
    .seg__btn { white-space: nowrap; padding: .45rem .7rem; font-size: .8rem; flex: 0 0 auto; }
    .tagwrap { max-width: 100%; }
}
