/* ============================================================
   Автосервиз БОРИ КАР — стилове
   Цветовете се сменят от променливите по-долу.
   Изображения:
     logo.png  — логото в горната лента
     bg.jpg    — фон на началната страница
     bg2.jpg   — фон на страница „Цени“ (неподвижен при скрол)
   ============================================================ */

:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --text: #999999;
  --muted: #98a2b0;
  --accent: #e01b1b;
  --accent-hover: #f52a2a;
  --on-accent: #f2f3f5;
  --border: #252a32;
  --radius: 14px;
  --wrap: 1120px;
  --shadow: 0 20px 45px -25px rgba(0, 0, 0, .95);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, iframe { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; 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: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--on-accent); padding: 12px 18px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.accent { color: var(--accent); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 650; font-size: .95rem; letter-spacing: .01em;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-call { background: var(--accent); color: var(--on-accent); }
.btn-call:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #3a414c; background: var(--surface); }

.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; margin-top: 10px; }

/* ---------- Хедър ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 13, 16, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; gap: 18px; height: 100px; }

/* логото да стои малко по-вляво */
.site-header .wrap { padding-left: 6px; }

.brand-group { display: flex; align-items: stretch; gap: 18px; flex: none; align-self: stretch; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: var(--text);
  flex: none;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  height: 44px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
  margin-top: -3px;
}

.owner-name {
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 550;
  letter-spacing: .02em;
  line-height: 1.15;
  white-space: nowrap;
  margin-left: 28px;
}

/* второ лого — показва се само ако файлът logo2.png съществува */
.brand-logo-secondary-wrap {
  align-self: stretch;
  display: flex;
  align-items: stretch;
}

.brand-logo-secondary {
  height: 100%;
  width: auto;
  max-width: 400px;
  object-fit: contain;
  display: block;
}

.brand-text { font-size: 1.15rem; font-weight: 500; letter-spacing: .01em; color: var(--text); }
.brand-text strong { font-weight: 800; color: var(--accent); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 8px;
  font-size: .95rem; font-weight: 550;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.header-call { margin-left: 6px; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Начален екран (със снимка на сервиза) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(84vh, 780px);
  padding: clamp(72px, 11vw, 130px) 0;
  background-color: #0b0d10;
  background-image:
    linear-gradient(180deg, rgba(11, 13, 16, .74) 0%, rgba(11, 13, 16, .86) 100%),
    url('bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-inner { position: relative; width: 100%; max-width: 820px; }

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.06;
  margin: 0 0 14px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .55);
}

.hero-sub {
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Статус „отворено / затворено“ */

.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .88rem; font-weight: 600; letter-spacing: .01em;
  color: var(--text);
  margin: 0 0 26px;
}
.status .dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--muted);
  transition: background .2s ease, box-shadow .2s ease;
}
.status.is-open .dot { background: #35d07f; box-shadow: 0 0 0 4px rgba(53, 208, 127, .2); }
.status.is-closed .dot { background: #ff5c5c; box-shadow: 0 0 0 4px rgba(255, 92, 92, .2); }

/* ---------- Заглавие на вътрешна страница ---------- */

.page-head {
  padding: clamp(44px, 6vw, 76px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(224, 27, 27, .07), transparent);
}
.page-head .lede { margin-bottom: 0; }

.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 62ch; }

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

.section { padding: clamp(52px, 7vw, 92px) 0; }
.section-tight { padding-top: clamp(32px, 4vw, 52px); }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Карти / мрежа ---------- */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #3a414c; transform: translateY(-2px); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Карта ---------- */

.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-height: 380px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }
.map-wide { min-height: 440px; }
.map-wide iframe { min-height: 440px; }

