/* Навигация: мега-меню «Услуги» ([nu_mega], child/inc/nav.php) и закреплённая шапка.
   Префикс :is(.elementor,#nu-mega) даёт правилам вес id: стили меню темы (menuzord) для списков и ссылок внутри
   .megamenu их не перебивают, а в редакторе Elementor панель выглядит так же, как в шапке. */

/* ---------- шапка: компактная стеклянная полоса, как на нынешнем сайте (решение владельца 19.09) ----------
   Полоса закреплена сверху с отступом 14 px, ширина до 960 px (владелец: «немного уже, небольшой отступ от верха»),
   высота 63 px. Цвета и размеры сняты с нынешнего neurounit.ai.
   Вне полосы шапка прозрачна для кликов (pointer-events), чтобы не перекрывать страницу. */
@media (min-width: 1025px) {
  #elementor-header-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    pointer-events: none;
  }
  body.admin-bar #elementor-header-top { top: 32px; }
  #elementor-header-top-sticky { display: none !important; }
  /* отступ сверху: тема обнуляет верхнее поле контейнера шапки, задаём своё */
  #elementor-header-top .nu-glass { padding-top: 14px !important; }
  .nu-glass > .e-con-inner {
    pointer-events: auto;
    padding: 8px 8px 8px 14px !important;
    background: rgba(13, 13, 19, .72);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
  }
}
.nu-glass > .e-con-inner { justify-content: space-between !important; flex-wrap: nowrap !important; }
/* 24.09 владелец: меню обратно к логотипу (по центру полосы не понравилось), полоса чуть уже */
.nu-glass .nu-glass-left, .nu-glass .nu-glass-right { width: auto !important; flex: 0 0 auto !important; }
.nu-glass .nu-glass-center { width: auto !important; flex: 0 1 auto !important; justify-content: flex-start !important;
  margin-right: auto !important; padding-left: 34px; }
.nu-glass .nu-glass-center .menuzord-menu { justify-content: flex-start !important; }
.nu-glass > .e-con-inner { max-width: 1280px !important; }
.nu-glass .menuzord-menu { display: flex !important; flex-wrap: nowrap !important; }
.nu-glass .menuzord-menu > li > a { white-space: nowrap; }
.nu-glass .elementor-widget-tm-ele-site-logo img { height: 28px !important; width: auto !important; max-width: none !important; }
/* у ссылки логотипа тема ставит поля 15 px сверху и снизу: полоса выходила 80 px вместо 63 */
.nu-glass .menuzord-brand { margin: 0 !important; }
/* окно «Услуги» ровно под полосой и во всю её ширину: считаем его от полосы, а не от пункта меню
   (тема ставит left и width скриптом, поэтому !important) */
