@import url('site-footer-social-sync.css');

/* ==========================================================================
   ПлАЦДАРМ — меню навигации (#sideMenu / #menuOverlay)
   Перебивает legacy page CSS и inline-стили index-overrides.js
   ========================================================================== */

/* ── До js-ready: меню закрыто, без анимации появления при загрузке ── */
#sideMenu:not(.active) {
  transform: translateX(100%) !important;
  pointer-events: none !important;
}

#menuOverlay:not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html:not(.nav-transitions-ready) #sideMenu,
html:not(.nav-transitions-ready) #menuOverlay {
  transition: none !important;
}

html.site-blocks,
html.js-ready {
  --nav-w-base: 380px;
  /* До 480px — мобильная ширина (calc(100vw / 1.5)), ниже в @media (max-width: 480px) */
  --nav-w: min(calc(var(--nav-w-base) / 1.5), calc(100vw / 1.5));
  --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-link-grad: linear-gradient(90deg, #96c8d6 0%, #6eb4c8 32%, #3d8ba8 68%, #2f7085 100%);
  --nav-link-grad-hover: linear-gradient(90deg, #a8d4e0 0%, #7ec0d2 32%, #4596b0 68%, #2d5f71 100%);
  --nav-link-grad-current: linear-gradient(90deg, #92cbdb 0%, #55a0b8 35%, #3f93ad 68%, #1f4b5b 100%);
  --site-logo-font-size: 1.08rem;
  /* Подписи разделов — как lead-текст index «основные направления деятельности» */
  --nav-desc-font-size: clamp(0.88rem, 1.35vw, 0.96rem);
}

html.site-blocks body.menu-open,
html.js-ready body.menu-open {
  overflow: hidden !important;
}

/* ── Overlay ── */
html.site-blocks #menuOverlay,
html.js-ready #menuOverlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  z-index: 35000 !important;
  background: rgba(10, 18, 25, 0.32) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.28s var(--nav-ease), visibility 0.28s var(--nav-ease) !important;
}

html.site-blocks #menuOverlay.active,
html.js-ready #menuOverlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ── Панель ── */
html.site-blocks #sideMenu,
html.js-ready #sideMenu {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: 0 !important;
  width: var(--nav-w) !important;
  max-width: calc(100vw / 1.5) !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  box-sizing: border-box !important;
  z-index: 35100 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  background-image: none !important;
  border-left: 1px solid rgba(10, 18, 25, 0.08) !important;
  box-shadow: -16px 0 48px rgba(12, 18, 32, 0.12) !important;
  overflow: hidden !important;
  transform: translateX(100%) !important;
  pointer-events: none !important;
  transition: transform 0.32s var(--nav-ease) !important;
}

html.site-blocks #sideMenu.active,
html.js-ready #sideMenu.active {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

/* ── Шапка ── */
html.site-blocks #sideMenu .side-menu-header,
html.js-ready #sideMenu .side-menu-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  padding: 16px 18px 14px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(10, 18, 25, 0.08) !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

html.site-blocks #sideMenu .side-menu-title,
html.js-ready #sideMenu .side-menu-title {
  margin: 0 !important;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #0a1219 !important;
  -webkit-text-fill-color: #0a1219 !important;
}

html.site-blocks #sideMenu #closeMenuBtn,
html.site-blocks #sideMenu .close-side-menu,
html.js-ready #sideMenu #closeMenuBtn,
html.js-ready #sideMenu .close-side-menu {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(10, 18, 25, 0.1) !important;
  border-radius: 50% !important;
  background: #f4f7fa !important;
  background-image: none !important;
  color: #5a6d7a !important;
  -webkit-text-fill-color: #5a6d7a !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  box-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  visibility: visible !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

html.site-blocks #sideMenu #closeMenuBtn:hover,
html.site-blocks #sideMenu .close-side-menu:hover,
html.js-ready #sideMenu #closeMenuBtn:hover,
html.js-ready #sideMenu .close-side-menu:hover {
  background: #e8eef2 !important;
  background-image: none !important;
  color: #0a1219 !important;
  -webkit-text-fill-color: #0a1219 !important;
}

/* ── Ссылки ── */
html.site-blocks #sideMenu .side-nav,
html.js-ready #sideMenu .side-nav {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 12px 14px 18px !important;
  margin: 0 !important;
  margin-top: 0 !important;
}

