/* ===================================================================
   THE Engineer — styles.css
   Общие стили для всех страниц сайта
   =================================================================== */

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --primary: #1a1a1a;
  --accent: #d32f2f;
  --gray-dark: #4a4a4a;
  --gray: #6b6b6b;
  --gray-light: #9e9e9e;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

/* ===== БАЗОВЫЙ СБРОС + ЗАЩИТА ОТ OVERFLOW ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  font-family: var(--font-serif);
  color: var(--primary);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;

  /* Прижимаем подвал к низу экрана */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== ПРИЖИМАЕМ ПОДВАЛ К НИЗУ ЭКРАНА ===== */
body > main {
  flex: 1 0 auto;
}

body > .topbar,
body > .site-header,
body > .main-nav,
body > footer {
  flex-shrink: 0;
}

/* Скрипты, ставшие прямыми детьми body, не занимают место во flex-потоке */
body > script {
  display: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ссылки без класса наследуют цвет родителя.
   Ссылки с классом (.job-apply-btn, .about-cta-btn и т.п.)
   задают свой цвет явно и не перебиваются этим правилом. */
a:not([class]) { color: inherit; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================================
   ШАПКА САЙТА
   =================================================================== */

/* ===== ВЕРХНЯЯ ПОЛОСА ===== */
.topbar {
  background: var(--primary);
  color: #ccc;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a {
  color: #ccc;
  text-decoration: none;
  margin-left: 16px;
  transition: color .2s;
}

.topbar a:hover { color: #ffffff; }

/* ===== ШАПКА С ЛОГОТИПОМ ===== */
.site-header {
  padding: 32px 0 24px;
  border-bottom: 4px solid var(--primary);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.logo img {
  height: 126px;
  width: auto;
  max-width: 100%;
}

/* ===== НАВИГАЦИЯ ===== */
.main-nav {
  border-bottom: 1px solid var(--border);
  position: relative;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
  padding: 0;
}

.main-nav li {
  flex: 0 1 auto;
  min-width: 0;
}

.main-nav a {
  display: block;
  color: var(--gray-dark);
  text-decoration: none;
  padding: 16px clamp(8px, 1.2vw, 20px);
  font-family: var(--font-sans);
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: color .2s;
  position: relative;
  white-space: nowrap;
  text-align: center;
}

.main-nav a:hover { color: var(--accent); }

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .2s;
}

.main-nav a:hover::after { width: calc(100% - 20px); }

.main-nav a.active { color: var(--accent); }
.main-nav a.active::after { width: calc(100% - 20px); }

.nav-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nav-toggle-icon {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background .2s;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform .25s, top .25s, bottom .25s;
}

.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after  { bottom: -7px; }

/* ===================================================================
   ГЛАВНАЯ — СЕТКА, HERO, ЛЕНТА
   =================================================================== */

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  padding: 40px 0;
}

/* ===== HERO ГЛАВНОЙ ===== */
.hero {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 3px solid var(--primary);
}

.hero-image {
  width: 100%;
  height: 440px;
  object-fit: cover;
  margin-bottom: 24px;
  border-radius: 2px;
}

.hero .category {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 18px;
  max-width: 900px;
  overflow-wrap: break-word;
}

.hero h1 a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
}

.hero h1 a:hover { color: var(--accent); }

.hero p {
  font-size: 19px;
  color: var(--gray-dark);
  line-height: 1.5;
  max-width: 800px;
  margin-bottom: 16px;
}

/* ===== МЕТА (автор · дата · время) ===== */
.meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===== ЛЕНТА НОВОСТЕЙ ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
}

.news-item {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.news-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 16px;
  border-radius: 2px;
}

.news-item .category {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

.news-item h3 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 400;
  margin: 8px 0 10px;
  overflow-wrap: break-word;
}

.news-item h3 a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
}

.news-item h3 a:hover { color: var(--accent); }

.news-item p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 10px;
  overflow-wrap: break-word;
}

/* ===== ЗАГОЛОВОК СЕКЦИИ В ЛЕНТЕ ===== */
.section-head {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  padding-bottom: 12px;
  margin: 48px 0 28px;
}

