/* =========================================================
   zavodsvay.com — базовые стили
   Mobile-first, без фреймворков
   Фирменный цвет: #04538A
   ========================================================= */

:root {
  --blue: #04538A;
  --blue-dark: #033A5F;
  --blue-light: #0E6FBE;
  --text: #1c1c1c;
  --muted: #5c6b7a;
  --bg: #ffffff;
  --bg-alt: #f2f6fa;
  --border: #dde5ec;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(4, 83, 138, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, h4 {
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  line-height: 1.2;
  color: var(--blue-dark);
}

h1 { font-size: 30px; margin-bottom: 16px; }
h2 { font-size: 24px; margin: 40px 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; color: var(--blue); }

p { margin: 0 0 12px; }

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

img { max-width: 100%; height: auto; }

/* ============ Шапка ============ */

.site-header {
  background: var(--blue);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  position: relative;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
}
.header-logo:hover { text-decoration: none; }
.header-logo img { border-radius: 6px; }
.header-logo__text { font-size: 14px; }

.header-phone {
  margin-left: auto;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.header-phone:hover { text-decoration: none; color: #cfe6f7; }

.hamburger-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.hamburger-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}

.header-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.header-nav a {
  display: block;
  padding: 6px 10px;
  color: #e6f0f8;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
}
.header-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.header-nav a.active { color: #fff; background: rgba(255, 255, 255, 0.2); }

/* ============ Контент ============ */

.content-area {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { margin: 0 6px; }

.page-lead { font-size: 18px; color: var(--muted); max-width: 820px; }

/* ============ Кнопки ============ */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--ghost:hover { background: var(--bg-alt); }
.btn--link { color: var(--blue); font-weight: 700; padding: 0; }
.btn--link:hover { text-decoration: underline; }

/* ============ Каталог серий (главная) ============ */

.section { padding: 8px 0 16px; }
.section--alt { background: var(--bg-alt); border-radius: var(--radius); padding: 24px 0; }
.section__desc { color: var(--muted); max-width: 760px; }

.series-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.series-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.series-card img { margin-bottom: 12px; border-radius: 8px; }
.series-card p { color: var(--muted); font-size: 15px; }
.series-card .btn--link { margin-top: auto; padding-top: 8px; }

/* ============ Преимущества ============ */

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}
.benefit { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

/* ============ CTA ============ */

.cta-block { text-align: center; padding: 32px 0 8px; }
.cta-block__phone { margin-top: 18px; }
.cta-block__phone .btn { margin: 6px; }

.cta-inline {
  margin-top: 40px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.cta-inline h2 { margin-top: 0; }
.cta-inline .btn { margin: 6px; }

/* ============ Таблицы ============ */

.catalog-table-wrap { overflow-x: auto; margin: 12px 0 24px; }

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 640px;
}
.catalog-table th, .catalog-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.catalog-table th { background: var(--blue); color: #fff; font-weight: 600; }
.catalog-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.catalog-table td strong { color: var(--blue-dark); }

.catalog-table--responsive td { border-bottom: 1px solid var(--border); }

.table-note { color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .catalog-table--responsive thead { display: none; }
  .catalog-table--responsive tr { display: block; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; padding: 8px; }
  .catalog-table--responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 8px; }
  .catalog-table--responsive td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--blue);
    flex-shrink: 0;
  }
  .catalog-table--responsive td:last-child { border: 0; }
}

/* ============ Карточки моделей (ВСГ) ============ */

.svai-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0 8px;
}
.svai-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.svai-card__badge {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.svai-card p { color: var(--muted); font-size: 15px; }
.svai-card__rec { font-size: 14px !important; }

/* ============ Intro продукта ============ */

.product-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 8px 0 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
}
.product-intro__img { text-align: center; }
.product-intro__img img { border-radius: 10px; background: #fff; padding: 10px; }
.product-intro__text p:last-child { margin-bottom: 0; }

/* ============ FAQ ============ */

.faq { margin: 12px 0 8px; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 14px 16px;
  background: #fff;
}
.faq__item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-dark);
}
.faq__item p { margin-top: 10px; color: var(--muted); }

/* ============ Поставка и монтаж ============ */

.steps { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
.step { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: #fff; box-shadow: var(--shadow); }
.step__num {
  width: 36px; height: 36px;
  background: var(--blue); color: #fff;
  font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin-bottom: 10px;
}

.check-list { list-style: none; margin: 8px 0 24px; }
.check-list li { padding: 8px 0 8px 32px; position: relative; border-bottom: 1px dashed var(--border); }
.check-list li::before {
  content: "✓";
  position: absolute; left: 6px; top: 8px;
  color: var(--blue); font-weight: 700;
}

.fund-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
.fund-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--bg-alt); }
.fund-card p { color: var(--muted); margin: 0; }

.photo-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 24px 0; }
.photo-grid img { border-radius: var(--radius); object-fit: cover; width: 100%; }

/* ============ Контакты ============ */

.contacts-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 8px 0 24px; }
.contacts-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px;
}
.contacts-card h2 { margin-top: 0; }
.contacts-card p { font-size: 16px; }
.contacts-map iframe { width: 100%; border-radius: var(--radius); }

/* ============ 404 ============ */

.not-found { text-align: center; padding: 60px 0; }
.not-found .btn { margin: 8px; }

/* ============ Подвал ============ */

.site-footer {
  background: var(--blue-dark);
  color: #cfe0ee;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 24px;
}
.site-footer h3 { color: #fff; margin-bottom: 10px; font-size: 16px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 6px; }
.site-footer a { color: #cfe0ee; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 14px; }

.footer-copy { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 16px; padding-bottom: 20px; }
.footer-copy p { font-size: 13px; color: #9db8cd; margin: 0; }

/* ============ Back to top ============ */

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 60;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--blue-dark); }

/* ============ Адаптив: планшет и выше ============ */

@media (min-width: 768px) {
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .fund-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .product-intro { grid-template-columns: 300px 1fr; align-items: center; }
  .contacts-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .series-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .benefits-grid { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 36px; }
}

/* ============ Мобильное меню ============ */

@media (max-width: 767px) {
  .hamburger-toggle { display: block; margin-left: auto; }
  .header-phone { display: none; }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    padding: 10px 16px 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  .header-nav.open { display: block; }
  .header-nav ul { flex-direction: column; }
  .header-nav a { padding: 10px; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
}
