/* ==========================================================================
   OPI Biuro Rachunkowości i Finansów
   Autor: kotonski.pl & AI
   DESIGN SYSTEM APPLIED
   ========================================================================== */

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    /* Kolory marki (wartosci wzorcowe z logo) */
    --navy:        #002D56;
    --navy-900:    #001d3a;
    --navy-700:    #0a3d6b;
    --navy-600:    #1a4e7e;
    --lime:        #C1D72D;
    --lime-600:    #aec326;
    --lime-ink:    #5d6b00; /* zielen czytelna jako tekst na bieli (WCAG) */
    --accent-blue: #1785d8; /* jaskrawy niebieski akcent (jak kolo w hero) */

    /* Kolory funkcyjne */
    --text:        #24303d;
    --text-muted:  #5b6b7a;
    --heading:     var(--navy);
    --bg:          #ffffff;
    --bg-light:    #f4f7f9;
    --bg-navy:     var(--navy);
    --border:      #e3e9ef;
    --border-strong:#cdd7e0;

    /* Typografia */
    --font-heading: 'Sora', 'Segoe UI', system-ui, sans-serif;
    --font-body:    'Manrope', 'Segoe UI', system-ui, sans-serif;
    --h1: clamp(2.2rem, 1.4rem + 3.2vw, 3.4rem);
    --h2: clamp(1.55rem, 1.25rem + 1.3vw, 2.1rem);
    --h3: 1.5rem;
    --h4: 1.2rem;

    /* Spacing (skala 8px) */
    --space-xs:  8px;
    --space-sm:  16px;
    --space-md:  24px;
    --space-lg:  32px;
    --space-xl:  48px;
    --space-xxl: 64px;

    /* Ksztalty */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    /* Uklad */
    --maxw: 1200px;
    --nav-h: 84px;

    /* Ruch */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Reset / Podstawy
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--heading);
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 var(--space-sm);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }

p { margin: 0 0 var(--space-sm); }

a { color: var(--navy); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-blue); }

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

ul { margin: 0; padding: 0; list-style: none; }

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

/* ==========================================================================
   Uklad / kontenery
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--space-md);
}

.section { padding-block: var(--space-xxl); }
.section--tight { padding-block: var(--space-xl); }
.section--light { background: var(--bg-light); }
.section--navy { background: var(--bg-navy); color: #dbe6f0; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: var(--space-xl); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head--wide { max-width: none; }
@media (min-width: 720px) {
    .nowrap-lg { white-space: nowrap; }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: var(--space-sm);
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-blue);
}
.section--navy .eyebrow,
.hero .eyebrow { color: var(--lime); }
.section--navy .eyebrow::before,
.hero .eyebrow::before { background: var(--lime); }

.lead { font-size: 1.12rem; color: var(--text-muted); }
.section--navy .lead { color: #b7c7d6; }

/* ==========================================================================
   Przyciski
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 26px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }

.btn-primary { background: var(--lime); color: var(--navy); }
.btn-primary:hover { background: var(--lime-600); color: var(--navy); }

.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-700); color: #fff; }

.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.section--navy .btn-ghost,
.hero .btn-ghost,
.page-hero .btn-ghost,
.error-hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.section--navy .btn-ghost:hover,
.hero .btn-ghost:hover,
.page-hero .btn-ghost:hover,
.error-hero .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.topbar {
    background: var(--navy-900);
    color: #c6d4e2;
    font-size: 0.85rem;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-lg);
    min-height: 42px;
    padding-block: 4px;
}
.topbar a { color: #c6d4e2; }
.topbar a:hover { color: var(--lime); }
.topbar-contact { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.topbar-contact span, .topbar-contact a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar-contact svg { width: 14px; height: 14px; color: var(--lime); flex: none; }
.topbar-fb {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    white-space: nowrap;
    padding-left: var(--space-lg);
    border-left: 1px solid rgba(255,255,255,0.16);
}
.topbar-fb svg { width: 16px; height: 16px; flex: none; }
.topbar-brand {
    display: none; /* tylko mobile */
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.nav-fb-item { display: none; } /* tylko w menu mobilnym */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: var(--nav-h);
}
.nav-logo {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    height: 118px;
    margin-block: -18px;
    padding: 0 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-logo:hover { border-color: var(--lime); transform: translateY(-3px); }
.nav-logo img { height: 78px; width: auto; }

/* menu dociagniete do prawej (logo z lewej) */
.nav > nav { margin-left: auto; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu > li > a {
    display: block;
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--navy);
    border-radius: var(--radius-sm);
}
.nav-menu > li > a:hover { background: rgba(23,133,216,0.08); color: var(--navy); }
.nav-menu > li.active > a { background: rgba(23,133,216,0.10); color: var(--navy); }

/* Dropdown */
.has-drop { position: relative; }
.has-drop > a::after {
    content: "";
    display: inline-block;
    width: 7px; height: 7px;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.6;
}
/* niewidzialny mostek wypelniajacy 6px luke miedzy linkiem a dropdownem,
   inaczej mysz gubi :hover w przerwie i menu znika */
.has-drop::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}
.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.has-drop:hover .dropdown,
.has-drop:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--navy);
}
.dropdown a:hover { background: rgba(23,133,216,0.12); }
.dropdown a[aria-current="page"] { background: rgba(23,133,216,0.10); color: var(--navy); }
.dropdown li + li { margin-top: 3px; } /* odstep, by podswietlone pozycje sie nie zlewaly */

