/* Экология-М — дополнения к пре-рендеренному dc-стилю: адаптив меню, слайдер, оглавление */

/* гамбургер скрыт на десктопе */
.em-burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 3px; background: #14213D; border: 0; cursor: pointer; margin-left: 8px; flex-direction: column; gap: 4px; }
.em-burger span { display: block; width: 22px; height: 2px; background: #fff; transition: .25s; }
.em-header.nav-open .em-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.em-header.nav-open .em-burger span:nth-child(2) { opacity: 0; }
.em-header.nav-open .em-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* активный пункт оглавления статьи */
a[data-active="1"] { color: #15B45C !important; font-weight: 600; }

/* слайдер: гарантируем, что без JS виден первый слайд (no-JS / до инициализации) */
.em-slider > div:not(:first-child) { opacity: 0; }
.em-slider > div { transition: opacity .55s ease; }

/* Контакты доступны в шапке независимо от свёрнутого меню. */
.em-header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.em-header-contacts { display: flex; flex-direction: column; gap: 4px; }
.em-header-contacts a { color: #14213d; font-size: 13px; text-decoration: none; white-space: nowrap; }
.em-header-contacts a:last-child { color: #16874a; font-size: 12px; }

/* В шаблонах меню скрывалось до 1024px: перекрываем это правило явно.
   На планшете горизонтальная навигация занимает вторую строку шапки. */
@media (min-width: 768px) {
  header nav.em-desktop-nav { display: flex !important; flex-direction: row !important; }
  .em-burger { display: none !important; }
  .em-header > div { gap: 16px !important; }
}
@media (min-width: 1100px) and (max-width: 1359px) {
  .em-header > div { padding-left: 24px !important; padding-right: 24px !important; gap: 12px !important; }
  header nav.em-desktop-nav { gap: 14px !important; }
  header nav.em-desktop-nav a { font-size: 14px !important; }
  .em-header-actions { gap: 12px !important; }
  .em-header-actions > a { padding: 12px 14px !important; font-size: 11px !important; }
  .em-header > div > a { gap: 8px !important; }
  .em-header > div > a > span { font-size: 18px !important; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .em-header > div { height: auto !important; padding: 12px 24px !important; flex-wrap: wrap; row-gap: 10px !important; }
  .em-header-actions { margin-left: auto; gap: 16px !important; }
  header nav.em-desktop-nav { order: 3; width: 100%; justify-content: center; gap: 28px !important; padding: 8px 0 2px; }
  header nav.em-desktop-nav a { font-size: 14px !important; }
}
@media (max-width: 767px) {
  .em-burger { display: inline-flex; flex-shrink: 0; }
  header nav.em-desktop-nav { display: none !important; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column !important; align-items: stretch !important; gap: 0 !important; background: #14213d; padding: 12px 24px; z-index: 50; box-shadow: 0 16px 40px #0003; }
  .em-header.nav-open nav.em-desktop-nav { display: flex !important; }
  .em-header nav.em-desktop-nav a { color: white !important; padding: 12px 0; }
  .em-header > div { height: auto !important; min-height: 74px; padding: 10px 16px !important; flex-wrap: wrap; gap: 12px !important; }
  .em-header-actions { margin-left: auto; }
  .em-header-actions > a { display: none !important; }
  .em-header > div > a { gap: 6px !important; }
  .em-header > div > a > span { font-size: 16px !important; }
  .em-header > div > a > img { width: 38px !important; height: 38px !important; }
  .em-burger { width: 36px; height: 36px; margin: 0; }
}
.em-consultation-float { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); right: 22px; z-index: 60; background: #15b45c; color: #fff; border: 0; border-radius: 6px; padding: 16px 22px; font: 600 14px Manrope, sans-serif; cursor: pointer; box-shadow: 0 6px 24px #14213d33; }
.em-consultation-dialog { box-sizing: border-box; width: min(500px, calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 30px; border: 1px solid #dbe1e9; border-radius: 6px; background: #fff; color: #14213d; font-family: Manrope, sans-serif; overflow-y: auto; }
.em-consultation-dialog::backdrop { background: #14213dbb; }
.em-consultation-dialog h2 { font-size: 25px; padding-right: 24px; margin: 0 0 12px; }
.em-consultation-dialog > p { color: #56657e; line-height: 1.5; }
.em-consultation-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; color: #14213d; font-size: 28px; cursor: pointer; width: 40px; height: 40px; }
.em-consultation-form { display: flex; flex-direction: column; gap: 14px; color: #14213d; text-align: left; }
.em-consultation-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.em-consultation-form label > span { font-size: 12px; }
.em-consultation-form input:not([type="checkbox"]), .em-consultation-form textarea { box-sizing: border-box; width: 100%; border: 1px solid #c2cddd; border-radius: 3px; padding: 11px 12px; color: #14213d; background: #fff; font: inherit; }
.em-consultation-form textarea { resize: vertical; }
.em-consultation-form .em-form-consent { flex-direction: row; align-items: flex-start; gap: 10px; line-height: 1.5; }
.em-form-consent input { margin: 4px 0; flex-shrink: 0; }
.em-form-consent a { color: #16874a; }
.em-consultation-form button[type="submit"] { padding: 15px; border: 0; border-radius: 3px; color: #fff; background: #15b45c; font: 600 15px Manrope, sans-serif; cursor: pointer; }
.em-consultation-form button:disabled { opacity: .6; cursor: wait; }
.em-form-status { margin: 0; font-size: 13px; line-height: 1.5; color: #56657e; }
.em-file-help { margin: -6px 0 0; color: #56657e; font-size: 12px; line-height: 1.5; }
.em-file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.em-file-list:empty { display: none; }
.em-file-list li { display: flex; align-items: start; justify-content: space-between; gap: 12px; font-size: 13px; }
.em-file-list span { min-width: 0; overflow-wrap: anywhere; }
.em-file-list button { flex-shrink: 0; border: 0; padding: 0; color: #16874a; background: none; cursor: pointer; font: inherit; }
.em-consultation-form .em-form-trap { display: none; }
.em-consultation-form :focus-visible, .em-consultation-float:focus-visible { outline: 2px solid #16874a; outline-offset: 3px; }
@media (max-width: 480px) {
  .em-consultation-dialog { padding: 24px 18px; }
  .em-consultation-float { right: 12px; bottom: 12px; padding: 13px 16px; font-size: 13px; }
}
/* Встроенная форма остаётся читаемой и на тёмных секциях дизайна. */
.em-consultation-form { background: #fff; padding: 22px; border-radius: 4px; }
.em-consultation-dialog .em-consultation-form { padding: 0; }
.em-header-contacts a { font-size: 13px !important; }
.em-header-contacts a:last-child { font-size: 12px !important; }

/* Настоящие логотипы сохраняют фирменные цвета и пропорции. */
.em-brands { background: #fff; padding: 80px 0; border-bottom: 1px solid #14213d14; }
.em-brands-wrap { box-sizing: border-box; max-width: 1240px; margin: 0 auto; padding: 0 32px; font-family: Manrope, sans-serif; color: #14213d; }
.em-brands-kicker { margin: 0 0 18px; font: 600 12px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #16874a; }
.em-brands h2 { max-width: 760px; margin: 0 0 18px; font-size: 38px; line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
.em-brands-lead { max-width: 720px; margin: 0 0 36px; color: #56657e; font-size: 16px; line-height: 1.65; }
.em-brands-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.em-brands-grid li { min-width: 0; }
.em-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; box-sizing: border-box; height: 144px; padding: 20px 14px 16px; border: 1px solid #14213d14; border-radius: 3px; text-decoration: none; background: #fff; transition: border-color .2s, background .2s; }
.em-brand:hover { border-color: #15b45c; background: #f8fbf9; }
.em-brand:focus-visible { outline: 2px solid #16874a; outline-offset: 3px; }
.em-brand-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; }
.em-brand-logo img { display: block; width: 100%; max-width: 160px; height: 64px; object-fit: contain; }
.em-brand-name { color: #56657e; font-size: 12px; line-height: 1.4; text-align: center; }
.em-brands-also { margin: 24px 0 0; font-size: 14px; line-height: 1.65; color: #56657e; }
@media (max-width: 1099px) { .em-brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .em-brands { padding: 56px 0; }
  .em-brands-wrap { padding: 0 20px; }
  .em-brands h2 { font-size: 29px; }
  .em-brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .em-brand { padding: 16px 12px; height: 128px; }
  .em-brand-logo, .em-brand-logo img { height: 52px; }
}
@media (max-width: 479px) { .em-brands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.em-brands-credits { display: inline-block; margin-top: 18px; font-size: 12px; color: #56657e; text-underline-offset: 3px; }
/* Белый вариант Grundfos остаётся белым; поля JPG прячем без изменения файла. */
.em-brand--dark { background: #14213d; border-color: #14213d; }
.em-brand--dark:hover { background: #243a63; }
.em-brand--dark .em-brand-name { color: #dde4ec; }
.em-brand--padded .em-brand-logo { overflow: hidden; }
.em-brand--padded .em-brand-logo img { transform: scale(1.6); }
.em-brand--portrait { gap: 8px; }
.em-brand--portrait .em-brand-logo, .em-brand--portrait .em-brand-logo img { height: 76px; }
@media (max-width: 767px) {
  .em-brand--portrait .em-brand-logo, .em-brand--portrait .em-brand-logo img { height: 64px; }
}
.em-brand--trimmed .em-brand-logo { overflow: hidden; }
.em-brand--trimmed .em-brand-logo img { transform: scale(1.3); }

.em-form-notice { font-size: 12px; line-height: 1.5; margin: 0 0 12px; }
.em-form-notice a { color: inherit; text-decoration: underline; }
body[data-legal-page] { font-family: Inter, Arial, sans-serif; color: #14213d; }
.em-legal-document .em-other-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.em-legal-document .em-other-grid > a { min-width: 0; overflow-wrap: anywhere; }
.em-legal-document article { overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .em-legal-document .em-other-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .em-legal-document .em-article-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  .em-legal-document .em-toc { position: static !important; }
  .em-legal-document .em-h1 { font-size: 28px !important; overflow-wrap: anywhere; }
  .em-req-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
