/* rubrics.css — дополнительные стили для рубричных страниц
   razvitierebenka-online.ru */

/* ══════════════════════════════
   HERO РУБРИКИ
══════════════════════════════ */
.rubric-hero {
  background: #1a3a5c;
  color: var(--white);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.rubric-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.rubric-hero-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.rubric-breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rubric-breadcrumb a { color: rgba(255,255,255,0.65); }
.rubric-breadcrumb a:hover { color: #fff; }
.rubric-breadcrumb span { color: rgba(255,255,255,0.4); }
.rubric-hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.85rem;
  border-radius: 0;
  margin-bottom: 1rem;
}
.rubric-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  color: #fff;
}
.rubric-hero h1 em {
  font-style: normal;
  color: #ffd166;
}
.rubric-hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.rubric-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.rubric-hero-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}
.rubric-hero-stat strong { color: #fff; font-weight: 700; }

/* ══════════════════════════════
   НАВИГАЦИЯ ПО КЛАССАМ (таблетки)
══════════════════════════════ */
.grades-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 100;
}
.grades-nav-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 52px;
}
.grades-nav-inner::-webkit-scrollbar { display: none; }
.grade-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  background: var(--bg);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.grade-pill:hover,
.grade-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ══════════════════════════════
   ОСНОВНАЯ СЕТКА: СТАТЬИ + САЙДБАР
