/* ===== Мега-меню «Услуги» в шапке сайта (Figma: «Mega menu / Услуги», 26.11.2026) =====
   Всё внутри .ch (шапка hero-2026). Селекторы .ch .mm-* перебивают сброс .ch *{margin:0;padding:0}. */
.ch .mm-li{ position: static; }
.ch .mm-trigger[aria-expanded="true"]{ color: var(--blue, #0066FF); }

/* панель */
.ch .mm{
  --mm-ink: #070A25; --mm-muted: #5B6180; --mm-blue: #0066FF; --mm-blue-ink: #0052D6;
  --mm-soft: #E5EFFF; --mm-surface: #F7F9FF; --mm-line: #E6EBF5;
  position: absolute; left: 0; right: 0; top: calc(100% - 12px); z-index: 60;
  display: flex; flex-direction: column; gap: 24px; padding: 32px;
  border-radius: 32px; background: #fff; box-shadow: inset 0 0 0 1px var(--mm-line), 0 24px 64px rgba(8, 15, 51, .16);
  color: var(--mm-ink); font-family: 'Geologica', 'Inter', Arial, sans-serif; font-size: 18px; font-weight: 500; line-height: 1.4; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
  transition: opacity .2s, transform .25s cubic-bezier(.16, 1, .3, 1), visibility 0s .25s;
}
.ch .mm-li.is-open .mm{ opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .2s, transform .25s cubic-bezier(.16, 1, .3, 1); }
.ch .mm-overlay{ position: fixed; left: 0; right: 0; bottom: 0; top: var(--mm-top, 124px); z-index: 59; background: rgba(7, 10, 37, .32); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.ch .mm-overlay.is-on{ opacity: 1; visibility: visible; transition: opacity .2s; }
.ch .mm a{ color: inherit; text-decoration: none; white-space: normal; }
.ch .mm-i{ display: block; flex: none; width: 24px; height: 24px; fill: none; }

.ch .mm-body{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 340px; grid-template-rows: auto 1fr; gap: 0 12px; }

/* колонка направления: строки «шапка / список» общие для всех колонок (subgrid),
   поэтому линия под шапкой на одной высоте, даже если заголовок переносится */
.ch .mm-col{ display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 16px; align-content: start; padding: 24px 20px; border-radius: 24px; background: #fff; }
.ch .mm-col > .mm-head{ align-self: stretch; }
.ch .mm-col > .mm-items{ align-self: start; }
.ch .mm-promo{ grid-row: span 2; }
@supports not (grid-template-rows: subgrid){
  .ch .mm-col{ display: flex; flex-direction: column; gap: 16px; }
  .ch .mm-head{ min-height: 96px; }
}
.ch .mm-col.is-current{ background: var(--mm-surface); }
.ch .mm-head{ display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--mm-line); }
.ch .mm-ib{ display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--mm-soft); color: var(--mm-blue); }
.ch .mm-col.is-current .mm-ib{ background: var(--mm-blue); color: #fff; }
.ch .mm-head__t{ display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ch .mm-num{ color: var(--mm-muted); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 16px; font-weight: 500; line-height: 18px; letter-spacing: .2em; }
.ch .mm-title{ display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 28px; font-weight: 600; line-height: 1.2; transition: color .2s; }
.ch .mm-col.is-current .mm-title, .ch .mm-head:hover .mm-title{ color: var(--mm-blue); }
.ch .mm-i--title{ width: 20px; height: 20px; transition: transform .3s; }
.ch .mm-head:hover .mm-i--title{ transform: translateX(4px); }

.ch .mm-items{ display: flex; flex-direction: column; gap: 2px; list-style: none; }
.ch .mm-item{ display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 12px 14px; border-radius: 12px; transition: background-color .2s, color .2s, box-shadow .2s; }
.ch .mm-item__t{ flex: 1; min-width: 0; }
.ch .mm-i--go{ width: 18px; height: 18px; margin-left: auto; color: var(--mm-blue); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.ch .mm-item:hover, .ch .mm-item:focus-visible{ background: var(--mm-surface); color: var(--mm-blue); outline: none; }
.ch .mm-col.is-current .mm-item:hover, .ch .mm-col.is-current .mm-item:focus-visible{ background: #fff; box-shadow: 0 4px 12px rgba(8, 26, 89, .06); }
.ch .mm-item:hover .mm-i--go, .ch .mm-item:focus-visible .mm-i--go{ opacity: 1; transform: none; }
.ch .mm-item--nest .mm-item__t{ flex: 0 1 auto; }
.ch .mm-i--nest{ width: 16px; height: 16px; color: #8F9CBB; }
.ch .mm-tag{ flex: none; padding: 3px 8px; border-radius: 6px; background: var(--mm-soft); color: var(--mm-blue-ink); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: .2em; }

/* промо */
.ch .mm-promo{ position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px; border-radius: 24px; background: linear-gradient(90deg, #0059F2 0%, #408CFF 100%); color: #fff; }
/* фон промо — как CTA на AI-страницах: двоичное поле плывёт вверх и световое пятно */
.ch .mm-promo__glow{ position: absolute; right: -120px; top: -140px; z-index: -1; width: 360px; height: 360px; border-radius: 50%; background: rgba(153, 204, 255, .45); filter: blur(70px); pointer-events: none; }
.ch .mm-promo__bin{ position: absolute; inset: 0; z-index: -1; overflow: hidden; white-space: pre; color: #fff; opacity: .16; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; font-weight: 500; line-height: 24px; letter-spacing: 10px; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 70%, transparent 100%); }
.ch .mm-promo__bin div{ animation: mm-rise 30s linear infinite; animation-play-state: paused; }
.ch .mm-li.is-open .mm-promo__bin div{ animation-play-state: running; }
@keyframes mm-rise { to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce){ .ch .mm-promo__bin div{ animation: none; } }
.ch .mm-chip{ display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 15px; font-weight: 400; }
.ch .mm-chip .mm-i{ width: 16px; height: 16px; }
.ch .mm-promo__t{ font-size: 28px; font-weight: 600; line-height: 1.2; }
.ch .mm-promo__x{ font-size: 15px; font-weight: 400; line-height: 1.4; }
.ch .mm-btn{ margin-top: auto; display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border-radius: 16px; background: #fff; color: var(--mm-blue) !important; font-size: 18px; font-weight: 500; transition: background-color .2s; }
.ch .mm-btn:hover, .ch .mm-btn:focus-visible{ background: var(--mm-soft); outline: none; }
.ch .mm-btn .mm-i{ width: 18px; height: 18px; transition: transform .3s; }
.ch .mm-btn:hover .mm-i{ transform: translateX(4px); }

/* низ панели */
.ch .mm-foot{ display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 8px 0; border-top: 1px solid var(--mm-line); }
.ch .mm-all{ display: inline-flex; align-items: center; gap: 8px; color: var(--mm-blue) !important; font-size: 18px; }
.ch .mm-all .mm-i{ width: 18px; height: 18px; transition: transform .3s; }
.ch .mm-all:hover .mm-i{ transform: translateX(4px); }
.ch .mm-contacts{ display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 400; }
.ch .mm-phone{ display: inline-flex; align-items: center; gap: 8px; }
.ch .mm-phone .mm-i{ width: 18px; height: 18px; color: var(--mm-muted); }
.ch .mm-contact{ display: inline-flex; align-items: center; gap: 6px; color: var(--mm-blue) !important; }
.ch .mm-contact .mm-i{ width: 16px; height: 16px; }
.ch .mm a:focus-visible{ outline: 2px solid var(--mm-blue); outline-offset: 2px; }

@media (max-width: 1439px){
  .ch .mm{ padding: 24px; gap: 20px; }
  .ch .mm-body{ grid-template-columns: repeat(3, minmax(0, 1fr)) 280px; }
  .ch .mm-col{ padding: 20px 16px; }
  .ch .mm-title, .ch .mm-promo__t{ font-size: 24px; }
  .ch .mm, .ch .mm-btn, .ch .mm-all{ font-size: 16px; }
  .ch .mm-item{ padding: 10px 12px; min-height: 44px; }
  .ch .mm-promo{ padding: 24px; }
  .ch .mm-chip{ display: none; }
  .ch .mm-btn{ padding: 14px 18px; white-space: nowrap; }
}
@media (max-width: 1299px){
  .ch .mm-body{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch .mm-promo{ display: none; }
}
/* десктопное меню прода видно с 1200px; ниже — только мобильный список */
@media (max-width: 1199px){
  .ch .mm, .ch .mm-overlay{ display: none; }
}

/* ===== мобильное меню: «Услуги» раскрывается списком ===== */
.ch .mm-m details > summary{ display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; border-radius: 8px; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.ch .mm-m details > summary::-webkit-details-marker{ display: none; }
.ch .mm-m details > summary::after{ content: ''; width: 8px; height: 8px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.ch .mm-m details[open] > summary{ color: var(--blue, #0066FF); }
.ch .mm-m details[open] > summary::after{ transform: rotate(-135deg); }
.ch .mm-m__body{ display: flex; flex-direction: column; gap: 12px; padding: 4px 0 12px 12px; }
.ch .mm-m__group ul{ list-style: none; }
.ch .ch-menu-list .mm-m__head{ padding: 8px; font-size: 16px; font-weight: 600; color: var(--blue, #0066FF); }
.ch .ch-menu-list .mm-m__group ul a{ padding: 8px; font-size: 16px; font-weight: 400; }
.ch .ch-menu-list .mm-m__all{ padding: 8px; font-size: 16px; color: var(--blue, #0066FF); }