html.site-blocks #sideMenu .side-nav a,
html.site-blocks #sideMenu .side-nav button,
html.site-blocks #sideMenu .side-nav a:hover,
html.site-blocks #sideMenu .side-nav a:focus-visible,
html.site-blocks #sideMenu .side-nav a.active,
html.site-blocks #sideMenu .side-nav a.is-current,
html.js-ready #sideMenu .side-nav a,
html.js-ready #sideMenu .side-nav button,
html.js-ready #sideMenu .side-nav a:hover,
html.js-ready #sideMenu .side-nav a:focus-visible,
html.js-ready #sideMenu .side-nav a.active,
html.js-ready #sideMenu .side-nav a.is-current {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 12px 14px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  background-image: none !important;
  color: #0a1219 !important;
  -webkit-text-fill-color: #0a1219 !important;
  font-family: "Manrope", sans-serif !important;
  font-size: var(--site-logo-font-size, 1.08rem) !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  line-height: 1.35 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-transform: none !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  box-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: background 0.2s ease, border-color 0.2s ease !important;
}

html.site-blocks #sideMenu .side-nav a::before,
html.site-blocks #sideMenu .side-nav a::after,
html.js-ready #sideMenu .side-nav a::before,
html.js-ready #sideMenu .side-nav a::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  background-image: none !important;
}

html.site-blocks #sideMenu .side-nav a .side-nav-num,
html.js-ready #sideMenu .side-nav a .side-nav-num {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
  background: transparent !important;
}

html.site-blocks #sideMenu .side-nav a,
html.site-blocks #sideMenu .side-nav button,
html.js-ready #sideMenu .side-nav a,
html.js-ready #sideMenu .side-nav button {
  gap: 12px !important;
  background: var(--nav-link-grad) !important;
  background-color: transparent !important;
  background-image: var(--nav-link-grad) !important;
  border-color: rgba(37, 84, 100, 0.18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 84, 100, 0.12) !important;
}

html.site-blocks #sideMenu .side-nav a .side-nav-body,
html.js-ready #sideMenu .side-nav a .side-nav-body {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

html.site-blocks #sideMenu .side-nav a .side-nav-label,
html.js-ready #sideMenu .side-nav a .side-nav-label {
  font-size: var(--site-logo-font-size, 1.08rem) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  line-height: 1.3 !important;
}

html.site-blocks #sideMenu .side-nav a .side-nav-desc,
html.js-ready #sideMenu .side-nav a .side-nav-desc {
  font-size: var(--nav-desc-font-size, clamp(0.88rem, 1.35vw, 0.96rem)) !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.82) !important;
  line-height: 1.35 !important;
}

html.site-blocks #sideMenu .side-nav a:hover,
html.site-blocks #sideMenu .side-nav a:focus-visible,
html.site-blocks #sideMenu .side-nav button:hover,
html.site-blocks #sideMenu .side-nav button:focus-visible,
html.js-ready #sideMenu .side-nav a:hover,
html.js-ready #sideMenu .side-nav a:focus-visible,
html.js-ready #sideMenu .side-nav button:hover,
html.js-ready #sideMenu .side-nav button:focus-visible {
  background: var(--nav-link-grad-hover) !important;
  background-color: transparent !important;
  background-image: var(--nav-link-grad-hover) !important;
  border-color: rgba(37, 84, 100, 0.24) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: none !important;
  box-shadow: 0 6px 18px rgba(37, 84, 100, 0.16) !important;
}

html.site-blocks #sideMenu .side-nav a.is-current,
html.site-blocks #sideMenu .side-nav a.active,
html.js-ready #sideMenu .side-nav a.is-current,
html.js-ready #sideMenu .side-nav a.active {
  background: var(--nav-link-grad-current) !important;
  background-color: transparent !important;
  background-image: var(--nav-link-grad-current) !important;
  border-color: rgba(31, 75, 91, 0.32) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow:
    inset 3px 0 0 rgba(255, 255, 255, 0.72),
    0 6px 20px rgba(31, 75, 91, 0.2) !important;
}

html.site-blocks #sideMenu .side-nav a.is-current .side-nav-num,
html.js-ready #sideMenu .side-nav a.is-current .side-nav-num {
  display: none !important;
}

html.site-blocks #sideMenu .side-nav a.is-current::before,
html.js-ready #sideMenu .side-nav a.is-current::before {
  content: none !important;
  display: none !important;
  background: transparent !important;
  background-image: none !important;
}

html.site-blocks #sideMenu .side-menu-footer,
html.js-ready #sideMenu .side-menu-footer {
  display: none !important;
}

@media (min-width: 481px) {
  html.site-blocks,
  html.js-ready {
    --nav-w: min(var(--nav-w-base), calc(100vw / 1.5));
  }
}

