/*
Theme Name: Лучшие компании
Theme URI: https://xn--80ajicajelkhm6b0co.xn--p1ai/
Author: Лучшие компании
Description: Современная широкая тема для рейтингового портала «Лучшие компании»: светлый интерфейс, плотная сетка карточек, гротеск Manrope и Inter, красный как единственный акцент.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: luchshie
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   «Лучшие компании» — светлая широкая тема
   ============================================================ */

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;

  --ink: #1A1D23;
  --ink-2: #3B3F46;
  --muted: #6B7280;
  --muted-2: #9AA1AC;

  --red: #E01E26;
  --red-dark: #B8161D;
  --red-deep: #8A1015;
  --red-tint: #FEF0F0;
  --red-line: #F7CFD1;

  --line: #E7E8EB;
  --line-soft: #F0F1F3;

  --font-display: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --wrap: 1360px;
  --measure: 860px;

  --shadow: 0 1px 2px rgba(26, 29, 35, .04), 0 8px 24px rgba(26, 29, 35, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 .6em;
}

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--red); color: #fff; padding: 10px 18px; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: var(--r-sm);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }

/* ---------- Шапка ---------- */

.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--red);
}
.header--stuck { box-shadow: 0 1px 12px rgba(26, 29, 35, .07); }

.header__inner { display: flex; align-items: center; gap: 36px; min-height: 70px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: 0 0 auto; }
.logo:hover { color: var(--ink); }
.logo__seal {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  background: var(--red); border-radius: 8px; color: #fff;
}
.logo__seal svg { width: 17px; height: 17px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.12; }
.logo__name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--red); }
.logo__name em { font-style: normal; color: var(--ink); margin-left: .12em; }
.logo__sub { font-size: 11px; color: var(--muted-2); letter-spacing: .01em; margin-top: 2px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  color: var(--ink-2); padding: 8px 0; position: relative;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--red); transform: scaleX(0); transition: transform .16s;
}
.nav__list a:hover { color: var(--ink); }
.nav__list a:hover::after,
.nav__list .current-menu-item > a::after,
.nav__list .current-cat > a::after { transform: scaleX(1); }
.nav__list .current-menu-item > a, .nav__list .current-cat > a { color: var(--ink); }

.header__actions { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--red-tint); color: var(--red); }
.iconbtn svg { width: 18px; height: 18px; }

.burger {
  display: none; width: 40px; height: 40px; padding: 0;
  background: var(--surface-2); border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.burger span { display: block; width: 18px; height: 2px; margin: 3px auto; background: var(--ink); border-radius: 2px; transition: transform .18s, opacity .18s; }
.burger--open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.header__search { background: var(--surface); border-top: 1px solid var(--line-soft); padding: 18px 0; }

/* ---------- Поиск ---------- */

.searchform { display: flex; gap: 10px; max-width: 680px; }
.searchform__input {
  flex: 1 1 auto; min-width: 0;
  padding: 14px 18px; font: inherit; font-size: 15.5px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.searchform__input::placeholder { color: var(--muted-2); }
.searchform__input:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-tint);
}
.searchform__btn {
  flex: 0 0 auto; padding: 14px 28px;
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px;
  background: var(--red); color: #fff; border: 0; border-radius: var(--r-sm); cursor: pointer;
  transition: background .15s;
}
.searchform__btn:hover { background: var(--red-dark); }

/* ---------- Первый экран ---------- */

.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 60px 0 54px; }
.hero__inner { max-width: 900px; }
.hero__kicker {
  display: inline-block; margin: 0 0 18px;
  padding: 6px 13px; background: var(--red-tint); color: var(--red);
  border-radius: 100px; font-family: var(--font-display);
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
}
.hero__title { font-size: clamp(34px, 4.6vw, 52px); margin: 0 0 18px; line-height: 1.1; }
.hero__lead { margin: 0 0 30px; font-size: 18.5px; line-height: 1.58; color: var(--muted); max-width: 700px; }
.hero__search { margin-bottom: 34px; }

