/* =========================================================
   CSS рубрик статей (/assets/cok-headings.css)
   Подключается на /headings-articles и /headings-articles?id=…
   1) Список рубрик — #headings (разметка #brands со страницы брендов)
   2) Страница рубрики — пока только ВИЭ (id=1625), разметка #seminars-inner
   ========================================================= */

/* ---------- 1. Список рубрик: группы, две колонки ---------- */
#headings #brands ol{
  display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px;
  margin:0 !important; padding:0 !important; height:auto !important; overflow:visible !important;
}
#headings #brands ol > li.sixcol{display:contents !important}
#headings #brands ol li p{
  margin:0 !important; padding:11px 0 !important; height:auto !important; overflow:visible !important;
  background:url("/img/dots/horizontal.png") -4px bottom repeat-x !important;
}
#headings #brands ol li p a{
  float:none !important; display:block !important; height:auto !important; padding:0 !important;
  font:700 14px/18px "Helvetica Neue",Helvetica,Arial,sans-serif !important;
  color:#444 !important; text-transform:none !important; text-decoration:none !important;
}
#headings #brands ol li p a em{font:400 13px/18px "Helvetica Neue",Helvetica,Arial,sans-serif !important; color:#8c9198 !important; margin-left:4px}
#headings #brands ol li p a:hover,#headings #brands ol li p a:hover em{color:#265a99 !important}

/* заголовки групп — псевдоэлементы двух колонок-li (display:contents) */
#headings #brands ol > li::before,#headings #brands ol > li::after{
  grid-column:1 / -1; display:block; margin:26px 0 4px; padding-bottom:9px;
  font:700 17px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; color:#4a4e53;
  border-bottom:1px solid #dfe2e6;
  background:linear-gradient(#e6292f,#e6292f) left bottom / 34px 1px no-repeat;
}
#headings #brands ol > li:first-child::before{content:"Инженерные системы"; order:100; margin-top:4px}
#headings #brands ol > li:first-child::after{content:"Энергетика и экология"; order:200}
#headings #brands ol > li.last::before{content:"Проектирование и регулирование"; order:300}
#headings #brands ol > li.last::after{content:"Наука и события"; order:400}

/* порядок рубрик внутри групп; новая рубрика без места — в конец списка */
#headings #brands ol li p{order:900}
#headings #brands ol li p:has(a[href$="id=1618"]){order:101}
#headings #brands ol li p:has(a[href$="id=1619"]){order:102}
#headings #brands ol li p:has(a[href$="id=1620"]){order:103}
#headings #brands ol li p:has(a[href$="id=1628"]){order:104}
#headings #brands ol li p:has(a[href$="id=1631"]){order:105}
#headings #brands ol li p:has(a[href$="id=1627"]){order:106}
#headings #brands ol li p:has(a[href$="id=1630"]){order:107}
#headings #brands ol li p:has(a[href$="id=3925"]){order:108}
#headings #brands ol li p:has(a[href$="id=1629"]){order:109}
#headings #brands ol li p:has(a[href$="id=1621"]){order:201}
#headings #brands ol li p:has(a[href$="id=1622"]){order:202}
#headings #brands ol li p:has(a[href$="id=1625"]){order:203}
#headings #brands ol li p:has(a[href$="id=2312"]){order:204}
#headings #brands ol li p:has(a[href$="id=1693"]){order:205}
#headings #brands ol li p:has(a[href$="id=2341"]){order:206}
#headings #brands ol li p:has(a[href$="id=1623"]){order:301}
#headings #brands ol li p:has(a[href$="id=1624"]){order:302}
#headings #brands ol li p:has(a[href$="id=2299"]){order:303}
#headings #brands ol li p:has(a[href$="id=2031"]){order:304}
#headings #brands ol li p:has(a[href$="id=1626"]){order:401}
#headings #brands ol li p:has(a[href$="id=2303"]){order:402}
#headings #brands ol li p:has(a[href$="id=2334"]){order:403}

@media (max-width:567px){
  #headings #brands ol{grid-template-columns:minmax(0,1fr)}
  #headings #brands ol{margin-left:0 !important}
}

/* ---------- 2. Страница рубрики «ВИЭ» ---------- */
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner > ul > li{
  padding:16px 0 !important; margin:0 !important;
  background:url("/img/dots/horizontal.png") -4px bottom repeat-x !important;
}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .seminar_info{margin:0 !important}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .seminar_heading,
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .seminar_heading__date{margin:0 !important; padding:0 !important; border:0 !important; background:none !important; height:auto !important; min-height:0 !important}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .date{
  display:inline-block !important; margin:0 0 6px !important; padding:0 !important; background:none !important;
  font:400 11px/14px "Helvetica Neue",Helvetica,Arial,sans-serif !important; color:#8c9198 !important;
  font-variant-numeric:tabular-nums;
}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .seminar_content{margin:0 !important; padding:0 !important}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .title,
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .title a{
  margin:0 !important; font:700 15px/20px "Helvetica Neue",Helvetica,Arial,sans-serif !important; color:#444 !important; text-decoration:none !important;
}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .title a:hover{color:#265a99 !important}
html:has(meta[property="og:url"][content*="id=1625"]) #seminars-inner .descr{
  margin:6px 0 0 !important; font:300 13px/18px HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif !important; color:#444 !important;
}
/* пагинация — как на /vak */
html:has(meta[property="og:url"][content*="id=1625"]) .pages{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:24px !important}
html:has(meta[property="og:url"][content*="id=1625"]) .pages a:not(.next):not(.prev){
  min-width:38px; height:38px; display:inline-grid !important; place-items:center; margin:0 !important; padding:0 6px !important;
  background:#f2f5f7 !important; color:#181716 !important; border:0 !important; border-radius:0 !important;
  font:400 13px/1 "Helvetica Neue",Helvetica,Arial,sans-serif !important; text-decoration:none !important; box-shadow:none !important;
}
html:has(meta[property="og:url"][content*="id=1625"]) .pages a.active:not(.next):not(.prev){background:#181716 !important; color:#fff !important}
html:has(meta[property="og:url"][content*="id=1625"]) .pages a:not([href]):not(.next):not(.prev){background:none !important; color:#8c9198 !important}
html:has(meta[property="og:url"][content*="id=1625"]) .pages a.prev{order:-1; float:none !important; margin:0 6px 0 0 !important}
html:has(meta[property="og:url"][content*="id=1625"]) .pages a.next{order:99; float:none !important; margin:0 0 0 6px !important}
