/*
Theme Name: Oceanolog
Description: Научно-популярная тема для сайта Oceanolog.ru. Иммерсивный дизайн, отражающий стихии воды, земли и неба.
Version: 1.0
*/

/* ===== КОРНЕВЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
  --color-primary: #0d2b35;
  --color-secondary: #2a9d8f;
  --color-bg: #edf2f4;
  --color-text: #2b2d42;
  --color-text-light: #6c757d;
  --color-accent: #e76f51;
  --color-card: #ffffff;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "PT Serif", serif;
  --font-meta: "Open Sans", sans-serif;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: linear-gradient(to bottom, #edf2f4, #e1ebf0);
}

/* ===== ХЕДЕР ===== */
.site-header {
  background: var(--color-primary) !important;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(13, 43, 53, 0.3);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-branding .logo {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
}

.site-branding .tagline {
  color: var(--color-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Главное меню */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-navigation a {
  color: white;
  font-family: var(--font-meta);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.main-navigation a:hover {
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
}

/* Кнопка */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: linear-gradient(135deg, var(--color-secondary), #238f7a);
  color: white;
  border-radius: 6px;
  font-family: var(--font-meta);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(42, 157, 143, 0.3);
}

.btn:hover {
  background: linear-gradient(135deg, var(--color-accent), #e55c3a);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 111, 81, 0.4);
  color: white;
}

/* ГЕРОЙ-СЕКЦИЯ */
.hero-section {
  position: relative;
  width: 100%;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
  overflow: hidden;
  border-bottom: 8px solid var(--color-secondary);
}

.hero-content {
  height: 70vh; /* Высота героя */
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Абсолютно растянутое изображение без отступов */
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}

/* Затемнение для текста */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 43, 53, 0.6);
  z-index: 2;
}

/* Текст поверх изображения */
.hero-text-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.hero-text-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  font-weight: 800;
  line-height: 1.1;
}

.hero-text-content .tagline {
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* Стили для текста в герое */
.hero-text-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  padding-top: 2rem;
}

.hero-text-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 800;
}

.hero-text-content .tagline {
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  font-style: italic;
  opacity: 0.9;
}

/* Затемнение изображения для лучшей читаемости текста */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 43, 53, 0.4);
  /* Полупрозрачный темный слой */
  z-index: 1;
}

/* ОСНОВНОЙ КОНТЕНТ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

/* Заголовки секций */
h2 {
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-secondary);
  font-weight: 700;
}

/* КАРТОЧКИ СТАТЕЙ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: var(--color-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(13, 43, 53, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 43, 53, 0.1);
  width: 50%;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13, 43, 53, 0.2);
}

.card-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 1.8rem;
}

.card-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-secondary), #238f7a);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-meta);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-content h3 a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-content h3 a:hover {
  color: var(--color-accent);
}

.card-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.card-meta {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-text-light);
  border-top: 1px solid rgba(13, 43, 53, 0.1);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* САЙДБАР */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--color-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(13, 43, 53, 0.1);
  margin-bottom: 2rem;
  border: 1px solid rgba(13, 43, 53, 0.1);
}

.sidebar-widget h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--color-secondary);
  font-weight: 700;
}