.hero__stats { display: flex; gap: 12px; margin: 0; flex-wrap: wrap; }
.hero__stats > div {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 18px; background: var(--surface-2); border-radius: var(--r-sm);
}
.hero__stats dt { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.hero__stats dd { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Секции ---------- */

.section { padding: 52px 0; }
.section__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section__title { font-size: clamp(23px, 2.6vw, 30px); margin: 0; }
.section__sub { margin: 0; color: var(--muted); font-size: 15px; }
.section__more {
  margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.section__more::after { content: "→"; transition: transform .15s; }
.section__more:hover::after { transform: translateX(3px); }

/* ---------- Рубрики ---------- */

.rubrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.rubric {
  display: block; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rubric:hover { border-color: var(--red-line); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.rubric__num {
  display: block; font-family: var(--font-display); font-size: 12px; font-weight: 800;
  color: var(--red); letter-spacing: .06em; margin-bottom: 12px;
}
.rubric__name { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 6px; }
.rubric__count { display: block; font-size: 13.5px; color: var(--muted); }

/* ---------- Сетка карточек ---------- */

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--red-line); box-shadow: var(--shadow); transform: translateY(-3px); }
.card__link { position: absolute; inset: 0; z-index: 2; }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1 1 auto; }

.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 100px;
  background: var(--surface-2); color: var(--muted);
}
.tag--city { background: var(--red-tint); color: var(--red); }

.card__title {
  font-size: 17px; font-weight: 700; margin: 0 0 8px; line-height: 1.35; letter-spacing: -.018em;
}
.card__excerpt { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.card__meta {
  margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted-2);
}
.card__meta .meta__date { background: var(--surface-2); color: var(--muted); padding: 4px 10px; border-radius: 6px; }
.card__meta .meta__views { display: inline-flex; align-items: center; gap: 5px; }
.card__meta .meta__views svg { width: 14px; height: 14px; opacity: .75; }

/* ---------- Города ---------- */

.cities { display: flex; flex-wrap: wrap; gap: 10px; }
.city {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.city:hover { border-color: var(--red); background: var(--red-tint); color: var(--red); }
.city span { font-size: 12px; color: var(--muted-2); font-weight: 500; }

/* ---------- Методология ---------- */

.method { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 60px 0; }
.method__title { font-size: clamp(23px, 2.6vw, 30px); margin: 0 0 32px; }
.method__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.method__item { padding: 24px 22px; background: var(--bg); border-radius: var(--r); }
.method__num {
  display: inline-block; font-family: var(--font-display); font-size: 12px; font-weight: 800;
  color: var(--red); background: var(--red-tint); padding: 4px 10px; border-radius: 100px;
  margin-bottom: 14px;
}
.method__item h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.method__item p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ---------- Шапки архивов ---------- */

.pagehead { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0 36px; }
.pagehead__title { font-size: clamp(28px, 4vw, 42px); margin: 12px 0 0; }
.pagehead__lead { margin: 14px 0 0; max-width: 760px; color: var(--muted); font-size: 17px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }

/* ---------- Шапка статьи ---------- */

.artichead { background: var(--surface); border-bottom: 1px solid var(--line); padding: 34px 0 32px; }
.artichead__inner { max-width: var(--measure); }
.artichead__title { font-size: clamp(28px, 3.8vw, 44px); margin: 14px 0 0; line-height: 1.15; }
.artichead__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13.5px; color: var(--muted-2); }
.artichead__meta .meta__views { display: inline-flex; align-items: center; gap: 5px; }
.artichead__meta .meta__views svg { width: 14px; height: 14px; opacity: .75; }

/* ---------- Раскладка статьи ---------- */

.entry { padding: 40px 0 72px; }
.article-layout {
  display: grid; grid-template-columns: minmax(0, var(--measure)) 320px;
  gap: 56px; align-items: start; justify-content: space-between;
}
.article-layout__main { min-width: 0; }

.entry-cover { margin: 0 0 30px; border-radius: var(--r); overflow: hidden; }

/* ---------- Тройка лидеров ---------- */

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 32px; }
.podium__item {
  padding: 18px 18px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column; gap: 5px; position: relative; overflow: hidden;
}
.podium__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.podium__item--1 { border-color: var(--red-line); background: var(--red-tint); }
.podium__item--1::before { background: var(--red); }
.podium__item--2::before { background: var(--muted-2); }
.podium__rank {
  font-family: var(--font-display); font-size: 13px; font-weight: 800;
  color: var(--muted-2); letter-spacing: .04em;
}
.podium__item--1 .podium__rank { color: var(--red); }
.podium__name { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.28; letter-spacing: -.02em; color: var(--ink); }
.podium__score { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--red); }
.podium__note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Контент статьи ---------- */