/* ===================================================================
   СТРАНИЦА СТАТЬИ
   =================================================================== */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  padding: 0 0 40px;
}

.article { min-width: 0; }

.breadcrumbs-wrap {
  padding-top: 32px;
  padding-bottom: 8px;
  margin-bottom: 0;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 24px 0 0;
  margin-bottom: 24px;
  overflow-wrap: break-word;
}

.breadcrumbs a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color .2s;
}

.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 8px; }

.article-layout > .sidebar {
  padding-top: 40px;
}

/* ===== ЗАГОЛОВОК СТАТЬИ ===== */
.article-header { margin-bottom: 32px; }

.article-header .category {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

.article-header h1 {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 20px;
  max-width: 900px;
  overflow-wrap: break-word;
}

.article-header .lead {
  font-size: 20px;
  color: var(--gray-dark);
  line-height: 1.5;
  max-width: 800px;
  margin-bottom: 20px;
  font-style: italic;
}

.article-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ===== HERO-ИЗОБРАЖЕНИЕ СТАТЬИ ===== */
.article-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  margin: 32px 0;
  border-radius: 2px;
}

.case-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  margin: 24px 0;
  border-radius: 2px;
}

.article-hero-caption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
  margin: 12px 0 32px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

/* ===== ТЕЛО СТАТЬИ ===== */
.article-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--primary);
  max-width: 780px;
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-body p { margin-bottom: 24px; }

.article-body h2 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
  margin: 48px 0 20px;
  color: var(--primary);
  overflow-wrap: break-word;
}

.article-body h3 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
  margin: 36px 0 16px;
  color: var(--primary);
  overflow-wrap: break-word;
}

.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }

.article-body a:not([class]) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  transition: border-color .2s;
}

.article-body a:not([class]):hover {
  border-bottom-color: var(--accent);
}

.article-body ol {
  counter-reset: art-list;
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.article-body ol > li {
  counter-increment: art-list;
  position: relative;
  padding-left: 60px;
  margin-bottom: 20px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-body ol > li::before {
  content: counter(art-list);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.article-body ul {
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.article-body ul > li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-body ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== КЕЙС-БЛОК ===== */
.case {
  background: var(--bg-alt);
  padding: 32px 36px;
  border-left: 5px solid var(--accent);
  margin: 40px 0;
  border-radius: 2px;
  width: 100%;
}

.case .case-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.case h3 {
  margin-top: 0 !important;
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

.case p {
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 18px;
  overflow-wrap: break-word;
}

.case p:last-child { margin-bottom: 0; }
.case ul { margin: 16px 0; }
.case ul li { font-size: 17px; }

/* ===== БЛОК «РЕЗУЛЬТАТ» ===== */
.result-box {
  background: var(--primary);
  color: white;
  padding: 28px 32px;
  border-radius: 2px;
  margin: 24px 0;
  width: 100%;
}

.result-box .result-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.result-box ul { margin: 0; }

.result-box ul li {
  color: white;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 10px;
  overflow-wrap: break-word;
}

.result-box ul li:last-child { margin-bottom: 0; }
.result-box ul li::before { background: var(--accent); top: 10px; }

/* ===== ЦИТАТА ===== */
.pull-quote {
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  padding: 28px 0;
  margin: 40px 0;
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  color: var(--primary);
  max-width: 780px;
  width: 100%;
  overflow-wrap: break-word;
}

/* ===== ТАБЛИЦА СРАВНЕНИЯ ===== */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
}

table.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 14px;
}

table.compare th,
table.compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.compare thead th {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

table.compare tbody tr:nth-child(even) { background: var(--bg-alt); }
table.compare tbody td:last-child { color: var(--accent); font-weight: 600; }

/* ===== СХЕМА СРАВНЕНИЯ (две колонки) ===== */
.compare-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.compare-flow .flow-col {
  background: var(--bg-alt);
  padding: 24px 26px;
  border-radius: 2px;
  border-top: 4px solid var(--gray-light);
}

.compare-flow .flow-col.new {
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
}

.compare-flow .flow-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-light);
  margin-bottom: 14px;
}

.compare-flow .flow-col.new .flow-label { color: var(--accent); }

.compare-flow ol {
  counter-reset: flow;
  list-style: none;
  margin: 0;
  padding: 0;
}

.compare-flow ol > li {
  counter-increment: flow;
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  line-height: 1.5;
  font-size: 15px;
  color: var(--gray-dark);
  overflow-wrap: break-word;
}

.compare-flow ol > li:last-child { margin-bottom: 0; }

.compare-flow ol > li::before {
  content: counter(flow);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--gray-light);
  color: white;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.compare-flow .flow-col.new ol > li::before { background: var(--accent); }

/* ===== РЕЗЮМЕ ===== */
.summary-box {
  background: var(--bg-alt);
  border-top: 4px solid var(--primary);
  padding: 32px 36px;
  margin: 48px 0 24px;
  border-radius: 2px;
  width: 100%;
}

.summary-box h3 {
  margin-top: 0 !important;
  font-size: 22px;
  margin-bottom: 16px;
}

.summary-box p {
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

.summary-box p:last-child { margin-bottom: 0; }

/* ===== БЛОК АВТОРА ===== */
.author-box {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: 2px;
  margin: 40px 0;
  align-items: start;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 4px;
}

.author-role {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.author-bio {
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-dark);
  margin: 0;
}

/* ===== FAQ ===== */
.faq {
  margin: 32px 0;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-item h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--primary);
  overflow-wrap: break-word;
}

.faq-item p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-dark);
  margin: 0;
  overflow-wrap: break-word;
}

