/* ── НИЦ ПО «Бийскэнергомаш» · дизайн-система 2026 ── */
:root {
  --accent: #1f7693;
  --accent-dark: #14586f;
  --accent-deep: #0f3d4c;
  --accent-tint: #e8f1f5;
  --text: #272623;
  --muted: #6b6862;
  --bg: #ffffff;
  --bg-alt: #f0efec;
  --bg-warm: #f7f6f3;
  --line: #e2e0da;
  --line-strong: #c9c6be;
  --ok: #2e7d4f;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 61, 76, 0.08);
  --container: 100%;
  --font: "Segoe UI", "PT Sans", Arial, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 3vw, 48px); }

/* ── Шапка ── */
.topbar {
  background: var(--accent-deep);
  color: #cfe3ea;
  font-size: 13.5px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar .search-form input[type="search"] { width: 210px; padding: 6px 10px; font-size: 13.5px; }
.topbar .search-form button { padding: 6px 11px; font-size: 13.5px; }
.topbar a { color: #ffffff; }
.topbar span { opacity: .85; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(15,61,76,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(16px, 3vw, 48px); max-width: var(--container); margin: 0 auto; flex-wrap: wrap; }
.nav { margin-left: auto; }
.search-form { margin-left: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 64px; width: auto; flex: none; }
a.brand:hover { text-decoration: none; }

.nav ul { list-style: none; display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  display: block; padding: 8px 10px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--text);
}
.nav a:hover { background: var(--bg-alt); text-decoration: none; }
.nav a.active { background: var(--accent-tint); color: var(--accent-dark); font-weight: 600; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 9px 12px; font-size: 15px; cursor: pointer; color: var(--text);
}

/* ── Поиск в шапке ── */
.search-form { display: flex; gap: 6px; margin-left: auto; }
.search-form input[type="search"] { width: 210px; padding: 8px 12px; font-size: 14px; }
.search-form button { padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.search-form button:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ── Hero-логотип на главной ── */
.hero-logo { display: block; width: 33%; min-width: 280px; max-width: 420px; height: auto; margin-bottom: 18px; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ── Результаты поиска ── */
.search-result { border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.search-result h3 { margin: 0 0 6px; }
.search-result .snippet { font-size: 14.5px; color: var(--muted); }
.search-result mark { background: #fdf3d7; color: inherit; }
.search-empty { color: var(--muted); padding: 24px 0; }

/* ── Хлебные крошки ── */
.breadcrumbs { font-size: 13.5px; color: var(--muted); padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "→"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); }

/* ── Типографика ── */
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; letter-spacing: -0.5px; margin: 18px 0 14px; }
h2 { font-size: clamp(21px, 3vw, 27px); line-height: 1.25; margin: 34px 0 12px; }
h3 { font-size: 18.5px; line-height: 1.3; margin: 24px 0 8px; }
.lead { font-size: 18.5px; line-height: 1.55; color: var(--muted); max-width: 60ch; }
p { margin: 0 0 12px; max-width: 78ch; }
.section { padding: 34px 0; }
.section-alt { background: var(--bg-alt); padding: 44px 0; }

/* ── Кнопки ── */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 600; font-size: 15.5px; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-outline { border-color: var(--accent); color: var(--accent-dark); background: transparent; }
.btn-outline:hover { background: var(--accent-tint); text-decoration: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }

/* ── Hero ── */
.hero {
  background:
    linear-gradient(120deg, rgba(15,61,76,.94) 0%, rgba(31,118,147,.88) 60%, rgba(31,118,147,.78) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px);
  color: #fff; padding: 64px 0 58px;
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero .lead { color: #d5e6ec; }
.hero .btn-primary { background: #fff; color: var(--accent-deep); }
.hero .btn-primary:hover { background: #e8f1f5; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 34px; }
.hero-stat b { display: block; font-size: 30px; line-height: 1.1; letter-spacing: -.5px; }
.hero-stat span { font-size: 14px; color: #c2dbe3; }

/* ── Карточки ── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin: 0; }
.card .meta { font-size: 13.5px; color: var(--muted); }
.card .pic {
  border-radius: 8px; border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(45deg, var(--bg-warm) 0 12px, var(--bg-alt) 12px 24px);
  min-height: 150px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 12px;
}
.card .more { margin-top: auto; font-weight: 600; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--accent-tint); color: var(--accent-dark);
}
.badge-gray { background: var(--bg-alt); color: var(--muted); }

/* ── Числа/факты ── */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.fact { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 18px 20px; }
.fact b { display: block; font-size: 26px; letter-spacing: -.5px; color: var(--accent-dark); }
.fact span { font-size: 14px; color: var(--muted); }

/* ── Таблицы ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0 6px; background: var(--bg); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 640px; }
thead th {
  background: var(--accent); color: #fff; text-align: left;
  padding: 10px 14px; font-weight: 600; white-space: nowrap;
}
tbody td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--bg-warm); }
td.num, th.num { white-space: nowrap; }
.table-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ── Списки ── */
.checklist { list-style: none; margin: 12px 0; }
.checklist li { padding: 7px 0 7px 30px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 14px;
  width: 14px; height: 8px; border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.plain-list { margin: 10px 0 14px 22px; }
.plain-list li { margin-bottom: 7px; }

/* ── Блоки-вставки ── */
.note {
  background: var(--accent-tint); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 14px 18px; margin: 16px 0; font-size: 15px;
}
.steps { counter-reset: step; list-style: none; margin: 18px 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding: 14px 18px 14px 62px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

/* ── Фильтры проектов ── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }
.filter-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Формы ── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
label { font-size: 14px; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--bg); color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-hint { font-size: 13px; color: var(--muted); }

/* ── Подвал ── */
.site-footer { background: var(--accent-deep); color: #c9dde5; margin-top: 56px; padding: 40px 0 26px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #c9dde5; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #9dbcc7; }

/* ── Печать и доступность ── */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

/* ── Адаптив ── */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav { display: none; width: 100%; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 0; }
  .nav a { padding: 12px 10px; }
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .topbar .search-form input[type="search"] { width: 150px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .hero-stats { gap: 20px; }
  .hero-logo { width: 60%; min-width: 220px; }
  .topbar .container { justify-content: center; }
}




/* ── Фотогалерея: просмотрщик с листанием ── */
.pv { max-width: 900px; margin: 14px 0 8px; }
.pv-main { position: relative; background: var(--bg-warm); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pv-main img { display: block; width: 100%; height: auto; max-height: 540px; object-fit: contain; margin: 0 auto; }
.pv-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--accent-deep); font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: background .15s;
}
.pv-btn:hover { background: #fff; }
.pv-prev { left: 12px; }
.pv-next { right: 12px; }
.pv-caption { margin: 10px 2px 2px; font-weight: 600; }
.pv-counter { margin: 0 2px 10px; font-size: 13.5px; color: var(--muted); }
.pv-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.pv-thumb { flex: none; width: 96px; height: 64px; object-fit: cover; border-radius: 6px; border: 2px solid var(--line); cursor: pointer; opacity: .75; }
.pv-thumb:hover { opacity: 1; }
.pv-thumb.active { border-color: var(--accent); opacity: 1; }

/* ── FAQ-аккордеон (etu.html) ── */
.faq { display: grid; gap: 10px; margin-top: 14px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-warm);
}
.faq details[open] { background: var(--bg); border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer;
  padding: 13px 46px 13px 18px;
  font-weight: 600;
  color: var(--accent-deep);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px; font-weight: 400; line-height: 1;
  color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent-dark); }
.faq .faq-a { padding: 0 18px 14px; }
.faq .faq-a ul { margin: 4px 0 0 20px; }
.faq .faq-a li { margin: 2px 0; }

/* ── Бейдж-ссылка на фотогалерею объекта (география в about.html) ── */
.badge-link { background: var(--accent-tint); color: var(--accent-dark); border: 1px solid rgba(31, 118, 147, .35); }
.badge-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

