/* CDO Global — единая шапка сайта (site-header) v1 (2026-07-07).
   Автономный CSS: все переменные и стили заскоуплены под .cdo-site-header,
   чтобы не конфликтовать с существующими стилями страниц (g-page, g-guide,
   science-*, doc, corporate, и т.д.). */

.cdo-site-header {
  --shd-bg: rgba(10, 15, 10, 0.92);
  --shd-line: rgba(255, 255, 255, 0.08);
  --shd-text: #ffffff;
  --shd-text-dim: rgba(255, 255, 255, 0.72);
  --shd-text-mute: rgba(255, 255, 255, 0.5);
  --shd-accent: #74D414;
  --shd-accent-2: #8be12a;
  --shd-btn-bg: #ffffff;
  --shd-btn-text: #0a0f0a;
  --shd-max: 1240px;
  --shd-pad: clamp(16px, 3vw, 40px);
  --shd-font: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--shd-bg);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--shd-line);
  font-family: var(--shd-font);
  color: var(--shd-text);
  line-height: 1.2;
}
.cdo-site-header *,
.cdo-site-header *::before,
.cdo-site-header *::after { box-sizing: border-box; }

.cdo-site-header a { text-decoration: none; color: inherit; }

.cdo-site-header__inner {
  max-width: var(--shd-max);
  margin: 0 auto;
  padding: 14px var(--shd-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cdo-site-header__logo { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.cdo-site-header__logo img { height: 28px; width: auto; display: block; }
.cdo-site-header__logo-txt { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }

.cdo-site-header__nav {
  display: flex;
  gap: 26px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
}
.cdo-site-header__nav-item { position: relative; }
.cdo-site-header__nav-link,
.cdo-site-header__nav-trigger {
  font-size: 14.5px;
  color: var(--shd-text-dim);
  font-family: inherit;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.cdo-site-header__nav-link:hover,
.cdo-site-header__nav-trigger:hover { color: var(--shd-text); }
.cdo-site-header__nav-caret { font-size: 10px; opacity: 0.7; }

.cdo-site-header__submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: -16px;
  min-width: 320px;
  background: #0f1410;
  border: 1px solid var(--shd-line);
  border-radius: 14px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  z-index: 1100;
}
.cdo-site-header__submenu--narrow { min-width: 240px; }
.cdo-site-header__nav-item.is-open .cdo-site-header__submenu { display: flex; }
.cdo-site-header__submenu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--shd-text-dim);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.cdo-site-header__submenu a strong { color: var(--shd-text); font-weight: 600; font-size: 14.5px; }
.cdo-site-header__submenu a span { color: var(--shd-text-mute); font-size: 12.5px; line-height: 1.4; }
.cdo-site-header__submenu a:hover { background: rgba(116,212,20,0.08); }
.cdo-site-header__submenu a:hover strong { color: var(--shd-accent); }

.cdo-site-header__right { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.cdo-site-header__lang { display: flex; gap: 10px; font-size: 13px; color: var(--shd-text-mute); }
.cdo-site-header__lang a { color: var(--shd-text-mute); transition: color .2s; }
.cdo-site-header__lang a:hover { color: var(--shd-text); }
.cdo-site-header__lang .is-active { color: var(--shd-text); font-weight: 600; }

.cdo-site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--shd-accent);
  color: var(--shd-btn-text);
  transition: background 0.2s;
  white-space: nowrap;
}
.cdo-site-header__cta:hover { background: var(--shd-accent-2); }

.cdo-site-header__burger {
  display: none;
  background: transparent;
  border: 0;
  color: var(--shd-text);
  font-size: 22px;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
}

/* Mobile */
@media (max-width: 960px) {
  .cdo-site-header__nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0f0a;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
    display: none;
  }
  .cdo-site-header.is-open .cdo-site-header__nav { display: flex; }
  .cdo-site-header__nav-item { width: 100%; }
  .cdo-site-header__nav-link,
  .cdo-site-header__nav-trigger {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--shd-line);
    justify-content: space-between;
  }
  .cdo-site-header__submenu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 4px 0 8px 12px;
  }
  .cdo-site-header__lang { display: none; }
  .cdo-site-header__cta { padding: 9px 16px; font-size: 13.5px; }
  .cdo-site-header__burger { display: inline-flex; }
}

/* Отступ для контента, чтобы sticky header не перекрывал якоря */
.cdo-site-header ~ * [id],
.cdo-site-header ~ * a[id] { scroll-margin-top: 80px; }
