/*
Theme Name: B.K Auto
Author: B.K Auto
Description: Motyw skupu samochodów wg makiety: nagłówek, oferty, poradnik, zgłoszenia, lokalne SEO i schema.
Version: 1.2.0
Text Domain: bk-auto
*/

:root {
    --navy: #0c1d33;
    --blue: #1f5cf0;
    --blue-dark: #1849c9;
    --lime: #c6f24a;
    --lime-dark: #a7d92a;
    --ink: #172a44;
    --muted: #5f6f86;
    --bg: #f5f7fb;
    --white: #ffffff;
    --line: #e3e9f2;
    --radius: 12px;
    --shadow: 0 10px 28px rgba(12, 29, 51, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
body {
    margin: 0;
    font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px; z-index: 99; }

/* Przyciski */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 2px solid transparent; border-radius: 8px; padding: 14px 22px; min-height: 48px;
    background: var(--blue); color: var(--white); font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--blue-dark); color: var(--white); }
.btn-lime { background: var(--lime); color: #13280f; }
.btn-lime:hover { background: var(--lime-dark); color: #13280f; }
.btn-outline { background: rgba(12,29,51,.25); color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.14); color: var(--white); }
.btn-small { min-height: 40px; padding: 10px 18px; font-size: 15px; }
.btn-small.btn-light { background: var(--white); color: var(--blue); border-color: var(--line); }

/* Nagłówek — granat, jak w makiecie */
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 4px; text-decoration: none; font-weight: 900; font-size: 24px; letter-spacing: -.5px; line-height: 1; }
.brand-bk { color: var(--white); }
.brand-auto { color: var(--lime); font-style: italic; }
.menu ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; flex-wrap: wrap; }
.menu a { text-decoration: none; color: #dfe7f3; font-weight: 600; font-size: 15px; }
.menu a:hover, .menu .current-menu-item > a { color: var(--lime); }
.phone-btn { white-space: nowrap; padding: 10px 16px; min-height: 40px; font-size: 15px; border-radius: 8px; }

/* Hero */
.hero { position: relative; color: var(--white); overflow: hidden; isolation: isolate; background: var(--navy); min-height: 600px; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,29,51,.78) 0%, rgba(12,29,51,.42) 48%, rgba(12,29,51,0) 80%); }
.hero-in { padding: 64px 0; max-width: 560px; border-left: 6px solid var(--lime); padding-left: 28px; }
.hero h1 { color: var(--white); margin-bottom: 14px; }
.hero .lead { font-size: 1.25rem; color: #eef3fa; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sekcje */
.section { padding: 64px 0; }
.section-alt { background: var(--bg); }
.sec-title { position: relative; display: inline-block; margin-bottom: 30px; }
.sec-title::after { content: ""; display: block; width: 44px; height: 4px; background: var(--lime); border-radius: 2px; margin-top: 10px; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 0; }
.title-row .sec-title { margin-bottom: 30px; }

/* Usługi */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: 0 4px 14px rgba(12,29,51,.05); }
.service h3 { margin: 16px 0 8px; }
.service p { color: var(--muted); margin: 0; font-size: 15px; }
.svc-ico { width: 56px; height: 56px; fill: var(--blue); }

