/* ИПКСЗ — публичный сайт: КОНТРОЛЫ И УТИЛИТЫ (базовый слой полей, размеры кнопок/иконок, варианты секций).
   Это единственный источник единых размеров контролов на сайте — не задавать их точечно в блоках. */

/* =========================================================
   Кнопки
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.90625rem;
  line-height: inherit; /* у <button> браузерный normal → кнопка ниже такой же ссылки .btn */
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--sm { padding: 10px 20px; font-size: 0.84375rem; }

.btn--primary, .btn--accent { background: var(--c-blue); color: #fff; }
.btn--primary:hover, .btn--accent:hover { background: var(--c-blue-600); color: #fff; }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.7);
}
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero .btn--ghost, .hero .btn--accent { color: #fff; }
.hero .btn--ghost { border-color: rgba(255,255,255,.5); }

.btn--light { background: #fff; color: var(--c-blue); }
.btn--light:hover { background: var(--c-blue-50); color: var(--c-blue); }

/* Опасное/отказное действие (Отмена, Закрыть, Выйти, Сбросить) — единый красный вид на сайте */
.btn--danger { background: #b3261e; color: #fff; border-color: transparent; }
.btn--danger:hover { background: #8f1d17; color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--c-link);
  border: 1.5px solid var(--c-link);
}
.btn--outline:hover { background: var(--c-blue-50); color: var(--c-blue); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-top: 22px;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--c-link); text-decoration: none; }
.back-link .ic { width: 17px; height: 17px; }

/* Заголовок раздела */
.page-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 0 30px;
}
.page-title { font-size: 2.125rem; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.page-head__note { color: var(--c-muted); font-size: 0.875rem; }
.page-head--filter { align-items: center; padding-bottom: 22px; }

/* Фильтр новостей по категориям (чипы-пилюли) */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.news-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  font-size: 0.90625rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.2;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.news-filter__chip:hover {
  border-color: var(--c-link);
  color: var(--c-link);
  background: var(--c-blue-50);
  text-decoration: none;
}
.news-filter__chip:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.news-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--c-blue-50);
  color: var(--c-muted);
  font-size: 0.78125rem;
  font-weight: 700;
}
.news-filter__chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-600) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 69, 115, .18);
}
.news-filter__chip.is-active:hover { color: #fff; }
.news-filter__chip.is-active .news-filter__count { background: rgba(255, 255, 255, .24); color: #fff; }

/* =========================================================
   Единый базовый слой полей + размеры контролов/иконок
   =========================================================
   Любой input/select/textarea публичной части (кроме проверок и служебных)
   получает единый вид. Специфичность 0 (:where) — точечные правила компонентов
   переопределяют без !important. Слой действует и в режиме правки (body.edit-mode):
   поля форм сайта должны выглядеть одинаково всегда; при этом контролы админ-модалок
   (`.edit-modal`/`.wysiwyg-modal`, см. editor.css) специфичнее и перекрывают слой. */
:where(.site-body) :where(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),
  select,
  textarea
) {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font: inherit;
  font-size: .9375rem;
  color: var(--c-text);
}
:where(.site-body) :where(select) { height: 46px; padding-top: 0; padding-bottom: 0; }
:where(.site-body) :where(textarea) { min-height: 132px; resize: vertical; }

/* Каретка (мигающая «палочка»): она нужна только в полях ввода. В тексте страниц её скрываем —
   иначе при включённом «курсорном просмотре» браузера (F7) или «индикаторе текстового курсора»
   Windows она мигает в каждой строке и мешает читать. В полях/редакторе каретка остаётся. */
:where(.site-body) { caret-color: transparent; }
:where(.site-body) :where(input, select, textarea, [contenteditable="true"], [contenteditable=""]) { caret-color: auto; }
:where(.site-body) :where(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),
  select,
  textarea
):focus { outline: none; border-color: var(--c-focus); box-shadow: 0 0 0 3px rgba(9, 92, 186, .12); }
/* Кнопка «в ряд с полем» (одна высота с контролами) */
.btn--field { height: 46px; padding: 0 20px; }

/* Единые размеры иконок: базовый — .ic (16px, site-base.css); модификаторы при необходимости */
.ic--sm { width: 14px; height: 14px; }
.ic--lg { width: 20px; height: 20px; }
.ic--xl { width: 24px; height: 24px; }

/* Варианты секций — вместо инлайн-стилей padding-top в разметке */
.section--flush { padding-top: 0; }
.section--tight { padding-top: 8px; }
.section--gap { padding-top: 24px; }
.page-head--slim { padding-bottom: 14px; }

/* Картинка «на всю карточку» (заполняет контейнер, без искажений) */
.img-cover { display: block; width: 100%; height: 100%; object-fit: cover; }