@media (min-width: 1025px) {
  .nu-glass > .e-con-inner { position: relative; }
  .nu-glass .nu-glass-left, .nu-glass .nu-glass-left > .elementor-widget, .nu-glass .nu-glass-left .elementor-widget-container,
  .nu-glass .nu-glass-center, .nu-glass .nu-glass-center > .elementor-widget, .nu-glass .nu-glass-center .elementor-widget-container,
  .nu-glass .menuzord, .nu-glass .menuzord-menu, .nu-glass .menuzord-menu > li { position: static !important; }
  .nu-glass .menuzord-menu > li > .megamenu.elementor-megamenu-wrapper {
    top: 100% !important;
    left: -1px !important;
    right: -1px !important;
    width: auto !important;
    padding-top: 8px;
  }
  /* тема растягивает строку окна до ширины контейнера сайта (1340 px): у нас окно по ширине полосы */
  .nu-glass .megamenu-fullwidth .megamenu-row { width: auto !important; max-width: none !important; }
}
.nu-glass .menuzord-menu > li { padding-top: 0 !important; padding-bottom: 0 !important; }
.nu-glass .menuzord-menu > li > a {
  padding: 11px 12px !important;
  color: #e9e9ec !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.nu-glass .menuzord-menu > li:hover > a,
.nu-glass .menuzord-menu > li.active > a,
.nu-glass .menuzord-menu > li.current-menu-ancestor > a { color: var(--theme-color1) !important; }
/* стрелка у пункта с выпадающим меню, как на сайте */
.nu-glass .menuzord-menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 7px;
  margin-left: 8px;
  vertical-align: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7' fill='none'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23899698' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s ease;
}
.nu-glass .menuzord-menu > li.menu-item-has-children:hover > a::after { transform: rotate(180deg); }
.nu-glass .menuzord-menu > li > a .indicator { display: none; }
.nu-glass .nu-lang { gap: 8px; font-size: 14px; font-weight: 600; }
.nu-glass .nu-lang a { color: rgba(255, 255, 255, .45); }
.nu-glass .nu-lang a:hover { color: #fff; }
.nu-bar-btn {
  display: inline-flex;
  align-items: center;
  height: 45px;
  padding: 0 18px;
  border-radius: 10px;
  background: #f1f1f1;
  color: #080d0d !important;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color .2s ease;
}
.nu-bar-btn:hover { background: var(--theme-color1); }
.nu-bar-btn:focus-visible { outline: 2px solid var(--theme-color1); outline-offset: 3px; }

/* тема красит ссылки внутри мега-меню светлой заливкой: на тёмной панели это белые плашки при наведении */
:is(.elementor, #nu-mega) .nu-mega a,
:is(.elementor, #nu-mega) .nu-mega a:hover,
:is(.elementor, #nu-mega) .nu-mega a:focus { background-color: transparent; }
:is(.elementor, #nu-mega) .nu-mega-btn:hover { background-color: #0b0c09; }

/* телефон и мессенджеры в полосе (решение владельца 20.09) */
.nu-bar-tel { color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; margin-right: 4px; }
.nu-bar-tel:hover { color: var(--theme-color1); }
/* 24.09 владелец: значки мессенджеров крупнее */
.nu-bar-msg { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 6px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.82); transition: .2s; vertical-align: middle; }
.nu-bar-msg svg { width: 22px; height: 22px; display: block; }
.nu-bar-msg:hover { color: #0b0b0b; background: var(--theme-color1); border-color: var(--theme-color1); }
@media (max-width: 1300px) { .nu-bar-tel { display: none; } }

/* мобильная шапка: та же стеклянная полоса с отступом 10 px сверху и 12 px по бокам. Стекло рисует ::before: blur на самой полосе
   сделал бы её рамкой для выезжающего меню (оно внутри шапки с position: fixed) */
@media (max-width: 1024px) {
  #elementor-header-top-mobile, #tm-header-mobile { background: transparent !important; box-shadow: none !important; }
  #tm-header-mobile #tm-header-main { background: transparent !important; box-shadow: none !important; margin: 10px 12px 0; isolation: isolate; }
  #tm-header-mobile #tm-header-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(13, 13, 19, .72);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    pointer-events: none;
  }
  #tm-header-mobile .nu-lang { gap: 8px; font-size: 14px; }
  #tm-header-mobile .nu-lang a { color: rgba(255, 255, 255, .45); }
}

/* ---------- окно мега-меню темы: без белой рамки, отступ от шапки ---------- */
.menuzord-menu > li > .megamenu.elementor-megamenu-wrapper { padding-top: 14px; }
.menuzord-menu > li > .megamenu.elementor-megamenu-wrapper .megamenu-row {
  display: block;
  border: 0;
  background: none;
  box-shadow: none;
}

/* ---------- панель ---------- */
:is(.elementor, #nu-mega) .nu-mega {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: #0d0e0b;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  color: #fff;
  text-align: left;
  font-family: var(--body-font-family);
}

/* карточка слева */
:is(.elementor, #nu-mega) .nu-mega-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 28px 28px;
  border-radius: 20px;
  background: var(--theme-color1);
  color: #0b0c09;
}
:is(.elementor, #nu-mega) .nu-mega-card::after {
  content: "";
  position: absolute;
  right: -96px;
  bottom: -118px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(11, 12, 9, .22);
  border-radius: 50%;
  pointer-events: none;
}
:is(.elementor, #nu-mega) .nu-mega-eyebrow {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .62;
}
:is(.elementor, #nu-mega) .nu-mega-title {
  margin-top: 16px;
  font-family: var(--heading-font-family);
  font-size: 30px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.01em;
  text-wrap: balance;
}
:is(.elementor, #nu-mega) .nu-mega-text {
  margin: 14px 0 28px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(11, 12, 9, .74);
}
:is(.elementor, #nu-mega) .nu-mega-btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 22px;
  border: 1.5px solid #0b0c09;
  border-radius: 999px;
  color: #0b0c09;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
:is(.elementor, #nu-mega) .nu-mega-btn:hover { background: #0b0c09; color: var(--theme-color1); }
:is(.elementor, #nu-mega) .nu-mega-btn svg { transition: transform .2s ease; }
:is(.elementor, #nu-mega) .nu-mega-btn:hover svg { transform: translateX(3px); }

/* группы справа */
:is(.elementor, #nu-mega) .nu-mega-body { min-width: 0; padding: 16px 14px 8px 16px; }
:is(.elementor, #nu-mega) .nu-mega-label {
  display: block;
  margin-bottom: 22px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--theme-color1);
}
:is(.elementor, #nu-mega) .nu-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
:is(.elementor, #nu-mega) .nu-mega--n4 .nu-mega-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(.elementor, #nu-mega) .nu-mega--n2 .nu-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.elementor, #nu-mega) .nu-mega-group,
:is(.elementor, #nu-mega) .nu-mega-list li {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  clear: none;
  list-style: none;
}
:is(.elementor, #nu-mega) .nu-mega-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
:is(.elementor, #nu-mega) .nu-mega-ic {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(188, 234, 62, .1);
  color: var(--theme-color1);
  transition: background-color .2s ease, color .2s ease;
}
:is(.elementor, #nu-mega) .nu-mega-ic svg { width: 21px; height: 21px; }
:is(.elementor, #nu-mega) a.nu-mega-head:hover,
:is(.elementor, #nu-mega) a.nu-mega-head[aria-current] { color: var(--theme-color1); }
:is(.elementor, #nu-mega) a.nu-mega-head:hover .nu-mega-ic { background: var(--theme-color1); color: #0b0c09; }
:is(.elementor, #nu-mega) .nu-mega-list { margin: 10px 0 0 52px; padding: 0; list-style: none; }
:is(.elementor, #nu-mega) .nu-mega-list a {
  display: inline-block;
  padding: 5px 0;
  color: rgba(255, 255, 255, .62);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  text-decoration: none;
  transition: color .2s ease;
}
:is(.elementor, #nu-mega) .nu-mega-list a:hover { color: var(--theme-color1); }
:is(.elementor, #nu-mega) .nu-mega-list a[aria-current] { color: var(--theme-color1); }
:is(.elementor, #nu-mega) .nu-mega a:focus-visible {
  outline: 2px solid var(--theme-color1);
  outline-offset: 3px;
  border-radius: 8px;
}
:is(.elementor, #nu-mega) .nu-mega-hint { grid-column: 1 / -1; color: rgba(255, 255, 255, .6); font-size: 15px; }

/* окно по ширине полосы (960 px): карточка и группы плотнее, чтобы названия услуг помещались в колонки */
@media (min-width: 1025px) {
  :is(.elementor, #nu-mega) .nu-mega { grid-template-columns: 230px minmax(0, 1fr); gap: 14px; padding: 14px; }
  :is(.elementor, #nu-mega) .nu-mega-card { padding: 26px 22px 22px; }
  :is(.elementor, #nu-mega) .nu-mega-title { font-size: 25px; }
  :is(.elementor, #nu-mega) .nu-mega-body { padding: 14px 10px 6px 12px; }
  :is(.elementor, #nu-mega) .nu-mega-grid { gap: 24px 18px; }
  :is(.elementor, #nu-mega) .nu-mega-head { gap: 10px; font-size: 15px; }
  :is(.elementor, #nu-mega) .nu-mega-ic { flex-basis: 36px; width: 36px; height: 36px; }
  :is(.elementor, #nu-mega) .nu-mega-ic svg { width: 19px; height: 19px; }
  :is(.elementor, #nu-mega) .nu-mega-list { margin-left: 46px; }
  :is(.elementor, #nu-mega) .nu-mega-list a { font-size: 14px; padding: 4px 0; }
  :is(.elementor, #nu-mega) .nu-mega-btn { padding: 11px 14px 11px 18px; gap: 8px; font-size: 14px; white-space: nowrap; }
  :is(.elementor, #nu-mega) .nu-mega--n4 .nu-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* узкий ноутбук: у четырёх групп две колонки */
@media (min-width: 1025px) and (max-width: 1279px) {
  :is(.elementor, #nu-mega) .nu-mega { grid-template-columns: 250px minmax(0, 1fr); gap: 14px; padding: 14px; }
  :is(.elementor, #nu-mega) .nu-mega-card { padding: 26px 22px 22px; }
  :is(.elementor, #nu-mega) .nu-mega-title { font-size: 25px; }
  :is(.elementor, #nu-mega) .nu-mega-head { gap: 10px; font-size: 15px; }
  :is(.elementor, #nu-mega) .nu-mega-ic { flex-basis: 38px; width: 38px; height: 38px; }
  :is(.elementor, #nu-mega) .nu-mega-list { margin-left: 48px; }
  :is(.elementor, #nu-mega) .nu-mega-list a { font-size: 14px; }
  :is(.elementor, #nu-mega) .nu-mega--n4 .nu-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* мобильное меню: без карточки, группы списком под пунктом «Услуги» */
@media (max-width: 1024px) {
  :is(.elementor, #nu-mega) .nu-mega {
    display: block;
    padding: 8px 0 16px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  :is(.elementor, #nu-mega) .nu-mega-card,
  :is(.elementor, #nu-mega) .nu-mega-label { display: none; }
  :is(.elementor, #nu-mega) .nu-mega-body { padding: 0; }
  :is(.elementor, #nu-mega) .nu-mega .nu-mega-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  :is(.elementor, #nu-mega) .nu-mega-head { gap: 12px; font-size: 16px; }
  :is(.elementor, #nu-mega) .nu-mega-ic { flex-basis: 36px; width: 36px; height: 36px; }
  :is(.elementor, #nu-mega) .nu-mega-ic svg { width: 18px; height: 18px; }
  :is(.elementor, #nu-mega) .nu-mega-list { margin: 6px 0 0 48px; }
  .menuzord-responsive .menuzord-menu > li > .megamenu.elementor-megamenu-wrapper { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nu-bar-btn,
  .nu-glass .menuzord-menu > li > a::after,
  :is(.elementor, #nu-mega) .nu-mega * { transition: none !important; }
}


/* контакты внизу мобильной панели меню (решение владельца 20.09) */
.nu-mob-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 26px;
  padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.nu-mob-contacts .nu-mob-tel { color: #fff; font-size: 18px; font-weight: 600; text-decoration: none; }
.nu-mob-contacts .nu-mob-msg { display: flex; gap: 10px; }
.nu-mob-contacts .nu-bar-msg { margin-left: 0; width: 38px; height: 38px; }
.nu-mob-contacts .nu-bar-msg svg { width: 18px; height: 18px; }
.nu-mob-contacts .nu-mob-cta { display: inline-flex; align-items: center; justify-content: center; width: 100%;
  padding: 13px 22px; border-radius: 999px; background: var(--theme-color1); color: #0b0c09;
  font-size: 15px; font-weight: 600; text-decoration: none; }
.nu-mob-contacts .nu-mob-cta:hover { background: #fff; }
