/* Плавающая шапка Nero AI (pill) — единый компонент главной и лонгридов */
body.nero-ai-landing-shell #masthead,
body.nero-ai-landing-shell .site-header,
body.nero-ai-landing-shell header.site-header,
body.nero-ai-landing-shell .kadence-header,
body.nero-ai-landing-shell #mobile-header,
body.home #masthead,
body.home .site-header,
body.home header.site-header,
body.home .kadence-header,
body.home #mobile-header {
  display: none !important;
}

body.nero-ai-landing-shell,
body.home {
  padding-top: 0 !important;
}

body.nero-ai-landing-shell #primary,
body.nero-ai-landing-shell .site-main,
body.nero-ai-landing-shell .site-content,
body.nero-ai-landing-shell #content,
body.nero-ai-landing-shell .content-area {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.nero-ai-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  pointer-events: none;
  padding: 14px 16px 0;
}

.nero-ai-header-shell {
  max-width: 1180px;
  margin: 0 auto;
  pointer-events: auto;
}

.nero-ai-header-bar {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s, transform 0.25s;
}

.nero-ai-header.is-scrolled .nero-ai-header-bar {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.nero-ai-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nero-ai-header-logo-img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.nero-ai-header-logo-text {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #0f172a;
}

.nero-ai-header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nero-ai-header-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: #f1f5f9;
  border-radius: 999px;
  flex-wrap: wrap;
  justify-content: center;
}

.nero-ai-header-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.nero-ai-header-link:hover,
.nero-ai-header-link:focus-visible {
  background: #fff;
  color: #0f172a;
  outline: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nero-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nero-ai-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.nero-ai-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55);
}

.nero-ai-header-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nero-ai-header-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nero-ai-header.is-open .nero-ai-header-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nero-ai-header.is-open .nero-ai-header-toggle-line:nth-child(2) {
  opacity: 0;
}

.nero-ai-header.is-open .nero-ai-header-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .nero-ai-header-pill {
    display: none;
  }

  .nero-ai-header-toggle {
    display: flex;
  }

  .nero-ai-header-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    flex: none;
    display: none;
  }

  .nero-ai-header.is-open .nero-ai-header-nav {
    display: block;
  }

  .nero-ai-header.is-open .nero-ai-header-pill {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }

  .nero-ai-header.is-open .nero-ai-header-link {
    padding: 12px 16px;
    border-radius: 12px;
  }

  .nero-ai-header-shell {
    position: relative;
  }

  .nero-ai-header-actions > .nero-ai-header-cta {
    display: none;
  }

  .nero-ai-header-cta--mobile {
    display: none;
  }

  .nero-ai-header.is-open .nero-ai-header-cta--mobile {
    display: inline-flex;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }
}

.nero-ai-header-cta--mobile {
  display: none;
}

/* На тёмных лонгридах правило .nero-ai-home-page a { color: inherit } ломает контраст шапки */
main.nero-ai-home-page > .nero-ai-header .nero-ai-header-logo-text {
  color: #0f172a !important;
}

main.nero-ai-home-page > .nero-ai-header .nero-ai-header-link {
  color: #334155 !important;
}

main.nero-ai-home-page > .nero-ai-header .nero-ai-header-link:hover,
main.nero-ai-home-page > .nero-ai-header .nero-ai-header-link:focus-visible {
  color: #0f172a !important;
  background: #fff;
}

main.nero-ai-home-page > .nero-ai-header .nero-ai-header-cta,
main.nero-ai-home-page > .nero-ai-header .nero-ai-header-cta--mobile {
  color: #fff !important;
}

main.nero-ai-home-page > .nero-ai-header .nero-ai-header-toggle-line {
  background: #334155 !important;
}
