/* ДТА-Сервис — стили сайта-визитки. Mobile-first, без внешних зависимостей. */

:root {
  --bg:        #f4f5f7;
  --tint:      #eceef2;
  --card:      #ffffff;
  --border:    #e2e6ec;
  --ink:       #1b232e;
  --muted:     #5c6773;
  --dark:      #12181f;
  --dark-2:    #1a2230;
  --accent:    #ff6b00;
  --accent-d:  #e85f00;
  --wa:        #25d366;
  --wa-d:      #1ebe5b;
  --radius:    14px;
  --shadow:    0 6px 24px rgba(18, 24, 31, .08);
  --wrap:      1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, iframe { max-width: 100%; }
a { color: inherit; }

/* Атрибут hidden должен побеждать любой display в стилях ниже
   (кнопки WhatsApp, отфильтрованные позиции каталога). */
[hidden] { display: none !important; }

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

/* ---------- Кнопки ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h);
  padding: 0 18px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, transform .1s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm  { --h: 38px; font-size: 14px; padding: 0 12px; border-radius: 9px; }
.btn--lg  { --h: 54px; font-size: 16.5px; padding: 0 24px; border-radius: 12px; }
.btn--accent  { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-d); }
.btn--wa      { background: var(--wa); color: #fff; }
.btn--wa:hover{ background: var(--wa-d); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost   { background: rgba(255,255,255,.08); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.16); }

/* На тёмном фоне героя контурная кнопка светлая */
.hero .btn--outline { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn--outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Верхняя панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px;
  background: rgba(18, 24, 31, .96);
  backdrop-filter: saturate(140%) blur(6px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand__mark { color: var(--accent); display: inline-flex; }
.brand__text b { display: block; font-size: 16px; line-height: 1.1; letter-spacing: .2px; }
.brand__text small { display: block; font-size: 11.5px; color: #aab3bd; }
.topbar__nav { display: none; gap: 20px; margin-left: auto; }
.topbar__nav a {
  font-size: 14.5px; font-weight: 600; color: #c7cfd8; text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease;
}
.topbar__nav a:hover { color: #fff; border-color: var(--accent); }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
/* Переключатель языка ҚАЗ/РУС. Лежит в .topbar__actions, а не в .topbar__nav:
   меню на телефонах скрыто, а язык должен переключаться на любом экране. */
.lang {
  flex: 0 0 auto;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  color: #c7cfd8; text-decoration: none;
  padding: 6px 9px; border: 1px solid #2c3742; border-radius: 8px;
  transition: color .15s ease, border-color .15s ease;
}
.lang:hover { color: #fff; border-color: var(--accent); }
.topbar__phone { font-variant-numeric: tabular-nums; }

/* ---------- Герой ---------- */
.hero {
  color: #fff;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(255,107,0,.18), transparent 55%),
    linear-gradient(160deg, #131a23 0%, #0f141b 60%, #10161d 100%);
  border-bottom: 3px solid var(--accent);
}
.hero__inner { max-width: var(--wrap); margin: 0 auto; padding: 32px 18px 30px; }
.eyebrow {
  margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 7vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -.5px;
}
.hero__lead { margin: 0 0 18px; max-width: 640px; font-size: clamp(15px, 2.3vw, 18px); color: #c7cfd8; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero__cta .btn { flex: 1 1 auto; }
.hero__addr {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; font-size: 15px; color: #dfe4ea;
}
.hero__addr svg { color: var(--accent); flex: none; }

/* ---------- Секции ---------- */
.section { padding: 30px 0; }
.section--tint { background: var(--tint); }
/* Две секции подряд на одном фоне не должны складывать отступы в двойной */
.section:not(.section--tint) + .section:not(.section--tint) { padding-top: 4px; }
.section__title {
  margin: 2px 0 16px; font-size: clamp(23px, 4.5vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.3px;
}
.eyebrow--dark { color: var(--accent-d); margin-bottom: 6px; }

/* ---------- О компании ---------- */
.about p { margin: 0; max-width: 820px; font-size: clamp(15px, 2.2vw, 17px); color: #33404d; }
.about p + p { margin-top: 12px; }

/* =========================================================
   КАТАЛОГ И ЦЕНЫ
   ========================================================= */
.catalog__lead { margin: -8px 0 14px; max-width: 720px; color: #33404d; font-size: 15.5px; }

/* --- Панель: поиск + вкладки --- */
.catalog__bar { display: grid; gap: 10px; margin-bottom: 10px; }

.search { position: relative; display: flex; align-items: center; }
.search > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; min-height: 48px;
  padding: 0 40px 0 42px;
  font: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: #97a1ac; }
.search input:focus { outline: none; border-color: var(--accent); }
.search__clear {
  position: absolute; right: 8px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--muted);
  background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.search__clear:hover { background: var(--tint); color: var(--ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--muted);
  min-height: 40px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.tab:hover { border-color: var(--accent); color: var(--accent-d); }
.tab.is-active { background: var(--dark); border-color: var(--dark); color: #fff; }

.catalog__count { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }

/* --- Список позиций --- */
.catalog {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.catalog__group {
  margin: 0; padding: 10px 16px 9px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--muted); background: #f7f8fa; border-bottom: 1px solid var(--border);
}
.catalog__group + .item summary { border-top: 0; }

/* --- Раскрывающаяся строка --- */
.item { border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }

.item summary {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 42px 10px 16px;
  position: relative;
  cursor: pointer;
  list-style: none;
  transition: background-color .12s ease;
}
.item summary::-webkit-details-marker { display: none; }
.item summary:hover { background: #fafbfc; }
.item[open] summary { background: #fafbfc; }

/* Стрелка-шеврон справа */
.item summary::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transform-origin: center;
  transition: transform .2s ease, border-color .2s ease;
}
.item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--accent-d); }

.item__n { flex: 1 1 auto; min-width: 0; font-size: 15.5px; line-height: 1.35; }
.item__n b { font-weight: 700; }
.item__n i { font-style: normal; color: var(--muted); font-size: 14px; }
.item__p { flex: none; text-align: right; line-height: 1.15; }
.item__p b {
  display: block; font-size: 16px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.item__p small { display: block; font-size: 11.5px; color: var(--muted); }

/* Содержимое раскрытой строки */
.item__b { padding: 0 16px 12px; background: #fafbfc; }
.pl { margin: 0; }
.pl > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 6px 0; border-bottom: 1px dashed var(--border);
}
.pl > div:last-child { border-bottom: 0; }
.pl dt { color: #33404d; font-size: 14.5px; }
.pl dd {
  margin: 0; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-size: 15px;
}
/* Ремонт с запчастями / с новым распылителем — выделяем акцентом */
.pl > div:last-child dd { color: var(--accent-d); }

/* --- Ответы в блоке «Частые вопросы» (та же вёрстка, что у каталога) --- */
.faq__a { margin: 0; padding-bottom: 4px; color: #33404d; font-size: 15px; }
.faq__a a { color: var(--accent-d); font-weight: 600; }

.catalog__empty { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.catalog__empty a { color: var(--accent-d); font-weight: 600; }

/* --- Примечание под каталогом --- */
.notice {
  margin-top: 14px; padding: 14px 18px;
  background: rgba(255,107,0,.07); border: 1px solid rgba(255,107,0,.25);
  border-radius: var(--radius);
}
.notice p { margin: 0 0 6px; color: #33404d; font-size: 14.5px; }
.notice p:first-child { font-size: 16px; color: var(--ink); }
.notice .btn { margin-top: 6px; }

/* ---------- Контакты + карта ---------- */
.contacts { display: grid; gap: 18px; grid-template-columns: 1fr; }
.info-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.info-row:first-child { padding-top: 0; }
.info-row svg { color: var(--accent-d); flex: none; margin-top: 2px; }
.info-row b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.info-row a, .info-row span { font-size: 16px; color: var(--ink); text-decoration: none; }
.info-row a:hover { color: var(--accent-d); }
.contacts__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.contacts__buttons .btn { flex: 1 1 140px; }
.contacts__maps { display: flex; flex-wrap: wrap; gap: 8px; }
.maplink {
  font-size: 13.5px; text-decoration: none; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--card);
}
.maplink:hover { color: var(--accent-d); border-color: var(--accent); }
.maplink--2gis { color: #0a8f3c; border-color: #b7e3c6; background: #f0faf3; font-weight: 600; }
.maplink--2gis:hover { color: #0a8f3c; border-color: #0a8f3c; }
.contacts__map iframe {
  width: 100%; height: 340px; border: 0; display: block;
  border-radius: var(--radius); box-shadow: var(--shadow); background: #dfe3e8;
}
/* Заглушка карты: настоящий iframe подгружается по клику */
.map-facade {
  width: 100%; height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font: inherit; color: var(--muted); text-align: center;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(255,107,0,.10), transparent 70%),
    repeating-linear-gradient(45deg, #e8ebef 0 14px, #e2e6ec 14px 28px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .15s ease;
}
.map-facade:hover { border-color: var(--accent); }
.map-facade__pin { color: var(--accent-d); }
.map-facade__t b { display: block; font-size: 16px; color: var(--ink); }
.map-facade__t small { display: block; font-size: 13.5px; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: #c7cfd8; padding: 24px 0 18px; }
.footer__inner { display: grid; gap: 16px; grid-template-columns: 1fr; }
.footer b { color: #fff; font-size: 16px; }
.footer p { margin: 6px 0 0; font-size: 14px; color: #98a2ad; }
.footer a { color: #fff; text-decoration: none; font-size: 17px; font-weight: 600; }
.footer a:hover { color: var(--accent); }
.footer__mail { font-size: 14px !important; font-weight: 400 !important; color: #98a2ad !important; }
.footer__mail:hover { color: var(--accent) !important; }
.footer__copy { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #7c8791; }

/* ---------- Плавающие кнопки: WhatsApp + звонок ---------- */
.fabs {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: flex; flex-direction: column; gap: 12px;
}
.fab {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 26px rgba(255, 107, 0, .45);
  transition: transform .15s ease, background-color .15s ease;
}
.fab:hover { background: var(--accent-d); transform: scale(1.06); }
.fab--wa { background: var(--wa); box-shadow: 0 8px 26px rgba(37, 211, 102, .5); }
.fab--wa:hover { background: var(--wa-d); }

/* ---------- Адаптив ---------- */
@media (min-width: 560px) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .item summary { padding-left: 20px; padding-right: 46px; }
  .item__b { padding-left: 20px; padding-right: 20px; }
  .catalog__group { padding-left: 20px; }
}
@media (min-width: 720px) {
  .section { padding: 40px 0; }
  .hero__inner { padding: 44px 18px 40px; }
  .hero__cta .btn { flex: 0 0 auto; }
  .contacts { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .contacts__map iframe { height: 480px; }
  .topbar__nav { display: flex; }
  .catalog__bar { grid-template-columns: minmax(260px, 380px) 1fr; align-items: center; }
  .tabs { justify-content: flex-end; }
  .item__n { font-size: 16px; }
  /* На широких экранах цены раскрытой позиции — в две колонки */
  .pl { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .pl > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
/* На узких экранах прячем подпись бренда и текст телефона в шапке */
@media (max-width: 430px) {
  .brand__text small { display: none; }
  .topbar__phone { display: none; }
  /* Переключатель языка занял место в шапке. WhatsApp здесь прячем —
     он никуда не делся, внизу экрана висит плавающая кнопка. */
  .topbar__actions .btn--wa { display: none; }
  .lang { padding: 5px 7px; font-size: 12px; }
  .item summary { gap: 10px; }
  .item__p b { font-size: 15px; }
}

/* =========================================================
   ПОДСТРАНИЦЫ «ремонт по маркам» — /remont-tnvd-kamaz/ и др.
   Своих компонентов минимум: страницы переиспользуют .hero,
   .section, .catalog, .item, .notice с главной. Ничего нового
   не грузится — style.css у посетителя уже в кэше.
   ========================================================= */

/* Герой подстраницы ниже главного: прайс должен быть ближе к первому экрану */
.hero--sub .hero__inner { padding: 24px 18px 22px; }
.hero--sub h1 { font-size: clamp(25px, 5.6vw, 40px); }

/* Хлебные крошки. Задаём только padding-top: боковые отступы приходят
   от .container, а полная запись padding их бы обнулила. */
.crumbs { padding-top: 12px; }
.crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted);
}
.crumbs li { display: flex; align-items: center; gap: 7px; }
.crumbs li:not(:last-child)::after { content: "›"; color: #aab3bd; }
.crumbs a { color: var(--accent-d); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Списки: что входит в ремонт, признаки неисправности */
.checks { max-width: 860px; margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.checks li { position: relative; padding-left: 27px; font-size: 15.5px; color: #33404d; }
.checks li::before {
  content: ""; position: absolute; left: 5px; top: 7px;
  width: 6px; height: 11px;
  border: solid var(--accent-d); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* Вариант с точками — для перечня симптомов, там «галочка» читается неверно */
.checks--dot li::before {
  top: 10px; left: 3px; width: 7px; height: 7px;
  border: 0; border-radius: 50%; background: var(--accent-d); transform: none;
}

/* Карточки-ссылки на соседние страницы (перелинковка) */
.pagecards { display: grid; gap: 10px; grid-template-columns: 1fr; }
.pagecard {
  display: block; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s ease, transform .1s ease;
}
.pagecard:hover { border-color: var(--accent); }
.pagecard:active { transform: translateY(1px); }
.pagecard b { display: block; font-size: 16px; line-height: 1.25; }
.pagecard span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.pagecard em { font-style: normal; color: var(--accent-d); font-weight: 600; }

@media (min-width: 560px) {
  .pagecards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .hero--sub .hero__inner { padding: 34px 18px 30px; }
  .checks { grid-template-columns: 1fr 1fr; column-gap: 30px; }
}

/* ---------- Доступность ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
