/* ==========================================================================
   Аритин (aritin.ru) — стили блоков, которых нет в Аритин.Коннект.
   Базовая дизайн-система лежит в style.css (скопирована из aritin-connect.ru),
   здесь только новые секции. Классы намеренно не пересекаются с базовыми
   (.card, .plan, .article, .docs заняты — используются .tile, .price-card и т. д.).
   ========================================================================== */

/* ---------- Мелкие утилиты ---------- */
.cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* ---------- Заголовки блоков — по центру (как в Аритин.Коннект) ---------- */
h2 { text-align: center; }

/* ---------- Хлебные крошки внутри hero (внутренние страницы) ---------- */
.hero-crumbs { margin-bottom: 18px; justify-content: flex-start; }

/* ==========================================================================
   Многоуровневое меню шапки
   Уровень 2 — колонки в выпадающей панели; уровень 3 — «вылет» справа
   от пункта направления (у пунктов с $dd['children']).
   ========================================================================== */
.dd-row { position: relative; }
.dd-row > a { width: 100%; }
.dd-sub-caret { margin-left: auto; font-size: 11px; opacity: .5; flex-shrink: 0; }
.dd-has-sub:hover > a { background: var(--bg-soft); }
.dd-has-sub:hover > a .dd-sub-caret { opacity: 1; }

/* Третий уровень: одна колонка; длинные списки — в две, с прокруткой */
.dd-sub {
  position: absolute;
  left: calc(100% + 8px);
  top: -12px;
  display: block;
  width: 320px;
  max-height: min(80vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 61;
}
.dd-sub--cols { width: 580px; column-count: 2; column-gap: 10px; }
/* Невидимый мостик, чтобы не терять hover при переходе в подменю */
.dd-sub::before { content: ''; position: absolute; left: -12px; top: 0; bottom: 0; width: 12px; }
.dd-has-sub:hover > .dd-sub,
.dd-has-sub:focus-within > .dd-sub {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0);
}
.dd-sub a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  break-inside: avoid;
}
.dd-sub a:hover { background: var(--bg-soft); }
.dd-sub .dd-title { font-size: 14px; font-weight: 500; }

/* Плоские длинные списки (продукты) — в колонки, чтобы не тянулись вниз */
.dropdown.dd-flow .dd-col { display: block; column-count: 3; column-gap: 14px; width: min(920px, 80vw); }
.dropdown.dd-flow .dd-row { break-inside: avoid; }

html[data-theme="dark"] .dd-sub { background: #0f1a28; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .dd-sub a:hover,
html[data-theme="dark"] .dd-has-sub:hover > a { background: rgba(255, 255, 255, .08); }

/* Вложенный уровень мобильного меню */
.mm-nested { border-top: 1px solid var(--border); }
.mm-nested > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 6px 11px 18px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  cursor: pointer; border-radius: 10px;
}
.mm-nested > summary::-webkit-details-marker { display: none; }
.mm-nested > summary i { font-size: 11px; color: var(--muted-2); transition: transform .2s ease; }
.mm-nested[open] > summary i { transform: rotate(180deg); }
.mm-deep { padding-left: 34px !important; font-size: 14px; }
.mm-deep:last-child { margin-bottom: 8px; }

@media (max-width: 1240px) {
  /* На средних экранах вылет идёт в одну колонку, чтобы не уйти за край */
  .dd-sub,
  .dd-sub--cols { width: 300px; column-count: 1; }
  .dropdown.dd-flow .dd-col { column-count: 2; width: min(600px, 74vw); }
}

.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.ticks li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.ticks li span { min-width: 0; }

.tag-chip {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap;
}

