/* Accessibility: visually hidden text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
  white-space: normal;
}

:root {
  --beige-color: #f9f6f0;
  --dark-brown: #5D4037;
  --green-color: #2E5D3E;
}

/* HOTFIX: pagination alignment */
div.pagination {
  max-width: 1800px;
  margin: 1rem auto 2.5rem;
  padding: 0 2rem 0 3.5rem !important; /* ← сдвиг вправо */
}

div.pagination > nav.navigation.pagination {
  margin: 0 !important;
}

div.pagination > nav.navigation.pagination .nav-links{
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}




* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f9f6f0;
  color: #5D4037;
  line-height: 1.65;
}

/* Шапка сайта */
header {
  background: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(139, 115, 85, 0.06);
  border-bottom: 1px solid rgba(139, 115, 85, 0.08);
}

.header-container {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 2rem;
}

.header-left {
  display: flex;
  gap: 8px;
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-right {
  width: 56px;
}

/* Боковое меню */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 1001;
  transition: left 0.4s ease;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  padding: 40px 20px;
  overflow-y: auto;
}

.sidebar-menu.open {
  left: 0;
}

.sidebar-menu h3 {
  margin-top: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #000;
  text-align: center;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  list-style: none;
  margin: 0 0 5px 0;
}

.sidebar-menu a {
  text-decoration: none;
  color: var(--dark-brown) !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  display: block;
  padding: 8px 12px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 300;
  transition: color 0.3s ease;
}

.sidebar-menu a:hover {
  color: var(--green-color) !important;
  background: transparent !important;
  text-decoration: underline;
}

.sidebar-menu .close-btn {
  position: absolute;
  top: 15px;
  left: 25px;
  background: #000;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* Иконки соцсетей */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  color: var(--dark-brown) !important;
  text-decoration: none;
  font-size: 24px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.1);
  color: var(--green-color) !important;
}

.social-icons i {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Кнопки меню и поиска */
.mf-menu-btn, .mf-search-btn {
  background: var(--beige-color);
  color: #000;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 40px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.mf-menu-btn:hover, .mf-search-btn:hover {
  background: var(--green-color);
  color: white;
}

.mf-menu-btn::before {
  content: "☰";
  font-size: 18px;
  color: #000;
}

.mf-search-btn svg {
  width: 18px;
  height: 27px;
  stroke: #000;
}

/* Логотип */
.logo {
  font-family: 'Raleway', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green-color) !important;
  letter-spacing: -1.1px;
  text-transform: lowercase;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--dark-brown) !important;
}

/* Нижняя панель с рубриками — для десктопа */
.nav-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0.8rem 0;
  background: #f9f6f0;
  margin-top: -1px;
}

.nav {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav li {
  list-style: none;
}

.nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: var(--dark-brown) !important;
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  background: white;
  border: 1px solid rgba(139, 115, 85, 0.1);
  border-radius: 6px;
  display: inline-block;
}

.nav a:hover {
  color: var(--green-color) !important;
}

/* Скрываем меню рубрик на мобильных */
@media (max-width: 768px) {
  .nav-container {
    display: none;
  }
}

/* Модальное окно поиска */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.search-modal.open {
  display: flex;
}

.search-modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.search-modal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #000;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.search-modal form {
  display: flex;
  flex-direction: column;
}

.search-modal input[type="search"] {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 10px;
}

.search-modal input[type="submit"] {
  padding: 10px;
  background: #000;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Адаптация */
@media (max-width: 1024px) {
  .header-left { padding-left: 2rem; }
  .header-container { padding: 0 2rem; }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: row;
    height: 80px;
    padding: 0 1.5rem;
    gap: 0.8rem;
  }
  .logo { font-size: 2.2rem; letter-spacing: -0.9px; }
  .header-left { width: auto; justify-content: flex-start; padding-left: 0; }
  .mf-menu-btn, .mf-search-btn {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    padding: 0;
    min-width: auto;
  }
  .mf-menu-btn::before { font-size: 22px; }
  .mf-search-btn svg { width: 22px; height: 22px; }
}

@media (max-width: 480px) {
  .header-container {
    flex-direction: row;
    height: 60px;
    padding: 0 1rem;
    align-items: center;
    gap: 10px;
  }
  .logo { font-size: 1.8rem; letter-spacing: -0.6px; }
  .mf-menu-btn, .mf-search-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    padding: 0;
    min-width: auto;
  }
  .mf-menu-btn::before { font-size: 18px; }
  .mf-search-btn svg { width: 18px; height: 18px; }
  .social-icons { gap: 15px; }
}

/* WordPress Menu Styles */
.main-navigation ul {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  list-style: none;
  margin: 0;
}

.main-navigation a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: var(--dark-brown) !important;
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  background: white;
  border: 1px solid rgba(139, 115, 85, 0.1);
  border-radius: 6px;
  display: inline-block;
}

.main-navigation a:hover {
  color: var(--green-color) !important;
}

.sidebar-menu .main-navigation ul {
  display: block !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}

.sidebar-menu .main-navigation li {
  margin: 0 0 5px 0 !important;
}

/* === ПАТЧ: меню рубрик в линию без точек === */
.nav-container ul,
.nav-container li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nav-container ul {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 0.6rem !important;
}

.nav-container a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: var(--dark-brown) !important;
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  background: white;
  border: 1px solid rgba(139, 115, 85, 0.1);
  border-radius: 6px;
  transition: color 0.2s;
  display: inline-block;
}

