/*
Theme Name: Pan Samochodzik – Used Car Dealer
Theme URI: https://example.com/used-car-dealer
Author: Your Name
Description: Landing page for a used car dealer, built from the Canva design "Used car dealer landing page".
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: used-car-dealer
Tags: car-dealer, landing-page, responsive, polish, modern
*/

/* ---------- Tokens (from the Canva design) ---------- */
:root {
    --bg: #f6f4ef;
    --bg-alt: #eeeae2;
    --surface: #ffffff;
    --navy: #1b2a3a;
    --navy-hover: #26394d;
    --orange: #e8734a;
    --orange-soft: #fde9e1;
    --text: #1b2a3a;
    --muted: #5f6670;
    --line: #d9d4ca;
    --radius: 12px;
    --shadow: 0 18px 40px rgba(27, 42, 58, .12);
    --font-head: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --container: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: 700 15px/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-hover); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #d9643c; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246, 244, 239, .92);
    backdrop-filter: blur(8px);
}
.admin-bar .site-header { top: 32px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 11px;
    background: var(--orange); color: #fff;
    display: grid; place-items: center;
    transform: rotate(-6deg);
}
.brand-mark svg { width: 24px; height: 24px; transform: rotate(6deg); }
.brand-name { font: 700 22px/1 var(--font-head); letter-spacing: -0.03em; color: var(--navy); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; }
.main-nav a { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--navy); }
.main-nav a:hover { color: var(--orange); }
.header-cta { padding: 13px 18px; }

.nav-toggle {
    display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 96px; }
.hero .container { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    color: var(--orange); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.hero h1 {
    margin: 26px 0 28px;
    font-size: clamp(48px, 7vw, 82px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -0.045em;
    color: var(--navy);
}
.hero h1 .accent { color: var(--orange); display: block; }
.hero-lead { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 475px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-media { position: relative; padding: 0 0 20px 0; }
.hero-media::before { /* beige backdrop offset behind the photo */
    content: ""; position: absolute; z-index: 0;
    top: -20px; right: 0; bottom: 0; left: 34px;
    background: var(--bg-alt);
    border-radius: 120px 22px 22px 34px;
}
.hero-photo {
    position: relative; z-index: 1;
    margin-right: 0;
    aspect-ratio: 617 / 510;
    border-radius: 92px 12px 12px 12px;
    overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
    position: absolute; z-index: 2;
    left: -65px; bottom: 42px;
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px 16px 16px;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-weight: 700; font-size: 15px; color: var(--navy);
    text-decoration: none;
}
.icon-chip {
    width: 40px; height: 40px; border-radius: 8px; flex: none;
    background: var(--orange-soft); color: var(--orange);
    display: grid; place-items: center;
}
.icon-chip svg { width: 22px; height: 22px; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 22px; height: 2px; background: currentColor; }
.section-head h2 { margin-top: 16px; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; color: var(--navy); }
.section-head p { margin-top: 16px; color: var(--muted); }

/* Category tabs */
.category-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tab-btn {
    padding: 11px 20px; border-radius: 999px;
    border: 1px solid var(--line); background: transparent;
    font: 700 14px/1 var(--font-body); color: var(--navy); cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.tab-btn:hover { border-color: var(--navy); }
.tab-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
    background: var(--surface);
    border-radius: 18px;
    padding: 32px;
    border: 1px solid #ece8e0;
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.section-alt .card { background: var(--bg); border-color: transparent; }
.card h3 { margin: 22px 0 10px; font-size: 24px; font-weight: 700; color: var(--navy); }
.card h4 { margin: 20px 0 8px; font-size: 20px; font-weight: 700; color: var(--navy); }
.card p { color: var(--muted); font-size: 16px; }
.card .icon-chip { width: 52px; height: 52px; border-radius: 12px; }
.card .icon-chip svg { width: 26px; height: 26px; }
.category-card { display: flex; flex-direction: column; }
.category-card p { flex: 1; }
.category-card .btn { margin-top: 28px; }
.category-card[hidden] { display: none; }
.tag { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 700; color: var(--orange); }

.tip-num { font: 700 15px/1 var(--font-head); color: var(--orange); letter-spacing: .08em; }

/* CTA + contact */
.cta {
    background: var(--navy); color: #fff;
    border-radius: 28px;
    padding: 72px;
    display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start;
}
.cta h2 { font-size: clamp(34px, 4.2vw, 50px); font-weight: 700; }
.cta h2 .accent { color: var(--orange); }
.cta-lead { margin-top: 20px; color: #b9c2cc; }
.cta-contacts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.cta-contacts li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.cta-contacts .icon-chip { background: rgba(232, 115, 74, .16); }

.contact-form { background: var(--surface); color: var(--text); border-radius: 18px; padding: 32px; display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; padding: 13px 14px;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--bg); color: var(--text);
    font: 400 15px/1.4 var(--font-body);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent;
}
.form-note { padding: 12px 14px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.form-note.ok { background: #e3f4ea; color: #1f6b3d; }
.form-note.err { background: var(--orange-soft); color: #a3401c; }
.hp-field { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-about { margin-top: 16px; color: var(--muted); max-width: 340px; }
.site-footer h5 { margin: 0 0 14px; font: 700 15px/1 var(--font-head); color: var(--navy); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; color: var(--muted); }
.site-footer ul a:hover { color: var(--orange); }
.copyright { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .cta { padding: 48px; grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .hero .container { grid-template-columns: 1fr; gap: 48px; }
    .hero-media { margin-left: 24px; }
    .hero-badge { left: -24px; }
    .grid-3 { grid-template-columns: 1fr; max-width: 560px; }
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        display: none; padding: 12px 24px 24px;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 0; font-size: 17px; }
    .header-cta { display: none; }
    .main-nav .btn { display: flex; margin-top: 12px; }
}
@media (min-width: 961px) { .main-nav .btn { display: none; } }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .site-header .container { height: 72px; }
    .hero { padding: 24px 0 72px; }
    .hero-photo { border-radius: 56px 12px 12px 12px; }
    .hero-media::before { left: 18px; border-radius: 72px 18px 18px 24px; }
    .hero-badge { left: -16px; bottom: 28px; padding: 12px 16px 12px 12px; font-size: 14px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .section { padding: 72px 0; }
    .grid-4, .form-row { grid-template-columns: 1fr; }
    .cta { padding: 32px 20px; border-radius: 20px; }
    .contact-form { padding: 22px; }
    .footer-grid { grid-template-columns: 1fr; }
}
