/* ═══════════════════════════════════════════════════════════════════
   Внутренние страницы agroto.ru в оформлении новой главной (07.11.2026).
   Подключается сервером ко всем страницам лендинга, кроме самой главной
   (src/routes/landing-skin.js): общая тёмная шапка .nh, шрифт Onest,
   фирменные зелёные, тёмные «герои» с авророй, тёмный CTA и подвал.
   Свои классы страниц (contacts-hero, kb-hero, doc-layout…) не меняем —
   только перекрашиваем, поэтому правила с запасом по специфичности.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --g900: #0B2E22; --g800: #0E3B2E; --g700: #15803D; --g600: #15803D; --g500: #16A34A;
  --g400: #22C55E; --g300: #4ADE80; --g200: #86EFAC; --g100: #DCFCE7; --g50: #F0FDF4;
  --nh-h: 72px;
}
html { scroll-padding-top: calc(var(--nh-h) + 16px); }
body { font-family: 'Onest', Arial, sans-serif !important; }
h1, h2, h3, h4 { font-family: 'Onest', Arial, sans-serif !important; letter-spacing: -.01em; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.nh { position: sticky; top: 0; z-index: 900; background: rgba(11, 46, 34, .94); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nh-in { max-width: 1240px; margin: 0 auto; padding: 0 32px; height: var(--nh-h); display: flex; align-items: center; gap: 28px; }
.nh-logo { display: flex; flex: 0 0 auto; }
.nh-logo img { width: 150px; height: auto; display: block; }
.nh-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nh-links a, .nh-login { color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; transition: color .15s; white-space: nowrap; }
.nh-links a:hover, .nh-login:hover, .nh-links a.on { color: #fff; }
.nh-links a.on { box-shadow: inset 0 -2px 0 #4ADE80; padding-bottom: 4px; }
.nh-right { display: flex; align-items: center; gap: 18px; }
.nh-btn { display: inline-flex; align-items: center; justify-content: center; background: #22C55E; color: #06281b !important;
  border-radius: 8px; padding: 11px 18px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.nh-btn:hover { background: #4ADE80; box-shadow: 0 8px 24px rgba(34, 197, 94, .35); }
.nh-menu { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px; width: 42px; height: 38px; font-size: 18px; cursor: pointer; }
@media (max-width: 960px) {
  .nh-in { padding: 0 16px; gap: 12px; }
  .nh-logo img { width: 132px; }
  .nh-menu { display: block; }
  .nh-links { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    background: #0B2E22; padding: 6px 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 30px rgba(0, 0, 0, .3); }
  .nh.open .nh-links { display: flex; }
  .nh-links a { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; }
  .nh-links a.on { box-shadow: none; color: #4ADE80; }
  .nh-right .nh-login { display: none; }
  .nh-btn { padding: 10px 12px; font-size: 12px; }
}
@media (max-width: 380px) { .nh-btn { display: none; } }

/* старая фиксированная навигация страниц больше не нужна — отступы под неё убираем */
body > nav { display: none !important; }