/* ---------- Hero: правая колонка и мини-показатели ---------- */
.hero-copy { min-width: 0; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 14px 30px;
  margin-top: 30px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero-stats .hs { display: flex; flex-direction: column; gap: 2px; }
.hero-stats .hs-val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hero-stats .hs-lab { font-size: 13px; color: var(--muted-2); max-width: 190px; line-height: 1.4; }
.visual-card img { border-radius: var(--radius); width: 100%; height: auto; }

/* ---------- Плашка показателей ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 30px 26px;
  box-shadow: var(--shadow-sm);
}
.stat { display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.stat-val {
  font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat-lab { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Боли клиента (аккордеон) ---------- */
.focus { display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
.focus-item { border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.focus-item > summary {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 17px; letter-spacing: -.01em;
}
.focus-item > summary::-webkit-details-marker { display: none; }
.focus-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 14px; font-weight: 700;
}
.focus-q { flex: 1; min-width: 0; }
.focus-caret { color: var(--muted-2); transition: transform .2s ease; flex-shrink: 0; }
.focus-item[open] .focus-caret { transform: rotate(180deg); }
.focus-a { padding: 0 24px 22px 74px; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.focus-a p { margin: 0 0 10px; }
.focus-a p:last-child { margin-bottom: 0; }

/* ---------- Ссылки-плитки (BLOCK8) ---------- */
.promo-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.promo-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  box-shadow: var(--shadow-sm); font-weight: 600; font-size: 15px;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}
.promo-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--accent-ink); }
.promo-link__ico { font-size: 12.5px; color: var(--muted-2); }
.promo-link:hover .promo-link__ico { color: var(--accent-ink); }