.entry-content { font-size: 17.5px; line-height: 1.7; color: var(--ink-2); }
.entry-content > * { margin-top: 0; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { font-size: clamp(23px, 2.8vw, 30px); margin: 2em 0 .65em; letter-spacing: -.024em; }
.entry-content h3 { font-size: clamp(18px, 2.1vw, 22px); margin: 1.7em 0 .5em; font-weight: 700; letter-spacing: -.02em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.3em; padding-left: 1.25em; }
.entry-content li { margin-bottom: .5em; }
.entry-content li::marker { color: var(--red); }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.entry-content strong { color: var(--ink); font-weight: 650; }
.entry-content img { border-radius: var(--r); margin: 1.4em 0; }

/* Блок «Коротко» */
.entry-content .tldr {
  background: var(--red-tint); border: 1px solid var(--red-line);
  padding: 22px 24px; margin: 0 0 30px; border-radius: var(--r);
}
.entry-content .tldr__label {
  margin: 0 0 8px !important; font-family: var(--font-display);
  font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--red);
}
.entry-content .tldr p:last-child { margin-bottom: 0; }

/* Контакты компании */
.entry-content .company-meta {
  font-size: 14.5px; color: var(--muted);
  background: var(--surface-2); border-radius: var(--r-sm);
  padding: 11px 16px; margin: 0 0 1.1em;
}
.entry-content .company-meta strong { color: var(--ink-2); font-weight: 650; }

/* Дисклеймер */
.entry-content .disclaimer {
  font-size: 14px; color: var(--muted); line-height: 1.55;
  border-top: 1px solid var(--line); padding-top: 18px; margin: 2em 0 1.4em;
}
.entry-content .disclaimer em { font-style: normal; }

/* Таблица рейтинга */
.entry-content .rating-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 2em;
  font-size: 15.5px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.entry-content .rating-table thead th {
  background: var(--surface-2); color: var(--ink); text-align: left;
  padding: 13px 16px; font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: .01em; border-bottom: 1px solid var(--line);
}
.entry-content .rating-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.entry-content .rating-table tbody tr:last-child td { border-bottom: 0; }
.entry-content .rating-table tbody tr:first-child { background: var(--red-tint); }
.entry-content .rating-table tbody tr:first-child td:first-child { font-weight: 700; color: var(--ink); }
.entry-content .rating-table td:nth-child(2) {
  font-family: var(--font-display); font-weight: 800; color: var(--red); white-space: nowrap; width: 1%;
}
.entry-content .rating-table td:nth-child(3) { color: var(--muted); font-size: 14.5px; }
.entry-content table { max-width: 100%; }