/* ── Тёмные «герои» страниц ───────────────────────────────────────── */
.contacts-hero, .about-hero, .page-hero, .kb-hero {
  position: relative; overflow: hidden; background: #0B2E22 !important; color: #fff !important;
  padding-top: 72px !important; padding-bottom: 64px !important; border-bottom: 0 !important;
}
.contacts-hero:before, .about-hero:before, .page-hero:before, .kb-hero:before {
  content: ''; position: absolute; inset: -25%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 420px at 15% 20%, rgba(34, 197, 94, .38), transparent 65%),
    radial-gradient(640px 380px at 85% 75%, rgba(21, 128, 61, .5), transparent 65%);
}
.contacts-hero > *, .about-hero > *, .page-hero > *, .kb-hero > * { position: relative; z-index: 1; }
.contacts-hero h1, .about-hero h1, .page-hero h1, .kb-hero h1 { color: #fff !important; }
.contacts-hero h1 em, .about-hero h1 em, .page-hero h1 em { color: #4ADE80 !important; font-style: normal !important; }
.contacts-hero p, .about-hero p, .page-hero p, .kb-hero p { color: rgba(255, 255, 255, .78) !important; }
.contacts-hero .eyebrow, .about-hero .hero-eyebrow, .page-hero .eyebrow, .contacts-hero [class*="eyebrow"] { color: #86EFAC !important; }
.about-hero .hero-card { background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(255, 255, 255, .12) !important; color: #fff; box-shadow: none !important; }
.about-hero .hero-card * { color: inherit; }
.about-hero .stat-num { color: #4ADE80 !important; }
.kb-hero .kb-search { border-radius: 12px; border: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }

/* ── Кнопки старых страниц — фирменный зелёный ───────────────────── */
.btn-primary, .nav-btn, a.btn.btn-primary { background: #16A34A !important; border-color: #16A34A !important; color: #fff !important; border-radius: 8px !important; }
.btn-primary:hover { background: #15803D !important; border-color: #15803D !important; }

/* ── CTA внизу страниц — как на главной ───────────────────────────── */
.cta-section, .cta-banner { position: relative; overflow: hidden; background: #0B2E22 !important; color: #fff !important; }
.cta-section:before, .cta-banner:before { content: ''; position: absolute; inset: -25%; pointer-events: none;
  background: radial-gradient(620px 360px at 80% 30%, rgba(34, 197, 94, .35), transparent 65%), radial-gradient(520px 320px at 10% 90%, rgba(21, 128, 61, .45), transparent 65%); }
.cta-section > *, .cta-banner > * { position: relative; z-index: 1; }
.cta-section h2, .cta-banner h2, .cta-section h3, .cta-banner h3 { color: #fff !important; }
.cta-section p, .cta-banner p { color: rgba(255, 255, 255, .78) !important; }
.cta-section [class*="eyebrow"] { color: #86EFAC !important; }
.cta-section a.btn, .cta-banner a.btn, .cta-section .btn-primary, .cta-banner .btn-primary { background: #22C55E !important; border-color: #22C55E !important; color: #06281b !important; }
.cta-section .btn-ghost, .cta-section .btn-outline { color: #fff !important; border-color: rgba(255, 255, 255, .35) !important; background: transparent !important; }

/* ── Документация и база знаний: шапка теперь общая, липкое меню ниже неё ── */
.doc-sidebar { top: calc(var(--nh-h) + 8px) !important; }
.doc-layout { padding-top: 0 !important; margin-top: 0 !important; }


/* ═══ 07.11.2026 вечер: единая палитра для всех внутренних страниц ═══════
   У страниц свои :root со старыми цветами (бежевый фон #faf9f6, песочные
   рамки, тёмно-зелёные #173626…). html:root сильнее :root — перебиваем
   токены разом, без правки каждой страницы. */
html:root {
  --g900: #0B2E22; --g800: #0E3B2E; --g700: #15803D; --g600: #15803D; --g500: #16A34A;
  --g400: #22C55E; --g300: #4ADE80; --g200: #86EFAC; --g100: #DCFCE7; --g50: #F0FDF4;
  --bg: #F5F8F6; --bg2: #F0FDF4; --white: #ffffff; --sand: #DCE5DF;
  --ink: #14261C; --ink2: #3D4A44; --ink3: #68766F;
}
body { background: #fff !important; }
.section-alt { background: #F5F8F6 !important; border-block: 1px solid #E8EEEA; }

/* карточки и плашки — белые с мятной рамкой, как на главной */
.value-card, .role-card, .post-card, .module-card, .kb-card, .article-card, .contact-card, .req-card,
.compare-card, .doc-card, .cert-card, .c-card {
  background: #fff !important; border-color: #DCE5DF !important; border-radius: 12px !important;
}
.value-card:hover, .post-card:hover, .module-card:hover, .kb-card:hover, .article-card:hover {
  border-color: #86EFAC !important; box-shadow: 0 16px 40px rgba(21, 128, 61, .10) !important;
}
.post-thumb { background: linear-gradient(135deg, #F0FDF4, #DCFCE7) !important; }
.kb-popular { background: #F0FDF4 !important; border: 1px solid #BBF7D0 !important; border-radius: 12px; }
.callout-info, .info-box { background: #F0FDF4 !important; border-color: #86EFAC !important; }

/* ── Призыв внизу — светлый мятный блок, как последняя секция главной
      (тёмный CTA вплотную к тёмному подвалу давал огромный зелёный низ) ── */
.cta-section, .cta-banner {
  background: linear-gradient(180deg, #F0FDF4 0%, #DCFCE7 100%) !important; color: #14261C !important;
  padding-top: 64px !important; padding-bottom: 64px !important; border-top: 1px solid #BBF7D0;
}
.cta-section:before, .cta-banner:before {
  background: radial-gradient(560px 300px at 85% 20%, rgba(34, 197, 94, .18), transparent 65%),
              radial-gradient(480px 280px at 10% 90%, rgba(21, 128, 61, .10), transparent 65%) !important;
}
.cta-section h2, .cta-banner h2, .cta-section h3, .cta-banner h3 { color: #14261C !important; }
.cta-section h2 em, .cta-banner h2 em { color: #15803D !important; }
.cta-section p, .cta-banner p { color: #3D4A44 !important; }
.cta-section a:not(.btn):not([class*="btn"]) { color: #15803D !important; }
.cta-section [class*="eyebrow"] { color: #15803D !important; }
.cta-section a.btn, .cta-banner a.btn, .cta-section .btn-primary, .cta-banner .btn-primary { background: #16A34A !important; border-color: #16A34A !important; color: #fff !important; }
.cta-section a.btn.btn-cta-ghost, .cta-banner a.btn.btn-cta-ghost, .cta-section a.btn.btn-ghost, .cta-section a.btn.btn-outline {
  background: #fff !important; color: #15803D !important; border: 1px solid #86EFAC !important;
}
@media (max-width: 680px) { .cta-section, .cta-banner { padding-top: 44px !important; padding-bottom: 44px !important; } }

/* ── Документация на телефоне: липкий выбор раздела (doc-nav.js) ───── */
.dn-bar { display: none; }
@media (max-width: 900px) {
  .dn-bar { display: block; position: sticky; top: var(--nh-h); z-index: 800; background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #DCE5DF; padding: 10px 16px; }
  .dn-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: #F0FDF4; border: 1px solid #BBF7D0;
    border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 14px; color: #14261C; text-align: left; cursor: pointer; }
  .dn-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #15803D; flex: 0 0 auto; }
  .dn-cur { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dn-ar { color: #15803D; transition: transform .2s; }
  .dn-bar.open .dn-ar { transform: rotate(180deg); }
  .dn-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid #DCE5DF;
    box-shadow: 0 24px 40px rgba(6, 40, 27, .18); max-height: calc(100dvh - var(--nh-h) - 70px); overflow-y: auto;
    overscroll-behavior: contain; padding: 6px 16px 16px; }
  .dn-bar.open .dn-panel { display: block; }
  .dn-panel .sidebar-section { padding: 10px 0 4px; border-bottom: 1px solid #EEF2EF; }
  .dn-panel .sidebar-section:last-child { border-bottom: 0; }
  .dn-panel .sidebar-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #68766F; margin: 4px 0 6px; }
  .dn-panel a { display: block; padding: 10px 12px; margin: 0 -12px; border-radius: 8px; color: #14261C; text-decoration: none; font-size: 15px; }
  .dn-panel a.active { background: #F0FDF4; color: #15803D; font-weight: 600; }
  html.dn-lock body { overflow: hidden; }
}
