/* =========================================================
   Автосервиз Панев — стилове
   ========================================================= */

:root {
  --blue: #007ac8;
  --blue-dark: #005b96;
  --blue-50: #eaf4fb;
  --red: #e80008;
  --red-dark: #c00007;
  --green: #16a34a;

  --ink: #10202f;
  --text: #43505f;
  --muted: #758192;
  --line: #e2e7ee;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --navy: #0d2236;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 47, .05), 0 6px 20px rgba(16, 32, 47, .07);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
.center { text-align: center; margin: 32px 0 0; }

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

/* ---------- Бутони ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 10px; border: 2px solid transparent;
  font-family: var(--font); font-weight: 700; font-size: 1rem; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { padding: .95em 1.6em; font-size: 1.08rem; }
.btn-block { width: 100%; }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--blue-dark); }
.btn-white:hover { background: var(--blue-50); color: var(--blue-dark); }

.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-btn:hover { color: #fff; }

.round-btn {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 1.1rem; cursor: pointer;
  box-shadow: var(--shadow); transition: background-color .15s, color .15s;
}
.round-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Отворено / затворено */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--red-dark); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.status.is-open { color: var(--green); }
.status.is-open::before { background: var(--green); }

/* ---------- Горна лента и хедър ---------- */

.topbar { background: var(--navy); color: #c7d1dc; font-size: .88rem; }
.topbar-inner { display: flex; gap: 28px; justify-content: flex-end; padding-block: 8px; }
.topbar-inner > :first-child { margin-right: auto; }
.topbar i { color: #6fb6e6; margin-right: 4px; }
.topbar a { color: #c7d1dc; }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(16, 32, 47, .06);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 52px; height: 52px; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .82rem; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .55em 1em; border-radius: 8px; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--bg-soft); color: var(--blue); }

.nav-toggle {
  display: none; position: relative;
  width: 46px; height: 46px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, top .2s; }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 26px; }
.nav-open .nav-toggle span:first-child { top: 22px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 22px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .topbar { display: none; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 32, 47, .1);
    padding: 8px 20px 16px;
  }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: .9em .5em; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-call { margin-left: auto; }
}
@media (max-width: 560px) {
  .header-call span { display: none; }
  .header-call { width: 46px; height: 46px; padding: 0; }
  .brand-text small { display: none; }
  .brand img { width: 44px; height: 44px; }
}

/* ---------- Начало ---------- */

.hero { background: linear-gradient(180deg, var(--blue-50), #fff); padding: clamp(40px, 6vw, 80px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }

.eyebrow { margin-bottom: 12px; color: var(--blue); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); max-width: 34em; margin: 18px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; }
.hero-points i { color: var(--blue); font-size: 1.15rem; }

.hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }

.info-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; }
.info-card-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.info-card-head img { width: 64px; height: 64px; }
.info-card-head strong { display: block; color: var(--ink); font-size: 1.25rem; }
.info-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; color: var(--ink); }
.info-row + .info-row { border-top: 1px solid var(--line); }
a.info-row:hover b { color: var(--blue); }
.info-row > i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-size: 1.05rem; }
.info-row small { display: block; color: var(--muted); font-size: .82rem; }
.info-row b { display: block; font-weight: 600; }
.info-card .btn { margin-top: 14px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Секции ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { margin-bottom: 40px; }
.section-head p:last-child { margin-bottom: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }

/* Услуги */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service {
  padding: 24px 22px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
.service:hover { border-color: #b9d9ee; box-shadow: var(--shadow); }
.service-icon {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px;
  border-radius: 12px; background: var(--blue-50); color: var(--blue); font-size: 1.45rem;
}
.service p { margin: 0; font-size: .96rem; }
.service-wide { grid-column: span 2; }
@media (max-width: 1024px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .service-wide { grid-column: auto; }
}

/* Видео */
.slider-nav { display: flex; gap: 10px; flex: none; }
.videos {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4);
  gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding-bottom: 6px; scrollbar-width: thin;
}
.video { scroll-snap-align: start; color: var(--ink); }
.video:hover { color: var(--blue); }
.video-thumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #dde3ea; margin-bottom: 10px; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(232, 0, 8, .92); color: #fff; font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.video-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 600; font-size: .96rem; line-height: 1.35;
}
@media (max-width: 1024px) { .videos { grid-auto-columns: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 560px) {
  .videos { grid-auto-columns: 72%; }
  .section-head-row { align-items: flex-start; flex-direction: column; }
}

/* Лента „Обадете се“ */
.call-band { background: var(--blue); color: #e6f2fa; padding: 40px 0; }
.call-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.call-band h2 { color: #fff; margin-bottom: .25em; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.call-band p { margin: 0; }

/* ---------- Контакти ---------- */

.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.contact-info { display: grid; gap: 12px; }

.contact-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.contact-row:hover { border-color: #b9d9ee; color: var(--ink); }
.contact-row > i { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-size: 1.15rem; }
.contact-row small { display: block; color: var(--muted); font-size: .82rem; }
.contact-row b { font-weight: 600; word-break: break-word; }
.contact-phone b { font-size: 1.4rem; font-weight: 800; }
.contact-phone > i { background: var(--red); color: #fff; }

.hours { padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.hours-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hours h3 { margin: 0; }
.hours ul { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; }
.hours li.today { background: var(--blue-50); color: var(--ink); font-weight: 700; }

.form-card { padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card > h3 { font-size: 1.35rem; margin-bottom: .2em; }
.form-card > p { color: var(--muted); margin-bottom: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.field { display: grid; gap: 5px; }
.field-full { grid-column: 1 / -1; }
.field > span, .field > label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: .75em .9em;
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #cfd7e1; border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #9aa5b3; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 122, 200, .15); }

.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img { flex: none; width: 126px; height: 46px; object-fit: cover; border-radius: 10px; border: 1px solid #cfd7e1; }
.captcha-refresh { flex: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid #cfd7e1; background: #fff; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.captcha-refresh:hover { border-color: var(--blue); color: var(--blue); }
.captcha-row input { flex: 1; min-width: 0; }

.form-note { margin: 0 0 14px; color: var(--muted); font-size: .88rem; }
.form-consent { margin: 12px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert i { font-size: 1.2rem; line-height: 1.4; }
.alert p { margin: 0; color: var(--ink); }
.alert-success { background: #e9f8ef; border: 1px solid #b7e4c7; }
.alert-success i { color: var(--green); }
.alert-error { background: #fdeceb; border: 1px solid #f5bcb9; }
.alert-error i { color: var(--red); }

.map { margin-top: 24px; height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .map { height: 340px; }
}

/* ---------- Футър ---------- */

.site-footer { background: var(--navy); color: #a9b6c4; padding-top: 56px; font-size: .96rem; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand-text small { color: #8d9bab; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand p { margin: 16px 0 18px; max-width: 26em; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #d3dbe4; }
.site-footer a:hover { color: #fff; }
.footer-list, .footer-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list li { display: flex; gap: 12px; align-items: flex-start; }
.footer-list i { color: #6fb6e6; margin-top: 2px; }
.footer-hours li { display: flex; justify-content: space-between; gap: 16px; max-width: 300px; }
.footer-hours li span:last-child { color: #d3dbe4; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 1.1rem; }
.social a:hover { background: var(--blue); }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem; }
.footer-bottom p { margin: 0; display: flex; gap: 10px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Бързи бутони (телефон) ---------- */

.mobile-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(16, 32, 47, .08);
  }
  .mobile-bar .btn { padding: .8em .6em; }
}

/* ---------- Правни страници ---------- */

.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.legal-head, .legal-body { max-width: 780px; margin: 0 auto; }
.legal-head { margin-bottom: 32px; }
.legal-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal-head p { color: var(--muted); }
.legal-body h2 { font-size: 1.25rem; margin: 2em 0 .6em; }
.legal-body ul { padding-left: 1.2em; }
.legal-body li { margin-bottom: .5em; }
.legal-body strong { color: var(--ink); }

/* ---------- Бисквитки ---------- */

.cookie-banner {
  position: fixed; z-index: 100; left: 16px; bottom: 16px;
  width: min(420px, calc(100% - 32px));
  padding: 18px 20px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(16, 32, 47, .18);
  font-size: .9rem; line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-text strong { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 1rem; margin-bottom: 4px; }
.cookie-text strong i { color: var(--blue); }
.cookie-text p { margin: 0 0 12px; }
.cookie-buttons { display: flex; gap: 8px; }
.cookie-buttons .btn { flex: 1; padding: .65em .8em; font-size: .9rem; }
@media (max-width: 760px) { .cookie-banner { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
