:root {
  --bg: #f7f7f6;
  --bg-card: #ffffff;
  --bg-sidebar: #f0f0ef;
  --bg-dark: #111110;
  --bg-dark-2: #1a1a19;
  --border: #e5e5e3;
  --border-soft: #eeeeed;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #6a6a6a;
  --text-muted: #a0a09e;
  --text-faint: #c0c0be;
  --accent: #5e6ad2;
  --accent-hover: #4f5ab8;
  --accent-soft: #e8eafe;
  --accent-soft-2: #f0f2ff;
  --red: #d95a43;
  --green: #38a169;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', monospace;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: 52px;
}
a { text-decoration: none; color: inherit; }

/* ── HEADER ─────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(247,247,246,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex; align-items: center;
  padding: 0 32px;
}
.logo {
  display: flex; align-items: center; gap: 2px;
  font-size: 15px; font-weight: 700;
  color: var(--text); letter-spacing: -0.3px;
  flex-shrink: 0;
}
.logo-mark {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.5px;
}
.logo-svg {
  width: 48px; height: 48px;
  display: block;
  flex-shrink: 0;
  margin-top: -2px;
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo span { color: var(--text-3); font-weight: 400; }
.nav {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.nav-link {
  font-size: 13.5px; color: var(--text-3);
  padding: 5px 10px; border-radius: var(--radius-sm);
  transition: color 0.1s, background 0.1s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(0,0,0,0.05); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.15s; white-space: nowrap; font-family: var(--font);
}
.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { background: #fff; color: var(--text); border-color: #d0d0ce; }
.btn-primary {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline {
  background: transparent; color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-soft); }
.btn-lg {
  padding: 9px 20px; font-size: 14px; border-radius: var(--radius);
}
.btn-dark {
  background: var(--text); color: #fff;
  border-color: var(--text);
}
.btn-dark:hover { background: #333; border-color: #333; }

/* ── DIVIDER ─────────────────────────────────── */
.divider {
  height: 1px; background: var(--border);
  margin: 0 32px;
}

/* ── FOOTER ─────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 40px 32px 32px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px;
  padding-bottom: 32px; border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-desc { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.footer-brand .logo-svg,
.header .logo-svg { margin-left: -10px; }
.footer-tg {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  font-size: 12.5px; color: var(--text-2); font-weight: 500;
  transition: all 0.12s; width: fit-content;
}
.footer-tg:hover { border-color: #2aabee; color: #2aabee; background: #f0f9ff; }
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-link {
  font-size: 12.5px; color: var(--text-3);
  transition: color 0.1s;
}
.footer-link:hover { color: var(--text); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer { padding: 32px 20px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease forwards; }
.fade-up-2 { animation: fadeUp 0.4s 0.08s ease forwards; opacity: 0; }
.fade-up-3 { animation: fadeUp 0.4s 0.16s ease forwards; opacity: 0; }
.fade-up-4 { animation: fadeUp 0.4s 0.24s ease forwards; opacity: 0; }
.fade-up-5 { animation: fadeUp 0.4s 0.32s ease forwards; opacity: 0; }

/* ── SCROLLBAR ───────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ccc; }

/* ── TAG PILL ────────────────────────────────── */
.tag-pill {
  padding: 4px 10px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3);
  cursor: pointer; transition: all 0.1s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft-2); }

/* ── COOKIE BANNER ───────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 13px; color: var(--text-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { max-width: 600px; }
.btn-sm { padding: 5px 14px; font-size: 12.5px; }

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column; gap: 10px; padding: 14px 16px;
    text-align: center;
  }
  .cookie-banner p { max-width: 100%; }
}

/* ── ARTICLE COVER IMAGE ─────────────────────── */
.article-cover {
  margin: 20px 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--bg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article-cover figcaption {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 8px;
  text-align: center;
}

/* ── LIGHTBOX ────────────────────────────────── */
.lightbox-trigger { cursor: pointer; display: block; }
.lightbox-trigger img { transition: opacity .15s; }
.lightbox-trigger:hover img { opacity: .85; }
.lightbox-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); align-items: center; justify-content: center; padding: 20px; }
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; }
.lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 32px; color: #fff; cursor: pointer; background: none; border: none; line-height: 1; opacity: .6; transition: opacity .15s; font-family: var(--font); z-index: 1; }
.lightbox-close:hover { opacity: 1; }

