/* SQB – arkusz stylów strony (wariant „jasny i przyjazny”) */

:root {
    --bg: #F4F6F9;
    --surface: #FFFFFF;
    --navy: #1D2B4F;
    --navy-line: #3B4A70;
    --text: #1D2B4F;
    --muted: #4B5675;
    --line: #E3E8F0;
    --placeholder: #DCE2EC;
    --accent: #C2410C;
    --accent-soft: #FFE9DC;
    --on-navy-muted: #C9D3EA;
    --success: #17794A;
    --error: #B42318;
    --shadow: 0 1px 2px rgba(29, 43, 79, .08);

    --font: 'Manrope', system-ui, sans-serif;
    --radius: 24px;
    --radius-lg: 32px;
    --radius-input: 16px;
    --section-pad: clamp(72px, 9vw, 104px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-weight: 800; color: var(--navy); margin: 0; line-height: 1.2; }
p { margin: 0; }

.container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 848px; }

/* blok z zaokrąglonym tłem (hero, kontakt) */
.panel { width: auto; max-width: 1200px; margin: 0 24px; border-radius: var(--radius-lg); }
@media (min-width: 1248px) { .panel { margin: 0 auto; } }

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

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #FFFFFF; }
.skip-link:focus { top: 16px; }

.icon { flex: none; }