/* Auta */
.cars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.car { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; box-shadow: 0 4px 14px rgba(12,29,51,.05); transition: transform .15s ease, box-shadow .15s ease; }
.car:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.car-img { aspect-ratio: 16 / 10; overflow: hidden; background: #e7ecf3; }
.car-img img { width: 100%; height: 100%; object-fit: cover; }
.car-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.car-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.car-body h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.price { background: var(--lime); color: #13280f; font-weight: 800; padding: 6px 12px; border-radius: 6px; white-space: nowrap; font-size: 15px; }
.car-meta { color: var(--muted); font-size: 14px; margin: 0; }

/* Pas zaufania */
.trust { position: relative; color: var(--white); background: var(--navy); overflow: hidden; isolation: isolate; }
.trust-bg { position: absolute; inset: 0; z-index: -2; }
.trust-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.trust::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,29,51,.92) 0%, rgba(12,29,51,.6) 50%, rgba(12,29,51,.1) 100%); }
.trust-in { padding: 56px 0; max-width: 640px; border-left: 6px solid var(--lime); padding-left: 26px; }
.trust h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 18px; }
.trust h2 span { color: var(--lime); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 15px; color: #eef3fa; }
.checks li::before { content: "✓"; color: var(--lime); font-weight: 900; margin-right: 6px; }

/* Wycena */
.section-wycena { background: var(--navy); color: var(--white); }
.section-wycena h2 { color: var(--white); }
.section-wycena .sec-title::after { background: var(--lime); }
.wycena-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.wycena-lead { color: #cfdbeb; font-size: 1.05rem; }
.checks-dark { color: #e6eef9; margin-top: 18px; }
.wycena-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.wycena-card label { color: var(--navy); }
.wycena-card .btn { width: 100%; }

/* Podstrony: nagłówek, usługi, wycena */
.page-hero { position: relative; background: var(--navy); color: var(--white); padding: 56px 0; overflow: hidden; isolation: isolate; }
.page-hero-img { min-height: 340px; display: flex; align-items: center; }
.page-hero-img .hero-bg { position: absolute; inset: 0; z-index: -2; }
.page-hero-img .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-img::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,29,51,.9) 0%, rgba(12,29,51,.55) 60%, rgba(12,29,51,.2) 100%); }
.page-hero h1 { color: var(--white); margin: 8px 0 14px; }
.page-hero .lead { color: #e2ebf7; font-size: 1.15rem; max-width: 680px; margin: 0 0 22px; }
.crumbs { font-size: 14px; color: #c9d6e8; margin: 0; }
.crumbs a { color: #c9d6e8; }
.usluga-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.article-body { background: var(--white); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); }
.article-body h2 { margin-top: 1.5em; font-size: 1.5rem; }
.article-body img { border-radius: 12px; margin: 1em 0; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.side-card h3 { margin-top: 0; }
.side-card p { color: var(--muted); font-size: 15px; }
.side-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.side-links a { text-decoration: none; font-weight: 600; }
.wycena-page { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.wycena-steps { grid-column: 1 / -1; display: flex; align-items: center; gap: 0; max-width: 420px; }
.step-dot { width: 36px; height: 36px; border-radius: 50%; background: #dfe6f0; color: var(--muted); display: grid; place-items: center; font-weight: 800; flex: none; }
.step-dot.is-on { background: var(--navy); color: var(--lime); }
.step-line { flex: 1; height: 3px; background: #dfe6f0; }
.wycena-card-wide { grid-column: 1; }
.wycena-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wycena-card legend { font-weight: 800; color: var(--navy); font-size: 1.15rem; margin-bottom: 12px; padding: 0; }
.wy-step { display: none; }
.wy-step.is-on { display: block; }
.wy-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.wy-nav .btn { min-width: 150px; }
.wy-error { background: #fde8e8; color: #7a1d1d; padding: 12px 14px; border-radius: 10px; font-weight: 600; margin: 14px 0 0; }
.wycena-side { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.wycena-side ol { padding-left: 1.2em; color: var(--muted); font-size: 15px; }
.wycena-result { grid-column: 1 / -1; max-width: 640px; }
.wy-quote { background: #eef8d8; color: #20400f; border-radius: 10px; padding: 14px 16px; font-weight: 700; margin: 14px 0; }
.wycena-result:focus { outline: 3px solid var(--lime); }
.wy-dialog { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 24px 60px rgba(12,29,51,.35); color: var(--ink); }
.wy-dialog::backdrop { background: rgba(12,29,51,.6); }
.wy-result { padding: 32px 28px 28px; }
.wy-result h2 { margin-top: 0; }
.wy-dialog-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.wy-loader { text-align: center; padding: 48px 28px; }
.wy-loader[hidden] { display: none; }
.wy-loader-text { font-weight: 700; color: var(--navy); margin: 18px 0 0; }
.wy-spinner { width: 46px; height: 46px; margin: 0 auto; border: 4px solid #dfe6f0; border-top-color: var(--blue); border-radius: 50%; animation: wy-spin .9s linear infinite; }
@keyframes wy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wy-spinner { animation-duration: 3s; } .wy-dialog[open] { animation: none; } .wy-progress span { animation-duration: 0.1s !important; } }

.wy-dialog[open] { animation: wy-pop .28s cubic-bezier(.2,.8,.2,1); }
@keyframes wy-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.wy-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eef3f8; color: var(--navy); font-size: 22px; line-height: 1; cursor: pointer; }
.wy-close:hover { background: #dfe6f0; }
.wy-loader { padding: 44px 32px 40px; }
.wy-loader-title { font-size: 1.35rem; margin: 20px 0 0; text-align: center; }
.wy-loader .wy-loader-text { margin: 6px 0 22px; text-align: center; color: var(--muted); font-weight: 600; }
.wy-progress { height: 6px; border-radius: 99px; background: #e5ebf3; overflow: hidden; }
.wy-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--lime)); border-radius: 99px; animation: wy-fill 2.6s ease-in-out forwards; }
@keyframes wy-fill { to { width: 100%; } }
.wy-result { padding: 40px 32px 30px; text-align: left; }
.wy-check { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; background: var(--lime); color: #14290f; display: grid; place-items: center; font-size: 34px; font-weight: 900; animation: wy-pop .45s cubic-bezier(.2,.8,.2,1); }
.wy-result h2 { text-align: center; margin: 14px 0 10px; }
.wy-message { text-align: center; color: var(--ink); margin: 0 0 14px; }
.wy-result .wy-quote { text-align: center; }
.wy-result .meta { text-align: center; font-size: 14px; }
.wy-dialog-actions { justify-content: center; }
.wy-dialog .wy-dialog-actions .btn { min-width: 150px; }
@media (max-width: 520px) { .wy-loader, .wy-result { padding-left: 22px; padding-right: 22px; } }

/* Poradnik */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(12,29,51,.05); }
.post-card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7ecf3; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-body h3 { font-size: 1.02rem; margin: 0; }
.post-card-body h3 a { color: var(--navy); text-decoration: none; }
.post-card-body p { color: var(--muted); font-size: 14px; margin: 0; }
.more { color: var(--blue); font-weight: 700; font-size: 14px; text-decoration: none; margin-top: auto; }
.meta { color: var(--muted); font-size: 14px; }

/* FAQ + kontakt */
.faq-contact { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
details { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 3px 10px rgba(12,29,51,.04); }
summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--blue); font-size: 22px; line-height: 1; font-weight: 500; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list strong { color: var(--navy); }
.contact-list a { color: var(--navy); text-decoration: none; font-weight: 600; }
.c-ico { width: 36px; height: 36px; border-radius: 50%; background: #e8efff; display: grid; place-items: center; font-size: 16px; flex: none; }
.foot-map { display: block; width: 100%; height: 170px; border: 0; border-radius: 10px; margin-top: 14px; }

/* Blok CTA */
.cta-band { background: var(--navy); color: var(--white); border-radius: 18px; padding: clamp(26px, 5vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0; }
.cta-band p { color: #c9d6e8; margin: 6px 0 0; }

/* Artykuł, strony i formularz */
.article { background: var(--white); border-radius: 18px; padding: clamp(22px, 4vw, 44px); margin: 36px auto; max-width: 780px; box-shadow: var(--shadow); }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.article h2 { margin-top: 1.6em; font-size: 1.5rem; }
.article h3 { margin-top: 1.2em; }
.article img { border-radius: 14px; margin: 1.2em 0; }
.article-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin-bottom: 26px; }
.article blockquote { border-left: 4px solid var(--lime); margin: 1.4em 0; padding: 8px 18px; color: var(--muted); background: #f7fbe9; border-radius: 0 10px 10px 0; }
.page-wrap { padding: 40px 0 70px; }
.page-card { background: var(--white); border-radius: 18px; padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=number], select, textarea {
    width: 100%; padding: 13px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 16px; background: var(--white); color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font: inherit; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.notice-ok { background: #e8f9d9; color: #24530f; }
.notice-err { background: #fde8e8; color: #7a1d1d; }

/* Stopka — jak w makiecie: logo, linki, prawne */
.site-footer { background: var(--navy); color: #b9c6d8; padding: 36px 0 22px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.foot-col { min-width: 0; }
.foot-brand { display: inline-flex; gap: 4px; font-weight: 900; font-size: 22px; text-decoration: none; }
.foot-brand .brand-bk { color: var(--white); }
.foot-brand .brand-auto { color: var(--lime); font-style: italic; }
.foot-about { margin: 14px 0 0; line-height: 1.6; }
.foot-title { color: var(--white); font-size: 15px; font-weight: 800; margin: 0 0 12px; letter-spacing: .02em; }
.foot-contact, .foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.foot-contact a, .foot-links a { color: #dfe7f3; text-decoration: none; }
.foot-contact a:hover, .foot-links a:hover { color: var(--lime); }
.foot-links { font-size: 14px; }
.foot-links li { margin: 0; }
.copyright { padding-top: 18px; font-size: 12px; color: #8a9bb3; }
.copyright p { margin: 0 0 4px; }

/* Baner cookies */
.bk-cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: var(--navy); color: #e6eef9; padding: 16px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; border: 1px solid rgba(198,242,74,.3); }
.bk-cookies[hidden] { display: none; }
.bk-cookies p { margin: 0; flex: 1 1 240px; }
.bk-cookies a { color: var(--lime); }

/* Przycisk menu mobilnego */
.menu-toggle { display: none; background: transparent; border: 0; padding: 10px; cursor: pointer; width: 44px; height: 44px; position: relative; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; position: absolute; left: 10px; width: 24px; height: 2px; background: var(--white); border-radius: 2px; content: ""; }
.menu-toggle-bars { top: 21px; }
.menu-toggle-bars::before { top: -7px; left: 0; }
.menu-toggle-bars::after { top: 7px; left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Responsywność */
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .cars { grid-template-columns: 1fr 1fr; }
    .faq-contact { grid-template-columns: 1fr; gap: 40px; }
    .wycena-grid { grid-template-columns: 1fr; gap: 28px; }
    .usluga-grid, .wycena-page { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.1); padding: 0; box-shadow: 0 14px 24px rgba(0,0,0,.25); }
    .site-header.is-open .menu { display: block; }
    .menu ul { flex-direction: column; gap: 0; margin: 0; padding: 4px 20px 14px; }
    .menu li { border-bottom: 1px solid rgba(255,255,255,.08); }
    .menu a { display: block; padding: 14px 0; font-size: 16px; }
    .site-header { position: sticky; }
    .bk-cookies { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; font-size: 13px; gap: 8px; border-radius: 10px; }
    .bk-cookies p { flex: 1 1 100%; }
    .bk-cookies .btn { min-height: 38px; padding: 8px 14px; font-size: 14px; }
    .nav { min-height: 60px; }
    .phone-btn { padding: 9px 12px; font-size: 14px; }
    .grid-3, .grid-4, .cars, .form-grid { grid-template-columns: 1fr; }
    .hero { min-height: 420px; }
    .hero-in { padding: 48px 0; padding-left: 20px; }
    .hero-actions .btn { width: 100%; }
    .section { padding: 48px 0; }
    .trust-in { padding: 44px 0; padding-left: 20px; }
    .cta-band { flex-direction: column; align-items: stretch; }
    .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}