.nav-container a:hover {
  color: var(--green-color) !important;
}

/* === СТИЛИ ДЛЯ КОНТЕНТА — ОГРАНИЧЕНИЕ ШИРИНЫ 1000px + ВЫРАВНИВАНИЕ ПО ШИРИНЕ (ТОЛЬКО ДЛЯ СТАТЕЙ) === */
main article {
  max-width: 1000px;
  margin: 1rem auto;
  padding: 0 2rem;
}

/* Выравнивание по ширине — ТОЛЬКО для полного текста в статьях */
main p,
main ul,
main ol,
main blockquote {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #5D4037;
  text-align: justify;
}

/* Анонсы на главной — НЕ выравниваем по ширине, ограничиваем до 1000px, центрируем */
.post-excerpt {
  color: #5D4037;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 1000px;
  margin: 0 auto;
  /* ❗️ ЯВНО УКАЗЫВАЕМ text-align: left — чтобы НИКОГДА не было justify */
  text-align: left;
}

main h1, main h2, main h3, main h4, main h5, main h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
  color: #5D4037;
}

main h1 { font-size: 2.2rem; font-weight: 700; }
main h2 { font-size: 1.8rem; font-weight: 600; }
main h3 { font-size: 1.5rem; font-weight: 600; }

main ul, main ol {
  margin: 1rem 0 1.5rem 1.5rem;
  padding: 0;
}

main li {
  margin: 0.5rem 0;
  line-height: 1.6;
  text-align: justify;
}

main a {
  color: #2E5D3E;
  text-decoration: underline;
  transition: color 0.2s;
}

main a:hover {
  color: #5D4037;
}

main blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #2E5D3E;
  background: #f9f6f0;
  font-style: italic;
  color: #5D4037;
}

main img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 6px;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

main th, main td {
  padding: 0.6rem;
  border: 1px solid rgba(139, 115, 85, 0.1);
}

main th {
  background: #f5f5f5;
  font-weight: 600;
}

/* === БАННЕР ДЛЯ ПЕРВОЙ СТАТЬИ — УСИЛЕННЫЙ (730px) === */
.post-banner {
  position: relative;
  width: 100%;
  max-width: 1800px;
  margin: 2rem auto 0;
  border-radius: 8px;
  overflow: hidden;
/*  box-shadow: 0 2px 8px rgba(0,0,0,0.05);*/
  height: 730px;
}

.banner-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* === ЗАТЕМНЕНИЕ НАЧИНАЕТСЯ С 25px СВЕРХУ === */
.banner-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 25px,
    rgba(0,0,0,0.6) 25px,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 5;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* === ЦЕНТРИРОВКА ПО ВЕРТИКАЛИ И ГОРИЗОНТАЛИ === */
.banner-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding: 2rem;
  background: transparent;
  color: white;
  text-align: center;
  z-index: 10;
}

/* === РУБРИКА В БАННЕРЕ — по центру, увеличенная в 2 раза === */
.banner-category {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.84rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  padding: 0;
  display: block;
  line-height: 1.4;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* === ЗАГОЛОВОК В БАННЕРЕ — по центру, без hover === */
.banner-content .post-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  line-height: 1.05;
  margin: 0.5rem 0 1rem 0;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  padding-left: 0;
  padding-right: 0;
  margin: 0 auto;
  max-width: 80%;
}

/* ❗️ ФИКС: ЗАГОЛОВОК В БАННЕРЕ — ВСЕГДА БЕЛЫЙ, НИКОГДА НЕ МЕНЯЕТСЯ ПРИ НАВЕДЕНИИ */
.banner-content .post-title:hover,
.banner-content .post-title:focus {
  color: white !important;
}

/* === ОСТАЛЬНЫЕ СТАТЬИ — КАРТОЧКИ === */
.posts-grid {
  max-width: 1800px;
  margin: 1rem auto 2rem;
  padding: 0 2rem;
  display: grid;
  gap: 1.5rem;
}

.post-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
}

/* === 🔥 ЕДИНЫЙ РАЗМЕР ИЗОБРАЖЕНИЙ В КАРТОЧКАХ === */
.post-thumbnail {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 6px;
  width: 100%;
  height: 250px; /* Фиксированная высота для всех изображений */
  position: relative;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Обрезает изображение, сохраняя пропорции */
  object-position: center; /* Центрирует изображение при обрезке */
  display: block;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.post-category {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: #2E5D3E;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: -1.5rem;
}

.post-title {
  font-size: 1.4rem;
  color: #5D4037;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.5rem 0 1rem 0;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-title:hover {
  color: #2E5D3E;
}

.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 1rem;
}

.post-meta span {
  margin-right: 0.5rem;
}

/* === ЭКЗЕРПТ — МАКСИМУМ 3 СТРОКИ — БЕЗ ВЫРАВНИВАНИЯ ПО ШИРИНЕ === */
.read-more {
  display: inline-block;
  color: #2E5D3E;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.read-more:hover {
  color: #5D4037;
  text-decoration: underline;
}

/* Адаптация под мобильные */
@media (max-width: 768px) {
  .posts-grid {
    padding: 0 1rem;
    max-width: 100%;
  }

  .post-card {
    padding: 1rem;
  }

  .post-title {
    font-size: 1.2rem;
  }

  /* Мобильная высота изображений */
  .post-thumbnail {
    height: 200px;
  }

  .post-banner {
    height: 400px;
    margin: 2rem auto 0;
  }

  .banner-content {
    padding: 1rem;
  }

  .banner-category {
    font-size: 1.4rem;
    padding: 0;
    height: 20px;
    line-height: 1.3;
    margin: 0 auto;
  }

  .banner-content .post-title {
    font-size: 2.2rem;
    max-width: 90%;
  }

  .posts-grid {
    margin: 1rem auto 2rem;
  }
}