/* ---------- Przyciski i etykiety ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 0 28px;
    border: 2px solid transparent; border-radius: 999px;
    font: inherit; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--navy); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent); color: #FFFFFF; }
.btn--accent { background: var(--accent); color: #FFFFFF; }
.btn--accent:hover { background: var(--navy); color: #FFFFFF; }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: #FFFFFF; }

.eyebrow { font-size: 14px; font-weight: 700; color: var(--accent); }

.section { padding: var(--section-pad) 0; }
.section-title { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.01em; line-height: 1.15; }
.section-lead { max-width: 560px; color: var(--muted); }

.section-head {
    display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between;
    margin-bottom: 40px;
}
.section-head__text { display: flex; flex-direction: column; gap: 12px; }
.section-head .btn--ghost { background: var(--navy); color: #FFFFFF; }
.section-head .btn--ghost:hover { background: var(--accent); border-color: var(--accent); }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }

/* ---------- Nagłówek ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 246, 249, .92); backdrop-filter: blur(8px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.site-header__logo img { height: 44px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
    color: var(--navy); text-decoration: none; font-size: 15px; font-weight: 700;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.is-active { background: var(--navy); color: #FFFFFF; }

.nav-toggle {
    display: none; width: 48px; height: 48px; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--navy); cursor: pointer;
}

/* ---------- Start (hero) ---------- */
.hero { padding-top: 24px; }
.hero__inner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
    padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 64px);
    background: var(--navy); color: #FFFFFF;
}
.hero__text { flex: 1.3 1 420px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero__badge { padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 13px; font-weight: 700; }
.hero__title { color: #FFFFFF; font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.02em; }
.hero__lead { max-width: 560px; font-size: 18px; color: var(--on-navy-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--primary { background: #FFFFFF; color: var(--navy); }
.hero .btn--primary:hover { background: var(--accent); color: #FFFFFF; }
.hero .btn--ghost { border-color: var(--navy-line); color: #FFFFFF; }
.hero .btn--ghost:hover { background: var(--navy-line); }
.hero__visual { flex: 1 1 300px; display: flex; justify-content: center; }
.hero__logo { width: 100%; max-width: 380px; aspect-ratio: 1 / 1; object-fit: contain; padding: 40px; border-radius: 28px; background: #FFFFFF; }

/* ---------- O nas ---------- */
.about { display: flex; flex-direction: column; gap: 48px; }
.about__intro { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.about__intro p:not(.eyebrow) { color: var(--muted); }
.about__intro .about__lead { font-size: 19px; color: var(--text); }

.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.service { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: var(--radius); }
.service__icon { display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: #FFFFFF; }
.service__icon .icon { stroke-width: 2; }
.service__title { font-size: 20px; margin-bottom: 8px; }
.service__text { font-size: 15px; color: var(--muted); }
.service--1 { background: #FFE9DC; } .service--1 .service__icon { color: #C2410C; }
.service--2 { background: #E2EAFF; } .service--2 .service__icon { color: #2F4DB5; }
.service--3 { background: #DDF3E7; } .service--3 .service__icon { color: #17794A; }
.service--4 { background: #F0E6FF; } .service--4 .service__icon { color: #6D3BC4; }

/* ---------- Karty wpisów ---------- */
.section--news { background: var(--surface); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.card__media { display: block; aspect-ratio: 16 / 10; background: var(--placeholder); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__media-empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--muted); opacity: .6; }
.card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 24px 28px 28px; }
.card__date { font-size: 13px; font-weight: 700; color: var(--muted); }
.card__title { font-size: 21px; line-height: 1.3; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { font-size: 15px; color: var(--muted); }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.card__more { margin-top: auto; padding-top: 6px; font-weight: 700; text-decoration: none; }

/* wariant bez zdjęcia (Dofinansowania) */
.card--plain { gap: 12px; padding: 32px; background: var(--surface); box-shadow: var(--shadow); }
.card--plain .card__body { padding: 0; }
.card__badge { display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }

/* na podstronach tło jest szare, więc karty ze zdjęciem są białe */
.section--page .card { background: var(--surface); }

/* ---------- Kontakt ---------- */
.section--contact { padding-top: 0; }
.contact { display: flex; flex-wrap: wrap; gap: 48px 64px; padding: clamp(32px, 5vw, 56px); background: var(--surface); box-shadow: var(--shadow); }
.contact__info { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; }
.contact__info > p:not(.eyebrow) { color: var(--muted); }
.contact__list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact__list li { display: flex; gap: 12px; align-items: center; }
.contact__list .icon { color: var(--accent); }
.contact__list a { color: var(--text); }
.contact__company { font-weight: 800; }
.contact__nip { color: var(--muted); }
.contact__form { flex: 1.3 1 420px; display: flex; flex-direction: column; gap: 16px; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: flex; flex-wrap: wrap; gap: 16px; }
.form__row > .field { flex: 1 1 200px; }
.form .btn { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 14px; font-weight: 700; }
.field input:not([type="checkbox"]), .field textarea {
    width: 100%; min-height: 50px; padding: 12px 18px;
    border: 2px solid var(--line); border-radius: var(--radius-input);
    background: var(--bg); color: var(--navy); font: inherit;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field--check label { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.field--check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.field--error input, .field--error textarea { border-color: var(--error); }
.field__error { font-size: 14px; color: var(--error); }

.alert { padding: 14px 18px; border-radius: var(--radius-input); font-size: 15px; border: 2px solid currentColor; }
.alert--success { color: var(--success); }
.alert--error { color: var(--error); }

/* ---------- Stopka ---------- */
.site-footer { background: var(--navy); color: var(--on-navy-muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 40px; padding-bottom: 40px; font-size: 14px; }
.site-footer__logo { height: 36px; width: auto; filter: invert(1); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: #FFFFFF; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Podstrony ---------- */
.section--page { padding-top: 48px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.breadcrumbs a { color: var(--muted); }
.post-header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.post-title { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.01em; }
.post-lead { font-size: 20px; line-height: 1.6; color: var(--muted); }
.post-cover { margin: 0 0 48px; border-radius: var(--radius); overflow: hidden; }
.post-cover img { width: 100%; }
.post-subtitle { font-size: 26px; margin-bottom: 24px; }
.post-gallery, .post-files { margin-top: 64px; }
.post-back { margin-top: 64px; }
.post-related { margin-top: 96px; padding-top: 64px; border-top: 1px solid var(--line); }

.prose { font-size: 18px; }
.prose > * + * { margin-top: 1.1em; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.6em; font-size: 1.5em; }
.prose h2 + p, .prose h3 + p { margin-top: .6em; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
.gallery figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files a {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 64px; padding: 14px 20px;
    border-radius: var(--radius-input); background: var(--surface); box-shadow: var(--shadow);
    color: var(--navy); text-decoration: none;
}
.files a:hover { color: var(--accent); }
.files .icon { color: var(--accent); }
.files__name { flex: 1 1 200px; font-weight: 700; }
.files__meta { font-size: 14px; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 64px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
    border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--navy); font-weight: 700;
}
.pagination [aria-current] { background: var(--navy); color: #FFFFFF; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .site-header__inner { flex-wrap: wrap; min-height: 72px; }
    .site-header__logo img { height: 38px; }
    .site-nav {
        display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 0 16px; border-radius: 0; background: none; box-shadow: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { min-height: 48px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .site-nav a.is-active { padding: 0 12px; }
    .panel { margin: 0 16px; }
}

@media (max-width: 520px) {
    .container { padding: 0 16px; }
    .cards { grid-template-columns: minmax(0, 1fr); }
    .contact__form, .contact__info { flex-basis: 100%; }
    .card--plain, .service { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