/* ФУТЕР */
.site-footer {
  background: linear-gradient(135deg, var(--color-primary), #0a2129);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-widget h4 {
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 0.8rem;
}

.footer-widget a {
  color: #d1d1d1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-widget a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #ccc;
  font-size: 0.9rem;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .content-with-sidebar {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Заголовки в карточках */
.card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

/* ===== ИСПРАВЛЕНИЕ ЦВЕТОВ ССЫЛОК ===== */
a {
  color: var(--color-primary);
  /* Теперь ссылки цвета #0d2b35 */
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-accent);
  /* Коралловый при наведении */
}

/* Ссылки в основном контенте */
.article-content a,
.page-content a {
  color: var(--color-secondary);
  /* Бирюзовый для ссылок в тексте */
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.article-content a:hover,
.page-content a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ===== ИСПРАВЛЕНИЕ ШИРИНЫ КОНТЕНТА ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Основной контент занимает больше места */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 3fr 1fr;
  /* Было 2fr 1fr */
  gap: 3rem;
  margin: 3rem 0;
}

/* Широкая версия для статей */
.single-article {
  max-width: none;
  /* Убираем ограничение ширины */
  width: 100%;
}

/* Контент статьи занимает всю ширину основной колонки */
.article-content {
  width: 100%;
  max-width: none;
  line-height: 1.7;
}

/* ===== ИСПРАВЛЕНИЕ БОКОВОЙ КОЛОНКИ ===== */
.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ===== */
/* Убираем синие цвета у виджетов */
.widget a {
  color: var(--color-text);
}

.widget a:hover {
  color: var(--color-accent);
}

/* Исправляем поиск */
.search-form {
  display: flex;
  margin: 1rem 0;
}

.search-form input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
}

.search-form button {
  padding: 0.8rem 1.5rem;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Стили для виджетов */
.widget_recent_entries ul,
.widget_archive ul,
.widget_categories ul {
  list-style: none;
  padding: 0;
}

.widget_recent_entries li,
.widget_archive li,
.widget_categories li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget_recent_entries li:last-child,
.widget_archive li:last-child,
.widget_categories li:last-child {
  border-bottom: none;
}

/* ===== КОНТЕЙНЕРЫ И СЕТКИ ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Для широких экранов 1600px+ */
@media (min-width: 1600px) {
  .container {
    max-width: 1560px;
    padding: 0 40px;
  }

  .header-container {
    max-width: 1560px;
  }

  .footer-container {
    max-width: 1560px;
  }
}

/* ===== СЕТКА СТАТЕЙ ДЛЯ ШИРОКИХ ЭКРАНОВ ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Планшеты */
@media (min-width: 768px) and (max-width: 1199px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Десктоп 1200px - 1599px */
@media (min-width: 1200px) and (max-width: 1599px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Широкие экраны 1600px+ */
@media (min-width: 1600px) {
  .article-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }

  .article-card {
    border-radius: 16px;
  }

  .card-content {
    padding: 2rem;
  }

  .card-content h3 {
    font-size: 1.5rem;
  }
}

/* ===== САЙДБАР И ОСНОВНОЙ КОНТЕНТ ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

@media (min-width: 1600px) {
  .content-with-sidebar {
    grid-template-columns: 3fr 1fr;
    gap: 4rem;
  }

  .sidebar-widget {
    padding: 2.5rem;
  }

  .sidebar-widget h3 {
    font-size: 1.5rem;
  }
}

/* ===== ХЕДЕР ===== */
@media (min-width: 1600px) {
  .site-header {
    padding: 1.5rem 0;
  }

  .site-branding .logo {
    font-size: 2.2rem;
  }

  .site-branding .tagline {
    font-size: 1.1rem;
  }

  .main-navigation a {
    font-size: 1.1rem;
    padding: 0.7rem 1.2rem;
  }

  .btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
  }
}

/* ===== ТИПОГРАФИКА ДЛЯ ШИРОКИХ ЭКРАНОВ ===== */
@media (min-width: 1600px) {
  body {
    font-size: 20px;
    line-height: 1.5;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.3rem;
  }

  h3 {
    font-size: 2rem;
  }

  h4 {
    font-size: 1.5rem;
  }

  .card-content h3 {
    font-size: 1.6rem;
    line-height: 1.4;
  }

  .card-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}

/* ===== ФУТЕР ===== */
@media (min-width: 1600px) {
  .site-footer {
    padding: 5rem 0 2.5rem;
  }

  .footer-container {
    gap: 4rem;
  }

  .footer-widget h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .footer-widget li {
    margin-bottom: 1rem;
  }

  .footer-widget a {
    font-size: 1.1rem;
  }
}

/* ===== СТРАНИЦА СТАТЬИ ===== */
@media (min-width: 1600px) {
  .single-article {
    max-width: 1000px;
    margin: 0 auto;
  }

  .article-header h1 {
    font-size: 3.2rem;
    line-height: 1.2;
  }

  .article-content {
    font-size: 1.2rem;
    line-height: 1.8;
  }

  .article-content h2 {
    font-size: 2.4rem;
    margin: 3rem 0 1.5rem;
  }

  .article-content h3 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
  }
}

/* ===== УТИЛИТЫ ДЛЯ ШИРОКИХ ЭКРАНОВ ===== */
@media (min-width: 1600px) {
  /* Увеличиваем отступы */
  .section-spacing {
    margin: 4rem 0;
  }

  /* Улучшаем карточки */
  .card-image {
    height: 250px;
  }

  /* Увеличиваем иконки */
  .social-link {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
  }
}

.wide-container {
  max-width: 1200px;
}

@media (min-width: 1600px) {
  .wide-container {
    max-width: 1400px;
  }
}

/* Плавное масштабирование для очень широких экранов */
@media (min-width: 2000px) {
  .container {
    max-width: 1800px;
  }

  .article-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 3rem;
  }

  body {
    font-size: 22px;
  }
}

/* Оптимизация для ultra-wide мониторов */
@media (min-width: 2560px) {
  .container {
    max-width: 2000px;
  }

  .hero-content h1 {
    font-size: 5rem;
  }
}

/* ===== ШИРОКАЯ СТРАНИЦА СТАТЬИ ===== */
.single-article-container {
  width: 100%;
}