══════════════════════════════ */
.rubric-layout {
  max-width: var(--w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

/* ── Вводный текст рубрики (добавлено 21.08.2026) ── */
.rubric-intro {
  max-width: 760px;
  margin-bottom: 2rem;
}
.rubric-intro p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.rubric-intro p:last-child { margin-bottom: 0; }
.rubric-intro a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(184, 67, 26,0.35);
  text-underline-offset: 2px;
  font-weight: 600;
}
.rubric-intro a:hover { text-decoration-color: var(--accent); }
@media (max-width: 700px) {
  .rubric-intro p { font-size: 0.95rem; line-height: 1.65; }
}
.feed-card-footer .feed-card-read:only-child { margin-left: auto; }

/* ── Лента статей ── */
.rubric-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.rubric-feed-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.rubric-feed-count {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 0;
}

/* Сортировка */
.sort-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.sort-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
}
.sort-btn:hover, .sort-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* ── Карточка статьи (расширенная) ── */
.feed-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  background: var(--white);
  border-radius: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feed-card:hover {
  box-shadow: 0 4px 24px rgba(79,134,198,0.13);
  transform: translateY(-2px);
}
.feed-card-img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.feed-card-body {
  padding: 1.1rem 1.25rem 1.1rem 0;
  display: flex;
  flex-direction: column;
}
.feed-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.feed-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(79,134,198,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 0;
}
.feed-card-grade {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  background: var(--red);
  padding: 0.2rem 0.55rem;
  border-radius: 0;
}
.feed-card-date {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}
.feed-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.feed-card-title a { color: inherit; }
.feed-card-title a:hover { color: var(--accent); }
.feed-card-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
}
.feed-card-read {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.feed-card-read::after { content: '→'; }
.feed-card-read:hover { color: var(--accent2); }
.feed-card-views {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Популярная метка */
.feed-card.feed-card--popular .feed-card-cat::before {
  content:'';
}
.feed-card.feed-card--new::after {
  content: 'Новое';
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  text-transform: uppercase;
}
.feed-card.feed-card--new { position: relative; }

/* ── Пагинация ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-btn.page-dots {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--muted);
}

/* ══════════════════════════════
   САЙДБАР
══════════════════════════════ */
.rubric-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Общий виджет */
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.widget-head {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.widget-head-icon {
  font-size: 1.1rem;
}
.widget-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.widget-body { padding: 1rem 1.25rem; }

/* Виджет: партнёрский курс */
.widget-course {
  border-top: 3px solid var(--accent);
}
.widget-course .course-logo-sm {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.widget-course .course-name-sm {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.widget-course .course-desc-sm {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.widget-course .course-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.widget-course .stars { color: #f59e0b; letter-spacing: -0.05em; }

/* Виджет: популярные статьи */
.popular-list { list-style: none; }
.popular-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--border);
  min-width: 24px;
  line-height: 1.2;
}
.popular-item:nth-child(1) .popular-num { color: #f59e0b; }
.popular-item:nth-child(2) .popular-num { color: #94a3b8; }
.popular-item:nth-child(3) .popular-num { color: #cd7c3e; }
.popular-link {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.2s;
}
.popular-link:hover { color: var(--accent); }

/* Виджет: RSS / Новости */
.rss-list { list-style: none; }
.rss-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.rss-item:last-child { border-bottom: none; padding-bottom: 0; }
.rss-item-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.25rem;
  display: block;
}
.rss-item-title:hover { color: var(--accent); }
.rss-item-source {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rss-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.rss-refresh {
  font-size: 0.72rem;
  color: var(--accent);
  cursor: pointer;
  text-align: right;
  display: block;
  margin-top: 0.75rem;
}
.rss-refresh:hover { text-decoration: underline; }

/* Виджет: Теги/рубрики */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}
.tag-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Виджет: Подписка (сайдбар) */
.widget-subscribe .subscribe-sm-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.widget-subscribe .subscribe-sm-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}
.subscribe-sm-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.subscribe-sm-form input {
  padding: 0.55rem 0.85rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  font-size: 0.83rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-sm-form input:focus { border-color: var(--accent); }

/* ══════════════════════════════
   РАЗДЕЛ: «НОВЫЕ СТАТЬИ» (горизонтальный)
══════════════════════════════ */
.new-articles-section {
  background: var(--bg);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.new-articles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ══════════════════════════════
   РАЗДЕЛ: «СВЕЖИЕ СТАТЬИ» (горизонтальная прокрутка)
══════════════════════════════ */
.fresh-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}
.fresh-scroll-wrap::-webkit-scrollbar { display: none; }
.fresh-scroll-row {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding-bottom: 0.5rem;
}
.fresh-mini-card {
  width: 220px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.fresh-mini-card:hover { box-shadow: 0 4px 16px rgba(79,134,198,0.12); }
.fresh-mini-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.fresh-mini-body { padding: 0.75rem; }
.fresh-mini-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.fresh-mini-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fresh-mini-title a { color: inherit; }
.fresh-mini-title a:hover { color: var(--accent); }
.fresh-mini-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ══════════════════════════════
   SEO-ТЕКСТ ВНИЗУ РУБРИКИ
══════════════════════════════ */
.rubric-seo-text {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}
.rubric-seo-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.rubric-seo-inner h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.rubric-seo-inner h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}
.rubric-seo-inner p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}
.rubric-seo-inner ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.rubric-seo-inner ul li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0.3rem;
}

/* ══════════════════════════════
   МОБИЛЬНЫЙ САЙДБАР (под лентой, только на мобиле)
══════════════════════════════ */
.mobile-sidebar-section {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.mobile-sidebar-section .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Горизонтальный скролл виджетов курсов на мобиле */
.mobile-courses-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.mobile-courses-row::-webkit-scrollbar { display: none; }
.mobile-course-card {
  flex-shrink: 0;
  width: 260px;
  background: var(--white);
  border-radius: 0;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 1rem;
}
.mobile-course-card .course-logo-sm { font-size: 1.75rem; margin-bottom: 0.35rem; }
.mobile-course-card .course-name-sm { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.mobile-course-card .course-desc-sm {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
/* Популярные статьи на мобиле — горизонтально */
.mobile-popular-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-popular-scroll::-webkit-scrollbar { display: none; }
.mobile-popular-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--white);
  border-radius: 0;
  border: 1px solid var(--border);
  padding: 0.85rem;
}
.mobile-popular-card .popular-num-sm {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.mobile-popular-card:nth-child(1) .popular-num-sm { color: #f59e0b; }
.mobile-popular-card:nth-child(2) .popular-num-sm { color: #94a3b8; }
.mobile-popular-card:nth-child(3) .popular-num-sm { color: #cd7c3e; }
.mobile-popular-card a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mobile-popular-card a:hover { color: var(--accent); }
/* RSS на мобиле */
.mobile-rss-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mobile-rss-list { list-style: none; }
.mobile-rss-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.mobile-rss-item:last-child { border-bottom: none; }
.mobile-rss-item a {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: block;
  margin-bottom: 0.2rem;
}
.mobile-rss-item a:hover { color: var(--accent); }
.mobile-rss-item span {
  font-size: 0.7rem;
  color: var(--muted);
}
/* Теги на мобиле */
.mobile-tags-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* ══════════════════════════════
   МОБИЛЬНЫЙ BOTTOM BAR — партнёрский CTA
══════════════════════════════ */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: 0.65rem 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
}
.mobile-cta-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--w);
  margin: 0 auto;
}
.mobile-cta-bar-text {
  flex: 1;
  min-width: 0;
}
.mobile-cta-bar-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-cta-bar-text span {
  font-size: 0.72rem;
  color: var(--muted);
}
.mobile-cta-bar .btn {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.mobile-cta-bar-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
  line-height: 1;
}

/* ══════════════════════════════
   АДАПТИВ
══════════════════════════════ */
@media (max-width: 1024px) {
  .rubric-layout {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }
  /* Сайдбар скрыт — показываем мобильный блок */
  .rubric-sidebar { display: none; }
  .mobile-sidebar-section { display: block; }
  .mobile-cta-bar { display: flex; }
  /* Отступ внизу страницы чтобы bottom bar не перекрывал контент */
  body { padding-bottom: 72px; }
}

@media (max-width: 768px) {
  /* Hero */
  .rubric-hero { padding: 2rem 0 1.75rem; }
  .rubric-hero h1 { font-size: clamp(1.4rem, 5.5vw, 2rem); }
  .rubric-hero-desc { font-size: 0.92rem; }
  .rubric-hero-meta {
    gap: 0.85rem;
    flex-wrap: wrap;
  }
  .rubric-hero-stat { font-size: 0.8rem; }

  /* Навигация таблетки */
  .grades-nav { top: 60px; }

  /* Лента статей */
  .feed-card {
    grid-template-columns: 1fr;
  }
  .feed-card-img { width: 100%; height: 175px; }
  .feed-card-body { padding: 0.85rem 1rem 1rem; }
  .feed-card-date { margin-left: 0; }
  .feed-card-meta { gap: 0.4rem; }

  /* Новые статьи */
  .new-articles-row { grid-template-columns: 1fr 1fr; }
  .new-articles-section { padding: 1.5rem 0; }

  /* Сортировка */
  .sort-bar { gap: 0.3rem; }
  .sort-btn { font-size: 0.72rem; padding: 0.28rem 0.7rem; }

  /* Пагинация */
  .pagination { gap: 0.3rem; }
  .page-btn { width: 34px; height: 34px; font-size: 0.8rem; }

  /* SEO-текст */
  .rubric-seo-text { padding: 2rem 0; }
  .rubric-seo-inner h2 { font-size: 1.15rem; }
}

@media (max-width: 480px) {
  /* Hero — очень маленький экран */
  .rubric-hero { padding: 1.75rem 0 1.5rem; }
  .rubric-breadcrumb { font-size: 0.72rem; margin-bottom: 0.65rem; }
  .rubric-hero-label { font-size: 0.65rem; padding: 0.25rem 0.7rem; }
  .rubric-hero h1 { font-size: clamp(1.25rem, 6vw, 1.6rem); margin-bottom: 0.6rem; }
  .rubric-hero-desc { font-size: 0.85rem; margin-bottom: 1.25rem; }
  .rubric-hero-meta { gap: 0.65rem; }
  .rubric-hero-stat { font-size: 0.75rem; }

  /* Заголовок ленты */
  .rubric-feed-header { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .rubric-feed-title { font-size: 1.1rem; }

  /* Карточки — компактнее */
  .feed-card-img { height: 155px; }
  .feed-card-title { font-size: 0.92rem; }
  .feed-card-excerpt { font-size: 0.8rem; -webkit-line-clamp: 2; }
  .feed-card-footer { flex-direction: row; }
  .feed-card-views { font-size: 0.68rem; }

  /* Свежие статьи — меньше карточки */
  .fresh-mini-card { width: 180px; }
  .fresh-mini-img { height: 110px; }

  /* Новые статьи — одна колонка */
  .new-articles-row { grid-template-columns: 1fr; }

  /* Layout отступы */
  .rubric-layout { padding: 1.5rem 1rem; }

  /* SEO-текст */
  .rubric-seo-inner h2 { font-size: 1.05rem; }
  .rubric-seo-inner h3 { font-size: 0.9rem; }
  .rubric-seo-inner p,
  .rubric-seo-inner ul li { font-size: 0.85rem; }

  /* Bottom CTA bar — меньше */
  .mobile-cta-bar { padding: 0.5rem 0.85rem; }
  .mobile-cta-bar-text strong { font-size: 0.78rem; }
  .mobile-cta-bar .btn { padding: 0.45rem 0.9rem; font-size: 0.7rem; }
}

@media (max-width: 375px) {
  .rubric-hero h1 { font-size: 1.2rem; }
  .feed-card-cat, .feed-card-grade { font-size: 0.65rem; }
  .grade-pill { font-size: 0.72rem; padding: 0.28rem 0.75rem; }
}
