/* =================================================================
   NEWKUBAN.RU - Main Site Styles
   Clean CSS without Tailwind utilities
   ================================================================= */

/* --- CSS Variables (Typography + Colors) --- */
:root {
  /* Typography */
  --font-size-xs: 0.75rem;      /* 12px - бейджи, время, block titles */
  --font-size-sm: 0.875rem;     /* 14px - мета-информация, подписи, хлебные крошки */
  --font-size-base: 1rem;       /* 16px - основной текст, элементы ленты */
  --font-size-md: 1.125rem;     /* 18px - лиды hero */
  --font-size-lg: 1.3125rem;    /* 21px - заголовки закрепленных и карточек */
  --font-size-xl: 1.5rem;       /* 24px - заголовки карточек, h3 */
  --font-size-2xl: 1.75rem;     /* 28px - заголовки hero */
  --font-size-3xl: 2.25rem;     /* 36px - крупные заголовки */
  --font-size-4xl: 3rem;        /* 48px - hero заголовки (landing) */
  --line-height-tight: 1.375;
  --font-serif: Georgia, 'Times New Roman', serif;

  /* Mobile typography (style guide). Десктоп — позже. */
  --mobile-h1-size: 24px;
  --mobile-h1-weight: 600;
  --mobile-h1-lh: 1.2;
  --mobile-h2-size: 20px;
  --mobile-h2-weight: 600;
  --mobile-h2-lh: 1.2;
  --mobile-h3-size: 18px;
  --mobile-h3-weight: 600;
  --mobile-h3-lh: 1.3;
  --mobile-feed-weight: 600;
  --mobile-feed-lh: 1.4;
  --mobile-block-title-size: 0.875rem; /* 14px */
  --mobile-block-title-weight: 700;
  --mobile-block-title-lh: 1;

  /* Colors — единый источник; critical.css дублирует для первого экрана */
  --color-bg: #fff;
  --color-text: #333;
  --color-text-muted: #6b7280;
  --color-text-strong: #111827;
  --color-text-secondary: #374151;
  --color-border: #E6E8EA;
  --color-border-light: #e5e7eb;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-error: #d92b2b;
  --color-on-dark: #fff;
  --color-bg-muted: #f3f4f6;

  /* Category menu subtitles */
  --color-menu-subtitle: #CDCDCD;
  --font-size-menu-subtitle: 12px;
  --font-weight-regular: 400;

  /* Shared photo hover-zoom for link cards (used by multiple blocks) */
  --nk-link-hover-zoom-scale: 1.02;
  --nk-link-hover-transition-duration: 420ms;
  --nk-link-hover-transition-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  font-family: 'Onest', 'Onest Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Default heading styles */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: 600;
  line-height: 1.3;
}

/* Base heading font sizes. Mobile-first: компактные заголовки, с 768px крупнее */
h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: 16px; }
h4 { font-size: 16px; }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }
@media (min-width: 768px) {
  h3 { font-size: var(--font-size-xl); }
  h4 { font-size: var(--font-size-lg); }
}

/* --- Utility classes (replacing Tailwind) --- */
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
}
.block { display: block; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.relative { position: relative; }
.no-underline { text-decoration: none; }
.text-inherit { color: inherit; }

/* Text sizes */
.text-base { font-size: var(--font-size-base); line-height: 1.5rem; }
.text-lg { font-size: var(--font-size-md); line-height: 1.75rem; }
.text-xl { font-size: var(--font-size-lg); line-height: 1.75rem; }
.text-2xl { font-size: var(--font-size-xl); line-height: 2rem; }
.text-3xl { font-size: var(--font-size-2xl); line-height: 2.25rem; }

/* Font weights */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Colors */
.text-black { color: #000; }
.text-gray-700 { color: var(--color-text-secondary); }

/* Spacing */
.m-0 { margin: 0; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Sizing */
.w-full { width: 100%; }
.h-auto { height: auto; }
.max-w-3xl { max-width: 48rem; }
.max-w-none { max-width: none; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Text alignment */
.text-center { text-align: center; }
.leading-tight { line-height: 1.25; }

/* Rounded corners */
.rounded-none { border-radius: 0; }
.rounded-lg { border-radius: 0.5rem; }

/* Object fit */
.object-cover { object-fit: cover; }

/* Group hover */
.group:hover .group-hover\:underline { text-decoration: underline; }

/* Hover states */
.hover\:underline:hover { text-decoration: underline; }

/* Visibility utility — toggle via JS instead of inline style */
.is-hidden { display: none !important; }

/* --- Site Header ---. Mobile-first: мобильный sticky без бордера, с 768px — полный хедер */
.site-header { background: var(--color-bg); border-bottom: none; margin-bottom: 0; position: sticky; top: 0; z-index: 100; padding-top: env(safe-area-inset-top, 0); height: 64px; }
.site-header .container { padding: 0.5rem 1rem; }
.header-content { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 0; }
@media (min-width: 768px) {
  .site-header {
    position: static;
    height: auto;
    padding-top: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .site-header .container { padding: 0.5rem 1rem; }
  .header-content { padding: 0.5rem 0; }
}
.menu-toggle { background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--color-text-strong); }
.menu-toggle-icon--hamburger.is-hidden { display: none !important; }
.menu-toggle-icon--close:not(.is-hidden) { display: block !important; }
.logo { display: flex; justify-content: center; align-items: center; }
.logo a { font-size: var(--font-size-xl); line-height: 2rem; font-weight: 700; color: #000; text-decoration: none; display: inline-flex; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2); border-radius: 8px; }

@media (hover: none) {
  .logo a:active {
    background: rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25) inset;
  }
}

.logo a:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 3px;
  box-shadow: none;
}
.header-actions { display: flex; align-items: center; gap: 24px; justify-content: flex-end; position: relative; }

/* Share Buttons */
.share-buttons {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.share-buttons__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

/* В строке мета-инфо делаем кнопку "Поделиться" компактнее */
.article-meta-row .share-buttons__trigger {
  padding-top: 0;
  padding-bottom: 0;
}

.share-buttons__trigger:hover {
  color: var(--color-text-strong);
}

.share-buttons__label {
  color: inherit;
}

.share-buttons__icon {
  display: block;
  flex-shrink: 0;
}

/* В детальной: скрываем иконку рядом с текстом "Поделиться" */
body.news-article-page .share-buttons__trigger .share-buttons__icon {
  display: none;
}

.share-buttons__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 180px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
}

.share-buttons.is-open .share-buttons__dropdown {
  display: block;
}

.share-dropdown__item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-strong);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
}

.share-dropdown__item:last-child {
  border-bottom: none;
}

.share-dropdown__item:hover {
  background: #f9fafb;
}

.share-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.share-button svg { display: block; }

/* Search */
.search-toggle { background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--color-text-muted); transition: color 0.2s ease; display: inline-flex; align-items: center; justify-content: center; }
.search-toggle:hover { color: var(--color-text-strong); }
.search-toggle svg { display: block; }

.search-form-wrapper { position: fixed; left: 1rem; right: 1rem; top: calc(64px + 0.5rem); background: var(--color-bg); border: 1px solid var(--color-border-light); border-radius: 4px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); z-index: 1000; }

.search-form { display: flex; padding: 0.75rem; gap: 0.5rem; }
.search-input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: var(--font-size-sm); outline: none; }
.search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.search-submit { padding: 0.5rem 1rem; background: var(--color-primary); color: var(--color-on-dark); border: none; border-radius: 4px; font-size: var(--font-size-sm); font-weight: 500; cursor: pointer; transition: background 0.2s ease; }
.search-submit:hover { background: var(--color-primary-hover); }

@media (min-width: 768px) {
  .search-form-wrapper { position: absolute; top: 100%; right: 0; left: auto; margin-top: 0.5rem; min-width: 300px; max-width: none; }
}

/* Category Menu */
.category-menu { 
  margin-top: 0.5rem; 
  padding: 1rem 0; 
  border-top: 1px solid var(--color-border-light); 
  background: var(--color-bg); 
}
.category-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  display: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}


.category-menu-list { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  display: flex; 
  flex-wrap: wrap; 
  flex-direction: column;
  gap: 0.5rem; 
}