.nav-cta { display: flex; align-items: center; gap: var(--space-sm); }

.nav-toggle {
    display: none;
    width: 46px; height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: "";
    display: block;
    width: 22px; height: 2px;
    margin: 0 auto;
    background: var(--navy);
    transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after { transform: translateY(5px); }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg); }
.nav-toggle.open span::after { transform: rotate(-45deg) translateY(-2px) translateX(2px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    background: var(--navy);
    color: #e6eef6;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 135px);
}
.hero > .container { width: 100%; }
.hero::after {
    /* motyw luku z logo - jasny niebieski akcent */
    content: "";
    position: absolute;
    right: -180px; top: -160px;
    width: 520px; height: 520px;
    border: 60px solid #3f7fbf;
    border-radius: 50%;
    opacity: 0.22;
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-xl);
    align-items: center;
    padding-block: var(--space-xl);
}
.hero-content { transform: translateY(-16px); }
.hero-content h1 {
    color: #fff;
    margin-bottom: var(--space-md);
    font-size: clamp(1.75rem, 1.15rem + 1.8vw, 2.45rem);
}
.hero-content h1 .hl { color: var(--lime); }
.hero-content .lead { color: #bcccdb; max-width: 42ch; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

.hero-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.14);
}
.hero-badge { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: #cddae7; }
.hero-badge svg { width: 22px; height: 22px; color: var(--lime); flex: none; }
.hero-badge strong { color: #fff; font-family: var(--font-heading); }

.hero-media { position: relative; }
.hero-media img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.hero-media .hero-chip {
    position: absolute;
    left: -18px; bottom: 28px;
    background: var(--lime);
    color: var(--navy);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    line-height: 1.1;
}
.hero-chip b { display: block; font-size: 1.6rem; }
.hero-chip span { font-size: 0.82rem; font-weight: 600; }

/* ==========================================================================
   Statystyki
   ========================================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.stat {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
}
.stat + .stat { border-left: 1px solid var(--border-strong); }
.stat b {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}
.stat b .plus { color: var(--accent-blue); }
.stat > span { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
   Uslugi (filary)
   ========================================================================== */
.services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}
.service {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s var(--ease);
}
.service:hover { border-color: var(--navy); }
/* caly kafelek klikalny */
.service-link::after { content: ""; position: absolute; inset: 0; }
.service-img { position: relative; }
.service-photo { aspect-ratio: 3 / 2; overflow: hidden; }
.service-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.service:hover .service-photo img { transform: scale(1.05); }
.service-icon {
    position: absolute;
    left: 18px; bottom: -24px;
    z-index: 2;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    background: var(--lime);
    color: var(--navy);
    border-radius: var(--radius);
}
.service-icon svg { width: 30px; height: 30px; }
.service-body {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: background 0.3s var(--ease);
}
.service-body h3 { margin-bottom: 10px; transition: color 0.3s var(--ease); }
.service-body p { color: var(--text-muted); transition: color 0.3s var(--ease); }
.service-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--navy);
    transition: color 0.25s var(--ease);
}
.service-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
/* Hover kafelka: granatowy panel, bialy tekst, limonkowy link */
.service:hover .service-body { background: var(--navy); }
.service:hover .service-body h3 { color: #fff; }
.service:hover .service-body p { color: #b7c7d6; }
.service:hover .service-link { color: var(--lime); }
.service:hover .service-link svg { transform: translateX(4px); }

/* ==========================================================================
   Dlaczego OPI (atuty)
   ========================================================================== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
/* wariant 2 kolumny (wieksze kafle, pelna szerokosc contentu) */
.features--2col { grid-template-columns: repeat(2, 1fr); }
.feature {
    display: flex;
    gap: var(--space-md);
    background: #fff;
    padding: var(--space-lg);
}
.feature-icon {
    flex: none;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    background: rgba(23, 133, 216, 0.12);
    color: var(--accent-blue);
    border-radius: var(--radius);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon-text { font-family: var(--font-heading); font-weight: 800; font-size: 0.92rem; letter-spacing: 0.03em; }
/* wariant z duza, wyrozniona liczba (np. liczebnosc dzialu) */
.feature--stat { align-items: center; }
.feature--stat .stat-badge { flex: none; min-width: 64px; text-align: center; line-height: 1; }
.feature--stat .stat-badge b { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 2.8rem; color: var(--accent-blue); }
.feature--stat .stat-badge span { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.feature h4 { margin-bottom: 4px; }
.feature p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

/* Cytat */
.quote {
    max-width: 620px;
    margin: var(--space-xl) auto 0;
    text-align: center;
}
.quote blockquote {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(1.2rem, 1.02rem + 0.6vw, 1.5rem);
    line-height: 1.5;
    font-weight: 500;
    font-style: italic;
    color: var(--navy);
}
.quote blockquote::before {
    content: "\201C";
    color: var(--lime);
    font-size: 1.5em;
    line-height: 0;
    vertical-align: -0.32em;
    margin-right: 5px;
    font-style: normal;
}
.quote figcaption {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-md);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.quote figcaption::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--lime);
}

/* ==========================================================================
   Programy (logotypy)
   ========================================================================== */
.programs {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0;
    align-items: center;
}
.program {
    display: grid;
    place-items: center;
    padding: var(--space-md) var(--space-sm);
    min-height: 92px;
}
.program + .program { border-left: 1px solid var(--border-strong); }
.program img {
    max-height: 40px;
    max-width: 76%;
    width: auto;
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.program:hover img { filter: grayscale(0); opacity: 1; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
    position: relative;
    background: var(--navy);
    color: #dbe6f0;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    left: -80px; bottom: -120px;
    width: 320px; height: 320px;
    border: 50px solid #3f7fbf;
    border-radius: 50%;
    opacity: 0.20;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; position: relative; }
.hl-underline { position: relative; white-space: nowrap; }
.hl-underline::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 100%; height: 4px;
    border-radius: var(--radius-pill);
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.7s var(--ease) 0.35s;
}
.cta-band.in .hl-underline::after { transform: scaleX(1); }
.cta-band p { margin: 0; position: relative; color: #b7c7d6; }
.cta-band .btn { position: relative; flex: none; }

/* ==========================================================================
   Facebook band
   ========================================================================== */
.fb-band { text-align: center; }
.fb-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.fb-card:hover { border-color: #1877F2; transform: translateY(-2px); }
.fb-logo {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: #1877F2;
    color: #fff;
    border-radius: 50%;
    flex: none;
}
.fb-logo svg { width: 26px; height: 26px; }
.fb-text { display: flex; flex-direction: column; }
.fb-text strong { font-family: var(--font-heading); color: var(--navy); font-size: 1.05rem; }
.fb-sub { font-size: 0.9rem; color: var(--text-muted); }
.fb-go { display: grid; place-items: center; margin-left: var(--space-sm); color: #1877F2; flex: none; }
.fb-go svg { width: 20px; height: 20px; transition: transform 0.2s var(--ease); }
.fb-card:hover .fb-go svg { transform: translateX(4px); }

/* ==========================================================================
   Zaufali nam (teaser)
   ========================================================================== */
.trust-teaser { text-align: center; }
.trust-logos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    margin-top: var(--space-xl);
    cursor: pointer;
}
.trust-cell {
    display: grid;
    place-items: center;
    background: #fff;
    padding: var(--space-lg) var(--space-md);
    min-height: 106px;
}
.trust-cell img {
    max-height: 34px;
    max-width: 74%;
    width: auto;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.trust-cell img:hover { filter: grayscale(0); opacity: 1; }

/* Sciana logo (podstrona Zaufali nam) - animacja "ozywania" do koloru */
.trust-wall {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.trust-wall .trust-cell { min-height: 128px; padding: var(--space-lg) var(--space-md); }
.trust-wall .trust-cell img {
    max-height: 46px;
    max-width: 80%;
    width: auto;
    filter: grayscale(1);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: filter 0.7s var(--ease), opacity 0.7s var(--ease), transform 0.35s var(--ease);
    transition-delay: calc(var(--i, 0) * 45ms);
}
.trust-wall.in .trust-cell img { filter: grayscale(0); opacity: 1; transform: none; }
.trust-wall .trust-cell:hover img { transform: scale(1.07); transition-delay: 0s; }
.trust-cell--more { color: var(--text-muted); font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; text-align: center; background: var(--bg-light); }

/* Galeria - apla brandowa, kolor na hover */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--navy);
    cursor: pointer;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.9;
    filter: grayscale(0.5);
    transform: scale(1.01);
    transition: filter 0.5s var(--ease), transform 0.6s var(--ease), opacity 0.4s var(--ease);
}
.gallery-item::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,45,86,0.22), rgba(0,45,86,0.5));
    opacity: 1;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}
.gallery-item:hover img { filter: grayscale(0); opacity: 1; transform: scale(1.06); }
.gallery-item:hover::after { opacity: 0; }
.gallery-item .zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.92);
    color: var(--navy);
    border-radius: 50%;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery-item:hover .zoom { opacity: 1; transform: none; }