/* ── BREADCRUMB ─────────────────────────────── */
.breadcrumb { padding: 12px 32px; border-bottom: 1px solid var(--border-soft); background: var(--bg-card); }
.breadcrumb-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; row-gap: 3px; font-size: 12.5px; color: var(--text-muted); }
.breadcrumb-link { color: var(--text-3); transition: color 0.1s; }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-faint); }
.breadcrumb-current { color: var(--text-2); font-weight: 500; }

/* ── HAMBURGER ────────────────────────────────── */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 28px; height: 28px; background: none; border: none; cursor: pointer; padding: 0; margin-left: auto; flex-shrink: 0; z-index: 201; position: relative; }
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-overlay { display: none; position: fixed; inset: 0; z-index: 199; background: rgba(0,0,0,0.4); -webkit-tap-highlight-color: transparent; }
.mobile-overlay.open { display: block; }
.mobile-menu { position: fixed; left: auto; right: 0; top: 0; bottom: 0; width: 300px; max-width: 85vw; z-index: 200; background: var(--bg-card); border-left: 1px solid var(--border); overflow-y: auto; box-shadow: -4px 0 20px rgba(0,0,0,0.08); transition: right 0.3s cubic-bezier(0.4,0,0.2,1); right: -100%; }
.mobile-menu.open { right: 0; }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.mobile-menu-logo { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.mobile-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 50%; cursor: pointer; font-size: 20px; color: var(--text-2); transition: background 0.15s; }
.mobile-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 32px; }
.mobile-link { display: block; font-size: 15px; font-weight: 500; color: var(--text-2); padding: 12px 14px; border-radius: var(--radius); transition: background 0.1s; }
.mobile-link:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.mobile-btn { margin-top: 12px; justify-content: center; }

@media (max-width: 768px) {
  .header { padding: 0 16px; gap: 12px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { display: none; }
  .header-right { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 600px) {
  .breadcrumb { padding: 10px 16px; }
  .breadcrumb-inner { gap: 4px; row-gap: 2px; }
  .header { padding: 0 12px; gap: 8px; }
  .nav { gap: 0; }
  .nav-link { font-size: 12px; padding: 4px 6px; }
  .header-right .btn { padding: 4px 8px; font-size: 12px; }
}

/* ============================================================
   Integrator Contact Modal — попап для прямого запроса контакта
   ============================================================ */
.ic-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ic-overlay.open { display: flex; }

.ic-modal {
  background: var(--bg-card, #fff);
  border-radius: var(--radius, 12px);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  position: relative;
}

.ic-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
  color: var(--text, #111);
  padding-right: 28px;
}

.ic-modal-desc {
  font-size: 14px;
  color: var(--text-3, #555);
  line-height: 1.55;
  margin: 0 0 20px;
}

.ic-modal input[type="text"],
.ic-modal input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border, #d0d0d0);
  border-radius: 8px;
  font: inherit;
  font-size: 16px; /* 16px — НЕ зум на iOS Safari */
  background: var(--bg, #fff);
  color: var(--text, #111);
}
.ic-modal input:focus {
  outline: 2px solid var(--accent, #5e6ad2);
  outline-offset: -1px;
}

.ic-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-3, #555);
  line-height: 1.5;
  margin: 8px 0 16px;
  cursor: pointer;
}
.ic-consent input[type="checkbox"] {
  margin: 2px 0 0;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.ic-consent a {
  color: var(--accent, #5e6ad2);
  text-decoration: underline;
}

.ic-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ic-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

.ic-error {
  color: #c53030;
  font-size: 13px;
  margin-top: 10px;
}

.ic-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--text-3, #888);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.ic-close:hover { background: rgba(0,0,0,0.06); color: var(--text, #111); }

/* Mobile: bottom-sheet вариант */
@media (max-width: 480px) {
  .ic-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .ic-modal {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    max-width: 100%;
    padding: 22px 18px 24px;
  }
  .ic-modal-title { font-size: 18px; padding-right: 32px; }
  .ic-modal-desc { font-size: 13.5px; margin-bottom: 16px; }
  .ic-actions { flex-direction: column-reverse; }
  .ic-actions .btn { width: 100%; }
}

/* Блокировка прокрутки body при открытом модале */
body.ic-open { overflow: hidden; }

/* === Кнопки-варианты в калькуляторе === */
.calc-option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calc-option-btn {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1.3;
}
.calc-option-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.calc-option-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(94,53,177,.22);
}
@media (max-width: 480px) {
  .calc-option-btn { font-size: 13px; padding: 8px 11px; }
}