/* ===== ПОДЕЛИТЬСЯ ===== */
.share {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.share-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-light);
  margin-right: 8px;
}

.share a,
.share a:visited {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-alt);
  color: var(--gray-dark);
  text-decoration: none;
  border-radius: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .2s;
}

.share a:hover { background: var(--accent); color: #ffffff; }

/* Кнопка «Скопировать ссылку» — по аналогии с .share a */
.share button,
.share-copy {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-alt);
  color: var(--gray-dark);
  text-decoration: none;
  border: none;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .2s;
  cursor: pointer;
}

.share button:hover,
.share-copy:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Состояние «Скопировано» */
.share-copy--done,
.share button.share-copy--done:hover {
  background: #2e7d32;
  color: #ffffff;
}

/* ===== ПОХОЖИЕ СТАТЬИ ===== */
.related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 3px solid var(--primary);
  width: 100%;
}

.related h2 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .2s;
  min-width: 0;
}

.related-card:hover { transform: translateY(-3px); }

.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 14px;
}

.related-card .related-category {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.related-card h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--primary);
  transition: color .2s;
  overflow-wrap: break-word;
}

.related-card:hover h3 { color: var(--accent); }

.related-card .meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: auto;
}

/* ===================================================================
   СТРАНИЦА РАЗДЕЛА
   =================================================================== */

.section-hero {
  padding: 24px 0 32px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 40px;
}

.section-hero h1 {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 16px;
  max-width: 900px;
  overflow-wrap: break-word;
}

.section-hero .lead {
  font-size: 19px;
  color: var(--gray-dark);
  line-height: 1.5;
  max-width: 800px;
  font-style: italic;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
  padding: 40px 0;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.article-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 18px;
  transition: opacity .2s;
}

.article-card:hover img { opacity: .9; }

.article-card .category {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.article-card h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--primary);
  transition: color .2s;
  overflow-wrap: break-word;
}

.article-card:hover h2 { color: var(--accent); }

.article-card p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 14px;
  overflow-wrap: break-word;
}

.article-card .meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: auto;
}

/* Первая карточка — крупная, во всю ширину */
.article-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  padding-bottom: 48px;
  margin-bottom: 0;
}

.article-card.featured img {
  height: 380px;
  margin-bottom: 0;
}

.article-card.featured h2 {
  font-size: 32px;
  line-height: 1.15;
}

.article-card.featured p { font-size: 17px; }

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
  font-family: var(--font-sans);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-alt);
  color: var(--gray-dark);
  text-decoration: none;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}

.pagination a:hover {
  background: var(--accent);
  color: #ffffff;
}

.pagination .current {
  background: var(--primary);
  color: #ffffff;
}