.map-link {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ---------- Снимка на сервиза (чиста, без затъмнение) ---------- */

.photo-band {
  width: 100%;
  height: clamp(240px, 42vw, 480px);
  background-image: url('bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #14171c;
}

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

.contact-simple {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 48px;
  margin-top: 44px;
}
.contact-simple h2 {
  font-size: 1rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); margin-bottom: .6em;
}
.contact-simple p { color: var(--muted); }

.contact-phone {
  color: var(--accent) !important;
  font-weight: 650;
  font-size: 1.05rem;
}
.contact-owner {
  color: var(--accent);
  font-weight: 650;
  margin-left: 8px;
}

/* ---------- Работно време ---------- */

.hours { width: 100%; border-collapse: collapse; margin: 4px 0 0; font-size: .95rem; }
.hours th, .hours td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 550; color: var(--muted); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.closed td { color: #e05555; }

/* ---------- Ценоразпис ---------- */

.price-block {
  margin-bottom: 24px;
  background: rgba(11, 13, 16, .74);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.price-block h2 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin-bottom: 6px;
}
.price-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.price-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.price-list li:last-child { border-bottom: none; }
.price-name { display: block; font-weight: 600; }
.price-desc { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.price {
  font-weight: 700; font-size: 1.05rem; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text);
}

/* таблица с две колони (автоклиматици) */
.price-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .95rem; }
.price-table th,
.price-table td {
  text-align: left;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.price-table th {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 650;
  padding-top: 0;
}
.price-table th:not(:first-child),
.price-table td:not(:first-child) { text-align: right; }
.price-table td:first-child { font-weight: 600; }
.price-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Фон на страница „Цени“ (неподвижен при скрол) ---------- */

body.page-bg {
  background-color: #0b0d10;
  background-image:
    linear-gradient(180deg, rgba(11, 13, 16, .82) 0%, rgba(11, 13, 16, .9) 100%),
    url('bg2.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.page-bg .page-head { background: transparent; border-bottom: none; }
body.page-bg .section { background: transparent; }

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

.site-footer { border-top: 1px solid var(--border); padding: 44px 0 56px; background: #08090b; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { font-size: 1.1rem; margin: 0 0 6px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-inner nav a { color: var(--muted); font-size: .92rem; }
.footer-inner nav a:hover { color: var(--text); }
.footer-inner .small { margin: 0; }

/* ---------- Мобилна лента за обаждане ---------- */

.mobile-call {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  align-items: center; justify-content: center; gap: 10px;
  padding: 15px 20px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 750; font-size: 1rem;
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .9);
}
.mobile-call:hover { text-decoration: none; }
.mobile-call svg { width: 20px; height: 20px; }

/* ---------- Леки анимации при зареждане на страницата ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-inner > *,
.page-head .wrap > *,
.section-head,
.card,
.map-frame,
.map-link,
.price-block,
.contact-simple > div {
  animation: fadeUp .65s cubic-bezier(.22, .61, .36, 1) backwards;
}

.hero-inner > *:nth-child(1) { animation-delay: .04s; }
.hero-inner > *:nth-child(2) { animation-delay: .13s; }
.hero-inner > *:nth-child(3) { animation-delay: .22s; }

.page-head .wrap > *:nth-child(1) { animation-delay: .04s; }
.page-head .wrap > *:nth-child(2) { animation-delay: .13s; }

.card:nth-child(1) { animation-delay: .04s; }
.card:nth-child(2) { animation-delay: .12s; }
.card:nth-child(3) { animation-delay: .20s; }

.price-block:nth-child(1) { animation-delay: .04s; }
.price-block:nth-child(2) { animation-delay: .12s; }
.price-block:nth-child(3) { animation-delay: .20s; }

.contact-simple > div:nth-child(1) { animation-delay: .04s; }
.contact-simple > div:nth-child(2) { animation-delay: .12s; }
.contact-simple > div:nth-child(3) { animation-delay: .20s; }

/* ---------- Адаптивност ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 62px; }

  .nav-toggle { display: flex; }
  .header-call { display: none; }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: #0f1216;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: max-height .32s cubic-bezier(.22, .61, .36, 1),
                opacity .26s ease,
                transform .32s cubic-bezier(.22, .61, .36, 1),
                padding .32s ease;
  }
  .nav.open {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding: 10px 16px 16px;
  }

  .nav a {
    padding: 12px 14px;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .24s ease, transform .24s ease;
  }
  .nav.open a { opacity: 1; transform: translateY(0); }
  .nav.open a:nth-child(1) { transition-delay: .08s; }
  .nav.open a:nth-child(2) { transition-delay: .15s; }
  .nav.open a:nth-child(3) { transition-delay: .22s; }

  .mobile-call { display: flex; }

  .header-inner { gap: 10px; height: 102px; }
  .brand-group { gap: 10px; flex: 1; min-width: 0; }
  .brand { justify-content: space-between; height: 100%; padding: 10px 0; }
  .brand-logo { height: 54px; max-width: 150px; }
  .owner-name { margin-left: 20px; font-size: .95rem; }
  .brand-logo-secondary-wrap { margin-left: auto; }
  .brand-logo-secondary { max-width: 110px; }
  .nav-toggle { width: 52px; height: 52px; }
  .nav-toggle span { width: 22px; }

  .hero { min-height: 74vh; }
  .hero h1 { font-size: clamp(1.6rem, 7.2vw, 2.6rem); }
  .hero-actions .btn { width: 100%; }

  .price-block { padding: 20px 18px 6px; }
  .price-list li { gap: 14px; }
  .price { font-size: .98rem; }

  .map-frame, .map-frame iframe, .map-wide, .map-wide iframe { min-height: 320px; }

  /* iOS не поддържа fixed фон — връщаме нормално поведение */
  body.page-bg { background-attachment: scroll; }
}

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