.single-article-wide {
  background: var(--color-card);
  padding: 3rem 0;
  margin: 2rem 0;
  border-top: 1px solid rgba(13, 43, 53, 0.1);
  border-bottom: 1px solid rgba(13, 43, 53, 0.1);
}

.article-content-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

.single-article-full {
  max-width: 100%;
  margin: 0 auto;
}

/* Заголовок статьи */
.article-header-full {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-secondary);
}

.article-header-full h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
}

.article-meta-full {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-family: var(--font-meta);
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.article-meta-full span {
  padding: 0.3rem 1rem;
  background: var(--color-bg);
  border-radius: 20px;
}

/* Изображение статьи */
.article-featured-image-full {
  margin: 2rem 0 3rem 0;
  text-align: center;
}

.article-featured-image-full img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Контент статьи - ШИРОКИЙ */
.article-content-full {
  max-width: 100%;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-content-full p {
  margin-bottom: 1.5rem;
}

.article-content-full h2 {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin: 3rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-secondary);
}

.article-content-full h3 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin: 2.5rem 0 1.2rem 0;
}

.article-content-full ul,
.article-content-full ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content-full li {
  margin-bottom: 0.5rem;
}

/* Подвал статьи */
.article-footer-full {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(13, 43, 53, 0.1);
}

.article-tags-full {
  text-align: center;
}

.article-tags-full strong {
  color: var(--color-primary);
  margin-right: 1rem;
}

.article-tags-full .tag {
  display: inline-block;
  background: var(--color-secondary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin: 0.3rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-tags-full .tag:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* Похожие материалы */
.related-posts-full {
  margin: 4rem 0;
}

.related-posts-full h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--color-primary);
}

/* ===== АДАПТИВНОСТЬ ДЛЯ СТАТЬИ ===== */
@media (max-width: 768px) {
  .single-article-wide {
    padding: 2rem 0;
  }

  .article-header-full h1 {
    font-size: 2rem;
  }

  .article-meta-full {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .article-content-full {
    font-size: 1rem;
  }
}

/* Для широких экранов */
@media (min-width: 1200px) {
  .article-content-full {
    font-size: 1.2rem;
    line-height: 1.9;
  }

  .article-header-full h1 {
    font-size: 3rem;
  }
}

/* ===== СПИСОК СТАТЕЙ С ИЗОБРАЖЕНИЕМ СЛЕВА ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.article-list-item {
  background: var(--color-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 43, 53, 0.1);
}

.article-list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.list-item-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.list-item-image {
  border-radius: 8px;
  overflow: hidden;
  height: 150px;
}

.list-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-list-item:hover .list-item-image img {
  transform: scale(1.05);
}

.list-item-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.list-item-category {
  display: inline-block;
  background: var(--color-secondary);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-meta);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.list-item-title {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.list-item-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.list-item-title a:hover {
  color: var(--color-accent);
}

.list-item-excerpt {
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.list-item-meta {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-text-light);
  display: flex;
  gap: 1rem;
}

/* ===== СЕТКА ДЛЯ ГЛАВНЫХ НОВОСТЕЙ ===== */
.article-grid-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ СПИСКА ===== */
@media (max-width: 768px) {
  .list-item-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .list-item-image {
    height: 200px;
  }

  .article-grid-main {
    grid-template-columns: 1fr;
  }
}

/* Для широких экранов */
@media (min-width: 1200px) {
  .list-item-container {
    grid-template-columns: 250px 1fr;
    gap: 2.5rem;
  }

  .list-item-image {
    height: 180px;
  }

  .article-grid-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

.featured-news {
  padding: 40px 0;
}

.article-grid-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .article-grid-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-grid-main {
    grid-template-columns: 1fr;
  }
}

/* Проверка */
/* Для всех изображений записей в сайдбаре и основном контенте */
.widget ul li img,
.article-grid-main img,
.post-thumbnail img,
.featured-news img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
}

/* Специально для сайдбара "Свежие записи" */
.widget_recent_entries img {
  height: 120px;
  /* Чуть меньше для сайдбара */
}

/* Для главных новостей */
.article-grid-main img {
  height: 200px;
}
.wp-block-latest-posts__list.wp-block-latest-posts
  > li
  > a.wp-block-latest-posts__post-title {
  text-decoration: underline;
  font-size: 1.2rem;
  line-height: 1;
}
.card-content h3 {
  line-height: 1.2 !important;
  margin-bottom: 0.8rem;
}

.article-grid-main .card-content h3 {
  line-height: 1.2 !important;
}

.list-item-title {
  line-height: 1.2 !important;
  margin-bottom: 0.8rem;
}

/* Для заголовков в сайдбаре и других виджетах */
.sidebar-widget h3,
.widget-title {
  line-height: 1.2 !important;
}
