/* =========================================================
   ГБЦ Сервис — тематический стиль: автосервис, металл, синий
   ========================================================= */

:root {
  --blue-900: #0e1a2c;
  --blue-800: #15243c;
  --blue-700: #1b2a41;
  --blue-600: #23507c;
  --steel-300: #cfd8e3;
  --steel-400: #9fb0c2;
  --steel-500: #6f8296;
  --accent: #d99a2b;        /* тёплый металл / индикатор */
  --accent-dark: #b57a1a;
  --text: #dce4ee;
  --text-soft: #aebdcf;
  --bg: #0b1320;
  --card: #101c2e;
  --line: #27405e;
  --ok: #43a06b;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, #17324f 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img { max-width: 100%; display: block; }
a { color: var(--steel-300); text-decoration: none; }
a:hover { color: #fff; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
.site-header {
  background: linear-gradient(180deg, #0d1830, #0a1220);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.logo { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.logo-img { height: 50px; width: auto; flex-shrink: 0; display: block; }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: .5px; display:flex; flex-direction:column; line-height:1.1; min-width:0; flex-shrink:1; }
.logo-text b { color: var(--accent); }
.logo-text small { font-size: 11px; font-weight: 400; color: var(--steel-400); font-weight:400; overflow-wrap: anywhere; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 10px 14px; border-radius: 6px;
  color: var(--steel-300); font-weight: 500; font-size: 15px; white-space: nowrap;
}
.nav-list a:hover, .nav-list a.active { background: rgba(57,94,133,.25); color: #fff; }
.nav-list a.active { color: var(--accent); }
.nav-phone {
  padding: 10px 16px; border: 1px solid var(--accent);
  border-radius: 8px; color: var(--accent); font-weight: 700; white-space: nowrap;
}
.nav-phone:hover { background: var(--accent); color: #0e1a2c; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display:block; width:26px; height:3px; background:#fff; margin:5px 0; border-radius:2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, rgba(10,18,32,.92) 0%, rgba(14,26,44,.72) 55%, rgba(14,26,44,.4) 100%);
}
.hero-inner { padding: 60px 20px; max-width: 1160px; width:100%; margin:0 auto; position: relative; z-index: 2; }
.hero-title { font-size: clamp(26px, 4.5vw, 46px); line-height: 1.15; margin: 0 0 16px; max-width: 700px; }
.hero-lead { font-size: clamp(16px, 2vw, 20px); color: var(--steel-300); max-width: 620px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 8px; font-weight: 700; font-size: 15px; border: 0; cursor: pointer; transition:.2s; }
.btn-accent { background: var(--accent); color: #0e1a2c; }
.btn-accent:hover { background: var(--accent-dark); color:#0e1a2c; }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-outline { border: 1px solid var(--accent); color: var(--accent); background: none; }
.btn-outline:hover { background: var(--accent); color: #0e1a2c; }

/* ---------- Контейнер страницы ---------- */
.page { padding-top: 40px; padding-bottom: 60px; }
.page-title { font-size: 30px; color: #fff; margin: 0 0 10px; }
.page-cover {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 24px;
  display: block;
}
.section-title { font-size: 24px; color: #fff; margin: 0 0 22px; display:flex; align-items:center; gap:10px; }
.section-title::after { content:''; flex:1; height:1px; background: var(--line); }
.page-body, .page-body p { color: var(--text); }
.page-body h2, .page-body h3 { color:#fff; }

/* ---------- Карточки ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 44px; }
.feature-card h3 { color: var(--accent); font-size: 18px; margin: 0 0 8px; }
.feature-card p { color: var(--text-soft); margin: 0; }
.about { max-width: 800px; margin-bottom: 20px; color: var(--text-soft); }
.about p:first-child { font-size: 17px; }

/* ---------- Новости ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.news-card { padding: 0; overflow: hidden; }
.news-img { width: 100%; height: 200px; object-fit: cover; }
.news-body { padding: 18px; }
.news-date { color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing:.5px; }
.news-body h3 { margin: 8px 0; font-size: 18px; }
.news-body h3 a { color:#fff; }
.news-body p { color: var(--text-soft); font-size: 15px; }
.news-full { max-width: 820px; margin: 0 auto 20px; }
.news-full .page-body { margin-top: 14px; }
.news-img-full { width: 100%; border-radius: 8px; margin-bottom: 16px; }
.latest-news { margin-top: 30px; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 24px; }
.contact-card h3 { color: var(--accent); margin-top: 0; }
.contact-card a.tel { font-size: 20px; font-weight: 700; color:#fff; }
.contact-card p { margin: 8px 0; color: var(--text-soft); }

/* ---------- Футер ---------- */
.site-footer { background: #0a1220; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 30px; padding: 40px 20px; }
.footer-brand { font-size: 20px; font-weight: 700; color:#fff; margin-bottom: 10px; }
.footer-col p { color: var(--text-soft); margin: 6px 0; }
.footer-title { text-transform: uppercase; font-size: 13px; color: var(--steel-500); margin-bottom: 12px; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin: 6px 0; }
.footer-tel { font-size: 18px; font-weight: 700; color:#fff; }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; color: var(--steel-500); font-size: 14px; }

/* ---------- Таблица цен ---------- */
.price-table { width:100%; border-collapse: collapse; margin: 18px 0; }
.price-table th, .price-table td { border:1px solid var(--line); padding:10px 14px; text-align:left; }
.price-table thead th { background: var(--blue-700); color:#fff; }
.price-table tbody tr:nth-child(even) { background: rgba(57,94,133,.12); }
.price-table td:last-child { color: var(--accent); font-weight:700; white-space:nowrap; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { margin: 0 0 18px; font-size: 14px; }
.breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--steel-500); }
.breadcrumbs li + li::before {
  content: "›"; color: var(--steel-500); margin-right: 4px; opacity: .7;
}
.breadcrumbs a { color: var(--steel-400); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--text); }

/* ---------- Кнопка назад в новостях ---------- */
.back-link { display:inline-block; margin-top: 18px; }

/* ---------- Адаптив ---------- */
/* Средние экраны: телефон компактнее, чтобы не наезжал */
@media (max-width: 1200px) {
  .nav-list a { padding: 10px 10px; font-size: 14px; }
  .logo-text { font-size: 19px; }
  .logo-text small { font-size: 10px; }
  .nav-phone { padding: 9px 13px; font-size: 14px; }
}

/* Бургер-меню на планшетах */
@media (max-width: 1024px) {
  .nav-toggle { display:block; }
  .site-nav {
    position: fixed; top: 70px; right: 0; height: calc(100vh - 70px);
    background: #0d1830; width: 280px; transform: translateX(100%);
    transition: transform .3s; padding: 20px;
    border-left: 1px solid var(--line);
    align-items: flex-start;
    overflow-y: auto;
    box-shadow: -12px 0 30px rgba(0,0,0,.4);
  }
  .site-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 4px; width: 100%; }
  .nav-list a { width: 100%; }
  .nav-phone { margin: 16px 0 0; display:inline-block; }
  /* шапка компактнее */
  .header-inner { min-height: 68px; gap: 12px; }
}

/* Телефоны */
@media (max-width: 480px) {
  .logo-text { font-size: 16px; }
  .logo-text small { font-size: 9px; }
  .logo-img { height: 36px; width: auto; }
  .logo { gap: 8px; }
  .header-inner { min-height: 60px; }
  /* скрыть телефон из шапки на самых узких — он есть в бургере */
  .site-nav { top: 60px; height: calc(100vh - 60px); width: 260px; }
}

/* ---------- Смартфон-улучшения ---------- */
/* безопасные отступы для устройств с вырезом/домашним жестом */
@supports (padding: max(0px)) {
  .site-header .header-inner { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .hero-inner { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .page { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}
/* удобные зоны нажатия на телефоне */
@media (max-width: 600px) {
  .nav-list a { padding: 14px 12px; font-size: 16px; }
  .btn { padding: 15px 22px; width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .price-table td:last-child { white-space: normal; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .page-title { font-size: 24px; }
  .section-title { font-size: 20px; }
  .news-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .contacts-grid { grid-template-columns: 1fr; gap: 16px; }
  .page { padding-top: 26px; padding-bottom: 40px; }
  .hero { min-height: 340px; }
  .hero-inner { padding: 40px 20px; }
  /* таблицы на телефоне — горизонтальная прокрутка вместо слома */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap .price-table { min-width: 480px; }
}
/* предотвращение горизонтального скролла */
body { overflow-x: hidden; }

/* ---------- Мобильная доводка ---------- */
/* hero-картинка и обложки страниц сохраняют пропорции */
.hero-bg { width: 100%; height: 100%; object-fit: cover; }
.page-cover { width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.news-img { width: 100%; height: 200px; object-fit: cover; }
.news-img-full { width: 100%; height: auto; border-radius: 8px; }

/* крупные сетки: не допускаем переполнения на средних экранах */
.news-grid, .contacts-grid, .footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* планшеты: 2-3 колонки вместо тесной сетки */
@media (max-width: 980px) and (min-width: 601px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* планшеты и телефоны: средние размеры */
@media (max-width: 767px) {
  .hero { min-height: 320px; }
  .hero-title { font-size: 26px; margin-bottom: 12px; }
  .hero-lead { font-size: 16px; }
  .features-grid, .news-grid, .contacts-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .news-img { height: 180px; }
  .section-title { font-size: 21px; }
}

/* очень маленькие экраны */
@media (max-width: 380px) {
  .logo-img { height: 32px; width: auto; }
  .logo-text { font-size: 15px; }
  .btn { font-size: 14px; padding: 13px 16px; }
}

/* Шапка на узких экранах: убираем подзаголовок, чтобы не переполнялось */
@media (max-width: 420px) {
  .logo-text small { display: none; }
  .header-inner { gap: 8px; }
  .nav-toggle { margin-left: auto; }
}

/* Контрастные кнопки на мобильном (над картинкой hero) */
@media (max-width: 600px) {
  .hero-actions .btn-light {
    background: rgba(20, 32, 52, .72);
    border: 1px solid rgba(255,255,255,.5);
    color: #fff;
  }
  .hero-actions .btn { font-size: 15px; }
}

/* ---------- Большие экраны ---------- */
@media (min-width: 1400px) {
  .container { max-width: 1260px; }
  .page-title { font-size: 34px; }
  .section-title { font-size: 26px; }
  .features-grid { gap: 22px; }
}
@media (min-width: 1800px) {
  .container { max-width: 1360px; }
  .page-title { font-size: 36px; }
}

/* ---------- Универсальная защита контента ---------- */
iframe, video, embed, object { max-width: 100%; }
.page-body img { height: auto; }
.page-body table { width: 100%; border-collapse: collapse; }
.page-body { overflow-wrap: break-word; }
/* незавёрнутые таблицы не ломают вёрстку на узких экранах */
@media (max-width: 767px) {
  .page-body table:not(.price-table) { display: block; overflow-x: auto; }
  .page-body ul, .page-body ol { padding-left: 20px; }
  .breadcrumbs { font-size: 13px; margin-bottom: 14px; }
}


/* ---------- SEO-страницы: услуги, FAQ, связанные ссылки ---------- */
.service-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.service-list li a {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--steel-300);
}
.service-list li a:hover { border-color: var(--accent); color: #fff; }
.service-list b { display: block; color: var(--accent); margin-bottom: 4px; }

.feature-card h3 a { color: inherit; }
.feature-card h3 a:hover { color: #fff; }

.faq { margin: 36px 0 10px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 26px 14px 0;
  font-weight: 700;
  color: #fff;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 12px;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 0 16px; color: var(--text-soft); }

.related { margin: 30px 0 0; }
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.related li a {
  display: block;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--steel-300);
}
.related li a:hover { border-color: var(--accent); color: #fff; }

@media (max-width: 600px) {
  .service-list, .related ul { grid-template-columns: 1fr; }
}