/* ---------- Универсальная сетка карточек (.tile) ---------- */
.tile-grid { display: grid; gap: 20px; }
.tile {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile__media { aspect-ratio: 16 / 9; overflow: hidden; flex-shrink: 0; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile__body h3 { font-size: 17.5px; margin: 0; letter-spacing: -.02em; line-height: 1.32; }
.tile__body p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.tile__more {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent-ink);
}
.tile:hover .tile__more { gap: 12px; }

/* ---------- Чередующиеся строки «картинка + текст» (BLOCK1) ---------- */
.rows { display: grid; gap: 22px; }
.row-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 30px;
  align-items: center; padding: 26px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.row-item--text { grid-template-columns: 1fr; }
/* Картинки в этих блоках — небольшие 3D-иконки: не растягиваем их на всю колонку. */
.row-media { grid-column: 1; grid-row: 1; max-width: 150px; }
.row-body { grid-column: 2; grid-row: 1; }
/* Чередование: у каждого второго блока картинка уходит вправо. */
.row-item--flip { grid-template-columns: 1fr 150px; }
.row-item--flip > .row-media { grid-column: 2; justify-self: end; }
.row-item--flip > .row-body { grid-column: 1; }
.row-item--text > .row-body { grid-column: 1; }
.row-media img { width: 100%; height: auto; object-fit: contain; }
.row-body h3 { font-size: 19px; margin: 0 0 10px; letter-spacing: -.02em; }
.row-text { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.row-text p { margin: 0 0 10px; }
.row-text p:last-child { margin-bottom: 0; }

/* ---------- «Важный нюанс»: крупная картинка + описание (BLOCK3) ---------- */
.duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center; padding: 40px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.duo.is-reverse .duo-body { order: 2; }
.duo-body h2 { font-size: 28px; margin: 12px 0 14px; letter-spacing: -.02em; line-height: 1.22; }
.duo-text { color: var(--muted); font-size: 16px; line-height: 1.7; }
.duo-text p { margin: 0 0 12px; }
.duo-text p:last-child { margin-bottom: 0; }
.duo-media { }
.duo-media img { width: 100%; height: auto; max-height: 420px; object-fit: contain; margin: 0 auto; }

/* ---------- Картинка + текст (BLOCK4, BLOCK7) ---------- */
.mediatext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  align-items: center; padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.mediatext.is-reverse .mediatext__media { order: 2; }
.mediatext.is-compact { padding: 28px; }
.mediatext__media { }
.mediatext__media img { max-width: 100%; max-height: 400px; width: auto; height: auto; object-fit: contain; margin: 0 auto; }
.mediatext__body h2 { font-size: 26px; margin: 0 0 14px; letter-spacing: -.02em; }
.mediatext__body h3 { font-size: 21px; margin: 0 0 12px; letter-spacing: -.02em; }
.mediatext__text { color: var(--muted); font-size: 15.5px; line-height: 1.68; }
.mediatext__text p { margin: 0 0 10px; }
.mediatext__text p:last-child { margin-bottom: 0; }
.mediatext__actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Блок «Единая система» (BLOCK10) ---------- */
.imgtext { display: grid; gap: 20px; }
.imgtext__row {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px;
  align-items: center; padding: 28px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.imgtext__row.is-reverse .imgtext__media { order: 2; }
.imgtext__media { }
.imgtext__media img { width: 100%; height: auto; max-height: 400px; object-fit: contain; margin: 0 auto; }
.imgtext__body h3 { font-size: 19px; margin: 0 0 10px; letter-spacing: -.02em; }
.imgtext__text { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.imgtext__text p { margin: 0; }

/* ---------- Галерея «диагональные картинки» (BLOCK9) ---------- */
.gallery-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
}
.gallery-strip__item {
  margin: 0; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); aspect-ratio: 4 / 3; background: var(--bg-soft);
  transition: transform .22s ease, box-shadow .22s ease;
}
.gallery-strip__item:nth-child(even) { transform: rotate(-1.2deg); }
.gallery-strip__item:nth-child(odd) { transform: rotate(1.2deg); }
.gallery-strip__item:hover { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-strip__item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Промо-блок (BLOCK_STOK) ---------- */
.stock {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: center;
  padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  background-image: linear-gradient(135deg, var(--accent-soft), transparent 60%);
}
.stock__body h2 { font-size: 26px; margin: 14px 0 12px; letter-spacing: -.02em; }
.stock__text { color: var(--muted); font-size: 15.5px; line-height: 1.65; margin-bottom: 18px; }
.stock__media { border-radius: var(--radius-sm); overflow: hidden; }
.stock__media img { width: 100%; height: auto; }

/* ---------- Трио продуктов (BLOCK6) ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trio__item {
  display: flex; flex-direction: column; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.trio__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.trio__media { aspect-ratio: 16 / 9; overflow: hidden; }
.trio__media img { width: 100%; height: 100%; object-fit: cover; }
.trio__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.trio__body h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.trio__desc { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; line-height: 1.55; }
.trio__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trio__points li { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.trio__points strong { font-size: 14px; font-weight: 600; }
.trio__points span { color: var(--muted); line-height: 1.5; }
.trio__link {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent-ink);
}

/* ---------- Сетка технологий ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tech {
  padding: 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tech:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tech__icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft);
  display: grid; place-items: center; overflow: hidden;
}
.tech__icon img { max-width: 30px; max-height: 30px; object-fit: contain; }
.tech h3 { font-size: 15.5px; margin: 0; letter-spacing: -.01em; }
.tech p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- Показатели кейса ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric {
  padding: 26px 24px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.metric__val {
  font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric__lab { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Задача / решение (кейс) ---------- */
.task-solution { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ts-item { padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ts-item h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; margin: 0 0 14px; letter-spacing: -.02em;
}
.ts-item h2 i { color: var(--accent-ink); font-size: 18px; }
.ts-text { color: var(--muted); font-size: 15.5px; line-height: 1.68; }
.ts-text p { margin: 0 0 10px; }
.ts-text p:last-child { margin-bottom: 0; }

/* ---------- Текстовый блок (BLOCK2) ---------- */
.note { padding: 32px 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.note h2 { font-size: 24px; margin: 0 0 14px; letter-spacing: -.02em; }
.note__text { color: var(--muted); font-size: 16px; line-height: 1.7; }
.note__text p { margin: 0 0 12px; }
.note__text p:last-child { margin-bottom: 0; }

/* ---------- Слайдер видео ---------- */
.video-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr);
  gap: 20px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.video-rail > * { scroll-snap-align: start; }
.video-card {
  display: flex; flex-direction: column; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-card__frame { position: relative; aspect-ratio: 16 / 9; background: #0b1220; overflow: hidden; cursor: pointer; }
.video-card__poster { width: 100%; height: 100%; object-fit: cover; }
.video-card__play {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--brand-1);
  display: grid; place-items: center; font-size: 20px;
  transition: transform .2s ease, background .2s ease;
  box-shadow: var(--shadow-md);
}
.video-card__play:hover { transform: scale(1.08); background: #fff; }
.video-card__body { padding: 18px 20px 22px; }
.video-card__body h3 { font-size: 16px; margin: 0 0 8px; letter-spacing: -.02em; line-height: 1.35; }
.video-card__body p { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.55; }

/* Отдельная страница видео */
.video-single { padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.video-single__player { width: 100%; border-radius: var(--radius-sm); background: #000; display: block; }
.video-single__desc { margin-top: 22px; }
.video-single__desc h2 { font-size: 20px; margin: 0 0 10px; letter-spacing: -.02em; }
.video-single__desc p { color: var(--muted); font-size: 15.5px; line-height: 1.65; margin: 0; }
.video-single__sect { margin: 18px 0 0; font-size: 13.5px; color: var(--muted-2); }

/* ---------- Карточки цен (продукт/услуга) ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.price-card {
  padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.price-card__head h3 { font-size: 19px; margin: 0; letter-spacing: -.02em; line-height: 1.3; }
.price-card__term { font-size: 13px; color: var(--muted-2); white-space: nowrap; padding-top: 4px; }
.price-card__lead { color: var(--muted); font-size: 14.5px; margin: 12px 0 0; line-height: 1.6; }
.price-card__items { margin-bottom: 6px; }
.price-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.price-card__foot {
  margin-top: auto; padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.price-card__price { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Детальный баннер карточки (услуга/продукт/кейс) ---------- */
.detail-hero { padding-top: 28px; }
.detail-hero .breadcrumbs { margin-bottom: 18px; }
.detail-hero__inner {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px;
  align-items: center; padding: 42px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.detail-hero__body h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 16px; }
.detail-hero__body .lead { margin: 0 0 22px; }
.detail-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-hero__media { border-radius: var(--radius-sm); overflow: hidden; }
.detail-hero__media img { width: 100%; height: auto; max-height: 400px; object-fit: contain; margin: 0 auto; }

/* ---------- Hero внутренней страницы с картинкой ---------- */
.page-hero__inner.has-media { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.page-hero__media { border-radius: var(--radius-sm); overflow: hidden; }
.page-hero__media img { width: 100%; height: auto; max-height: 400px; object-fit: contain; margin: 0 auto; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cc-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 17px;
}
.cc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-title { font-size: 12.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.cc-text { font-size: 15px; font-weight: 600; overflow-wrap: break-word; }
.contact-aside { padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-aside h2 { font-size: 21px; margin: 0 0 18px; letter-spacing: -.02em; }
.req { display: grid; gap: 4px; margin: 0 0 22px; }
.req dt { font-size: 12.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; }
.req dd { margin: 0; font-size: 15px; }
.btn-block { width: 100%; }
.req-text { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ---------- Переход в мессенджеры (вместо формы) ---------- */
.support-channels { padding: 34px 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; }
.support-channels h2 { font-size: 24px; margin: 0 0 10px; letter-spacing: -.02em; }
.support-channels > p { color: var(--muted); margin: 0 0 24px; font-size: 15.5px; }
.sc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; text-align: left; }
.sc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sc-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; color: #fff; }
.sc-max .sc-ico { background: var(--max); }
.sc-tg .sc-ico { background: var(--tg); }
.sc-phone .sc-ico { background: var(--accent); }
.sc-mail .sc-ico { background: #64748b; }
.sc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-title { font-weight: 600; font-size: 15.5px; }
.sc-text { font-size: 13px; color: var(--muted-2); }
.sc-help { margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.sc-help a { color: var(--accent-ink); font-weight: 600; }

/* ---------- 404 ---------- */
.notfound { padding: 56px 40px; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; }
.nf-code {
  font-size: 84px; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound h1 { font-size: 30px; margin: 12px 0 14px; letter-spacing: -.02em; }
.notfound .lead { max-width: 620px; margin: 0 auto 26px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nf-help { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
.nf-help p { font-size: 13px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.nf-links a {
  padding: 8px 16px; border-radius: 999px; background: var(--bg-soft);
  font-size: 14px; font-weight: 500; transition: background .15s ease, color .15s ease;
}
.nf-links a:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Документация: дерево + контент ---------- */
.docs-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.docs-menu { padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.docs-menu__title {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-2); margin: 0 0 14px;
}
.docs-menu__nav { display: grid; gap: 4px; }
.docs-menu__all,
.docs-menu__link {
  display: block; padding: 7px 10px; border-radius: 9px;
  font-size: 14px; color: var(--muted); transition: background .15s ease, color .15s ease;
}
.docs-menu__all:hover, .docs-menu__link:hover { background: var(--bg-soft); color: var(--text); }
.docs-menu__all.is-active, .docs-menu__link.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.docs-menu__group { margin-top: 16px; }
.docs-menu__module {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 0 0 6px; padding: 0 10px; line-height: 1.35;
}
.docs-content { display: grid; gap: 18px; min-width: 0; }
.docs-module { padding: 26px 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.docs-module h2 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.02em; }
.docs-module__hint { font-size: 13px; color: var(--muted-2); margin: 0 0 14px; }
.docs-module__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.docs-module__list a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; font-size: 15px;
  color: var(--muted); transition: background .15s ease, color .15s ease;
}
.docs-module__list a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.docs-module__list i { color: var(--muted-2); font-size: 13px; }
.docs-body { padding: 40px 44px; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-wrap: break-word; }
.docs-body h2 { font-size: 24px; margin: 34px 0 14px; letter-spacing: -.02em; }
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { font-size: 19px; margin: 26px 0 12px; }
.docs-body p { color: var(--muted); font-size: 16px; line-height: 1.72; margin: 0 0 14px; }
.docs-body ul, .docs-body ol { color: var(--muted); font-size: 16px; line-height: 1.72; padding-left: 22px; margin: 0 0 16px; }
.docs-body li { margin-bottom: 7px; }
.docs-body code {
  background: var(--bg-soft); border-radius: 6px; padding: 2px 7px;
  font-size: 14px; color: var(--brand-1);
}
.docs-body img { border-radius: var(--radius-sm); margin: 18px 0; }
.docs-body a { color: var(--accent-ink); font-weight: 600; }
.docs-body a:hover { text-decoration: underline; }
.docs-product {
  padding: 16px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.docs-product__label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); }
.docs-product a { font-weight: 600; color: var(--accent-ink); }
.docs-siblings { padding: 22px 26px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.docs-siblings__title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); margin: 0 0 12px; }
.docs-siblings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.docs-siblings a { color: var(--muted); font-size: 15px; }
.docs-siblings a:hover { color: var(--accent-ink); }
.docs-video { margin-top: 4px; }

/* ---------- Статья блога ---------- */
.article__cover { margin: 0 0 28px; border-radius: var(--radius-sm); overflow: hidden; }
.article__cover img { width: 100%; height: auto; }
.article__body h2 { font-size: 24px; margin: 32px 0 14px; letter-spacing: -.02em; }
.article__body h2:first-child { margin-top: 0; }
.article__body h3 { font-size: 19px; margin: 26px 0 12px; }
.article__body p { color: var(--muted); font-size: 16px; line-height: 1.75; margin: 0 0 15px; }
.article__body ul, .article__body ol { color: var(--muted); font-size: 16px; line-height: 1.75; padding-left: 22px; margin: 0 0 16px; }
.article__body li { margin-bottom: 7px; }
.article__body img { border-radius: var(--radius-sm); margin: 18px 0; }
.article__body a { color: var(--accent-ink); font-weight: 600; }
.article__body a:hover { text-decoration: underline; }
.article__body blockquote {
  border-left: 3px solid var(--accent); background: var(--bg-soft);
  border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 0 0 18px; color: var(--text);
}

/* ---------- Статья блога + правый сайдбар ---------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start;
}
.article-layout > .article { min-width: 0; }
.article-aside { display: grid; gap: 20px; position: sticky; top: 92px; }
.aside-card { padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.aside-card h2, .aside-card h3 { font-size: 18px; margin: 0 0 14px; letter-spacing: -.02em; }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.aside-list a { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.aside-list a i { color: var(--accent-ink); font-size: 13px; margin-top: 4px; flex-shrink: 0; }
.aside-list a:hover { color: var(--accent-ink); }
.aside-card--cta { text-align: center; background-image: linear-gradient(150deg, var(--accent-soft), transparent 70%); }
.aside-card--cta h3 { margin-bottom: 8px; }
.aside-card--cta p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.aside-card--cta .btn { width: 100%; }
.aside-card--cta .aside-phone { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }

/* ---------- Видео: попап (lightbox) ---------- */
.video-modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 24px;
  background: rgba(6, 12, 22, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.video-modal.is-open { opacity: 1; visibility: visible; }
.video-modal__box {
  position: relative; width: min(1080px, 100%);
  border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.985); transition: transform .24s ease;
}
.video-modal.is-open .video-modal__box { transform: none; }
.video-modal__player { width: 100%; height: auto; max-height: 78vh; display: block; background: #000; }
.video-modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: #0f172a; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}
.video-modal__close:hover { background: #fff; }
.video-modal__title {
  padding: 14px 18px; color: #fff; font-size: 15px; font-weight: 600;
  background: rgba(0, 0, 0, .55);
}
body.has-modal { overflow: hidden; }

/* Видео одиночной страницы ------------------------------------------------------------------ */

/* ---------- Чипы рубрик ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14.5px; font-weight: 500;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.chip__count {
  font-size: 12px; color: var(--muted-2); background: var(--bg-soft);
  border-radius: 999px; padding: 1px 8px;
}

/* ---------- Футер: контакты и правовые ссылки ---------- */
.foot-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; }
.foot-contacts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 9px; }
.foot-contacts li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); }
.foot-contacts i { color: var(--accent-ink); font-size: 14px; margin-top: 4px; width: 16px; text-align: center; flex-shrink: 0; }
.foot-contacts a:hover { color: var(--accent-ink); }
.foot-legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-legal-links a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- Решения экосистемы: три карточки-визитки (МедЮрист, МИС, Коннект) ---------- */
.sister-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sister-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.sister-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.sister-card__media { aspect-ratio: 16 / 10; overflow: hidden; flex-shrink: 0; }
.sister-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sister-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sister-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sister-card__brand { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.sister-card__site {
  font-size: 12px; color: var(--muted-2); padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft); white-space: nowrap;
}
.sister-card__title { font-size: 20px; margin: 0; letter-spacing: -.02em; line-height: 1.28; text-align: left; }
.sister-card__text { color: var(--muted); font-size: 15px; line-height: 1.62; margin: 0; }
.sister-card .ticks { margin-top: 2px; }
.sister-card__actions { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.sister-card__cta { width: 100%; }
.sister-card__cta i { font-size: 12.5px; opacity: .85; }
.sister-card__more {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent-ink); text-align: center;
}
.sister-card__more i { font-size: 12px; transition: transform .18s ease; }
.sister-card__more:hover i { transform: translateX(3px); }

@media (max-width: 1024px) {
  .sister-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Инструменты ---------- */
.tool-shell { padding: 34px 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tool-shell h1 { display: none; }         /* заголовок уже выведен в page-hero */
.tool-shell header { padding: 0 !important; }

/* ---------- Заметка о виджете ---------- */
.widget-note { padding: 34px 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; }
.widget-note h2 { font-size: 24px; margin: 0 0 12px; letter-spacing: -.02em; }
.widget-note p { color: var(--muted); font-size: 15.5px; line-height: 1.68; max-width: 720px; margin: 0 auto 22px; }

/* ---------- Правовой документ ---------- */
.legal-doc { padding: 44px 48px; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-wrap: break-word; }
.legal-doc h2 { font-size: 24px; margin: 0 0 18px; letter-spacing: -.02em; }
.legal-doc h3 { font-size: 19px; margin: 28px 0 12px; }
.legal-doc p, .legal-doc div { color: var(--muted); font-size: 15.5px; line-height: 1.75; margin: 0 0 12px; }
.legal-doc b, .legal-doc strong { color: var(--text); }
.legal-doc a { color: var(--accent-ink); font-weight: 600; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
.legal-doc th, .legal-doc td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; color: var(--muted); }
.legal-doc th { background: var(--bg-soft); color: var(--text); font-weight: 600; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1024px) {
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
  .trio { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .docs-layout { grid-template-columns: 240px 1fr; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .detail-hero__inner,
  .page-hero__inner.has-media { grid-template-columns: 1fr; padding: 30px; }
  .duo, .imgtext__row, .mediatext, .stock { grid-template-columns: 1fr; gap: 24px; padding: 26px; }
  .duo.is-reverse .duo-body,
  .imgtext__row.is-reverse .imgtext__media,
  .mediatext.is-reverse .mediatext__media { order: 0; }
  .row-item { grid-template-columns: 1fr; gap: 20px; }
  .row-item > .row-media,
  .row-item > .row-body,
  .row-item--flip > .row-media,
  .row-item--flip > .row-body { grid-column: 1; grid-row: auto; }
  .row-item--flip { grid-template-columns: 1fr; }
  .row-item--flip > .row-media { justify-self: start; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: 1fr; }
  .task-solution { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-menu { position: static; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .features.cols-3, .features.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; padding: 22px 18px; }
  .stat-val { font-size: 25px; }
  .stat-lab { font-size: 12.5px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .trio, .plans, .contact-cards, .sc-grid { grid-template-columns: 1fr; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr !important; }
  .features.cols-2, .features.cols-3, .features.cols-4 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .sister-grid { grid-template-columns: 1fr; }
  .article-aside { grid-template-columns: 1fr; }
  .detail-hero__body h1 { font-size: 27px; }
  .notfound { padding: 40px 22px; }
  .nf-code { font-size: 64px; }
  .focus-a { padding-left: 24px; }
  .legal-doc, .docs-body, .article { padding: 26px 22px; }
  .support-channels, .tool-shell, .widget-note { padding: 26px 22px; }
  .foot-grid { grid-template-columns: 1fr; }
}