.gallery-item .zoom svg { width: 18px; height: 18px; }

/* Karty (np. modele wspolpracy) */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); align-items: stretch; }
.cards-3 .panel { display: flex; flex-direction: column; }
.cards-3 .panel .feature-icon { margin-bottom: var(--space-md); }
.cards-3 .panel h3 { margin-bottom: 8px; }
.card-badge-slot { min-height: 26px; margin-bottom: var(--space-sm); }
.card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--lime); color: var(--navy);
    border-radius: var(--radius-pill);
    font-family: var(--font-heading); font-weight: 700;
    font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.card-logos { margin-top: var(--space-md); }
.card-logos.is-single { display: grid; place-items: center; min-height: 128px; }
.card-logos.is-single img { max-height: 30px; width: auto; filter: grayscale(1); opacity: 0.72; }
/* siatka 2x2 z krzyzem - kazde logo w rownej komorce */
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--space-md); }
.logo-grid .cell { display: grid; place-items: center; padding: 16px 10px; min-height: 64px; }
.logo-grid .cell img { max-height: 24px; max-width: 78%; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.72; }
.logo-grid .cell:nth-child(1) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logo-grid .cell:nth-child(2) { border-bottom: 1px solid var(--border); }
.logo-grid .cell:nth-child(3) { border-right: 1px solid var(--border); }
.logo-grid .cell:nth-child(2) img { max-height: 34px; }             /* wapro wieksze */
.logo-grid .cell:nth-child(3) img { max-height: 19px; max-width: 66%; } /* streamsoft mniejsze */
/* karty modeli - wspolny elastyczny rzad logotypow (skaluje sie 2..5+) */
.logo-flow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 24px; min-height: 128px; margin-top: var(--space-md); }
.logo-flow img { max-height: 26px; max-width: 92px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.72; }
.card-for { margin-top: auto; padding-top: var(--space-md); color: var(--text-muted); font-size: 0.95rem; }
.card-for strong { color: var(--navy); font-family: var(--font-heading); }