/* ---------- Поделиться ---------- */

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.share__label { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.share__btn {
  padding: 9px 16px; font-family: var(--font-display); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 100px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.share__btn:hover { border-color: var(--red); color: var(--red); background: var(--red-tint); }
.share__btn.is-copied { border-color: var(--red); color: var(--red); background: var(--red-tint); }

/* ---------- Плашка «Как мы считаем» ---------- */

.notice { margin: 30px 0 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.notice__title { margin: 0 0 8px; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--red); }
.notice__text { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

.related { margin-top: 52px; }
.related .section__title { font-size: 24px; }

/* ---------- Боковая колонка ---------- */

.article-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; }
.sidebox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; position: relative; }
.sidebox__title {
  margin: 0; padding: 15px 18px 12px;
  font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .05em;
  color: var(--ink); border-bottom: 1px solid var(--line-soft);
}
.sidebox__list { list-style: none; margin: 0; padding: 6px 0; max-height: 340px; overflow-y: auto; }
.sidebox__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 18px; font-size: 14.5px; color: var(--ink-2);
}
.sidebox__list a:hover { background: var(--red-tint); color: var(--red); }
.sidebox__list span { font-size: 12px; color: var(--muted-2); }
.sidebox__list::-webkit-scrollbar { width: 6px; }
.sidebox__list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ---------- Пустое состояние и 404 ---------- */

.empty, .notfound { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 52px 32px; text-align: center; }
.empty__title, .notfound__title { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.empty__text, .notfound__text { margin: 0 auto 24px; max-width: 540px; color: var(--muted); }
.empty .searchform, .notfound .searchform { margin: 0 auto 20px; }
.notfound__code { font-family: var(--font-display); font-size: 76px; font-weight: 800; color: var(--red); opacity: .15; margin: 0; line-height: 1; }

/* ---------- Пагинация ---------- */

.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Комментарии ---------- */

.comments { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments__list { list-style: none; margin: 0 0 32px; padding: 0; }
.comments__list .comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-submit input[type="submit"] {
  padding: 12px 26px; background: var(--red); color: #fff; border: 0; border-radius: var(--r-sm);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; cursor: pointer;
}

/* ---------- Подвал ---------- */

.footer { background: var(--ink); color: rgba(255,255,255,.72); }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 52px 32px 42px; max-width: var(--wrap); margin: 0 auto; }
.footer .logo { color: #fff; }
.footer .logo__name { color: var(--red); }
.footer .logo__name em { color: #fff; }
.footer__desc { margin: 16px 0 0; font-size: 14.5px; line-height: 1.6; max-width: 340px; color: rgba(255,255,255,.6); }
.footer__heading { margin: 0 0 14px; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .05em; color: #fff; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: 9px; }
.footer__list a { color: rgba(255,255,255,.72); font-size: 14.5px; }
.footer__list a:hover { color: #fff; }
.footer__soon { font-size: 14.5px; color: rgba(255,255,255,.4); }

.footer__legal { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0 28px; }
.footer__legal p { margin: 0 0 6px; font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.55; }

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1200px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
}

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 36px; }
  .article-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-side .sidebox { flex: 1 1 280px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .container { padding: 0 20px; }
  .header__inner { min-height: 62px; gap: 12px; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 65px 0 auto; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .22s ease;
    box-shadow: 0 8px 20px rgba(26,29,35,.08);
  }
  .nav--open { max-height: 70vh; overflow-y: auto; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 18px; }
  .nav__list li { border-top: 1px solid var(--line-soft); }
  .nav__list a { display: block; padding: 13px 0; }
  .nav__list a::after { display: none; }

  .hero { padding: 44px 0 40px; }
  .section { padding: 40px 0; }
  .podium { grid-template-columns: 1fr; }
  .footer__inner { padding: 44px 20px 36px; }
}

@media (max-width: 560px) {
  .searchform { flex-direction: column; }
  .hero__title { font-size: 31px; }
  .hero__lead { font-size: 17px; }
  .grid--3 { grid-template-columns: 1fr; }
  .rubrics { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .entry-content .rating-table { font-size: 14px; }
  .entry-content .rating-table td, .entry-content .rating-table thead th { padding: 10px 12px; }

  /* В колонке flex-basis из правила выше задал бы высоту, а не ширину — сбрасываем. */
  .article-side { flex-direction: column; }
  .article-side .sidebox { flex: 0 0 auto; }
  .article-side .sidebox__list { max-height: 280px; }
  .article-side .sidebox--scrollable::after {
    content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 32px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--surface) 92%);
  }
  .article-side .sidebox--scrolled-end::after { opacity: 0; transition: opacity .15s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
