/* ===== Прокат авто — стилі публічної частини ===== */
:root {
  --ink: #0f1b2d;
  --ink-2: #33415a;
  --muted: #6b778c;
  --line: #e3e7ee;
  --bg: #f5f6f8;
  --card: #fff;
  --accent: #ff6a3d;
  --accent-2: #e8542a;
  --ok: #1f9d55;
  --warn: #c27c0e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 27 45 / 6%), 0 8px 24px rgb(15 27 45 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
p { margin: 0 0 1em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.lead { font-size: 1.125rem; color: var(--ink-2); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin: .25em 0; }

/* ----- кнопки ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.25em; border-radius: 10px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: .15s;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { border-color: rgb(255 255 255 / 35%); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / 10%); }
.btn-lg { padding: .9em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ----- шапка ----- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: .5em .8em; border-radius: 8px; text-decoration: none; color: rgb(255 255 255 / 80%); font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgb(255 255 255 / 8%); }
.header-call { padding: .55em 1em; white-space: nowrap; }
.nav-toggle, .nav-burger { display: none; }

@media (max-width: 960px) {
  .header-row { flex-wrap: wrap; gap: 12px; }
  .nav-burger {
    display: block; margin-left: auto; width: 40px; height: 40px; cursor: pointer; position: relative; order: 2;
  }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after {
    content: ""; position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; border-radius: 2px;
  }
  .nav-burger span { top: 19px; }
  .nav-burger span::before { top: -7px; left: 0; right: 0; }
  .nav-burger span::after { top: 7px; left: 0; right: 0; }
  .main-nav { display: none; order: 4; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .header-call { order: 1; margin-left: auto; font-size: .9rem; }
}
@media (max-width: 480px) {
  .logo { font-size: 1rem; }
  .header-call { display: none; }
}

/* ----- hero ----- */
.hero {
  color: #fff; padding: 56px 0 64px;
  background:
    radial-gradient(1000px 400px at 85% 20%, rgb(255 106 61 / 22%), transparent 60%),
    linear-gradient(160deg, #13233b 0%, var(--ink) 60%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.hero .lead { color: rgb(255 255 255 / 80%); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-car { position: relative; display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgb(0 0 0 / 35%); text-decoration: none; }
.hero-car img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hero-car-tag {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column;
  background: rgb(15 27 45 / 85%); backdrop-filter: blur(6px); padding: 8px 14px; border-radius: 10px; font-size: .9rem;
}
@media (max-width: 860px) {
  .hero { padding: 36px 0 44px; }
  .hero-inner { grid-template-columns: 1fr; }
}

/* ----- секції ----- */
.section { padding: 48px 0; }
.section-alt { background: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-title { margin-bottom: 20px; }
.section-head .section-title { margin: 0; }
.link-more { color: var(--accent-2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.empty { padding: 32px; background: #fff; border-radius: var(--radius); text-align: center; color: var(--muted); }

.page-head { background: var(--ink); color: #fff; padding: 28px 0 32px; }
.page-head .lead { color: rgb(255 255 255 / 75%); margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.page-head .crumbs { color: rgb(255 255 255 / 60%); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.perks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.perks li { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-top: 3px solid var(--accent); }
.perks strong { display: block; }
.perks span { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .perks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .perks { grid-template-columns: 1fr; } }

/* ----- картки авто ----- */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.car-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.car-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgb(15 27 45 / 12%); }
.car-card-link { display: block; text-decoration: none; color: inherit; }
.car-card-img { position: relative; aspect-ratio: 4 / 3; background: #dde2ea; }
.car-card-img img { width: 100%; height: 100%; object-fit: cover; }
.car-card-body { padding: 16px 18px 18px; }
.car-card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.car-meta { display: flex; gap: 12px; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.prices { display: grid; gap: 6px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.prices div { display: flex; justify-content: space-between; gap: 8px; }
.prices dt { color: var(--muted); }
.prices dd { margin: 0; }
.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: .95rem; }
.img-placeholder.big { aspect-ratio: 4 / 3; background: #dde2ea; border-radius: var(--radius); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #fff; background: var(--ink-2); }
.car-card-img .badge { position: absolute; top: 12px; left: 12px; }
.badge-available { background: var(--ok); }
.badge-rented { background: #2f6fde; }
.badge-buyout { background: #7d5ce0; }
.badge-sold { background: #d48612; }
.badge-archived { background: #6b778c; }

/* ----- відгуки ----- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review { margin: 0; background: var(--bg); border-radius: var(--radius); padding: 22px; }
.review blockquote { margin: 0 0 14px; font-size: 1.05rem; }
.review blockquote::before { content: "“"; color: var(--accent); font-size: 2rem; line-height: 0; vertical-align: -.35em; margin-right: 4px; }
.review figcaption { display: flex; flex-direction: column; font-size: .92rem; }
.review figcaption span { color: var(--muted); }

/* ----- сторінка авто ----- */
.car-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.car-head h1 { margin: 0; }
.car-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.car-layout > * { min-width: 0; }
.car-bottom { margin-top: 24px; }
.car-bottom > div { display: grid; gap: 24px; }
@media (max-width: 900px) { .car-layout { grid-template-columns: 1fr; } }

.gallery-main { display: block; width: 100%; padding: 0; border: 0; background: #dde2ea; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.gallery-thumbs button { flex: 0 0 96px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; scroll-snap-align: start; opacity: .75; }
.gallery-thumbs button.active { border-color: var(--accent); opacity: 1; }
.gallery-thumbs img { aspect-ratio: 4 / 3; object-fit: cover; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / 92%); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / 80%); }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgb(255 255 255 / 12%); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / 25%); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

.car-side { display: grid; gap: 16px; }
.price-card { display: grid; gap: 10px; }
.price-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.price-row span { color: var(--muted); }
.price-row strong { text-align: right; }
.specs { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.specs th, .specs td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th { color: var(--muted); font-weight: 500; width: 40%; }

.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.2em; }
.prose img { border-radius: 10px; margin: 8px 0; }
.partners h3:first-child { margin-top: 0; }

.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .calc-fields { grid-template-columns: 1fr; } }
.calc-result { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin-top: 8px; padding: 16px; border-radius: 10px; background: var(--bg); }
.calc-result.ok { background: #eef8f1; }
.calc-result.warn { display: block; background: #fff6e6; color: var(--warn); }
.calc-result span { color: var(--muted); grid-column: 1; }
.calc-result b { font-size: 1.25rem; grid-column: 2; }
.calc-result small { grid-column: 2; color: var(--muted); margin-bottom: 8px; }

/* ----- форми ----- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-weight: 600; font-size: .95rem; }
.field small { font-weight: 400; color: var(--muted); }
input, textarea, select {
  font: inherit; width: 100%; padding: .65em .8em; border: 1px solid #cfd6e0; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgb(255 106 61 / 40%); border-color: var(--accent); }
.kind-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.kind-switch label { display: flex; align-items: center; gap: 6px; padding: .45em .9em; border: 1px solid #cfd6e0; border-radius: 999px; cursor: pointer; }
.kind-switch input { width: auto; accent-color: var(--accent); }
.kind-switch label:has(input:checked) { border-color: var(--accent); background: #fff3ee; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: 14px; min-height: 0; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert-ok { background: #eef8f1; color: #176b3a; }
.alert-err { background: #fdecec; color: #a12a2a; }
.lead-form h2 { margin-bottom: 4px; }
.lead-form { scroll-margin-top: 80px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.map { padding: 0; overflow: hidden; }
.map iframe { width: 100%; height: 360px; border: 0; display: block; }
.map p { padding: 16px 20px; margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ----- футер ----- */
.site-footer { background: var(--ink); color: rgb(255 255 255 / 85%); padding: 40px 0 0; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: rgb(255 255 255 / 55%); }
.copyright { border-top: 1px solid rgb(255 255 255 / 10%); margin-top: 24px; padding: 16px 0; font-size: .9rem; color: rgb(255 255 255 / 55%); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