/* ===================================================================
   САЙДБАР
   =================================================================== */

.sidebar { min-width: 0; }
.sidebar section { margin-bottom: 40px; }

.sidebar h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 20px;
}

.sidebar-list {
  list-style: none;
  counter-reset: sidebar;
}

.sidebar-list li {
  counter-increment: sidebar;
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.sidebar-list li::before {
  content: counter(sidebar);
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 28px;
  flex-shrink: 0;
}

.sidebar-list a {
  font-size: 15px;
  line-height: 1.35;
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
  overflow-wrap: break-word;
}

.sidebar-list a:hover { color: var(--accent); }

/* ===== ПОДПИСКА ===== */
.newsletter--wide {
  max-width: 520px;
  margin: 0;
}

.newsletter {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: 2px;
}

.newsletter h4 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
  border: none;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

.newsletter p {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.4;
}

.newsletter input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 14px;
  margin-bottom: 10px;
  font-family: var(--font-sans);
}

.newsletter input:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .2s;
}

.newsletter button:hover { background: #b71c1c; }

/* ===== ЧЕКБОКС СОГЛАСИЯ В ФОРМЕ ПОДПИСКИ ===== */
.newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.4;
  color: var(--gray);
  margin-bottom: 12px;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.newsletter-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.newsletter-consent span {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
}

.newsletter-consent a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  transition: border-color .2s;
  overflow-wrap: break-word;
}

.newsletter-consent a:hover {
  border-bottom-color: var(--accent);
}

/* ===== ТЕГИ ===== */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tags a,
.tags a:visited {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 6px 12px;
  background: var(--bg-alt);
  color: var(--gray);
  text-decoration: none;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: all .2s;
  overflow-wrap: break-word;
}

.tags a:hover { background: var(--accent); color: #ffffff; }

/* ===================================================================
   ПОДВАЛ
   =================================================================== */

footer {
  background: var(--primary);
  color: var(--gray-light);
  padding: 48px 0 24px;
  margin-top: 64px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid > div { min-width: 0; }

footer h5 {
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

footer ul { list-style: none; }
footer li { margin-bottom: 10px; }

footer a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color .2s;
  overflow-wrap: break-word;
}

footer a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--gray);
  flex-wrap: wrap;
}

.footer-note {
  display: block;
  margin-top: 4px;
  opacity: .7;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--gray-light);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--gray-light);
  flex-shrink: 0;
  transition: all .2s;
}

.age-badge:hover { border-color: white; color: white; }

/* ===== ЮРИДИЧЕСКИЕ ССЫЛКИ В ПОДВАЛЕ ===== */
.footer-legal {
  padding: 20px 0 8px;
  margin-top: 8px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--gray);
  opacity: .75;
}

.footer-legal a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color .2s;
  text-transform: none;
  letter-spacing: 0;
}

.footer-legal a:hover {
  color: white;
}

.footer-legal-sep {
  display: inline-block;
  margin: 0 12px;
  color: #444;
  user-select: none;
}

/* ===================================================================
   СТРАНИЦЫ «О НАС», «РЕДАКЦИЯ», «РЕКЛАМА», «ВАКАНСИИ», «КОНТАКТЫ»
   =================================================================== */

/* ===== СЕТКА «О НАС» ===== */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  padding: 16px 0 40px;
}

.about-body {
  max-width: 780px;
  width: 100%;
  font-size: 18px;
  line-height: 1.7;
  color: var(--primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.about-body h2 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
  margin: 48px 0 20px;
  color: var(--primary);
  overflow-wrap: break-word;
}

.about-body h2:first-child { margin-top: 0; }

.about-body p {
  margin-bottom: 24px;
  overflow-wrap: break-word;
}

.about-body strong { font-weight: 700; }

.about-body a:not([class]) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  transition: border-color .2s;
}

.about-body a:not([class]):hover {
  border-bottom-color: var(--accent);
}

