/*
Theme Name: АСУ ТП — сообщество (дочерняя тема Astra)
Theme URI: https://asu-tp.su
Description: Дочерняя тема для сайта сообщества инженеров АСУ ТП. Главная страница из разделов, рекламные зоны, стилизация форума и досок.
Author: asu-tp.su
Template: astra
Version: 1.0.0
Text Domain: asutp-child
*/

/* ---------- Токены ---------- */
:root {
  --asutp-ink: #1c2430;
  --asutp-muted: #5b6875;
  --asutp-line: #d5dbe1;
  --asutp-bg: #f3f5f7;
  --asutp-panel: #ffffff;
  --asutp-steel: #14324f;      /* основной цвет: сталь/шкаф управления */
  --asutp-steel-2: #1f4a72;
  --asutp-signal: #f5a300;     /* сигнальный янтарный: индикатор, лента */
  --asutp-ok: #2e8b57;
  --asutp-radius: 6px;
}

body {
  font-family: "Manrope", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  color: var(--asutp-ink);
  background: var(--asutp-bg);
}

a { color: var(--asutp-steel-2); }
a:hover { color: var(--asutp-steel); }

/* ---------- Шапка: сигнальная лента ---------- */
.site-header { border-top: 4px solid var(--asutp-signal); }

/* ---------- Главная ---------- */
.asutp-home { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; }

.asutp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--asutp-line);
}
.asutp-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--asutp-steel);
}
.asutp-hero p { font-size: 18px; line-height: 1.55; color: var(--asutp-muted); max-width: 60ch; margin: 0 0 24px; }
.asutp-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.asutp-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--asutp-radius);
  font-weight: 700;
  text-decoration: none;
  background: var(--asutp-steel);
  color: #fff;
  border: 2px solid var(--asutp-steel);
}
.asutp-btn:hover { background: var(--asutp-steel-2); color: #fff; }
.asutp-btn--ghost { background: transparent; color: var(--asutp-steel); }
.asutp-btn--ghost:hover { background: #e8eef4; color: var(--asutp-steel); }
.asutp-btn--signal { background: var(--asutp-signal); border-color: var(--asutp-signal); color: var(--asutp-ink); }
.asutp-btn--signal:hover { background: #ffb61a; border-color: #ffb61a; color: var(--asutp-ink); }

/* Панель «Сейчас на форуме» в hero */
.asutp-live {
  background: var(--asutp-panel);
  border: 1px solid var(--asutp-line);
  border-left: 6px solid var(--asutp-signal);
  border-radius: var(--asutp-radius);
  padding: 20px 22px;
}
.asutp-live h2 { font-size: 15px; margin: 0 0 12px; color: var(--asutp-muted); font-weight: 600; }
.asutp-live ul { list-style: none; margin: 0; padding: 0; }
.asutp-live li { padding: 8px 0; border-top: 1px solid var(--asutp-line); font-size: 15px; line-height: 1.35; }
.asutp-live li:first-child { border-top: 0; padding-top: 0; }
.asutp-live small { display: block; color: var(--asutp-muted); font-size: 12.5px; margin-top: 2px; }

/* Сетка разделов */
.asutp-section { padding: 36px 0 8px; }
.asutp-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.asutp-section__head h2 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.asutp-section__head a { font-size: 14px; font-weight: 600; white-space: nowrap; }

.asutp-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.asutp-card { background: var(--asutp-panel); border: 1px solid var(--asutp-line); border-radius: var(--asutp-radius); overflow: hidden; display: flex; flex-direction: column; }
.asutp-card__img { aspect-ratio: 16 / 9; background: #dfe5ea; object-fit: cover; width: 100%; display: block; }
.asutp-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.asutp-card__cat { font-size: 12.5px; color: var(--asutp-steel-2); font-weight: 700; }
.asutp-card h3 { font-size: 17px; line-height: 1.3; margin: 0; font-weight: 700; }
.asutp-card h3 a { color: var(--asutp-ink); text-decoration: none; }
.asutp-card h3 a:hover { color: var(--asutp-steel-2); }
.asutp-card__meta { font-size: 13px; color: var(--asutp-muted); margin-top: auto; }

/* Компактные списки (тендеры, вакансии) */
.asutp-list { list-style: none; margin: 0; padding: 0; background: var(--asutp-panel); border: 1px solid var(--asutp-line); border-radius: var(--asutp-radius); }
.asutp-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--asutp-line); font-size: 15px; }
.asutp-list li:first-child { border-top: 0; }
.asutp-list a { font-weight: 600; text-decoration: none; }
.asutp-list time, .asutp-list .asutp-list__aside { color: var(--asutp-muted); font-size: 13px; white-space: nowrap; }
.asutp-two { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.asutp-empty { padding: 20px; border: 1px dashed var(--asutp-line); border-radius: var(--asutp-radius); color: var(--asutp-muted); background: var(--asutp-panel); font-size: 15px; }

/* События */
.asutp-event { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.asutp-event__date { text-align: center; background: var(--asutp-steel); color: #fff; border-radius: var(--asutp-radius); padding: 8px 4px; line-height: 1.05; }
.asutp-event__date b { display: block; font-size: 24px; }
.asutp-event__date span { font-size: 12px; }

/* ---------- Рекламные зоны ---------- */
.asutp-ad { margin: 24px auto; text-align: center; }
.asutp-ad:empty { display: none; }
.asutp-ad--sticky-mobile { display: none; }
@media (max-width: 782px) {
  .asutp-ad--sticky-mobile { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; margin: 0; background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
  .asutp-ad--sticky-mobile:empty { display: none; }
}
/* Обязательная пометка «Реклама» (ФЗ-38, ОРД) */
.asutp-ad-label { display: block; font-size: 11px; color: var(--asutp-muted); margin-bottom: 4px; }

/* ---------- Вход через российские сервисы ---------- */
.asutp-login { max-width: 460px; margin: 0 auto; }
.asutp-login__social { display: grid; gap: 10px; margin: 0 0 20px; }
.asutp-login__social a { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: var(--asutp-radius); font-weight: 700; text-decoration: none; color: #fff; }
.asutp-login__social .is-vk { background: #0077ff; }
.asutp-login__social .is-yandex { background: #000; }
.asutp-login__or { text-align: center; color: var(--asutp-muted); font-size: 13px; margin: 12px 0; }

/* ---------- Форум / доски: лёгкая доводка ---------- */
#wpforo #wpforo-wrap { font-family: inherit; }
#wpforo #wpforo-wrap .wpfl-1 .wpforo-forum-title a { font-weight: 700; }
.hp-listing__title a, .job_listing .position a { font-weight: 700; }

/* ---------- Шапка форума: cookie ---------- */
.asutp-cookie { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 640px; margin: 0 auto; z-index: 950; background: var(--asutp-steel); color: #fff; padding: 14px 18px; border-radius: var(--asutp-radius); display: flex; gap: 14px; align-items: center; font-size: 14px; }
.asutp-cookie a { color: #ffd77a; }
.asutp-cookie button { background: var(--asutp-signal); border: 0; color: var(--asutp-ink); font-weight: 700; padding: 8px 14px; border-radius: var(--asutp-radius); cursor: pointer; }

@media (max-width: 900px) {
  .asutp-hero { grid-template-columns: 1fr; padding: 32px 0 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
:focus-visible { outline: 3px solid var(--asutp-signal); outline-offset: 2px; }
