/* NGP Fonts: свои шрифты вместо Google Fonts. Заголовки: Times New Roman (если есть у посетителя) -> NGP Serif
   (Liberation Serif, метрически совпадает). Текст и меню: NGP Sans (PT Sans). Плагин ngp-fonts. */
@font-face{font-family:"NGP Serif";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/ngp-serif-regular.woff2") format("woff2")}
@font-face{font-family:"NGP Serif";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/ngp-serif-bold.woff2") format("woff2")}
@font-face{font-family:"NGP Sans";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/ngp-sans-regular.woff2") format("woff2")}
@font-face{font-family:"NGP Sans";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/ngp-sans-bold.woff2") format("woff2")}
@font-face{font-family:"NGP Sans";font-style:italic;font-weight:400;font-display:swap;src:url("../fonts/ngp-sans-italic.woff2") format("woff2")}

:root{
  --ngp-head-font:"Times New Roman","NGP Serif",Times,serif;
  --ngp-text-font:"NGP Sans","PT Sans",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --ngp-blue:#5F95D7;      /* фирменный голубой бланка */
  --ngp-blue-dark:#2E5F9E; /* его тёмный тон: наведение, активный пункт */
}

/* Основной текст (не трогаем * и иконки FontAwesome; плашка #teo-cookie задаёт свой font) */
body,input,textarea,select{
  font-family:var(--ngp-text-font);
  font-size:17px;
  line-height:1.6;
  color:#2b2b2b;
}

/* Заголовки */
h1,h2,h3,h4,h5,h6,
#site-title,.entry-title,.widget-title,.slogan-wrap,.slogan-wrap .slogan span,
.widget_promotional_bar{
  font-family:var(--ngp-head-font);
}
.widget_promotional_bar .promotional-text span{font-family:var(--ngp-text-font)}

/* Название на фирменном бланке: Times, жирный, капитель, чёрный */
#site-title{font-weight:700;font-variant:small-caps;letter-spacing:.01em;line-height:1.3}
#site-title a{color:#000}
#site-title a:hover,#site-title a:focus,#site-title a:active{color:var(--ngp-blue-dark)}

/* Меню: без смены регистра темы */
#access a{
  font-family:var(--ngp-text-font);
  font-size:16px;
  text-transform:none;
  color:#555;
}
#access a:hover,
#access ul li.current-menu-item > a,
#access ul li.current_page_ancestor > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current_page_item > a,
#access ul li:hover > a{color:var(--ngp-blue-dark)}

/* ===== Ссылки при наведении (1.1.0): ярко-чёрный текст на светло-голубой подсветке + подчёркивание.
   Фон = фирменный голубой #5F95D7 с прозрачностью .22 (на белом ~#DCE8F6, чёрный на нём ~17:1).
   !important: тема attitude задаёт цвета ссылок идентификаторами (#access ul li ul li a:hover и т. п.).
   Не затрагиваются: труба ngp-header (.ngp-head-link), кнопка .readmore и кнопки блоков, иконки соцсетей, «наверх».
   Картинки-ссылки (a > img) подсветку фона не получают. ===== */
:root{--ngp-link-hl:rgba(95,149,215,.22)}

body a:not(:where(.ngp-head-link,.readmore,.wp-block-button__link,.button,.back-to-top a,.social-profiles a)){
  transition:color .15s ease,background-color .15s ease,text-decoration-color .15s ease;
}
body a:not(:where(.ngp-head-link,.readmore,.wp-block-button__link,.button,.back-to-top a,.social-profiles a)):hover,
body a:not(:where(.ngp-head-link,.readmore,.wp-block-button__link,.button,.back-to-top a,.social-profiles a)):focus-visible,
body #access a:hover,
body #access ul li:hover > a,
body #access ul li.current-menu-item > a:hover,
body #access ul li.current_page_item > a:hover,
body #access ul li.current-menu-ancestor > a:hover,
body #access ul li.current_page_ancestor > a:hover,
body #access ul li ul li a:hover,
body #access ul li ul li:hover > a,
body #access ul li.current-menu-item ul li a:hover{
  color:#000 !important;
  background-color:var(--ngp-link-hl) !important;
  text-decoration:underline !important;
  text-decoration-thickness:1px;
  text-underline-offset:.18em;
  box-shadow:0 0 0 .12em var(--ngp-link-hl);
  border-radius:2px;
}
body a:not(:where(.ngp-head-link,.readmore,.wp-block-button__link,.button,.back-to-top a,.social-profiles a)):focus-visible{
  outline:2px solid #000;outline-offset:2px;
}
/* ссылка-картинка: подсветка фона не нужна */
body a:has(> img):hover,body a:has(> img):focus-visible{
  background-color:transparent !important;box-shadow:none !important;text-decoration:none !important;
}
/* труба ngp-header: остаётся как есть */
body .ngp-head-link:hover,body .ngp-head-link:focus{background:none !important;box-shadow:none !important;text-decoration:none !important;color:#000 !important}
/* название сайта (скрыто визуально) и «наверх» */
body #site-title a:hover,body #site-title a:focus{background:none !important;box-shadow:none !important;text-decoration:none !important}
@media (prefers-reduced-motion:reduce){body a{transition:none !important}}

/* ===== 1.1.1: подпункты меню без capitalize темы («Инженерные системы и сети», не «Инженерные Системы И Сети»).
   Тема: #access ul li.current_page_ancestor ul li a (1,1,5) пишет capitalize -> !important. Действует и в мобильном меню. ===== */
body #access ul ul a,
body #access ul li ul li a{text-transform:none !important}

/* ===== 1.1.1: планшет / узкое окно (768-1078 px): отступ между пунктами верхнего уровня 20 -> 14 px.
   Только верхний уровень (ul.root > li); на 1300 px и в мобильном меню (<768) не действует. ===== */
@media (min-width:768px) and (max-width:1078px){
  body #access ul.root > li{padding-right:14px}
}