.about-body ul {
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.about-body ul > li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.about-body ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.about-body ol {
  counter-reset: about-list;
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.about-body ol > li {
  counter-increment: about-list;
  position: relative;
  padding-left: 60px;
  margin-bottom: 20px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.about-body ol > li::before {
  content: counter(about-list);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

/* ===== БЛОК «ЧТО НАС ОТЛИЧАЕТ» ===== */
.about-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 24px;
}

.about-feature {
  background: var(--bg-alt);
  padding: 24px 26px;
  border-radius: 2px;
  border-top: 4px solid var(--accent);
}

.about-feature-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.about-feature p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-dark);
  margin: 0;
  overflow-wrap: break-word;
}

/* ===== САЙДБАР «О НАС» ===== */
.about-sidebar { min-width: 0; }

.about-stat {
  padding: 24px;
  background: var(--bg-alt);
  border-radius: 2px;
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
}

.about-stat-number {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.about-stat-label {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
}

.about-cta {
  background: var(--primary);
  color: white;
  padding: 28px;
  border-radius: 2px;
  margin-top: 24px;
}

.about-cta h4 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

.about-cta p {
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
  margin-bottom: 18px;
  overflow-wrap: break-word;
}

/* Кнопка в CTA-блоке — белый текст во всех состояниях */
.about-cta .about-cta-btn,
.about-cta .about-cta-btn:visited,
.about-cta .about-cta-btn:active {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .2s;
}

.about-cta .about-cta-btn:hover {
  background: #b71c1c;
  color: #ffffff;
}

/* ===================================================================
   РЕДАКЦИЯ — КАРТОЧКИ СОТРУДНИКОВ
   =================================================================== */

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
  padding: 40px 0;
}

.editorial-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: 2px;
  min-width: 0;
}

.editorial-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.editorial-info { min-width: 0; }

.editorial-info h2 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary);
  overflow-wrap: break-word;
}

.editorial-role {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.editorial-info p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-dark);
  margin-bottom: 14px;
  overflow-wrap: break-word;
}

.editorial-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  transition: border-color .2s;
  overflow-wrap: break-word;
  word-break: break-all;
}

.editorial-links a:hover {
  border-bottom-color: var(--accent);
}

/* ===== РЕДАКЦИОННАЯ ПОЛИТИКА ===== */
.editorial-policy {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 3px solid var(--primary);
}

.editorial-policy > h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 28px;
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.policy-item {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.policy-item:last-child {
  border-bottom: 1px solid var(--border);
}

.policy-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.policy-item p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-dark);
  margin: 0;
  max-width: 780px;
  overflow-wrap: break-word;
}

.policy-item a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  transition: border-color .2s;
}

.policy-item a:hover {
  border-bottom-color: var(--accent);
}

/* ===== КОНТАКТЫ ===== */
.editorial-contacts {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 3px solid var(--primary);
}

.editorial-contacts > h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 28px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 24px;
}

.contact-card {
  background: var(--bg-alt);
  padding: 24px;
  border-radius: 2px;
  border-left: 3px solid var(--accent);
  min-width: 0;
}

.contact-label {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 10px;
}

.contact-card a {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
  overflow-wrap: break-word;
  word-break: break-all;
  display: block;
  margin-bottom: 10px;
}

.contact-card a:hover {
  color: var(--accent);
}

.contact-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-dark);
  margin: 0;
  overflow-wrap: break-word;
}

.contact-note a {
  display: inline;
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .35);
  word-break: normal;
  margin: 0;
  transition: border-color .2s;
}

.contact-note a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* ===================================================================
   РЕКЛАМА — ФОРМАТЫ РАЗМЕЩЕНИЯ
   =================================================================== */

.ads-formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0 24px;
}

.ads-format {
  background: var(--bg-alt);
  padding: 28px 30px;
  border-radius: 2px;
  border-top: 4px solid var(--accent);
  min-width: 0;
}

.ads-format-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.ads-format h3 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--primary);
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

.ads-format p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-dark);
  margin: 0;
  overflow-wrap: break-word;
}

/* ===================================================================
   ВАКАНСИИ
   =================================================================== */

.job-item {
  background: var(--bg-alt);
  border-left: 5px solid var(--accent);
  padding: 32px 36px;
  border-radius: 2px;
  margin: 40px 0;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.job-header h3 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--primary);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}