/* Tresc prawna (polityka prywatnosci) */
.prose { max-width: 820px; margin-inline: auto; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.prose h3 { font-size: 1.1rem; margin-top: var(--space-lg); margin-bottom: 6px; }
.prose p { color: var(--text); }
.prose ul { list-style: disc; padding-left: 1.4em; margin: 0 0 var(--space-md); }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent-blue); }
.prose a:hover { text-decoration: underline; }
.prose .muted { color: var(--text-muted); font-size: 0.95rem; }

/* Strona 404 */
.error-hero { position: relative; overflow: hidden; background: var(--navy); color: #e6eef6; text-align: center; padding-block: var(--space-xxl); }
.error-hero::after { content: ""; position: absolute; right: -160px; top: -200px; width: 460px; height: 460px; border: 56px solid #3f7fbf; border-radius: 50%; opacity: 0.18; pointer-events: none; }
.error-hero > .container { position: relative; z-index: 1; }
.error-code { font-family: var(--font-heading); font-weight: 800; font-size: clamp(4.5rem, 14vw, 9rem); line-height: 1; color: var(--lime); letter-spacing: -0.03em; }
.error-hero h1 { color: #fff; margin-top: var(--space-sm); }
.error-hero .lead { color: #bcccdb; max-width: 52ch; margin-inline: auto; }
.error-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; margin-top: var(--space-lg); }
.trust-note {
    display: inline-block;
    margin-top: var(--space-md);
    padding: 10px 18px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--navy-900);
    color: #a9bccf;
    padding-block: var(--space-xxl) var(--space-lg);
    font-size: 0.94rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-brand img { height: 46px; width: auto; margin-bottom: var(--space-md); }
.footer-brand p { color: #93a9bd; max-width: 34ch; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: var(--space-md); }
.footer a { color: #a9bccf; }
.footer a:hover { color: var(--lime); }
.footer-list li { margin-bottom: 10px; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; }
.footer-contact svg { width: 18px; height: 18px; color: var(--lime); flex: none; margin-top: 2px; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding-top: var(--space-lg);
    color: #7f97ac;
    font-size: 0.88rem;
}
.footer-bottom a { color: #a9bccf; transition: color 0.2s var(--ease); }
.footer-bottom a:hover { color: var(--lime); }

/* ==========================================================================
   Animacje
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Wjazd hero (kaskadowo) */
@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}
.hero-content .eyebrow { animation: heroIn 0.6s var(--ease) 0.05s both; }
.hero-content h1       { animation: heroIn 0.6s var(--ease) 0.14s both; }
.hero-content .lead    { animation: heroIn 0.6s var(--ease) 0.24s both; }
.hero-actions          { animation: heroIn 0.6s var(--ease) 0.34s both; }
.hero-badges           { animation: heroIn 0.6s var(--ease) 0.44s both; }
.hero-media            { animation: heroIn 0.8s var(--ease) 0.30s both; }

/* Zapalanie slowa "OPI Gliwice" na limonke */
@keyframes hlLight {
    0%, 45% { color: #ffffff; }
    100%    { color: var(--lime); }
}
.hero-content h1 .hl { animation: hlLight 1.5s var(--ease) 0.5s both; }

/* ==========================================================================
   Podstrony: hero, breadcrumb, uklad tekst+media, kroki
   ========================================================================== */
.page-hero {
    position: relative;
    background: var(--navy);
    color: #e6eef6;
    overflow: hidden;
    padding-block: var(--space-xxl);
}
.page-hero::after {
    /* ten sam motyw luku z logo, mniejszy */
    content: "";
    position: absolute;
    right: -160px; top: -200px;
    width: 460px; height: 460px;
    border: 56px solid #3f7fbf;
    border-radius: 50%;
    opacity: 0.18;
    pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--lime); }
.page-hero .eyebrow::before { background: var(--lime); }
.page-hero h1 { color: #fff; margin-bottom: var(--space-md); }
.page-hero .lead { color: #bcccdb; max-width: 62ch; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

/* Okruszki nawigacyjne */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    color: #90a6bd;
}
.breadcrumb a { color: #bcccdb; font-weight: 600; }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current] { color: #fff; }
.breadcrumb .sep { opacity: 0.5; }

/* Lokalna nawigacja sekcji (podstrony "O nas") */
.subnav { background: #fff; border-bottom: 1px solid var(--border); }
.subnav-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.subnav-list::-webkit-scrollbar { display: none; }
.subnav-list a {
    display: block;
    padding: 16px 14px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.subnav-list a:hover { color: var(--navy); }
.subnav-list a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--lime); }

/* Uklad tekst + zdjecie */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
    align-items: center;
}
.split--flip .split-media { order: -1; }
.split-media img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.split h2 { margin-bottom: var(--space-md); }
/* wariant: zdjecie wypelnia pelna wysokosc kolumny tekstowej */
.split--fill { align-items: stretch; }
.split--fill .split-media { display: flex; }
.split--fill .split-media img { height: 100%; object-fit: cover; object-position: center; }

/* Lista z ptaszkami */
.check-list { display: grid; gap: 12px; margin-top: var(--space-md); }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { flex: none; width: 22px; height: 22px; color: var(--accent-blue); margin-top: 2px; }
.check-list strong { color: var(--navy); font-family: var(--font-heading); }
.check-list.cols-2 { grid-template-columns: 1fr 1fr; gap: 14px var(--space-xl); }

/* Kroki procesu */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}
.step {
    padding-top: var(--space-md);
    border-top: 3px solid var(--lime);
}
.step-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--accent-blue);
    line-height: 1;
    margin-bottom: 8px;
}
.step h4 { margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }
.step-mark { color: var(--accent-blue); font-weight: 700; }
.steps-note { margin-top: var(--space-lg); font-size: 0.9rem; color: var(--text-muted); }
.steps-note .step-mark { margin-right: 4px; }

/* Wysrodkowany przycisk pod sekcja */
.section-cta { text-align: center; margin-top: var(--space-xl); }

/* Dwie rownolegle kolumny (np. doradztwo gospodarcze + finansowe) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: stretch; }

/* Panel / karta */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); color: var(--text); }
.panel h3 { color: var(--navy); }
.panel p { color: var(--text-muted); }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: var(--space-md); }
.panel-head .feature-icon { flex: none; width: 46px; height: 46px; }
.panel-head .feature-icon svg { width: 24px; height: 24px; }
.panel-head h3 { margin: 0; }