/* === 🔥 ВСЕГДА 3 КОЛОНКИ НА ДЕСКТОПЕ === */
@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* === ЗАГОЛОВОК РУБРИКИ — В НАЧАЛО СТРОКИ, БЕЗ ЖИРНОСТИ === */
.archive-header {
  max-width: 1800px;
  margin: 2rem auto 1rem;
  padding: 0 2rem;
  text-align: left;
}

.archive-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: #5D4037;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
  padding: 0.5rem 0;
  background: transparent;
  border-radius: 0;
  display: block;
}

/* === УБИРАЕМ ЧЕРТУ ПОД МЕНЮ В БОКОВОМ МЕНЮ === */
.sidebar-menu .main-navigation {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.sidebar-menu .social-icons {
  margin-top: 1rem !important;
  border-top: none !important;
}

/* === ОТСТУПЫ И ПОЗИЦИОНИРОВАНИЕ В БОКОВОМ МЕНЮ === */
.sidebar-menu h3 {
  margin-top: 30px;
}

.sidebar-menu ul {
  margin-top: 10px;
}

/* === ВЕРТИКАЛЬНОЕ МЕНЮ С ТОЧНЫМ РАССТОЯНИЕМ === */
.sidebar-menu .main-navigation a {
  display: block;
  padding: 8px 12px;
  margin: 0;
  width: 100%;
  text-align: left;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.sidebar-menu .main-navigation li {
  margin: 0 0 5px 0 !important;
}

/* === СТИЛИ ДЛЯ СТРАНИЦ — ТОЧНО КАК В РУБРИКАХ === */
.page-content,
.archive .page-content {
  max-width: 1000px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.archive .page-content h1,
.archive .page-content h2,
.archive .page-content h3,
.archive .page-content h4,
.archive .page-content h5,
.archive .page-content h6 {
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  font-family: 'Montserrat', sans-serif !important;
  color: #5D4037 !important;
  line-height: 1.3 !important;
}

.page-content h1,
.archive .page-content h1 { 
  font-size: 2.2rem !important; 
  font-weight: 700 !important; 
}
.page-content h2,
.archive .page-content h2 { 
  font-size: 1.8rem !important; 
  font-weight: 600 !important; 
}
.page-content h3,
.archive .page-content h3 { 
  font-size: 1.5rem !important; 
  font-weight: 600 !important; 
}

.page-content p,
.page-content ul,
.page-content ol,
.page-content blockquote,
.archive .page-content p,
.archive .page-content ul,
.archive .page-content ol,
.archive .page-content blockquote {
  margin-bottom: 1.5rem !important;
  line-height: 1.7 !important;
  color: #5D4037 !important;
  text-align: justify /*!important;*/
}

.page-content ul, 
.page-content ol,
.archive .page-content ul, 
.archive .page-content ol {
  margin: 1rem 0 1.5rem 1.5rem !important;
  padding: 0 !important;
}

.page-content li,
.archive .page-content li {
  margin: 0.5rem 0 !important;
  line-height: 1.6 !important;
  text-align: justify !important;
}

.page-content a,
.archive .page-content a {
  color: #2E5D3E !important;
  text-decoration: underline !important;
  transition: color 0.2s !important;
}

.page-content a:hover,
.archive .page-content a:hover {
  color: #5D4037 !important;
}

.page-content blockquote,
.archive .page-content blockquote {
  margin: 1.5rem 0 !important;
  padding: 1rem 1.5rem !important;
  border-left: 4px solid #2E5D3E !important;
  background: #f9f6f0 !important;
  font-style: italic !important;
  color: #5D4037 !important;
}

.page-content img,
.archive .page-content img {
  max-width: 100% !important;
  height: auto !important;
  margin: 1.5rem 0 !important;
  border-radius: 6px !important;
}
/* === ЦЕНТРИРОВАНИЕ ЗАГОЛОВКА РУБРИКИ НА МОБИЛЬНЫХ === */
@media (max-width: 768px) {
  .archive-header {
    text-align: center !important;
  }
  
  .archive-header h1 {
    text-align: center !important;
    padding: 0.5rem 0 !important;
    margin: 0 auto !important;
    display: inline-block !important;
  }
}
/* === ЦЕНТРИРОВАНИЕ ИЗОБРАЖЕНИЙ В СТАТЬЯХ === */
.entry-content img,
.post-content img,
.page-content img {
  display: block;
  margin: 1rem auto !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Поддержка классов выравнивания из редактора */
.aligncenter,
.aligncenter img {
  display: block;
  margin: 1rem auto !important;
  text-align: center !important;
}

.alignleft,
.alignleft img {
  display: block;
  margin: 1rem 0 1rem 0 !important;
  text-align: left !important;
}

.alignright,
.alignright img {
  display: block;
  margin: 1rem 0 1rem 0 !important;
  text-align: right !important;
}

/* Для новых версий WordPress с блоками */
.wp-block-image.aligncenter {
  text-align: center !important;
}

.wp-block-image.aligncenter img {
  display: inline-block;
  text-align: center !important;
}

:root {
      --beige-color: #f9f6f0;
      --dark-brown: #5D4037;
      --green-color: #2E5D3E;
      --social-icon-size: 60px;
      --social-icon-font-size: 24px;
      --menu-icon-color: white;
      --search-icon-color: white;
      --menu-bg-color: #000;
      --search-bg-color: #000;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: 'Montserrat', sans-serif;
      background: #f9f6f0;
      color: #5D4037;
      line-height: 1.65;
    }

    /* Шапка сайта */
    header {
      background: white;
      padding: 0;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 12px rgba(139, 115, 85, 0.06);
      border-bottom: 1px solid rgba(139, 115, 85, 0.08);
    }

    .header-container {
      max-width: 1800px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 80px;
      padding: 0 2rem;
    }

    .header-left {
      display: flex;
      gap: 8px;
    }

    .header-center {
      flex: 1;
      text-align: center;
    }

    .header-right {
      width: 56px;
    }

    /* Боковое меню */
    .sidebar-menu {
      position: fixed;
      top: 0;
      left: -300px;
      width: 300px;
      height: 100vh;
      background: #fff;
      z-index: 1001;
      transition: left 0.4s ease;
      box-shadow: 2px 0 10px rgba(0,0,0,0.1);
      padding: 40px 20px;
      overflow-y: auto;
    }

    .sidebar-menu.open {
      left: 0;
    }

    .sidebar-menu h3 {
      margin-top: 0;
      font-family: 'Montserrat', sans-serif;
      font-weight: 700;
      font-size: 24px;
      color: #000;
      text-align: center;
    }

    .sidebar-menu ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .sidebar-menu li {
      list-style: none;
      margin: 0 0 5px 0;
    }

    /* СТИЛЬ ДЛЯ ПУНКТОВ МЕНЮ - ТОЧНОЕ РАССТОЯНИЕ КАК В ОРИГИНАЛЕ */
    .sidebar-menu a {
      text-decoration: none;
      color: var(--dark-brown) !important;
      font-family: 'Montserrat', sans-serif;
      font-size: 16px;
      display: block;
      padding: 8px 12px; /* ТОЧНЫЙ ОТСТУП КАК В ОРИГИНАЛЕ */
      background: transparent !important;
      border: none !important;
      border-radius: 0 !important;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      font-weight: 300;
      transition: color 0.3s ease;
    }

    .sidebar-menu a:hover {
      color: var(--green-color) !important;
      background: transparent !important;
      text-decoration: underline;
    }

    .sidebar-menu .close-btn {
      position: absolute;
      top: 15px;
      left: 25px;
      background: #000;
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }

    /* Иконки соцсетей */
    .social-icons {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 30px;
      padding-top: 20px;
      border-top: 1px solid #eee;
    }

    .social-icons a {
      display: flex;
      justify-content: center;
      align-items: center;
      width: var(--social-icon-size);
      height: var(--social-icon-size);
      color: var(--dark-brown) !important;
      text-decoration: none;
      font-size: var(--social-icon-font-size);
      border-radius: 50%;
      transition: all 0.3s ease;
    }

    .social-icons a:hover {
      transform: scale(1.1);
      color: var(--green-color) !important;
      text-decoration: none;
    }

    .social-icons i {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    /* Кнопки меню и поиска */
    .mf-menu-btn, .mf-search-btn {
      background: var(--beige-color);
      color: #000;
      border: none;
      padding: 12px 16px;
      border-radius: 6px;
      cursor: pointer;
      min-width: 40px;
      text-align: center;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: all 0.3s ease;
    }

    .mf-menu-btn:hover, .mf-search-btn:hover {
      background: var(--green-color);
      color: white;
    }

    .mf-menu-btn::before {
      content: "☰";
      font-size: 18px;
      color: #000;
    }

    .mf-search-btn svg {
      width: 18px;
      height: 27px;
      stroke: #000;
    }

    /* Логотип */
    .logo {
      font-family: 'Raleway', sans-serif;
      font-size: 2.8rem;
      font-weight: 700;
      color: var(--green-color) !important;
      letter-spacing: -1.1px;
      text-transform: lowercase;
      text-decoration: none;
      display: inline-block;
      transition: color 0.3s ease;
    }

    .logo:hover {
      color: var(--dark-brown) !important;
    }

    /* Нижняя панель с рубриками — для десктопа */
    .nav-container {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 0.8rem 0;
      background: #f9f6f0;
      margin-top: -1px;
    }

    .nav {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
      justify-content: center;
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .nav li {
      list-style: none;
    }

    .nav a {
      font-family: 'Montserrat', sans-serif;
      font-size: 0.92rem;
      color: var(--dark-brown) !important;
      text-decoration: none;
      font-weight: 300;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      transition: color 0.2s;
      padding: 0.4rem 0.8rem;
      white-space: nowrap;
      background: white;
      border: 1px solid rgba(139, 115, 85, 0.1);
      border-radius: 6px;
      display: inline-block;
    }

    .nav a:hover {
      color: var(--green-color) !important;
    }

    /* Скрываем меню рубрик на мобильных */
    @media (max-width: 768px) {
      .nav-container {
        display: none;
      }
    }

    /* Модальное окно поиска */
    .search-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 2000;
      display: none;
      justify-content: center;
      align-items: center;
    }

    .search-modal.open {
      display: flex;
    }

    .search-modal-content {
      background: white;
      padding: 20px;
      border-radius: 8px;
      width: 90%;
      max-width: 500px;
      position: relative;
    }

    .search-modal .close-btn {
      position: absolute;
      top: 10px;
      right: 15px;
      background: #000;
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }

    .search-modal form {
      display: flex;
      flex-direction: column;
    }

    .search-modal input[type="search"] {
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 4px;
      margin-bottom: 10px;
    }

    .search-modal input[type="submit"] {
      padding: 10px;
      background: #000;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    /* Адаптация */
    @media (max-width: 1024px) {
      .header-left { padding-left: 2rem; }
      .header-container { padding: 0 2rem; }
    }

    @media (max-width: 768px) {
      .header-container {
        flex-direction: row;
        height: 80px;
        padding: 0 1.5rem;
        gap: 0.8rem;
      }
      .logo { font-size: 2.2rem; letter-spacing: -0.9px; }
      .header-left { width: auto; justify-content: flex-start; padding-left: 0; }
      .mf-menu-btn, .mf-search-btn {
        width: 52px;
        height: 52px;
        border-radius: 12px;
        padding: 0;
        min-width: auto;
      }
      .mf-menu-btn::before { font-size: 22px; }
      .mf-search-btn svg { width: 22px; height: 22px; }
    }
    
    @media (max-width: 480px) {
      .header-container {
        flex-direction: row;
        height: 60px;
        padding: 0 1rem;
        align-items: center;
        gap: 10px;
      }
      .logo { font-size: 1.8rem; letter-spacing: -0.6px; }
      .mf-menu-btn, .mf-search-btn {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        padding: 0;
        min-width: auto;
      }
      .mf-menu-btn::before { font-size: 18px; }
      .mf-search-btn svg { width: 18px; height: 18px; }
      .social-icons { gap: 15px; }
      :root {
        --social-icon-size: 40px;
        --social-icon-font-size: 18px;
      }
    }

    /* WordPress Menu Styles */
    .main-navigation ul {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
      justify-content: center;
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .main-navigation li {
      list-style: none;
      margin: 0;
    }

    .main-navigation a {
      font-family: 'Montserrat', sans-serif;
      font-size: 0.92rem;
      color: var(--dark-brown) !important;
      text-decoration: none;
      font-weight: 300;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      transition: color 0.2s;
      padding: 0.4rem 0.8rem;
      white-space: nowrap;
      background: white;
      border: 1px solid rgba(139, 115, 85, 0.1);
      border-radius: 6px;
      display: inline-block;
    }

    .main-navigation a:hover {
      color: var(--green-color) !important;
    }

    .sidebar-menu .main-navigation ul {
      display: block !important;
      gap: 0 !important;
      flex-wrap: nowrap !important;
      justify-content: flex-start !important;
    }

    .sidebar-menu .main-navigation li {
      margin: 0 0 5px 0 !important;
    }

    /* === ПАТЧ: меню рубрик в линию без точек === */
    .nav-container ul,
    .nav-container li {
      list-style: none !important;
      margin: 0 !important;
      padding: 0 !important;
    }

    .nav-container ul {
      display: flex !important;
      flex-wrap: wrap !important;
      justify-content: center !important;
      gap: 0.6rem !important;
    }

    .nav-container a {
      font-family: 'Montserrat', sans-serif;
      font-size: 0.92rem;
      color: var(--dark-brown) !important;
      text-decoration: none;
      font-weight: 300;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      padding: 0.4rem 0.8rem;
      white-space: nowrap;
      background: white;
      border: 1px solid rgba(139, 115, 85, 0.1);
      border-radius: 6px;
      transition: color 0.2s;
      display: inline-block;
    }

    .nav-container a:hover {
      color: var(--green-color) !important;
    }

    /* === СТИЛИ ДЛЯ КОНТЕНТА — ОГРАНИЧЕНИЕ ШИРИНЫ 1000px + ВЫРАВНИВАНИЕ ПО ШИРИНЕ (ТОЛЬКО ДЛЯ СТАТЕЙ) === */
    main article {
      max-width: 800px;
      margin: 0.5rem auto;
      padding: 0 2rem;
    }

    /* Выравнивание по ширине — ТОЛЬКО для полного текста в статьях */
    main p,
    main ul,
    main ol,
    main blockquote {
      margin-bottom: 1.5rem;
      line-height: 1.7;
      color: #5D4037;
      text-align: justify;
    }

    /* Анонсы на главной — НЕ выравниваем по ширине, ограничиваем до 1000px, центрируем */
    .post-excerpt {
      color: #5D4037;
      line-height: 1.6;
      margin-bottom: 1rem;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 1000px;
      margin: 0 auto;
      /* ❗️ ЯВНО УКАЗЫВАЕМ text-align: left — чтобы НИКОГДА не было justify */
      text-align: left;
    }

    main h1, main h2, main h3, main h4, main h5, main h6 {
      margin-top: 2rem;
      margin-bottom: 1rem;
      font-family: 'Montserrat', sans-serif;
      color: #5D4037;
    }

    main h1 { font-size: 2.2rem; font-weight: 700; }
    main h2 { font-size: 1.8rem; font-weight: 600; }
    main h3 { font-size: 1.5rem; font-weight: 600; }

    main ul, main ol {
      margin: 1rem 0 1.5rem 1.5rem;
      padding: 0;
    }

    main li {
      margin: 0.5rem 0;
      line-height: 1.6;
      text-align: justify;
    }

    main a {
      color: #2E5D3E;
      text-decoration: underline;
      transition: color 0.2s;
    }

    main a:hover {
      color: #5D4037;
    }

    main blockquote {
      margin: 1.5rem 0;
      padding: 1rem 1.5rem;
      border-left: 4px solid #2E5D3E;
      background: #f9f6f0;
      font-style: italic;
      color: #5D4037;
    }

    main img {
      max-width: 100%;
      height: auto;
      margin: 1.5rem 0;
      border-radius: 6px;
    }

    main table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5rem 0;
    }

    main th, main td {
      padding: 0.6rem;
      border: 1px solid rgba(139, 115, 85, 0.1);
    }

    main th {
      background: #f5f5f5;
      font-weight: 600;
    }

    /* === БАННЕР ДЛЯ ПЕРВОЙ СТАТЬИ — УСИЛЕННЫЙ (730px) === */
    .post-banner {
      position: relative;
      width: 100%;
      max-width: 1800px;
      margin: 2rem auto 0;
      border-radius: 8px;
      overflow: hidden;
     /* box-shadow: 0 2px 8px rgba(0,0,0,0.05); */
      height: 730px;
    }

    .banner-image {
      position: relative;
      width: 100%;
      height: 100%;
      /*overflow: hidden;*/
    }

/* === ЗАТЕМНЕНИЕ С ГРАДИЕНТОМ, НО БЕЗ БЕЛОЙ ПОЛОСЫ === */
.banner-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.7) 0%,     /* Начинаем с затемнения сразу сверху (0%) */
    rgba(0,0,0,0.5) 100%    /* Легче к низу */
  );
  z-index: 5;
}

    .banner-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      display: block;
    }

    /* === ЦЕНТРИРОВКА ПО ВЕРТИКАЛИ И ГОРИЗОНТАЛИ === */
    .banner-content {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      transform: translateY(-50%);
      padding: 2rem;
      background: transparent;
      color: white;
      text-align: center;
      z-index: 10;
    }

    /* === РУБРИКА В БАННЕРЕ — по центру, увеличенная в 2 раза === */
    .banner-category {
      font-family: 'Montserrat', sans-serif;
      font-size: 1.4rem;
      color: white;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 0.5rem;
      padding: 0;
      display: block;
      line-height: 1.4;
      height: 70px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto;
    }

    /* === ЗАГОЛОВОК В БАННЕРЕ — по центру, без hover === */
    .banner-content .post-title {
      font-family: 'Montserrat', sans-serif;
      font-size: 3.2rem;
      font-weight: 600;
      color: white;
      text-decoration: none;
      line-height: 1.05;
      margin: 0.5rem 0 1rem 0;
      display: block;
      word-wrap: break-word;
      overflow-wrap: break-word;
      text-shadow: 0 2px 4px rgba(0,0,0,0.5);
      padding-left: 0;
      padding-right: 0;
      margin:20px auto;
      max-width: 80%;
    }

    /* Уменьшаем размер шрифта заголовка баннера на мобильных */
@media (max-width: 768px) {
  .banner-content .post-title {
    font-size: 18px !important;
    line-height: 1.2 !important;
    max-width: 90% !important;
  }
}
    /* ❗️ ФИКС: ЗАГОЛОВОК В БАННЕРЕ — ВСЕГДА БЕЛЫЙ, НИКОГДА НЕ МЕНЯЕТСЯ ПРИ НАВЕДЕНИИ */
    .banner-content .post-title:hover,
    .banner-content .post-title:focus {
      color: white !important;
    }

    /* === ОСТАЛЬНЫЕ СТАТЬИ — КАРТОЧКИ === */
    .posts-grid {
      max-width: 1800px;
      margin: 1rem auto 2rem;
      padding: 0 2rem;
      display: grid;
      gap: 1.5rem;
    }

    .post-card {
      background: white;
      border-radius: 8px;
      padding: 0.5rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      transition: transform 0.2s ease;
    }

    .post-card:hover {
      transform: translateY(-2px);
    }

    /* === 🔥 ЕДИНЫЙ РАЗМЕР ИЗОБРАЖЕНИЙ В КАРТОЧКАХ === */
    .post-thumbnail {
      margin-bottom: 1rem;
      overflow: hidden;
      border-radius: 6px;
      width: 100%;
      height: 250px; /* Фиксированная высота для всех изображений */
      position: relative;
      background: #f5f5f5;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .post-thumbnail img {
      width: 100%;
      height: 100%;
      object-fit: cover; /* Обрезает изображение, сохраняя пропорции */
      object-position: center; /* Центрирует изображение при обрезке */
      display: block;
      border-radius: 6px;
      transition: transform 0.3s ease;
    }

    .post-category {
      font-family: 'Montserrat', sans-serif;
      font-size: 0.8rem;
      font-weight: 300;
      color: #2E5D3E;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: -1.5rem;
    }
  

    .post-title {
      font-size: 1.4rem;
      color: #5D4037;
      font-family: 'Montserrat', sans-serif; /*!important;*/
      /*text-transform: uppercase;*/
      text-decoration: none;
      font-weight: 450;
      line-height: 1.3;
      margin: 0.5rem 0 1rem 0;
      display: block;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }

    .post-title:hover {
      color: #2E5D3E;
    }

    .post-meta {
      font-size: 0.85rem;
      color: #777;
      margin-bottom: 1rem;
    }

    .post-meta span {
      margin-right: 0.5rem;
    }

    /* === ЭКЗЕРПТ — МАКСИМУМ 3 СТРОКИ — БЕЗ ВЫРАВНИВАНИЯ ПО ШИРИНЕ === */
    .read-more {
      display: inline-block;
      color: #2E5D3E;
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 300;
      letter-spacing: 0.5px;
      transition: color 0.2s;
    }

    .read-more:hover {
      color: #5D4037;
      text-decoration: underline;
    }

    /* Адаптация под мобильные */
    @media (max-width: 768px) {
      .posts-grid {
        padding: 0 1rem;
        max-width: 100%;
      }

      .post-card {
        padding: 0.5rem;
      }

      .post-title {
        font-size: 1.2rem;
      }

      /* Мобильная высота изображений */
      .post-thumbnail {
        height: 200px;
      }

      .post-banner {
        height: 400px;
        margin: 2rem auto 0;
      }

      .banner-content {
        padding: 1rem;
      }

      .banner-category {
        font-size: 14px;
        padding: 0;
        height: 20px;
        line-height: 1.3;
        margin: 0 auto;
      }

      .banner-content .post-title {
        font-size: 2.2rem;
        max-width: 90%;
      }

      .posts-grid {
        margin: 1rem auto 2rem;
      }
    }

    /* === 🔥 ВСЕГДА 3 КОЛОНКИ НА ДЕСКТОПЕ === */
    @media (min-width: 768px) {
      .posts-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (max-width: 767px) {
      .posts-grid {
        grid-template-columns: 1fr;
      }
    }

    /* === ЗАГОЛОВОК РУБРИКИ — В НАЧАЛО СТРОКИ, БЕЗ ЖИРНОСТИ === */
    .archive-header {
      max-width: 1800px;
      margin: 2rem auto 1rem;
      padding: 0 2rem;
      text-align: left;
    }

    .archive-header h1 {
      font-family: 'Montserrat', sans-serif;
      font-size: 2.2rem;
      font-weight: 300;
      color: #5D4037;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      margin: 0;
      padding: 0.5rem 0;
      background: transparent;
      border-radius: 0;
      display: block;
    }

    /* === УБИРАЕМ ЧЕРТУ ПОД МЕНЮ В БОКОВОМ МЕНЮ === */
    .sidebar-menu .main-navigation {
      border-bottom: none !important;
      padding-bottom: 0 !important;
    }

    .sidebar-menu .social-icons {
      margin-top: 1rem !important;
      border-top: none !important;
    }

    /* === ОТСТУПЫ И ПОЗИЦИОНИРОВАНИЕ В БОКОВОМ МЕНЮ === */
    .sidebar-menu h3 {
      margin-top: 30px;
    }

    .sidebar-menu ul {
      margin-top: 10px;
    }
    
    /* === ВЕРТИКАЛЬНОЕ МЕНЮ С ТОЧНЫМ РАССТОЯНИЕМ === */
    .sidebar-menu .main-navigation a {
      display: block;
      padding: 8px 12px;
      margin: 0;
      width: 100%;
      text-align: left;
      background: transparent !important;
      border: none !important;
      border-radius: 0 !important;
    }
    
    .sidebar-menu .main-navigation li {
      margin: 0 0 5px 0 !important;
    }
    
    /* === СИЛЬНОЕ ЦЕНТРИРОВАНИЕ ЗАГОЛОВКА РУБРИКИ НА МОБИЛЬНЫХ === */
    @media (max-width: 768px) {
      .archive-header {
        text-align: center !important;
      }
      
      .archive-header h1 {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
      }
      
      .archive-header h1::before,
      .archive-header h1::after {
        display: none !important;
      }
    }
    /* === MOBILE TYPOGRAPHY TWEAKS (clean, no nested media) === */
@media (max-width: 768px) {
  /* Уменьшаем заголовок статьи */
  main h1 {
    font-size: 1.3rem !important;
    line-height: 1.2 !important;
    margin: 3opx auto !important;
    max-width: 100% !important;
    font-weight: 450 !important;
  }

  /* Уменьшаем заголовок рубрики */
  .archive-header h1 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  max-width: 1200px;
  margin: 4rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
  color: #8B7355;
  font-size: 0.9rem;
  font-weight: 300;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.copyright {
  color: #8B7355;
  font-size: 0.9rem;
  font-weight: 300;
}

.privacy-policy {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.privacy-policy a {
  /* Важно: в WP/плагинах часто есть "a { color: blue !important }".
     Тут футер должен выглядеть одинаково на всех страницах. */
  color: #8B7355 !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.privacy-policy a:visited {
  color: #8B7355 !important;
}

.privacy-policy a:hover {
  color: var(--green-color) !important;
  text-decoration: underline !important;
}

@media (max-width: 768px) {
  .site-footer {
    margin: 3rem auto 1.5rem;
  }
  .privacy-policy {
    font-size: 0.82rem;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .privacy-policy {
    font-size: 0.8rem;
  }
}

/* ===========================
   Cookie notice
   =========================== */
.mindflow-cookie-notice {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  z-index: 9999;
  font-family: 'Montserrat', sans-serif;
  color: var(--dark-brown);
  font-size: 0.9rem;
  line-height: 1.5;
  max-height: 90vh;
  overflow-y: auto;
  display: none;
}

.mindflow-cookie-notice a {
  color: var(--green-color) !important;
  text-decoration: underline;
}

.mindflow-cookie-content p {
  margin-bottom: 1rem;
}

.mindflow-cookie-accept {
  background: var(--green-color) !important;
  color: white !important;
  border: none !important;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
  font-weight: 300;
  transition: background 0.2s;
}

.mindflow-cookie-accept:hover {
  background: #214a2f;
}

@media (max-width: 768px) {
  .mindflow-cookie-notice {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto;
    right: auto;
    width: 90%;
    max-width: 350px;
    max-height: 85vh;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
}

/* ===========================
   Pagination (basic)
   =========================== */
.pagination {
  max-width: 1800px;
  margin: 1rem auto 2.5rem;
  padding: 0 2rem 0 3.5rem;
  display: flex;
  justify-content: flex-start;
}


.pagination .page-numbers {
  display: inline-block;
  padding: 3px 6px;
  margin: 0 4px;
  border-radius: 6px;
  border: 1px solid rgba(139, 115, 85, 0.15);
  background: white;
  text-decoration: none;
  color: var(--dark-brown);
  font-weight: 300;
}

.pagination .page-numbers.current {
  background: var(--green-color);
  color: white;
  border-color: var(--green-color);
}

.pagination .page-numbers:hover {
  color: var(--green-color);
}

/* ===========================
   Single meta
   =========================== */
.post-meta-single {
  margin: 1.5rem 0;
  color: #777;
  font-size: 0.9rem;
}

/* ===========================
   Captions (подписи к фото)
   =========================== */
/* Gutenberg */
figure.wp-block-image {
  margin: 1.2rem auto;
}

figure.wp-block-image img {
  display: block;
  margin: 0 auto !important;
}

figure.wp-block-image figcaption,
.wp-element-caption {
  margin: 0.35rem auto 0 !important;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--dark-brown);
  opacity: 0.9;
  text-align: center;
}

/* Classic editor / wp-caption */
.wp-caption {
  max-width: 100%;
  margin: 1.2rem auto;
}

.wp-caption img {
  display: block;
  margin: 0 auto !important;
}

.wp-caption-text {
  margin: 0.35rem auto 0 !important;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--dark-brown);
  opacity: 0.9;
  text-align: left;
}

/* ===========================
   Images: desktop max-width fix (from functions.php)
   =========================== */
/*@media (min-width: 768px) {
  .entry-content img,
  .post-content img {
    max-width: 736px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important; 
    object-fit: contain !important;
  }

  .wp-caption,
  .wp-block-image {
    max-width: 800px !important;
   /* margin: 2rem auto !important; */
  }
}

/* ===========================
   Mobile: fix grey bars / backgrounds around images
   =========================== */
@media (max-width: 768px) {
  .post-thumbnail,
  .banner-image,
  .wp-block-image,
  .wp-caption,
  figure {
    background: transparent !important;
    background-color: transparent !important;
  }

  .post-thumbnail {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .post-banner {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: transparent !important;
  }

  .banner-image {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .entry-content > *,
  .post-content > *,
  .page-content > * {
    margin-top: 0 !important;
  }

  .entry-content img:first-child,
  .post-content img:first-child,
  .page-content img:first-child {
    margin-top: 0 !important;
  }

  body:before,
  main:before {
    display: none !important;
  }

  .wp-block-image {
    margin: 0 0 1rem 0 !important;
  }

  .wp-block-image img {
    margin: 0 !important;
  }

  img.alignnone,
  img.aligncenter,
  img.alignleft,
  img.alignright {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
  }
}

/* Дополнительно: отключаем псевдоэлементы, которые иногда рисуют "полосы" */
img::before,
img::after,
.post-thumbnail::before,
.post-thumbnail::after,
article img:before,
article img:after {
  display: none !important;
  content: none !important;
}


/* ===========================
   Teaser images: stable crop (ONE rectangle everywhere)
   =========================== */

/* Grid cards (all teasers) */
.post-thumbnail {
  aspect-ratio: 16 / 9;
  height: auto !important; /* override any fixed heights */
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20% !important; /* faces cut less often */
  display: block;
}

/* Hero banner (first post): full image (no crop) + боковое затемнение по бокам */
.post-banner { aspect-ratio: 1800 / 730; height: auto !important; background: transparent !important; }

.post-banner .banner-image { position: relative; width: 100%; height: 100%; overflow: hidden; }
.post-banner .banner-image::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.18); z-index: 6; }
.post-banner .banner-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, rgba(0,0,0,0.55) 100%); z-index: 7; pointer-events: none; }

.post-banner .banner-img,
.post-banner .banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  margin: 0 !important;
  border-radius: 0 !important;
  display: block;
}

/* Banner content stays above overlays */
.post-banner .banner-content { position: absolute; z-index: 10; }

/* Mobile: keep same behavior, no fixed heights */
@media (max-width: 768px) {
  .post-thumbnail { aspect-ratio: 16 / 9; height: auto !important; }
  .post-banner { aspect-ratio: 16 / 9; height: auto !important; }
}



.single-category{
  display: inline-block;
  margin: 0 0 0px;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
 /* color: #d11; */
  text-decoration: none;
}

.single-category:hover{
  text-decoration: underline;
}






/*##########################################################################################################################################################################################*/
/* Banner overlay: затемнение поверх фоновой картинки */
.post-banner .banner-image{
  position: relative; /* нужно для ::before */
}

.post-banner .banner-image::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55); /* ↑ крути: 0.15 слабее, 0.35 сильнее */
  z-index: 2;
  pointer-events: none;
}

/* чтобы текст и остальной контент был поверх затемнения */
.post-banner .banner-content{
  position: absolute;
  z-index: 3;
}




/* Страницы (политики и т.п.) не выравниваем по ширине */
body.page main p,
body.page main ul,
body.page main ol,
body.page main blockquote{
  text-align: left;
}