.job-type {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: white;
  padding: 5px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.job-intro {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-dark);
  margin-bottom: 20px;
  overflow-wrap: break-word;
}

.job-block {
  margin-bottom: 20px;
}

.job-block:last-of-type {
  margin-bottom: 24px;
}

.job-block-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 10px;
}

.job-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job-block ul > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.55;
  font-size: 15px;
  color: var(--gray-dark);
  overflow-wrap: break-word;
}

.job-block ul > li:last-child {
  margin-bottom: 0;
}

.job-block ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.job-apply {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Кнопка «Откликнуться» — белый текст во всех состояниях */
.job-apply .job-apply-btn,
.job-apply .job-apply-btn:visited,
.job-apply .job-apply-btn:active {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .2s;
}

.job-apply .job-apply-btn:hover {
  background: #b71c1c;
  color: #ffffff;
}

/* ===================================================================
   COOKIE BANNER
   =================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 20px 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-banner__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1 1 400px;
  min-width: 0;
}

.cookie-banner__text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  color: #ffffff;
}

.cookie-banner__text p {
  margin: 0;
  line-height: 1.5;
  color: #cccccc;
}

.cookie-banner__text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 47, 47, .5);
  transition: border-color .2s;
}

.cookie-banner__text a:hover {
  border-bottom-color: var(--accent);
}

.cookie-banner__buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 24px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.cookie-banner__btn--accept {
  background: var(--accent);
  color: #ffffff;
}

.cookie-banner__btn--accept:hover {
  background: #b71c1c;
}

.cookie-banner__btn--reject {
  background: transparent;
  color: #cccccc;
  border: 1px solid #555;
}

.cookie-banner__btn--reject:hover {
  background: #333;
  color: #ffffff;
  border-color: #777;
}

@media (max-width: 768px) {
  .cookie-banner { padding: 16px 20px; }
  .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .cookie-banner__buttons { flex-direction: column; }
  .cookie-banner__btn { width: 100%; text-align: center; }
  .cookie-banner__text { flex: 0 0 auto; }
}

@media (max-width: 480px) {
  .cookie-banner { padding: 14px 16px; }
  .cookie-banner__text { font-size: 13px; }
}

/* ===================================================================
   АДАПТИВ
   =================================================================== */

/* ===== ПЛАНШЕТ (≤1024px) ===== */
@media (max-width: 1024px) {
  .main-grid,
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .article-layout > .sidebar {
    padding-top: 0;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .article-card.featured {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-card.featured img {
    height: 280px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== МОБИЛЬНЫЙ (≤768px) ===== */
@media (max-width: 768px) {
  .container { padding: 0 20px; }

  /* Шапка и меню */
  .nav-toggle { display: flex; }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    border-top: 1px solid var(--border);
    background: var(--bg);
    width: 100%;
  }
  .main-nav ul.is-open { display: flex; }

  .main-nav li { flex: 1 1 auto; width: 100%; }

  .main-nav a {
    padding: 16px 24px;
    font-size: 14px;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: normal;
    width: 100%;
  }
  .main-nav a::after { display: none; }
  .main-nav a:active {
    background: var(--bg-alt);
    color: var(--accent);
  }

  .topbar .container {
    justify-content: center;
    gap: 6px;
  }
  .topbar a { margin: 0 8px; }

  /* Крошки */
  .breadcrumbs {
    padding: 16px 0 0;
  }

  /* Главная */
  .hero-image { height: 260px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 17px; }

  .news-grid { grid-template-columns: 1fr; }
  .news-item img { height: 220px; }
  .news-item h3 { font-size: 19px; }

  /* Статья */
  .article-header h1 { font-size: 30px; }
  .article-header .lead { font-size: 17px; }
  .article-hero { height: 240px; margin: 24px 0; }
  .case-img { height: 220px; margin: 20px 0; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; margin: 40px 0 16px; }
  .article-body h3 { font-size: 20px; }
  .article-body ol > li { padding-left: 50px; }
  .article-body ol > li::before {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .case { padding: 24px 20px; }
  .summary-box { padding: 24px 20px; }
  .result-box { padding: 22px 20px; }
  .pull-quote { font-size: 19px; }

  .compare-flow { grid-template-columns: 1fr; gap: 16px; }

  .faq-item h3 { font-size: 18px; }
  .faq-item p { font-size: 16px; }

  /* Раздел */
  .section-hero { padding: 16px 0 24px; }
  .section-hero h1 { font-size: 30px; }
  .section-hero .lead { font-size: 17px; }

  .article-card img { height: 200px; }
  .article-card h2 { font-size: 20px; }
  .article-card.featured h2 { font-size: 24px; }
  .article-card.featured img { height: 220px; }

  /* Сайдбар и сетки */
  .sidebar { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; gap: 24px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  /* О нас / Редакция / Реклама / Вакансии / Контакты */
  .about-body { font-size: 17px; }
  .about-body h2 { font-size: 24px; margin: 40px 0 16px; }
  .about-features { grid-template-columns: 1fr; }
  .about-stat-number { font-size: 26px; }

  .editorial-card {
    grid-template-columns: 72px 1fr;
    padding: 20px;
  }
  .editorial-avatar {
    width: 72px;
    height: 72px;
  }
  .editorial-info h2 {
    font-size: 18px;
  }
  .editorial-policy > h2,
  .editorial-contacts > h2 {
    font-size: 20px;
  }

  .contacts-grid { grid-template-columns: 1fr; }

  .ads-formats { grid-template-columns: 1fr; }
  .ads-format { padding: 22px 24px; }
  .ads-format h3 { font-size: 18px; }

  .job-item { padding: 24px 20px; }
  .job-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .job-header h3 { font-size: 20px; }
  .job-intro { font-size: 15px; }
}

/* ===== УЗКИЙ МОБИЛЬНЫЙ (≤480px) ===== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .topbar .container {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  .topbar a { margin: 0 6px; }

  .logo img { height: 72px; }

  /* Крошки */
  .breadcrumbs {
    padding: 12px 0 0;
    font-size: 11px;
  }

  /* Главная */
  .hero-image { height: 200px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 16px; }

  .news-item img { height: 180px; }

  /* Статья */
  .article-header h1 { font-size: 24px; }
  .article-header .lead { font-size: 16px; }
  .article-hero { height: 200px; }
  .case-img { height: 180px; }
  .article-body { font-size: 16px; }
  .article-body ol > li { padding-left: 44px; }
  .article-body ol > li::before {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .case { padding: 20px 16px; }
  .summary-box { padding: 20px 16px; }
  .result-box { padding: 18px 16px; }
  .pull-quote { font-size: 17px; padding: 20px 0; }

  /* Блок автора */
  .author-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-avatar { margin: 0 auto; }

  /* Раздел */
  .section-hero { padding: 12px 0 20px; }
  .section-hero h1 { font-size: 24px; }
  .section-hero .lead { font-size: 16px; }
  .article-card h2 { font-size: 19px; }
  .article-card.featured h2 { font-size: 22px; }

  .newsletter { padding: 22px 18px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Юридические ссылки в подвале — в столбик */
  .footer-legal {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .footer-legal-sep {
    display: none;
  }

  /* О нас / Редакция / Реклама / Вакансии / Контакты */
  .about-body { font-size: 16px; }
  .about-body h2 { font-size: 22px; }
  .about-feature { padding: 20px; }
  .about-stat { padding: 20px; }
  .about-cta { padding: 22px 18px; }
  .about-body ol > li { padding-left: 44px; }
  .about-body ol > li::before {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .editorial-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .editorial-avatar {
    margin: 0 auto;
  }
  .editorial-links a {
    font-size: 12px;
  }

  .contact-card {
    padding: 20px;
  }
  .contact-card a {
    font-size: 15px;
  }

  .ads-format { padding: 20px; }
  .ads-format h3 { font-size: 17px; }

  .job-item { padding: 20px 16px; }
  .job-header h3 { font-size: 18px; }

  /* Кнопки на мобильных — во всю ширину */
  .job-apply .job-apply-btn {
    display: block;
    text-align: center;
    width: 100%;
  }

  .about-cta .about-cta-btn {
    display: block;
    text-align: center;
    width: 100%;
  }
}