.category-menu-item { 
  margin: 0; 
}

.category-menu-link { 
  display: block; 
  padding: 0.75rem 1rem; 
  padding-left: 0;
  color: var(--color-text-secondary); 
  text-decoration: none; 
  text-underline-offset: 2px; 
  border-radius: 0; 
  transition: color 0.2s ease; 
  font-size: var(--font-size-sm); 
}

.category-menu-link:hover {
  background-color: transparent; 
  color: var(--color-text-strong); 
  text-decoration: underline;
}

.category-menu-link:focus-visible {
  outline: none;
  box-shadow: none;
  background-color: transparent;
}

.category-menu-social-title { margin: 0 0 12px; text-align: center; font-size: var(--font-size-sm); }
.category-menu-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 0.75rem 1rem;
}
.category-menu-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.category-menu-social-link img {
  width: 48px;
  height: 48px;
}
.category-menu-block { padding: 0; }
.category-menu-block .category-menu-list + .category-menu-list { margin-top: 0.25rem; }
.category-menu-divider { height: 1px; margin: 24px 0; background: var(--color-border-light); }

.category-menu-section-title {
  margin: 0 0 12px;
  color: var(--color-menu-subtitle);
  font-size: var(--font-size-menu-subtitle);
  font-weight: var(--font-weight-regular);
  text-align: left;
}

.category-menu-section-title--sub {
  font-weight: var(--font-weight-regular);
}