@media (max-width: 480px) {
  html.site-blocks,
  html.js-ready {
    --nav-w: calc(100vw / 1.5);
  }

  html.site-blocks #sideMenu,
  html.js-ready #sideMenu {
    border-left: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.site-blocks #sideMenu,
  html.site-blocks #menuOverlay,
  html.js-ready #sideMenu,
  html.js-ready #menuOverlay {
    transition: none !important;
  }
}

/* Логотип — только «ПлАЦДАРМ» (без разделителя и «СИЛА ЖИТЬ») */
html.site-blocks .site-header .logo,
html.js-ready .site-header .logo {
  display: inline-flex !important;
  grid-template-columns: auto !important;
  column-gap: 0 !important;
}

/* Меню навигации — поверх шапки (шапка до z-index 30000) */
html body #menuOverlay.menu-overlay,
html body #menuOverlay,
html.site-blocks #menuOverlay,
html.js-ready #menuOverlay {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  z-index: 35000 !important;
}

html body #sideMenu.side-menu,
html body #sideMenu,
html.site-blocks #sideMenu,
html.js-ready #sideMenu {
  top: 0 !important;
  padding-top: 0 !important;
  width: var(--nav-w, min(calc(380px / 1.5), calc(100vw / 1.5))) !important;
  max-width: calc(100vw / 1.5) !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 35100 !important;
}

@media (min-width: 481px) {
  html body #sideMenu.side-menu,
  html body #sideMenu,
  html.site-blocks #sideMenu,
  html.js-ready #sideMenu {
    width: var(--nav-w, min(380px, calc(100vw / 1.5))) !important;
  }
}

/* ── Иконки страниц в боковом меню (без рамок) ── */
html.site-blocks #sideMenu .side-nav > a.side-nav-page-link,
html.js-ready #sideMenu .side-nav > a.side-nav-page-link,
html body #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn):not(.modern-hero-brand),
html body #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn),
html body #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn),
html body #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn),
html body #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn),
html body #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn) {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: left !important;
}

html.site-blocks #sideMenu .side-nav a .side-nav-icon,
html.js-ready #sideMenu .side-nav a .side-nav-icon,
html body #sideMenu .side-nav a .side-nav-icon {
  display: block !important;
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  object-fit: contain !important;
  object-position: center !important;
  align-self: center !important;
  pointer-events: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Старые ::before-фоны отключаем — иконки уже через <img> */
html.site-blocks #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.site-blocks #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.site-blocks #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.site-blocks #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.site-blocks #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.site-blocks #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html.js-ready #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::before,
html body #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

html.site-blocks #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="font.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.site-blocks #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="laboratory.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.site-blocks #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="school.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.site-blocks #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="school_str.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.site-blocks #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="social.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.site-blocks #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html.js-ready #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::after,
html body #sideMenu .side-nav > a[href*="positions.html"]:not(.fund-choice-link):not(.contract-btn)::after {
  display: none !important;
  content: none !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   Мобильная версия: высота кнопок меню разделов — 15mm на всех страницах.
   Десктоп (min-width: 769px) не затрагивается.
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  html body #sideMenu .side-nav > a,
  html body #sideMenu .side-nav > button,
  html body #sideMenu .side-nav a.side-nav-page-link,
  html.site-blocks body #sideMenu .side-nav > a,
  html.site-blocks body #sideMenu .side-nav > button,
  html.site-blocks body #sideMenu .side-nav a.side-nav-page-link,
  html.js-ready body #sideMenu .side-nav > a,
  html.js-ready body #sideMenu .side-nav > button,
  html.js-ready body #sideMenu .side-nav a.side-nav-page-link {
    flex: 0 0 15mm !important;
    height: 15mm !important;
    min-height: 15mm !important;
    max-height: 15mm !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  html body #sideMenu .side-nav a .side-nav-icon,
  html.site-blocks body #sideMenu .side-nav a .side-nav-icon,
  html.js-ready body #sideMenu .side-nav a .side-nav-icon {
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
  }

  html body #sideMenu .side-nav a .side-nav-label,
  html.site-blocks body #sideMenu .side-nav a .side-nav-label,
  html.js-ready body #sideMenu .side-nav a .side-nav-label {
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
  }

  html body #sideMenu .side-nav a .side-nav-desc,
  html.site-blocks body #sideMenu .side-nav a .side-nav-desc,
  html.js-ready body #sideMenu .side-nav a .side-nav-desc {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
  }
}