/* Numerowany przebieg wieloetapowy */
.flow { max-width: 760px; margin-inline: auto; }
.flow li { display: flex; gap: var(--space-md); align-items: center; padding: var(--space-md) 0; border-top: 1px solid var(--border); }
.flow li:first-child { border-top: none; padding-top: 0; }
.flow-num { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(23,133,216,0.12); color: var(--accent-blue); border-radius: var(--radius); font-family: var(--font-heading); font-weight: 800; }
.flow-body { font-family: var(--font-heading); font-weight: 600; color: var(--navy); }

/* Model rozliczenia (prowizja) */
.fees { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); max-width: 720px; margin: var(--space-xl) auto 0; }
.fee { text-align: center; padding: var(--space-lg); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius-lg); }
.fee b { display: block; font-family: var(--font-heading); font-size: 2.6rem; font-weight: 800; color: var(--lime); line-height: 1; margin-bottom: 6px; }
.fee span { color: #cddae7; font-size: 0.96rem; }

/* Kontakt: wiersze z ikona */
.contact-rows { display: grid; gap: var(--space-lg); }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .feature-icon { flex: none; width: 48px; height: 48px; }
.contact-row .feature-icon svg { width: 24px; height: 24px; }
.c-label { display: block; font-family: var(--font-heading); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.c-val { font-family: var(--font-heading); font-weight: 600; font-size: 1.08rem; color: var(--navy); }
.c-val a { color: var(--navy); }
.c-val a:hover { color: var(--accent-blue); }
.c-note { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--text-muted); margin-top: 2px; }
/* wyrozniony numer telefonu */
.c-val--accent, .c-val--accent a { color: var(--accent-blue); font-size: 1.2rem; }
.c-val--accent a:hover { color: var(--navy); }

/* oddzial - drugorzedny, mniejszy niz siedziba glowna */
.contact-row--sub .feature-icon { width: 36px; height: 36px; }
.contact-row--sub .feature-icon svg { width: 18px; height: 18px; }
.contact-row--sub .c-label { font-size: 0.7rem; }
.contact-row--sub .c-val { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.contact-row--sub .c-note { font-size: 0.8rem; }

/* Dane rejestrowe */
.reg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.reg-item--wide { grid-column: 1 / -1; }

/* Mapa Google */
.map-embed { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { display: block; width: 100%; height: 460px; border: 0; }

/* Lightbox (certyfikaty) */
.lb { position: fixed; inset: 0; z-index: 1000; display: none; background: rgba(0,17,34,0.93); }
.lb.open { display: grid; place-items: center; padding: var(--space-lg); }
.lb-inner { position: relative; width: 100%; max-width: 920px; }
.lb-fig { margin: 0; text-align: center; }
.lb-img { max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: var(--radius); background: #fff; }
.lb-cap { color: #e6eef6; font-family: var(--font-heading); font-weight: 600; margin-top: var(--space-md); font-size: 0.98rem; }
.lb-count { color: #90a6bd; text-align: center; margin-top: 6px; font-size: 0.85rem; }
.lb-close { position: absolute; top: -50px; right: 0; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 2.1rem; line-height: 1; cursor: pointer; }
.lb-nav { position: absolute; top: 38%; transform: translateY(-50%); width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-close:hover, .lb-nav:hover { color: var(--lime); border-color: var(--lime); }

/* ==========================================================================
   Responsywnosc
   ========================================================================== */
@media (max-width: 1024px) {
    /* siatka programow: bez pionowych kresek, tylko poziome linie miedzy rzedami */
    .programs { grid-template-columns: repeat(4, 1fr); gap: 0; }
    .program + .program { border-left: none; }
    .program { border-top: 1px solid var(--border-strong); }
    .program:nth-child(-n+4) { border-top: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .hero-media { order: -1; }
    .hero-media img { max-height: 340px; }
    .services { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .trust-wall { grid-template-columns: repeat(4, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .cards-3 { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; gap: var(--space-xl); }
    .split--flip .split-media { order: -1; }
    .split-media { order: -1; }
    /* na mobile zdjecie wraca do naturalnych proporcji (brak kolumny obok) */
    .split--fill .split-media img { height: auto; max-height: 340px; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .check-list.cols-2 { grid-template-columns: 1fr; }
    .duo { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; text-align: center; }

    .nav-toggle { display: block; }
    .nav-cta .btn:not(.nav-toggle) { display: none; }
    .nav-menu {
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        /* poziomy padding NA STALE (nie dodaje wysokosci, wiec nie tworzy
           widmowego paska), a pionowy padding + kreska tylko gdy otwarte -
           dzieki temu przy zwijaniu tekst nie ucieka w lewo do krawedzi */
        padding-inline: var(--space-sm);
        padding-block: 0;
        max-height: 0;
        overflow: hidden;
        /* padding animowany RAZEM z max-height, inaczej pionowy padding znika
           skokowo i lista podskakuje do gory przy zwijaniu */
        transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
    }
    .nav-menu.open {
        max-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
        padding-block: var(--space-sm);
        border-bottom: 1px solid var(--border);
    }
    .nav-menu > li > a { padding: 14px; }

    /* topbar: chowamy link FB, pokazujemy nazwe firmy */
    .topbar-fb { display: none; }
    .topbar-brand { display: inline-flex; }
    .topbar .container { justify-content: space-between; }

    /* FB przeniesiony do rozwijanego menu */
    .nav-fb-item { display: block; border-top: 1px solid var(--border); margin-top: 4px; }
    .nav-fb-item > a { display: inline-flex; align-items: center; gap: 8px; }
    .nav-fb-item svg { width: 18px; height: 18px; color: var(--navy); flex: none; }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        padding: 0 0 8px 14px;
        display: none;
    }
    .has-drop.open .dropdown { display: block; }
    .has-drop::after { display: none; } /* mostek tylko na desktop */
}

@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .stat + .stat { border-left: none; border-top: 1px solid var(--border); }
    .programs { grid-template-columns: repeat(2, 1fr); }
    .program:nth-child(n) { border-top: 1px solid var(--border-strong); }
    .program:nth-child(-n+2) { border-top: none; }
    /* pionowa linia TYLKO na srodku (lewa krawedz prawej kolumny) */
    .program:nth-child(even) { border-left: 1px solid var(--border-strong); }
    .trust-logos { grid-template-columns: repeat(3, 1fr); }
    .trust-wall { grid-template-columns: repeat(3, 1fr); }
    .trust-wall .trust-cell { min-height: 92px; padding: var(--space-md) var(--space-sm); }
    .trust-wall .trust-cell img { max-height: 34px; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .trust-cell { padding: var(--space-md) var(--space-sm); min-height: 82px; }
    .trust-cell img { max-height: 32px; max-width: 82%; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
    .hero-badges { grid-template-columns: 1fr; gap: var(--space-sm); }
    .steps { grid-template-columns: 1fr; }
    .fees { grid-template-columns: 1fr; }
    .map-embed iframe { height: 340px; }
    .reg-grid { grid-template-columns: 1fr; }
    .topbar-contact { display: none; }
    .topbar .container { justify-content: center; }
    .nav-logo { height: auto; margin-block: 0; padding: 6px 12px; }
    .nav-logo img { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