@media (max-width: 767px) {
  body.category-menu-open { overflow: hidden; }
  .category-menu-overlay { display: none !important; }
  .category-menu {
    position: fixed;
    left: 0;
    top: calc(64px + env(safe-area-inset-top, 0));
    background: #2D2D2D;
    border-top-color: transparent;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: calc(120px + env(safe-area-inset-top, 0));
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0));
  }
  .category-menu-social { border-bottom: none; }
  .category-menu-social-title { color: #fff; }
  .category-menu-social-link img { width: 48px; height: 48px; }
  .category-menu-divider { background: #404040; }
  .category-menu-list { gap: 0.5rem; }
  .category-menu-link { color: #fff; padding: 0.25rem 1rem; padding-left: 0; }
  .category-menu-link:hover { background-color: transparent; color: #fff; text-decoration: underline; }
  .site-header.category-menu-open .menu-toggle { background: #2D2D2D; color: #fff; }
}

@media (min-width: 768px) {
  body.category-menu-open { overflow: hidden; }
  body.category-menu-open .category-menu-overlay { display: block; }
  .category-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
    padding-top: calc(120px + env(safe-area-inset-top, 0));
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0));
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background: #2D2D2D;
    border-top: none;
    z-index: 200;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .category-menu::-webkit-scrollbar { width: 0; height: 0; }
  .category-menu-social-title { color: #fff; }
  .category-menu-divider { background: #404040; }
  .category-menu-social { border-bottom: none; }
  .category-menu .category-menu-social-link img {
    width: 32px;
    height: 32px;
  }
  .category-menu-link { color: #fff; }
  .category-menu-link:hover { background-color: transparent; color: #fff; text-decoration: underline; }
  .category-menu-social {
    border-bottom: none;
  }

  .category-menu-list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .category-menu-link {
    padding: 0 1rem;
    padding-left: 0;
    line-height: 28px;
  }
}

.article-main .meta--tags {
  display: none;
}

.subscribe-block {
  flex-direction: column;
  gap: 8px;
}

.subscribe-link {
  width: 100%;
}

.latest-sidebar .list .item:nth-child(n+7) {
  display: none;
}

@media (min-width: 768px) {
  main {
    margin-top: 40px;
  }

  .article-top-banner + main.container .breadcrumbs {
    margin-top: 32px;
  }

  .article-main .meta--tags {
    display: block;
  }

  .subscribe-block {
    flex-direction: row;
    gap: 16px;
  }

  .subscribe-link {
    width: auto;
  }

  .latest-sidebar .list .item:nth-child(n+7) {
    display: flex;
  }

  .latest-sidebar .list .item:last-child .title {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* --- News Index Grid --- */
.news-index h1 { font-size: var(--font-size-2xl); line-height: 2.25rem; font-weight: 600; margin-bottom: 1rem; }
.news-index .lead { font-size: var(--font-size-md); line-height: 1.75rem; color: var(--color-text-secondary); margin-bottom: 1rem; }

/* --- Hero Content Wrapper. Mobile-first: колонка, с 1320px ряд --- */
.hero-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* --- Main Hero Grid. Mobile-first: одна колонка, с 1320px 454px x2 --- */
.main-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  row-gap: 0;
  flex: 1;
}

.main-hero-grid .pinned-card-large {
  grid-column: 1;
  grid-row: auto;
}

.main-hero-grid .pinned-small-container {
  grid-column: 1;
  grid-row: auto;
}

/* Latest News Sidebar. Mobile-first: на всю ширину + подложка, с 1320px 300px --- */
.latest-sidebar {
  width: 100%;
  flex-shrink: 0;
  background-color: #F7F7F7;
  padding: 24px 16px;
}

.latest-sidebar-header {
  margin-bottom: 0;
}

.latest-sidebar-header a {
  color: inherit;
  text-decoration: none;
}

.latest-sidebar-header a:hover {
  text-decoration: underline;
}

@media (min-width: 1320px) {
  .main-hero-wrapper {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 908px 300px;
    grid-template-rows: auto auto;
    row-gap: 32px;
    column-gap: 40px;
  }
  .main-hero-wrapper > .hero-area { grid-column: 1; grid-row: 1; }
  .main-hero-wrapper .container { display: contents; }
  .main-hero-wrapper .hero-content-wrapper { display: contents; }
  .main-hero-wrapper .main-hero-grid { grid-column: 1; grid-row: 2; grid-template-columns: 442px 442px; gap: 24px; row-gap: 32px; column-gap: 24px; }
  .main-hero-wrapper .latest-sidebar { grid-column: 2; grid-row: 1 / -1; width: 300px; }
  .main-hero-grid .pinned-card-large { grid-column: 1; grid-row: 1; }
  .main-hero-grid .pinned-small-container { grid-column: 2; grid-row: 1; }
  .main-hero-wrapper .main-hero-grid .pinned-card-large img { max-width: 442px; }
  .latest-sidebar { width: 300px; }
}

.block-title {
  display: block;
  margin: 0;
  font-size: var(--mobile-block-title-size);
  font-weight: var(--mobile-block-title-weight);
  letter-spacing: 0;
  line-height: var(--mobile-block-title-lh);
}
.block-title::after { content: ''; display: block; height: 2px; background: #000; margin-top: 12px; }

/* Pinned cards - Large. Mobile-first: строка и мелкое фото, с 768px колонка и крупное фото */
.pinned-card { display: block; text-decoration: none; color: inherit; }
.pinned-card-large {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 0 0 0;
  margin-top: 0;
}
.main-hero-grid .pinned-card-large { order: 2; }
.main-hero-grid .pinned-small-container { order: 3; }
.pinned-card-large picture { display: block; overflow: visible; flex-shrink: 0; }
.pinned-card-large img {
  width: 100px;
  height: 80px;
  max-width: 100px;
  margin-bottom: 0;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.pinned-card-large h3 {
  font-size: var(--mobile-h3-size);
  font-weight: var(--mobile-h3-weight);
  margin: 0;
  line-height: var(--mobile-h3-lh);
  flex: 1;
}
.pinned-card-large:hover h3 { text-decoration: underline; }

@media (min-width: 768px) {
  .main-hero-grid { row-gap: 32px; }
  .main-hero-grid .pinned-card-large { order: unset; }
  .main-hero-grid .pinned-small-container { order: unset; }
  .main-hero-grid .pinned-card-large {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin-top: 0;
  }
  .main-hero-grid .pinned-card-large picture { overflow: hidden; }
  .main-hero-grid .pinned-card-large img {
    width: 100%;
    max-width: 454px;
    height: 310px;
    margin-bottom: 0.75rem;
  }
  .main-hero-grid .pinned-card-large h3 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 0.75rem 0;
    flex: none;
  }
}

/* Pinned cards - Small (horizontal layout) */
.pinned-small-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Разделитель между закреплённой 1 и 2 — только на мобильной, линия только под колонкой заголовка (фото 100px + gap 12px) */
.main-hero-grid .pinned-small-container {
  margin-top: 1rem;
  padding-top: 0;
}
.main-hero-grid .pinned-small-container::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--color-border);
  margin-left: 112px;
  margin-bottom: 1rem;
}

.pinned-card-small {
  display: flex;
  flex-direction: row-reverse;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
}

.pinned-card-small:first-child {
  padding-top: 0;
}

.pinned-card-small:last-child {
  padding-bottom: 0;
}

.pinned-card-small picture {
  flex-shrink: 0;
}

.pinned-card-small img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.pinned-card-small h3 {
  font-size: var(--mobile-h3-size);
  font-weight: var(--mobile-h3-weight);
  margin: 0;
  line-height: var(--mobile-h3-lh);
  flex: 1;
}

.pinned-card-small:hover h3 {
  text-decoration: underline;
}

.pinned-small-container {
  margin-top: 0;
  padding-top: 0;
}

.pinned-small-container::before {
  content: none;
  display: none;
}

.pinned-small-container .pinned-card-small:first-child {
  padding-top: 0;
}

/* На мобильных: фото слева, заголовок справа; с 768px row-reverse */
.pinned-card-small {
  flex-direction: row;
}

@media (min-width: 768px) {
  .pinned-card-small {
    flex-direction: row-reverse;
    align-items: center;
  }
  .main-hero-grid .pinned-small-container {
    margin-top: 0;
    padding-top: 0;
  }
  .main-hero-grid .pinned-small-container::before {
    content: none;
    display: none;
  }
}

.pinned-separator {
  height: 1px;
  background: var(--color-border);
  margin-left: 112px; /* только под колонкой заголовка на мобильной */
}

@media (min-width: 768px) {
  .pinned-separator {
    margin-left: 0; /* на десктопе — на всю ширину блока */
  }
}

/* Hero area. Mobile-first: авто высота и компактный overlay, с 768px 510px и крупнее заголовок */
.hero-link { display: block; color: inherit; text-decoration: none; }
.hero-image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 3 / 2;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  transform: scale(1);
  transition: transform var(--nk-link-hover-transition-duration, 420ms) var(--nk-link-hover-transition-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
  will-change: transform;
}
.hero-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0) 100%);
  padding: 0 24px 24px 24px;
}
.hero-title {
  color: #fff;
  font-size: var(--mobile-h1-size);
  line-height: var(--mobile-h1-lh);
  font-weight: var(--mobile-h1-weight);
  margin: 0;
  font-family: 'Onest', 'Onest Fallback', sans-serif;
}
.hero-lead {
  color: #fff;
  font-size: var(--font-size-base);
  line-height: 1.375;
  margin: 0;
  max-width: 700px;
  display: none;
}
.hero-link:hover .hero-image { transform: scale(var(--nk-link-hover-zoom-scale, 1.02)); }

@media (prefers-reduced-motion: reduce) {
  .hero-image { transition: none; }
  .hero-link:hover .hero-image { transform: scale(1); }
}

@media (min-width: 768px) {
  .hero-image-wrapper { height: 510px; }
  .hero-image { height: 510px; aspect-ratio: auto; }
  .hero-title-overlay { padding: 3rem 2rem 1.5rem; }
  .hero-title { font-size: var(--font-size-2xl); margin: 0 0 0.75rem 0; }
  .hero-lead { display: block; }
}

/* --- Day Pictures Grid --- */
.day-pictures { margin-bottom: 2rem; padding: 4rem 0 2rem; position: relative; }
.day-pictures::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100%; height: 1px; background: var(--color-border); z-index: 0; }

/* Верхний ряд: hero + реклама */
.day-pictures-top { display: flex; gap: 1.5rem; margin-bottom: 24px; }

.day-pictures-hero-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.day-pictures-mobile-subtitle { display: none; }
.day-pictures-header-text { font-size: var(--mobile-block-title-size); font-weight: var(--mobile-block-title-weight); letter-spacing: 0; line-height: var(--mobile-block-title-lh); }

/* Hero: текст + фото */
.day-pictures-hero { flex: 1; min-width: 0; }
.day-pictures-hero-link { display: flex; gap: 24px; text-decoration: none; color: inherit; align-items: flex-start; }
.day-pictures-hero-left { flex: 1; height: 400px; display: flex; flex-direction: column; }
.day-pictures-hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.day-pictures-hero-title { margin: 0 0 0.75rem; font-size: 24px; line-height: 1.3; font-weight: 700; }
.day-pictures-hero-lead { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; color: #5e5e5e; }
.day-pictures-card-lead { display: inline; color: #4E4E4E; font-size: 16px; line-height: 1.3; font-weight: 400; }
.day-pictures-hero-lead-inline { display: inline; color: #4E4E4E; font-size: 16px; line-height: 1.3; font-weight: 400; }
.day-pictures-hero-image-wrapper { width: 624px; height: 400px; flex-shrink: 0; overflow: hidden; }
.day-pictures-hero-image { display: block; width: 624px; height: 400px; object-fit: cover; border-radius: 2px 2px 0 0; transform: scale(1); transition: transform var(--nk-link-hover-transition-duration) var(--nk-link-hover-transition-ease); will-change: transform; }
.day-pictures-hero-link:hover .day-pictures-hero-image { transform: scale(var(--nk-link-hover-zoom-scale)); }

/* Рекламный блок */
.day-pictures-ad { width: 300px; height: 400px; flex-shrink: 0; margin-top: 40px; }

/* Нижний ряд: 4 карточки */
.day-pictures-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.day-pictures-card-link { display: block; text-decoration: none; color: inherit; }
.day-pictures-card-image { display: block; width: 100%; margin-bottom: 12px; }
.day-pictures-card-image img { width: 100%; height: 200px; display: block; object-fit: cover; border-radius: 2px; transform: scale(1); transition: transform var(--nk-link-hover-transition-duration) var(--nk-link-hover-transition-ease); will-change: transform; }
.day-pictures-card-link:hover .day-pictures-card-image img { transform: scale(var(--nk-link-hover-zoom-scale)); }

@media (prefers-reduced-motion: reduce) {
  .day-pictures-hero-image { transition: none; }
  .day-pictures-card-image img { transition: none; }
  .day-pictures-hero-link:hover .day-pictures-hero-image { transform: scale(1); }
  .day-pictures-card-link:hover .day-pictures-card-image img { transform: scale(1); }
}
/* Адаптивность. Mobile-first: колонка и 2 колонки карточек, с 1320px ряд сверху и 4 колонки карточек */
.day-pictures-top { flex-direction: column; gap: 0; margin-bottom: 16px; }
.day-pictures-ad { order: -1; width: 100%; max-width: none; height: 250px; background: transparent; margin-top: 32px; margin-bottom: 32px; }
.day-pictures-ad__inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.day-pictures-ad__inner > * { max-width: 100%; max-height: 100%; min-height: 0; overflow: visible; }
.day-pictures-hero-link { flex-direction: column; align-items: stretch; gap: 0; }
.day-pictures-hero-left { height: auto; min-width: 0; flex: none; display: block; margin-top: -56px; background: transparent; border-radius: 0; padding: 0; overflow: visible; }
.day-pictures-hero-title { font-size: var(--mobile-h2-size); font-weight: var(--mobile-h2-weight); line-height: var(--mobile-h2-lh); margin: 0; padding: 0; background: transparent; }
.day-pictures-hero-lead { display: none; }
.day-pictures-hero-image-wrapper { width: 100%; height: auto; flex-shrink: 0; order: -1; }
.day-pictures-hero-image { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; margin-bottom: 0; display: block; }

@media (max-width: 767px) {
  .day-pictures-mobile-subtitle { display: block; margin-bottom: 16px; }
  .day-pictures-hero .day-pictures-hero-subtitle { display: none; }

  /* Mobile: серый блок с заголовком+лидом должен быть вплотную к фото, на всю ширину */
  .day-pictures-hero .day-pictures-hero-left {
    margin-top: 0;
    background: #F3F3F3;
    border-radius: 0 0 4px 4px;
    padding: 16px;
    overflow: hidden;
  }
  .day-pictures-hero .day-pictures-hero-title { margin: 0; padding: 0; background: transparent; }

  /* Mobile: карточки 2-4 (внутри сетки) — без наезда на фото, серый блок строго под изображением */
  .day-pictures-cards .day-pictures-hero-left { margin-top: 0; background: #F3F3F3; border-radius: 0 0 4px 4px; padding: 16px; overflow: hidden; }
}
.day-pictures-cards { grid-template-columns: 1fr; gap: 16px; border-top: none; margin-top: 16px; padding-top: 0; }
.day-pictures-cards .day-pictures-card:nth-child(4) { display: none; }
.day-pictures-card-link { display: block; padding: 0; }
.day-pictures-card-image { display: block; width: 100%; margin-bottom: 0; }
.day-pictures-card-image img { width: 100%; height: auto; aspect-ratio: 3 / 2; display: block; object-fit: cover; border-radius: 2px 2px 0 0; }

.day-pictures { margin-top: 0; padding-top: 0; margin-bottom: 32px; padding-bottom: 0; }
.day-pictures::before { display: none; }

@media (min-width: 768px) {
  .world-news-section--districts { margin-bottom: 0; }
  .day-pictures { margin-top: 40px; padding-top: 0; }
  .day-pictures::before { display: none; }
  .day-pictures-top { gap: 1.5rem; margin-bottom: 24px; }
  .day-pictures-header-text {
    font-size: var(--mobile-block-title-size);
    font-weight: var(--mobile-block-title-weight);
    letter-spacing: 0;
    line-height: var(--mobile-block-title-lh);
    padding-left: 0;
  }
  .day-pictures-hero-lead-inline { display: none; }
  .day-pictures-cards { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; border-top: none; margin-top: 0; padding-top: 0; }
  .day-pictures-cards .day-pictures-card:nth-child(4) { display: block; }
  .day-pictures-card-link { display: block; padding: 0; flex-direction: column; align-items: stretch; }
  .day-pictures-card-image { width: 100%; height: 200px; margin-bottom: 12px; }
  .day-pictures-card-image img { width: 100%; height: 200px; aspect-ratio: auto; }
  .day-pictures-card-link .day-pictures-hero-left { height: auto; flex: none; margin-top: 0; display: block; }
  .day-pictures-card-link .day-pictures-hero-title { padding: 0; background: transparent; background-color: transparent; font-size: var(--font-size-lg); margin: 0; }
  .day-pictures-cards .day-pictures-hero-title { font-size: var(--mobile-h3-size); }
  .day-pictures-card:not(:first-child) .day-pictures-hero-title { font-weight: 600; }
  .day-pictures-cards .day-pictures-card:not(:last-child) .day-pictures-card-link { border-bottom: none; }
  .day-pictures-cards .day-pictures-card:nth-child(3) .day-pictures-card-link { border-bottom: none; }
  .day-pictures-top { flex-direction: column; gap: 1.5rem; margin-bottom: 24px; }
  .day-pictures-ad { order: unset; width: 100%; max-width: 300px; height: auto; aspect-ratio: auto; margin-bottom: 0; margin-top: 40px; }
  .day-pictures-hero-link { flex-direction: row; gap: 24px; align-items: flex-start; }
  .day-pictures-hero .day-pictures-hero-left {
    height: 400px;
    flex: 0 0 324px;
    width: 324px;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    position: relative;
    background: #F3F3F3;
    border-radius: 4px 0 0 4px;
    overflow: hidden;
    padding: 0;
    /* Нужна визуальная "склейка" фона с фото без псевдоэлементов. */
    margin-right: -24px;
  }
  .day-pictures-hero-content { margin: 0; min-width: 0; }
  .day-pictures-hero-subtitle { padding-top: 24px; padding-left: 24px; padding-right: 24px; }
  .day-pictures-hero .day-pictures-hero-content { padding-left: 24px; padding-right: 24px; }
  .day-pictures-hero-title { padding: 0; background: transparent; font-size: 18px; line-height: 1.3; margin: 0 0 0.75rem; }
  .day-pictures-hero-lead { display: block; }
  .day-pictures-hero-image-wrapper { width: 624px; height: 400px; order: unset; }
  .day-pictures-hero-image { width: 624px; height: 400px; aspect-ratio: auto; margin-bottom: 0; border-radius: 0; }

  /* Карточки 2–5: серый фон под заголовок и только нижние скругления */
  .day-pictures-cards .day-pictures-hero-left {
    background: #F3F3F3;
    border-radius: 0 0 4px 4px;
    height: 200px;
    padding: 16px;
    overflow: hidden;
  }
  .day-pictures-cards .day-pictures-card-image { margin-bottom: 0; }
  .day-pictures-cards .day-pictures-card-image img {
    border-radius: 2px 2px 0 0;
  }
}

@media (min-width: 1320px) {
  .day-pictures { padding-top: 0; }
  .day-pictures-top { flex-direction: row; margin-bottom: 24px; align-items: flex-start; }
  .day-pictures-hero { margin-top: 0; }
  .day-pictures-hero .day-pictures-hero-left { flex: 0 0 324px; width: 324px; }
  .day-pictures-ad { width: 300px; height: 400px; margin-top: 0; }
  .day-pictures-cards { grid-template-columns: repeat(4, 1fr); margin-top: 0; padding-top: 0; }
}

/* Latest News List. Часть правил дублируется в critical.css для первого экрана; при правках проверить синхронность там. */
.latest-sidebar .block-title { margin-bottom: 1.5rem; }
.latest-sidebar .block-title a { color: inherit; text-decoration: none; }
.latest-sidebar .block-title a:hover { text-decoration: underline; }

.latest-sidebar .list { display: flex; flex-direction: column; gap: 0; }
.latest-sidebar .list .item { display: flex; flex-direction: row; align-items: baseline; gap: 12px; text-decoration: none; color: inherit; }
.latest-sidebar .list .item:not(:first-child) { padding-top: 16px; }
.latest-sidebar .list .item:hover .title { text-decoration: underline; }
.latest-sidebar .list .title { order: 1; flex: 1; min-width: 0; display: block; font-size: var(--font-size-base); line-height: var(--mobile-feed-lh); font-weight: 500; margin: 0; border-bottom: 1px solid var(--color-border); padding-bottom: 16px; }
.latest-sidebar .list .time { order: -1; flex-shrink: 0; width: 2.5em; display: block; font-size: var(--font-size-xs); font-weight: 400; color: #545658; margin: 0; line-height: normal; }
.latest-sidebar .list .empty { padding: 0.5rem 0; color: #666; font-size: var(--font-size-sm); }
.latest-sidebar-all-link { display: block; width: 100%; margin-top: 24px; padding: 0.5rem 1rem; color: #414141; background: #fff; border: 1px solid #929292; border-radius: 2px; text-decoration: none; font-size: var(--font-size-sm); font-weight: 500; text-align: center; }
.latest-sidebar-all-link:hover { color: #414141; text-decoration: underline; }

@media (max-width: 767px) {
  .latest-sidebar .list .item:nth-child(6) .title { border-bottom: none; padding-bottom: 0; }
}

@media (min-width: 768px) {
  .latest-sidebar .list .title { font-size: 0.875rem; }
}

/* Ads sidebar */
.ad-block { 
  margin: 1rem 0; 
  text-align: center; 
  min-height: 250px; /* Резервируем место для рекламы чтобы избежать CLS */
}

/* --- Media Section. Mobile: фото на всю ширину 39/50, оверлей с градиентом и текстом; с 768px — колонка/ряд и серый блок --- */
.media-section { position: relative; width: 100%; }
.media-wrapper { max-width: 1920px; margin-left: auto; margin-right: auto; display: flex; flex-direction: column; position: relative; }
.media-image-wrapper { width: 100%; aspect-ratio: 39 / 50; flex-shrink: 0; position: relative; overflow: hidden; }
.media-image-wrapper::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 80%); }
.media-image-wrapper picture { position: absolute; inset: 0; display: block; }
.media-image-wrapper .media-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-dark { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: transparent; flex: 1; min-height: auto; display: flex; flex-direction: column; justify-content: space-between; color: #fff; padding: 0; }
.media-header { padding: 24px 0 0 16px; margin-bottom: 0; display: flex; align-items: center; gap: 12px; }
.media-header::before { display: none; }
.media-header-text { font-size: var(--mobile-block-title-size); font-weight: var(--mobile-block-title-weight); letter-spacing: 0; line-height: var(--mobile-block-title-lh); text-transform: none; color: #CECECE; }
.media-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: flex-end; }
.media-content { padding: 0 16px 32px 16px; }
.media-title { font-size: var(--mobile-h2-size); line-height: var(--mobile-h2-lh); font-weight: var(--mobile-h2-weight); margin: 0 0 0.75rem 0; color: #fff; }
.media-lead { font-size: var(--font-size-base); line-height: var(--mobile-feed-lh); font-weight: var(--mobile-feed-weight); margin: 0; color: #B7B7B7; }
.media-link:hover .media-title { text-decoration: underline; }

@media (min-width: 768px) {
  .media-image-wrapper { height: 600px; aspect-ratio: auto; }
  .media-image-wrapper::after { display: block; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 80%); }
  .media-image-wrapper picture { position: absolute; inset: 0; }
  .media-image-wrapper .media-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
  .media-dark { position: absolute; inset: 0; background: transparent; justify-content: space-between; padding: 0; }
  .media-header {
    padding: 48px max(1.5rem, calc((100dvw - 1320px) / 2 + 1.5rem)) 0;
    margin-bottom: 0;
  }
  .media-header::before { display: none; }
  .media-header-text { color: #CECECE; }
  .media-link { display: flex; flex-direction: column; justify-content: flex-end; }
  .media-content {
    padding: 0 max(1.5rem, calc((100dvw - 1320px) / 2 + 1.5rem)) 48px;
  }
  .media-title { font-size: 24px; max-width: 624px; margin: 0 0 12px 0; }
  .media-lead { font-size: 16px; color: #B7B7B7; margin: 0; max-width: 624px; }
}

@media (min-width: 1320px) {
  .media-wrapper { flex-direction: column; }
  .media-image-wrapper { width: 100%; max-width: 1920px; height: 600px; aspect-ratio: auto; }
  .media-image { width: 100%; height: 100%; object-fit: cover; }
}

/* --- News Article. Mobile-first: одна колонка; с 768px — служебный 1000px, основной 688 + 40 + rail 240 --- */
.news-article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.news-article .article-main { order: 1; }
.news-article .article-service { order: 0; }
.news-article .right-rail {
  order: 2;
  width: 100%;
  position: static;
  align-self: start;
}
.news-article .right-rail .ad-block {
  height: 250px;
  margin-top: 0;
  margin-bottom: 0;
}

.news-article .article-related--desktop-only {
  display: none;
}

.news-article .article-related--mobile-only {
  display: block;
  order: 3; /* after .right-rail on mobile */
  margin-top: 0;
  margin-bottom: 32px;
}

/* Top banner ad slot */
.article-top-banner {
  width: 100%;
  background-color: #F8F8F8;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  overflow: clip;
}

.article-top-banner__inner {
  width: 100%;
  max-width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  overflow: hidden;
  overflow: clip;
}

.article-top-banner__inner > * {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Ensure nested ad markup can't exceed the slot bounds */
.article-top-banner__inner iframe,
.article-top-banner__inner img,
.article-top-banner__inner video,
.article-top-banner__inner object,
.article-top-banner__inner embed {
  max-width: 100%;
  max-height: 100%;
}

@media (min-width: 768px) {
  /* Контейнер 1000px; 688 + 40 + 240 центрированы (по бокам остаётся по 16) */
  .news-article {
    grid-template-columns: 1fr 688px 40px 240px 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    max-width: 1000px;
    padding: 0;
  }

  .news-article .article-service {
    grid-column: 1 / -1;
  }

  .news-article .article-main {
    grid-column: 2;
    width: 688px;
  }

  .news-article .right-rail {
    grid-column: 4;
    position: sticky;
    top: 24px;
    width: 240px;
    margin-bottom: 32px;
  }

  .news-article .right-rail .ad-block {
    height: 400px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .article-top-banner {
    height: 152px;
  }

  .article-top-banner__inner {
    max-width: 1000px;
    height: 120px;
    padding: 0 1rem;
  }

  .article-top-banner__inner > * {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  /* Основной контент: фото 8 - подпись 24 - текст 24 - соцсети 24 - теги 24 - Читайте также 32 */
  .news-article .article-main .article-image { margin: 0 0 8px 0; }
  .news-article .article-main .image-caption { margin-top: 8px; margin-bottom: 24px; }
  .news-article .article-main .content { margin: 0 0 24px 0; }
  .news-article .article-main .article-subscribe { margin: 0 0 24px 0; }
  .news-article .article-main .meta--tags { margin-top: 0; margin-bottom: 24px; }
  .news-article .article-main .article-related--list { margin-top: 0; margin-bottom: 32px; }

  .news-article .article-related--desktop-only { display: block; }
  .news-article .article-related--mobile-only { display: none; }
}

.article-main {
  width: 100%;
}

/* Служебный блок: крошки, заголовок, дата, поделиться, разделитель. Отступы: 32 - крошки - 16 - заголовок - 16 - дата - 16 - разделитель - 24 */
.article-service {
  padding-top: 32px;
}
.article-service .breadcrumbs {
  margin: 0 0 16px 0;
}
.article-service__title {
  font-family: 'Onest', 'Onest Fallback', sans-serif;
  font-size: 28px;
  line-height: 2.25rem;
  font-weight: 900;
  margin: 0 0 16px 0;
}
.article-service .article-meta-row {
  margin-bottom: 16px;
}
.article-service__divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0 0 24px 0;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.article-meta-row .article-date {
  margin-bottom: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
.article-meta-row .share-buttons {
  margin-top: 0;
  margin-bottom: 0;
}
.article-main .lead { font-size: var(--font-size-md); line-height: 1.75rem; color: var(--color-text-secondary); margin-bottom: 1rem; }
.article-main .meta { font-size: var(--font-size-sm); color: #666; margin-top: 1rem; }
.article-main .meta--tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-main .meta-tag {
  display: inline-block;
  padding: 8px;
  border: 1px solid #000;
  color: #000;
  text-decoration: none;
  font-size: var(--font-size-xs);
  transition: background-color 0.15s ease;
}
.article-main .meta-tag:hover {
  background: #f0f0f0;
  color: #000;
  text-decoration: none;
}
.article-main .content { margin: 1.5rem 0; }

/* Override for landing style - content should not have top margin */
.landing-content-wrapper .article-main .content {
  margin-top: 0;
}

.article-image { margin: 0 0 1rem 0; }
.article-image img { width: 100%; height: auto; display: block; }

@media (max-width: 767px) {
  /* Mobile: убрать разделитель под заголовком и сделать отступы минимальными */
  .article-service {
    padding-top: 16px;
  }
  .article-service .breadcrumbs {
    margin-bottom: 8px;
  }
  .article-service__title {
    margin-bottom: 10px;
  }
  .article-service .article-meta-row {
    margin-bottom: 8px;
  }
  .article-service__divider {
    display: none;
    margin: 0;
  }

  /* Mobile: уменьшить зазор grid между служебным блоком и фото */
  .news-article .article-main {
    margin-top: -1.5rem; /* -24px */
  }
}

@media (max-width: 767px) {
  .news-article .article-main .article-image {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    box-sizing: border-box;
  }
  .news-article .article-main .article-image picture,
  .news-article .article-main .article-image picture img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
  }
  .news-article .article-main .article-image--vertical .article-image__container {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .news-article .article-main .article-image--vertical img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    aspect-ratio: 3 / 2;
  }
  .news-article .article-main .article-image .image-caption {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.article-image--vertical .article-image__container {
  width: 100%;
  max-width: 1200px;
  height: 800px;
  background-color: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-image--vertical picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.article-image--vertical img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Специфичные стили для главного изображения статьи (hero) — ширина по колонке 688px */
.article-main .article-image--vertical .article-image__container {
  max-width: 688px;
  height: 400px;
}
.image-caption { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-top: 0.375rem; line-height: 1.4; }

/* Article video container */
.article-video { 
  margin: 1.5rem 0; 
  display: flex; 
  justify-content: center;
}
.article-video iframe { 
  max-width: 100%; 
  width: 100%;
  min-height: 400px;
  border: none; 
}

/* Video badge icon */
.video-badge {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
  color: #dc2626;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

/* Adjust size in different contexts */
.hero-title .video-badge {
  width: 1.5rem;
  height: 1.5rem;
}

.latest .list .video-badge {
  width: 1rem;
  height: 1rem;
  margin-right: 0.375rem;
}

/* Day picture article */
.day-picture-article { max-width: 48rem; margin: 0 auto; }
.day-picture-article h1 { 
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl); 
  line-height: 2.25rem; 
  font-weight: 700; 
  margin-bottom: 1rem; 
}
.day-picture-article .lead { font-size: var(--font-size-md); line-height: 1.75rem; color: var(--color-text-secondary); margin-bottom: 1rem; }
.day-picture-article .content { max-width: none; margin: 1rem 0; }
.day-picture-article .meta { margin-top: 1.5rem; font-size: var(--font-size-sm); color: #666; }
.day-picture-article picture img { width: 100%; height: auto; margin-bottom: 1rem; }

/* --- Landing Style Article --- */
.article-landing {
  max-width: 100%;
  padding: 0;
  display: block;
}

/* Override news-article grid for landing style */
.article-landing.news-article {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.landing-hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  overflow: hidden;
  margin-bottom: 0;
}

.landing-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.landing-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 0 1rem 3rem;
}

.landing-hero-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: #fff;
}

@media (min-width: 1320px) {
  .landing-hero-content {
    max-width: 1320px;
  }
}

.landing-title {
  font-size: var(--font-size-4xl);
  line-height: 1.1;
  font-weight: 700;
  margin: 1rem 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.landing-date {
  display: block;
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.landing-lead {
  font-size: var(--font-size-xl);
  line-height: 1.4;
  margin: 1rem 0 0;
  color: rgba(255,255,255,0.95);
  max-width: 800px;
}

.landing-hero-noimage {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--color-primary) 100%);
  padding: 4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-hero-noimage .landing-hero-content {
  text-align: center;
}

.landing-image-caption {
  background: #f9fafb;
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
}

.landing-content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1320px) {
  .landing-content-wrapper {
    max-width: 1320px;
    padding: 2rem 1.5rem;
  }
}

.landing-content-wrapper .article-main {
  max-width: 800px;
  grid-column: 1;
  order: 1;
}

.landing-content-wrapper .right-rail {
  grid-column: 2;
  order: 2;
  width: 300px;
}

.landing-content-wrapper .content {
  line-height: 1.65;
  font-size: var(--font-size-lg);
}

.landing-content-wrapper .content p {
  margin: 0 0 1rem 0;
}

.landing-content-wrapper .content h2,
.landing-content-wrapper .content h3,
.landing-content-wrapper .content h4 {
  margin: 1.5rem 0 0.75rem 0;
}

.landing-content-wrapper .content ul,
.landing-content-wrapper .content ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.landing-content-wrapper .content li {
  margin-bottom: 0.5rem;
}

/* Landing style: breadcrumbs on hero */
.landing-hero .breadcrumbs {
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5rem;
}

.landing-hero .breadcrumbs a {
  color: rgba(255,255,255,0.9);
}

.landing-hero .breadcrumbs li:after {
  color: rgba(255,255,255,0.6);
}

.landing-hero .badge-breaking {
  font-size: var(--font-size-base);
  padding: 0.5rem 1rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Responsive adjustments for landing style. Mobile-first */
.landing-content-wrapper {
  grid-template-columns: 1fr;
}

.landing-hero {
  height: 60vh;
  min-height: 350px;
}

.landing-title {
  font-size: var(--font-size-xl);
}

.landing-lead {
  font-size: var(--font-size-base);
}

.landing-hero-overlay {
  padding: 0 1rem 2rem;
}

@media (min-width: 768px) {
  .landing-hero {
    height: 70vh;
    min-height: 400px;
  }

  .landing-title {
    font-size: var(--font-size-2xl);
  }

  .landing-lead {
    font-size: var(--font-size-md);
  }
}

@media (min-width: 1320px) {
  .landing-content-wrapper {
    grid-template-columns: 1fr 300px;
  }
}

/* --- Badges --- */
/* Базовые .badge, .badge-breaking, .badge-featured, .badge-pinned заданы в components.css (и в critical для первого экрана). */

/* --- Breadcrumbs --- */
.breadcrumbs { color: #666; margin: 0.5rem 0 24px; font-size: var(--font-size-sm); }

/* Убираем верхний отступ у крошек на страницах статей (отступ создаётся баннером и .article-service) */
body.news-article-page .article-service .breadcrumbs {
  margin-top: 0;
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:after { content: "\203A"; color: #bbb; margin-left: 0.5rem; }
.breadcrumbs li:last-child:after { content: ""; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* --- Content & Meta --- */
.content {
  line-height: 1.5; /* 24px для 16px текста */
  font-size: var(--font-size-base); /* 16px */
  font-weight: 400;
}
.content p { margin: 0 0 1rem 0; }
.content h2, .content h3, .content h4 { margin: 1.5rem 0 0.75rem 0; }
.content ul, .content ol { margin: 0 0 1rem 0; padding-left: 1.5rem; }
.content li { margin-bottom: 0.5rem; }
.content figure { margin: 1rem 0; }
.content figure img { max-width: 100%; height: auto; display: block; }
.content img { max-width: 100%; height: auto; margin: 1rem 0; }
.content blockquote { 
  background: #f0f7ff; 
  border-left: 4px solid var(--color-primary-hover); 
  padding: 1.5rem 1.5rem 1rem 2rem; 
  margin: 1.5rem 0; 
  color: #1e293b; 
  font-size: var(--font-size-md);
  line-height: 1.7;
  font-style: italic;
  font-weight: 500;
  position: relative;
}
.content blockquote:before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: var(--font-size-4xl);
  line-height: 1;
  color: var(--color-primary-hover);
  opacity: 0.3;
  font-family: Georgia, serif;
}

/* Raw HTML block (for iframes, embeds) - centered */
.content .embed-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 100%;
}

.content .embed-container iframe {
  max-width: 100%;
  border: none;
}

/* Подписка в футере статьи: разделитель — 16 — (слева Читайте НК в соцсетях + Макс/ТГ, вертикальная черта 32, справа Подписаться на + Дзен) — 16 — разделитель. Десктоп. */
.article-subscribe {
  margin: 24px 0 1.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.article-subscribe__inner {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.article-subscribe__group {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.article-subscribe__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.3;
  flex-shrink: 0;
}
.article-subscribe__links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.article-subscribe__vdivider {
  display: block;
  width: 1px;
  align-self: stretch;
  background: var(--color-border);
  flex-shrink: 0;
}
.article-subscribe__link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.article-subscribe__link img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.article-subscribe__group--left .article-subscribe__link img {
  width: 32px;
  height: 32px;
}
.article-subscribe__group--right .article-subscribe__link img {
  width: 82px;
  height: 24px;
}

@media (max-width: 767px) {
  .article-subscribe {
    margin-bottom: 0;
  }
  .article-subscribe__vdivider {
    display: block;
  }
  .article-subscribe__inner {
    flex-wrap: nowrap;
    gap: 12px;
  }

  /* Под мобильную ширину: оставляем весь блок в одной строке */
  .article-subscribe__group {
    justify-content: flex-start;
    gap: 8px;
  }
  .article-subscribe__label {
    font-size: var(--font-size-xs);
    flex-shrink: 1;
    min-width: 0;
  }
  .article-subscribe__links {
    flex-shrink: 1;
    gap: 6px;
  }
  .article-subscribe__group--left .article-subscribe__link img {
    width: 28px;
    height: 28px;
  }
  .article-subscribe__group--right .article-subscribe__link img {
    width: 64px;
    height: 20px;
  }
}

/* Subscribe block (если используется вне статьи) */
.subscribe-block {
  display: flex;
  gap: 8px;
  margin: 40px 0 1.5rem 0;
  padding: 0;
  border: none;
}

.subscribe-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 306px;
  height: 48px;
  background: #F8F8F8;
  text-decoration: none;
  color: #000;
  font-size: var(--font-size-base);
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.subscribe-link__icon {
  flex-shrink: 0;
}
.subscribe-link__icon--dzen {
  height: 24px;
  width: auto;
}

.subscribe-link:hover {
  background: #e8e8e8;
  text-decoration: none;
}

.meta { font-size: var(--font-size-sm); color: #666; }

/* --- Live Event Styles --- */

/* Live indicator with animated dot */
.live-indicator { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.live-dot { 
  width: 8px; 
  height: 8px; 
  background: #ef4444; 
  border-radius: 50%; 
  animation: pulse 2s ease-in-out infinite;
}
.live-text { 
  font-size: var(--font-size-sm); 
  font-weight: 700; 
  color: #ef4444; 
  letter-spacing: 0.05em;
}

/* Ended state */
.live-indicator.ended .live-dot { 
  background: #9ca3af; 
  animation: none;
}
.live-indicator.ended .live-text { color: #9ca3af; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Live event preview on homepage */
.live-event-preview { margin-bottom: 2rem; }
.live-event-link { 
  display: block; 
  text-decoration: none; 
  color: inherit; 
  border: 1px solid var(--color-border-light);
  transition: border-color 0.2s;
}
.live-event-link:hover { border-color: #ef4444; }

.live-event-content { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 1rem;
  padding: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .live-event-content { 
    grid-template-columns: 1fr 1fr; 
    gap: 2rem;
    padding: 2rem;
  }
}

.live-event-title { 
  font-size: var(--font-size-2xl); 
  line-height: 2.25rem; 
  font-weight: 600; 
  margin: 0 0 0.75rem 0;
}
.live-event-lead { 
  font-size: var(--font-size-base); 
  line-height: 1.5rem; 
  color: var(--color-text-secondary); 
  margin: 0;
}

.live-event-image img { 
  width: 100%; 
  height: auto; 
  display: block;
}

/* Live event page */
.live-event { max-width: 800px; margin: 0 auto; }
.live-event h1 { 
  font-size: var(--font-size-3xl); 
  line-height: 2.5rem; 
  font-weight: 700; 
  margin: 1rem 0;
}
.live-event .lead { 
  font-size: var(--font-size-lg); 
  line-height: 1.75rem; 
  color: var(--color-text-secondary); 
  margin-bottom: 1.5rem;
}

/* Live updates timeline */
.live-updates { margin-top: 3rem; }
.live-updates h2 { 
  font-size: var(--font-size-xl); 
  font-weight: 600; 
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border-light);
}

.live-update-item { 
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.update-time { 
  font-size: var(--font-size-sm); 
  font-weight: 600; 
  color: #ef4444;
  padding-top: 0;
}

@media (min-width: 768px) {
  .live-update-item {
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
  }
  .update-time {
    padding-top: 0.25rem;
  }
}

.update-headline { 
  font-size: var(--font-size-lg); 
  line-height: 1.75rem; 
  font-weight: 600; 
  margin: 0 0 0.5rem 0;
}

.update-body { 
  line-height: 1.6; 
  color: var(--color-text-secondary);
}

.update-body p { margin: 0 0 1rem 0; }
.update-body p:last-child { margin-bottom: 0; }

.update-image { margin-top: 1rem; }
.update-image img { 
  width: 100%; 
  height: auto; 
  display: block;
}

.live-update-item:last-child { border-bottom: 0; }

/* --- Search Results --- */
.search-query-info { color: var(--color-text-muted); margin-bottom: 1.5rem; font-size: var(--font-size-sm); }
.search-query-info strong { color: var(--color-text-strong); }

.search-results { margin-bottom: 2rem; }
.search-result-item { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border-light); }
.search-result-item:last-child { border-bottom: none; }

.search-result-meta { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-bottom: 0.5rem; }
.search-result-meta time { font-variant-numeric: tabular-nums; }

.search-result-title { font-size: var(--font-size-lg); line-height: 1.5; font-weight: 600; margin: 0 0 0.5rem 0; }
.search-result-title a { color: inherit; text-decoration: none; }
.search-result-title a:hover { text-decoration: underline; }
.search-result-title .badge { margin-right: 0.5rem; }

.search-result-lead { color: var(--color-text-secondary); margin: 0 0 0.75rem 0; line-height: 1.6; }

.search-result-image { margin-top: 0.75rem; }
.search-result-image img { width: 100%; height: auto; display: block; border-radius: 4px; }

.search-no-results { padding: 2rem 0; text-align: center; color: var(--color-text-muted); }
.search-no-results strong { color: var(--color-text-strong); }

.search-empty { padding: 2rem 0; text-align: center; color: var(--color-text-muted); }

.pagination { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; margin: 2rem 0; padding: 1rem 0; }
.pagination-info { color: var(--color-text-muted); font-size: var(--font-size-sm); order: 2; }
.pagination-link { padding: 0.5rem 1rem; background: var(--color-bg-muted); color: var(--color-text-strong); text-decoration: none; border-radius: 4px; transition: background 0.2s ease; }
.pagination-link:hover { background: var(--color-border-light); }

@media (min-width: 768px) {
  .pagination { flex-direction: row; gap: 1rem; }
  .pagination-info { order: unset; }
}

/* --- Footer --- */
.site-footer {
    background: #222222;
    color: #fff;
    padding: 32px 0 1.5rem;
    margin-top: 0;
    border-top: none;
}

@media (max-width: 767px) {
  .site-footer .container {
    display: flex;
    flex-direction: column;
  }
  .site-footer .footer-social { order: 1; margin-bottom: 0; }
  .site-footer .footer-nav { order: 2; }
  .site-footer .footer-legal { order: 3; }
  .site-footer .footer-legal { margin-bottom: 24px; }
  .site-footer .footer-liveinternet { order: 4; margin: 0 0 24px 0; }
  .site-footer .footer-copyright { order: 5; display: flex; justify-content: space-between; align-items: center; }
  .site-footer .category-menu-social-title { color: #CDCDCD; }
  .site-footer .category-menu-social { border-bottom: none; padding-top: 0; padding-bottom: 0; }
  .site-footer .category-menu-divider { background: #404040; }
  .footer-copyright-age { color: #7C7C7C; }
}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 0;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    padding: 0;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 32px 0 40px;
    margin-top: 0;
  }
  .site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .site-footer .footer-social { order: 1; margin-bottom: 0; text-align: center; }
  .site-footer .footer-nav { order: 2; margin-bottom: 0; }
  .site-footer .footer-legal { order: 3; margin-bottom: 0; }
  .site-footer .footer-liveinternet { order: 4; margin: 0; }
  .site-footer .footer-copyright { order: 5; align-self: stretch; display: flex; justify-content: space-between; align-items: center; }
  .footer-legal {
    margin-bottom: 0;
    text-align: center;
  }
  .footer-legal-text {
    max-width: 688px;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0;
    align-items: center;
    justify-content: center;
  }

  .footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-social .category-menu-social-title {
    display: block;
    color: #CDCDCD;
    margin: 0 0 12px 0;
  }

  .footer-social .category-menu-social {
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px 0;
    padding: 0;
  }

  .footer-social .category-menu-divider {
    display: block;
    background: #404040;
    margin: 0;
    width: 100%;
  }

  .footer-social .category-menu-social-link img {
    width: 48px;
    height: 48px;
  }

  .footer-copyright {
    justify-content: center;
    gap: 16px;
  }
}

.footer-social {
  padding: 0;
  margin-bottom: 24px;
}


.footer-legal-text {
    margin: 0;
    color: #CDCDCD;
}

.footer-legal-link {
    color: inherit;
    text-decoration: underline;
}

.footer-legal-link:hover {
    color: #fff;
}

/* Навигационные ссылки */
.footer-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
}

.footer-nav-link:hover {
    color: #fff;
}

/* LiveInternet logo */
.footer-liveinternet {
    padding: 0;
    margin-bottom: 0.5rem;
}

.footer-liveinternet img {
    vertical-align: middle;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.footer-liveinternet a {
    display: inline-block;
}

/* Копирайт */
.footer-copyright {
    text-align: left;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #CDCDCD;
    padding: 0;
}

/* --- World News Section --- */
.world-news-section {
  position: relative;
  padding-top: 0;
  margin-bottom: 32px;
}
.world-news-section::before {
  content: '';
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: var(--color-border);
  z-index: 0;
}

@media (min-width: 768px) {
  .world-news-section {
    margin-bottom: 40px;
    padding-top: 2rem; /* 32px: от линии до заголовка */
  }
  .world-news-section::before { display: block; }
  .world-news-section--districts { padding-top: 0; margin-bottom: 0; }
  .world-news-section--districts::before { display: none; }
  .world-news-section .block-title::after { display: none; }
}

/* Отступ сверху для блока «Новости районов» (как margin-bottom у .world-news-section) */
.district-news-wrapper {
  margin-top: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .district-news-wrapper {
    margin-top: 40px;
    margin-bottom: 48px;
  }
}

.world-news-section .block-title {
  margin-bottom: 24px;
}

.world-news-section--districts .block-title {
  margin-bottom: 24px;
}

.world-news-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.world-news-card {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  color: inherit;
  text-decoration: none;
}

.world-news-lead {
  margin: 8px 0 8px 0;
  font-size: var(--font-size-base);
  line-height: var(--mobile-feed-lh);
  font-weight: var(--mobile-feed-weight);
  color: var(--color-text-muted);
}

.world-news-lead:empty {
  display: none;
}

.world-news-section--districts .world-news-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.world-news-district-tag {
  display: block;
  color: #0046E3;
  font-size: var(--font-size-xs);
  font-weight: 500;
  margin: 0 0 8px 0;
}

.world-news-grid--districts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  row-gap: 0;
}

.world-news-section--districts .world-news-card:first-child {
  grid-column: 1 / -1;
}

.world-news-section--districts .world-news-card:not(:last-child) {
  border-bottom: none;
  padding-bottom: 8px;
}

.world-news-section--districts .world-news-card:first-child {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.world-news-section--districts .world-news-card:not(:first-child):not(:last-child)::after {
  display: none;
}

@media (max-width: 767px) {
  .world-news-section--districts .world-news-card:nth-child(4) {
    display: none;
  }

  .world-news-card:first-child {
    padding-top: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .world-news-card:first-child .world-news-title { order: 1; }
  .world-news-card:first-child .world-news-lead { order: 2; }
  .world-news-card:first-child picture { order: 3; width: 100%; }

  .world-news-card:first-child .world-news-image {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 35 / 40;
    object-fit: cover;
    margin-bottom: 0;
    margin-top: 8px;
  }

  .world-news-card:first-child .world-news-title {
    flex: none;
    font-size: var(--mobile-h2-size);
    font-weight: var(--mobile-h2-weight);
    line-height: var(--mobile-h2-lh);
  }
}

.world-news-card picture {
  flex-shrink: 0;
}

.world-news-image {
  width: 100px;
  height: 80px;
  max-width: 100px;
  margin-bottom: 0;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.world-news-title {
  flex: 1;
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--mobile-feed-weight);
  line-height: var(--mobile-feed-lh);
}

/* На мобильной разделитель только под колонкой заголовка у карточек 2, 3 (не у первой) */
.world-news-card:not(:last-child) {
  padding-bottom: 16px;
  margin-bottom: 0;
}

.world-news-card:first-child:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.world-news-card:not(:first-child):not(:last-child) {
  position: relative;
  border-bottom: none;
}

.world-news-card:not(:first-child):not(:last-child)::after {
  content: '';
  position: absolute;
  left: 112px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-border);
}

.world-news-card:not(:first-child) .world-news-title {
  font-weight: 600;
}

.world-news-card:hover .world-news-title {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .world-news-section .block-title {
    margin-bottom: 16px;
  }

  .world-news-title {
    font-size: var(--mobile-h3-size);
  }

  .world-news-section--districts .world-news-title {
    font-size: var(--font-size-base);
  }

  .world-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .world-news-section--districts .world-news-card:first-child {
    grid-column: auto;
  }

  .world-news-section--districts .world-news-card:nth-child(4) {
    display: block;
  }

  .world-news-section--districts .world-news-card:not(:last-child) {
    border-bottom: none;
    padding-bottom: 0;
  }

  .world-news-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .world-news-card:first-child picture {
    width: 100%;
    order: 1;
  }

  .world-news-card:first-child .world-news-title {
    order: 2;
  }

  .world-news-card:first-child .world-news-lead {
    display: none;
  }

  .world-news-card picture {
    flex-shrink: unset;
  }

  .world-news-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin-bottom: 12px;
  }

  .world-news-title {
    flex: none;
    margin: 0;
  }

  .world-news-card:not(:last-child),
  .world-news-card:first-child:not(:last-child) {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .world-news-card:not(:first-child):not(:last-child)::after {
    content: none;
    display: none;
  }

  .world-news-card .world-news-title {
    font-weight: 600;
  }

  /* Desktop card style (match "СМИ2" look):
     - title is over photo (white, 16px, padding: 12px sides / 16px bottom)
     - dark gradient overlay on photo
     - underline removed on hover
     - photo zoom on hover */
  .world-news-section:not(.world-news-section--districts) .world-news-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden; /* ensures zoom + gradient stay clipped */
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card picture {
    position: relative;
    overflow: hidden; /* clip zoomed image */
    border-radius: 4px;
    display: block;
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card .world-news-image {
    position: relative;
    z-index: 0;
    margin-bottom: 0; /* keep card height stable */
    transform: scale(1);
    transition: transform var(--nk-link-hover-transition-duration) var(--nk-link-hover-transition-ease);
    will-change: transform;
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card picture::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    /* darken bottom part: stops at 40% and 100% */
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.65) 40%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card .world-news-title {
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 16px;
    bottom: 16px;
    margin: 0;
    font-size: var(--font-size-md);
    color: #fff;
    text-decoration: none;
    line-height: 1.3;
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card:hover .world-news-title {
    text-decoration: none;
  }

  .world-news-section:not(.world-news-section--districts) .world-news-card:hover .world-news-image {
    transform: scale(var(--nk-link-hover-zoom-scale));
  }
}

@media (min-width: 1320px) {
  .world-news-grid {
    grid-template-columns: repeat(4, 300px);
  }
}

/* Блок «Читайте также» под статьёй (внутри .article-main): фон F7F7F7, паддинг 24, список без фото, разделители 16px */
.article-related--list {
  background: #F7F7F7;
  padding: 24px;
  list-style: none;
}
.article-related--list .article-related__title {
  margin: 0 0 8px 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1;
}
.article-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-related__item {
  margin: 0;
  margin-top: 12px;
  padding: 12px 0 0 0;
  border-top: 1px solid var(--color-border);
}
.article-related__item:first-child {
  margin-top: 0;
  padding-top: 16px;
  border-top: 2px solid #000;
}
.article-related__link {
  color: inherit;
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.4;
}
.article-related__link:hover {
  text-decoration: underline;
}

/* Legacy: блок «Читайте также» вне статьи (если используется) */
.article-related {
  margin-top: 24px;
}

/* Блок СМИ2: подложка на всю ширину экрана. Отступ сверху задаёт предыдущий блок (Читайте также — 32px), лишний не добавляем */
.article-smi2 {
  margin-top: 0;
}
.article-smi2__inner {
  width: 100%;
  box-sizing: border-box;
  background: #323232;
  padding: 24px 0;
  border-radius: 0;
}
.article-smi2__logo {
  margin-bottom: 12px;
}
.article-smi2__logo img {
  height: 22px;
  width: auto;
  display: block;
}
.article-smi2__container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .article-smi2__container {
    padding: 0 1.5rem;
  }
}
.article-smi2__content {
  margin-top: 0;
}

/* Отступ между карточками через класс smi2-card; у первой и последней обнуляем боковой margin */
.article-smi2__content table td {
  padding: 0;
  vertical-align: top;
}
.article-smi2__content .smi2-card {
  margin: 0 12px;
}
.article-smi2__content table td:first-child .smi2-card {
  margin-left: 0;
}
.article-smi2__content table td:last-child .smi2-card {
  margin-right: 0;
}
