/* =========================================================
   ОБЩЕПИТ — стили блога об истории общественного питания в России
   Структура файла соответствует будущим WP-шаблонам:
   1. Base/Reset      -> подключается глобально (style.css темы)
   2. Header/Footer    -> header.php / footer.php
   3. Hero          -> template-parts/hero.php (только на главной)
   4. Blog loop/cards   -> archive.php / template-parts/content.php
   5. Sidebar/widgets   -> sidebar.php
   6. Single post      -> single.php
   7. Ad slots       -> template-parts/ad-slot.php (шорткод/виджет Яндекс.Директ)
   ========================================================= */

/* ---------- 0. Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&family=PT+Sans:wght@400;600;700&display=swap');

/* ---------- 1. Base / Reset ---------- */
:root{
  /* Палитра: тёплая винтажная — крем/бумага, дерево, латунь + акценты кирпично-красный/зелёный */
  --white:#ffffff;
  --bg-page:#f7f0e2;
  --bg-soft:#efe0c3;

  --wood-900:#2b1c10;
  --wood-800:#3c2717;
  --wood-700:#54371f;
  --brown-600:#7a4a26;
  --brown-700:#5f3a1e;
  --brown-500:#96693c;

  --gold-500:#b8863b;
  --gold-400:#d1a35b;
  --cream-100:#faf3e2;

  --red-500:#c4472f;
  --red-600:#a13a26;

  --green-600:#3f6b4f;

  --ink-900:#2a2015;
  --ink-700:#5c4a37;
  --ink-500:#8a7660;
  --ink-300:#bfae8f;

  --line:#e2d0aa;
  --line-soft:#ede0c3;

  --radius-s:8px;
  --radius-m:14px;
  --radius-l:20px;

  --shadow-card:0 2px 6px rgba(43,28,16,0.08), 0 10px 24px rgba(43,28,16,0.08);
  --shadow-hover:0 8px 16px rgba(43,28,16,0.12), 0 16px 32px rgba(43,28,16,0.12);

  --container:1200px;

  --font-head:'PT Serif', Georgia, serif;
  --font-body:'PT Sans', Arial, sans-serif;
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html{ overflow-x:hidden; }
body{
  margin:0;
  background:var(--bg-page);
  color:var(--ink-900);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family:var(--font-head); margin:0; color:var(--ink-900); }
p{ margin:0 0 16px; }
button{ font-family:inherit; cursor:pointer; }
input{ font-family:inherit; }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 20px;
}

.visually-hidden{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap;
}

/* Стандартный «отступ» между блоками страницы */
.section{ margin:44px 0; }

/* ---------- Кнопки ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px;
  border-radius:999px;
  border:none;
  font-weight:700;
  font-size:14px;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary{ background:var(--brown-600); color:var(--white); }
.btn--primary:hover{ background:var(--brown-700); box-shadow:var(--shadow-hover); }
.btn--outline{ background:var(--white); color:var(--brown-700); border:1.5px solid var(--line); }
.btn--outline:hover{ border-color:var(--gold-500); color:var(--brown-600); }
.btn--ghost{ background:rgba(246,236,217,0.12); color:var(--cream-100); border:1.5px solid rgba(246,236,217,0.45); }
.btn--ghost:hover{ background:rgba(246,236,217,0.2); border-color:var(--cream-100); }
.btn--red{ background:var(--red-500); color:var(--white); }
.btn--red:hover{ background:var(--red-600); }
.btn--block{ width:100%; }

/* Тег категории — используем и на карточках, и в шапке статьи */
.tag{
  display:inline-flex; align-items:center;
  padding:5px 12px;
  border-radius:999px;
  font-size:12px; font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
  background:var(--cream-100);
  color:var(--brown-700);
}
.tag--imperial{ background:#f3e6cf; color:#7a4a26; }
.tag--soviet{ background:#fdeceb; color:#b23a2e; }
.tag--nineties{ background:#eef0e3; color:#5c6b3f; }
.tag--fastfood{ background:#fdeee0; color:#c26a1f; }
.tag--coffee{ background:#ece1d3; color:#5c3a22; }
.tag--delivery{ background:#e6eef0; color:#2d6b6f; }
.tag--street{ background:#f6e9d8; color:#a8632b; }
.tag--trends{ background:#e8f0e4; color:#3f6b4f; }

/* =========================================================
   2. HEADER  (template: header.php)
   ========================================================= */
.topbar{
  background:var(--wood-900);
  color:#d8c6a6;
  font-size:13px;
}
.topbar .container{
  display:flex; align-items:center;
  height:38px;
}
.topbar__links{ display:flex; gap:18px; margin-left:auto; }
.topbar__links a:hover{ color:var(--white); }

.site-header{
  background:var(--white);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:50;
}
.site-header .container{
  display:flex; align-items:center; gap:28px;
  height:124px;
}
.site-header__logo{
  flex-shrink:0; display:flex; align-items:center; gap:16px;
}
.site-header__crest{ height:92px; width:auto; display:block; flex-shrink:0; }
.site-header__wordmark{ display:flex; flex-direction:column; gap:4px; }
.site-header__title{
  font-family:var(--font-head); font-weight:700; font-size:31px; line-height:1;
  color:var(--wood-900); letter-spacing:.2px;
}
.site-header__tagline{
  font-family:var(--font-body); font-weight:600; font-size:12.5px; letter-spacing:.03em;
  color:var(--brown-500);
}

.site-search{
  flex:1;
  display:flex; align-items:center; gap:10px;
  max-width:520px;
  height:46px;
  padding:0 18px;
  background:var(--bg-soft);
  border-radius:999px;
  color:var(--ink-500);
}
.site-search:focus-within{ background:var(--cream-100); }
.site-search svg{ flex-shrink:0; }
.site-search input{
  flex:1; min-width:0;
  height:100%;
  border:none; background:none; outline:none;
  font-size:14px; color:var(--ink-900);
}
.site-search input::placeholder{ color:var(--ink-500); }

.site-header__actions{ display:flex; align-items:center; gap:14px; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs{
  font-size:13px; color:var(--ink-500);
  padding:20px 0 0;
}
.breadcrumbs a:hover{ color:var(--brown-600); }
.breadcrumbs span{ margin:0 6px; color:var(--ink-300); }

/* =========================================================
   3. HERO (template-parts/hero.php — только на главной странице)
   ========================================================= */
.hero{
  position:relative;
  margin-top:64px;
  border-radius:var(--radius-l);
  overflow:hidden;
  background:var(--wood-900);
  box-shadow:var(--shadow-card);
}
.hero__media{ position:absolute; inset:0; }
.hero__media img{ width:100%; height:100%; object-fit:cover; opacity:.55; }
.hero__media::after{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(100deg, rgba(24,15,8,0.96) 0%, rgba(24,15,8,0.88) 30%, rgba(24,15,8,0.55) 62%, rgba(24,15,8,0.25) 100%);
}
.hero__body{
  position:relative;
  max-width:640px;
  padding:64px 44px;
  color:var(--cream-100);
}
.hero__eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--gold-400);
  margin-bottom:18px;
}
.hero__eyebrow::before{ content:''; width:22px; height:1.5px; background:var(--gold-400); }
.hero__title{
  font-size:42px; line-height:1.18; font-weight:700;
  margin-bottom:18px;
  color:var(--white);
}
.hero__title em{ font-style:normal; color:var(--gold-400); }
.hero__text{
  font-size:16.5px; line-height:1.65; color:#e6d8c0;
  max-width:540px; margin-bottom:28px;
}
.hero__actions{ display:flex; flex-wrap:wrap; gap:14px; margin-bottom:34px; }
.hero__stats{ display:flex; flex-wrap:wrap; gap:28px; }
.hero__stat{ display:flex; flex-direction:column; gap:2px; }
.hero__stat b{ font-family:var(--font-head); font-size:22px; color:var(--white); }
.hero__stat span{ font-size:12.5px; color:#c8b696; }

@media (max-width:820px){
  .hero__body{ padding:44px 26px; max-width:100%; }
  .hero__title{ font-size:30px; }
  .hero__media::after{ background:linear-gradient(180deg, rgba(24,15,8,0.55) 0%, rgba(24,15,8,0.92) 62%, rgba(24,15,8,0.97) 100%); }
}

/* =========================================================
   4. ЗАГОЛОВОК СТРАНИЦЫ БЛОГА
   ========================================================= */
.page-title{
  padding:36px 0 4px;
}
.page-title h1{
  font-size:34px; font-weight:700;
}
.page-title p{
  color:var(--ink-500); font-size:16px; margin-top:8px; max-width:640px;
}

/* ---------- Табы категорий — карусель (archive.php: список таксономии) ---------- */
.category-carousel{
  position:relative;
  padding:20px 0 18px;
  border-bottom:1px solid var(--line);
  margin-bottom:28px;
}
.category-carousel__row{ position:relative; }

.category-tabs{
  display:flex; flex-wrap:nowrap; gap:10px;
  overflow-x:auto;
  scroll-behavior:smooth;
  scrollbar-width:none;
  -ms-overflow-style:none;
  padding:2px 46px 4px;
}
.category-tabs::-webkit-scrollbar{ display:none; }
.category-tabs__item{
  flex:0 0 auto;
  display:inline-flex; align-items:center; gap:8px;
  white-space:nowrap;
  padding:9px 18px;
  border-radius:999px;
  background:var(--white);
  border:1.5px solid var(--line);
  font-weight:600; font-size:14px;
  color:var(--ink-700);
}
.category-tabs__item svg{ flex-shrink:0; opacity:.85; }
.category-tabs__item:hover{ border-color:var(--gold-500); color:var(--brown-600); }
.category-tabs__item.is-active{
  background:var(--brown-600); border-color:var(--brown-600); color:var(--white);
}
.category-tabs__item.is-active svg{ opacity:1; }

.category-carousel__fade{
  position:absolute; top:0; bottom:4px; width:46px; z-index:1; pointer-events:none;
}
.category-carousel__fade--left{ left:0; background:linear-gradient(90deg, var(--bg-page), rgba(247,240,226,0)); }
.category-carousel__fade--right{ right:0; background:linear-gradient(270deg, var(--bg-page), rgba(247,240,226,0)); }

.category-carousel__arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:34px; height:34px;
  border-radius:50%;
  background:var(--brown-600); color:var(--white); border:none;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 10px rgba(43,28,16,0.25);
  z-index:2;
}
.category-carousel__arrow:hover{ background:var(--brown-700); }
.category-carousel__arrow--prev{ left:0; }
.category-carousel__arrow--next{ right:0; }

/* =========================================================
   5. РЕКЛАМНЫЕ БЛОКИ (Яндекс.Директ)
   template-parts/ad-slot.php — подставить RTB-код блока Яндекса
   ========================================================= */
.ad-slot{
  position:relative;
  background:var(--white);
  border:1px dashed #d6c093;
  border-radius:var(--radius-m);
  display:flex; align-items:center; justify-content:center;
  color:var(--ink-300);
  font-size:13px;
  overflow:hidden;
}
.ad-slot::before{
  content:'РЕКЛАМА';
  position:absolute; top:8px; left:12px;
  font-size:10px; font-weight:700; letter-spacing:.08em;
  color:var(--ink-300);
}
.ad-slot__inner{ text-align:center; }
.ad-slot__inner small{ display:block; margin-top:4px; color:var(--ink-300); }

.ad-slot--leaderboard{ height:100px; margin:28px 0; }
.ad-slot--leaderboard .ad-slot__inner::after{ content:'Рекламный блок 728×90 / адаптивный'; }

.posts-grid > .ad-slot--infeed{ grid-column:span 2; grid-row:span 1; }
.ad-slot--infeed{ min-height:100%; }
.ad-slot--infeed .ad-slot{ height:100%; min-height:220px; }
.ad-slot--infeed .ad-slot__inner::after{ content:'Рекламный блок в ленте'; }

.ad-slot--sidebar{ height:250px; margin-bottom:24px; }
.ad-slot--sidebar .ad-slot__inner::after{ content:'300×250'; }

.ad-slot--sidebar-tall{ height:600px; margin-bottom:24px; }
.ad-slot--sidebar-tall .ad-slot__inner::after{ content:'300×600'; }

.ad-slot--inarticle{ height:120px; margin:32px 0; }
.ad-slot--inarticle .ad-slot__inner::after{ content:'Рекламный блок в статье'; }

.ad-slot__inner::after{
  display:block; margin-top:2px; color:var(--ink-300); font-size:12px;
}

/* =========================================================
   6. КОНТЕНТНАЯ СЕТКА (главная страница блога)
   ========================================================= */
.blog-layout{
  display:grid;
  grid-template-columns:1fr 320px;
  gap:40px;
  align-items:start;
}

/* ---------- Ассиметричная сетка карточек (The Loop) ---------- */
.posts-grid{
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  grid-auto-rows:minmax(180px, auto);
  gap:22px;
}

.card{
  background:var(--white);
  border-radius:var(--radius-m);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease;
  display:flex; flex-direction:column;
  grid-column:span 2;
  grid-row:span 1;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-hover); }

/* Размеры карточек, создающие асимметрию бенто-сетки */
.card--xl{ grid-column:span 4; grid-row:span 2; }
.card--tall{ grid-column:span 2; grid-row:span 2; }
.card--wide{ grid-column:span 3; grid-row:span 1; }
.card--std{ grid-column:span 2; grid-row:span 1; }

.card__media{ position:relative; flex:1; min-height:76px; overflow:hidden; }
.card__media img{ width:100%; height:100%; object-fit:cover; transition:transform .3s ease; }
.card:hover .card__media img{ transform:scale(1.05); }
.card__tag{ position:absolute; top:14px; left:14px; }

.card__body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex-shrink:0; }
.card--xl .card__body,
.card--tall .card__body{ padding:20px 22px 22px; }
.card__title{
  font-size:17px; line-height:1.32; font-weight:700; font-family:var(--font-head);
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.card--xl .card__title{ font-size:23px; -webkit-line-clamp:3; }
.card--tall .card__title{ font-size:19px; -webkit-line-clamp:3; }
.card__title a:hover{ color:var(--brown-600); }
.card__excerpt{
  color:var(--ink-500); font-size:13.5px; flex:1;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}

.card__meta{
  display:flex; align-items:center; gap:14px;
  font-size:12px; color:var(--ink-500);
  padding-top:8px; margin-top:auto;
  border-top:1px solid var(--line-soft);
}
.card__meta span{ display:inline-flex; align-items:center; gap:5px; }
.card__meta svg{ width:13px; height:13px; flex-shrink:0; opacity:.7; }

/* На узких карточках без свободного места скрываем описание */
.card--std .card__excerpt{ display:none; }

/* ---------- Пагинация ---------- */
.pagination{
  margin:36px 0 8px;
}
.pagination .nav-links{
  display:flex; justify-content:center; align-items:center; gap:8px; flex-wrap:wrap;
}
.pagination a, .pagination span{
  min-width:40px; height:40px; padding:0 6px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px;
  background:var(--white);
  border:1.5px solid var(--line);
  font-weight:600; font-size:14px; color:var(--ink-700);
}
.pagination a:hover{ border-color:var(--gold-500); color:var(--brown-600); }
.pagination .current{ background:var(--brown-600); border-color:var(--brown-600); color:var(--white); }
.pagination .dots{ border:none; background:none; color:var(--ink-300); }
.screen-reader-text{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap;
}

/* =========================================================
   7. САЙДБАР  (template: sidebar.php)
   ========================================================= */
.sidebar{ display:flex; flex-direction:column; gap:0; }
.widget{
  background:var(--white);
  border-radius:var(--radius-m);
  padding:22px;
  box-shadow:var(--shadow-card);
  margin-bottom:24px;
}
.widget__title{
  font-size:16px; font-weight:700; font-family:var(--font-head); margin-bottom:16px;
  display:flex; align-items:center; gap:8px;
}
.widget__title::before{
  content:''; width:4px; height:16px; background:var(--red-500); border-radius:2px;
}

.widget-post{ display:flex; gap:12px; margin-bottom:16px; }
.widget-post:last-child{ margin-bottom:0; }
.widget-post__media{ width:76px; height:60px; border-radius:8px; overflow:hidden; flex-shrink:0; }
.widget-post__media img{ width:100%; height:100%; object-fit:cover; }
.widget-post__title{ font-size:13.5px; font-weight:700; line-height:1.35; }
.widget-post__title a:hover{ color:var(--brown-600); }
.widget-post__meta{ font-size:11.5px; color:var(--ink-500); margin-top:6px; }

.widget-categories li{ border-bottom:1px solid var(--line-soft); }
.widget-categories li:last-child{ border-bottom:none; }
.widget-categories a{
  display:flex; justify-content:space-between; align-items:center;
  padding:11px 2px;
  font-size:14px; font-weight:600; color:var(--ink-700);
}
.widget-categories a:hover{ color:var(--brown-600); }
.widget-categories a span{
  font-size:12px; color:var(--ink-500); font-weight:600;
  background:var(--bg-soft); border-radius:999px; padding:2px 9px;
}

/* ---------- Виджет подписки ---------- */
.widget--subscribe{
  background:linear-gradient(135deg, var(--brown-700), var(--wood-900));
  color:var(--white);
}
.widget--subscribe .widget__title{ color:var(--white); }
.widget--subscribe p{ color:#e6d8c0; font-size:13.5px; }
.subscribe-form{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.subscribe-form input{
  height:44px; border-radius:10px; border:none; padding:0 14px; font-size:14px;
}

/* =========================================================
   8. ПОДВАЛ (template: footer.php)
   ========================================================= */
.site-footer{
  background:var(--wood-900);
  color:#c2ac86;
  margin-top:60px;
}
.site-footer .container{ padding-top:52px; padding-bottom:24px; }
.footer-grid{
  display:grid;
  grid-template-columns:1.3fr 1.5fr 1fr;
  gap:32px;
  padding-bottom:36px;
}
.footer-col__title{ color:var(--white); font-size:14px; font-weight:700; margin-bottom:16px; letter-spacing:.02em; }
.footer-col li{ margin-bottom:10px; font-size:13.5px; }
.footer-col a:hover{ color:var(--white); }
.footer-col--categories ul{ columns:2; column-gap:20px; }
.footer-about{ display:flex; flex-direction:column; }
.footer-about__brand{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.footer-about__brand-icon{
  display:flex; align-items:center; justify-content:center;
  width:70px; height:70px; flex-shrink:0;
  border-radius:50%;
  background:radial-gradient(circle, #faf3e2 0%, #faf3e2 52%, rgba(250,243,226,0) 76%);
}
.footer-about__brand-icon img{ height:54px; width:auto; display:block; }
.footer-about__brand-title{ font-family:var(--font-head); font-weight:700; font-size:22px; color:var(--white); }
.footer-about p{ font-size:13.5px; color:#b3a181; max-width:280px; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.08);
  padding:18px 0;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12.5px; color:#8f7c5e;
}
.footer-bottom a:hover{ color:var(--white); }

/* =========================================================
   9. СТРАНИЦА ОТДЕЛЬНОЙ СТАТЬИ (template: single.php)
   ========================================================= */
.post-header{ padding:22px 0 0; max-width:820px; }
.post-header__title{ font-size:34px; line-height:1.3; font-weight:700; margin:14px 0 18px; }

.post-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:18px;
  font-size:13.5px; color:var(--ink-500);
  padding-bottom:20px; margin-bottom:8px;
  border-bottom:1px solid var(--line);
}
.post-meta span{ display:inline-flex; align-items:center; gap:6px; }
.post-meta svg{ width:16px; height:16px; opacity:.7; }
.post-meta__author{ display:flex; align-items:center; gap:8px; color:var(--ink-700); font-weight:600; }
.post-meta__author img{ width:28px; height:28px; border-radius:50%; }

.post-hero{
  margin:26px 0 8px;
  border-radius:var(--radius-l);
  overflow:hidden;
  aspect-ratio:16/7;
  box-shadow:var(--shadow-card);
}
.post-hero img{ width:100%; height:100%; object-fit:cover; }
.post-hero__caption{ font-size:12.5px; color:var(--ink-500); text-align:center; margin-top:10px; }

/* ---------- Оглавление статьи (TOC) ---------- */
.toc{
  max-width:820px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-m);
  padding:22px 26px;
  margin:28px 0;
  box-shadow:var(--shadow-card);
}
.toc__title{
  font-family:var(--font-head); font-weight:700; font-size:15px;
  margin-bottom:14px; display:flex; align-items:center; gap:8px;
}
.toc__title::before{ content:''; width:4px; height:16px; background:var(--red-500); border-radius:2px; }
.toc ol{
  counter-reset:toc; list-style:none; margin:0; padding:0;
  display:grid; gap:4px;
}
.toc li{ counter-increment:toc; }
.toc a{
  display:flex; align-items:center; gap:12px;
  padding:6px 4px; border-radius:8px;
  font-size:14.5px; font-weight:600; color:var(--ink-700);
}
.toc a::before{
  content:counter(toc);
  flex-shrink:0; width:24px; height:24px;
  border-radius:50%;
  background:var(--cream-100); color:var(--brown-700);
  font-size:12px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.toc a:hover{ background:var(--bg-soft); color:var(--brown-700); }
.toc a:hover::before{ background:var(--brown-600); color:var(--white); }

.post-body{ max-width:820px; font-size:16.5px; line-height:1.75; color:var(--ink-700); }
.post-body h2{ font-size:24px; font-weight:700; font-family:var(--font-head); margin:34px 0 14px; color:var(--ink-900); scroll-margin-top:100px; }
.post-body h3{ font-size:19px; font-weight:700; margin:26px 0 12px; color:var(--ink-900); scroll-margin-top:100px; }
.post-body p{ margin-bottom:18px; }
.post-body ul{ margin:0 0 18px; padding-left:22px; list-style:disc; }
.post-body ol{ margin:0 0 18px; padding-left:22px; list-style:decimal; }
.post-body li{ margin-bottom:8px; }
.post-body li::marker{ color:var(--brown-600); }
.post-body a{ color:var(--brown-700); text-decoration:underline; text-decoration-color:var(--gold-400); }

.post-body blockquote{
  margin:24px 0; padding:18px 22px;
  background:var(--cream-100);
  border-left:4px solid var(--brown-600);
  border-radius:0 var(--radius-s) var(--radius-s) 0;
  font-style:normal; font-size:15.5px; color:var(--wood-900);
}
.callout{
  margin:26px 0; padding:20px 22px;
  border-radius:var(--radius-m);
  background:#fdeceb;
  border:1px solid #f2c7c1;
  font-size:15px; color:#8a2a1f;
  display:flex; gap:14px;
}
.callout strong{ display:block; margin-bottom:4px; color:var(--red-600); font-family:var(--font-head); }

.post-image{ margin:26px 0; }
.post-image img{ border-radius:var(--radius-m); width:100%; aspect-ratio:16/7; object-fit:cover; }
.post-image figcaption{ font-size:12.5px; color:var(--ink-500); margin-top:8px; text-align:center; }

.tag-list{ display:flex; flex-wrap:wrap; gap:8px; margin:34px 0; max-width:820px; }

.share-bar{
  display:flex; align-items:center; gap:10px; margin:20px 0 0;
}
.share-bar span{ font-size:13px; color:var(--ink-500); font-weight:600; }
.share-bar a{
  width:36px; height:36px; border-radius:50%;
  background:var(--bg-soft); color:var(--brown-700);
  display:flex; align-items:center; justify-content:center;
}
.share-bar a:hover{ background:var(--brown-600); color:var(--white); }

.author-box{
  max-width:820px;
  display:flex; gap:16px; align-items:flex-start;
  padding:22px; margin:38px 0;
  background:var(--white); border-radius:var(--radius-m); box-shadow:var(--shadow-card);
}
.author-box img{ width:56px; height:56px; border-radius:50%; flex-shrink:0; }
.author-box__name{ font-weight:700; font-family:var(--font-head); margin-bottom:4px; }
.author-box p{ font-size:13.5px; color:var(--ink-500); margin:0; }

.related-posts{ margin-top:48px; }
.related-posts__title{ font-size:22px; font-weight:700; font-family:var(--font-head); margin-bottom:20px; }
.related-posts .posts-grid{ grid-template-columns:repeat(3, 1fr); grid-auto-rows:auto; }
.related-posts .card{ grid-column:auto; grid-row:auto; }
.related-posts .card__media{ aspect-ratio:5/3; flex:none; }

/* =========================================================
   10. Адаптив
   ========================================================= */
@media (max-width:1024px){
  .blog-layout{ grid-template-columns:1fr; }
  .posts-grid{ grid-template-columns:repeat(4, 1fr); grid-auto-rows:170px; }
  .card--xl{ grid-column:span 4; }
  .card--tall{ grid-column:span 2; }
  .card--wide{ grid-column:span 2; }
  .card--std{ grid-column:span 2; }
  .footer-grid{ grid-template-columns:1fr 1fr 1fr; }
  .related-posts .posts-grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width:820px){
  .category-carousel__arrow, .category-carousel__fade{ display:none; }
  .category-tabs{ padding:2px 2px 4px; }
  .topbar{ display:none; }
  .site-header .container{ height:76px; gap:10px; }
  .site-header__logo{ gap:10px; }
  .site-header__crest{ height:54px; }
  .site-header__title{ font-size:20px; }
  .site-header__tagline{ display:none; }
  .site-search{ max-width:none; height:40px; padding:0 6px 0 14px; }
  .site-header__actions{ gap:8px; }
  .site-header__actions .btn--primary{ display:none; }

  .page-title h1{ font-size:26px; }
  .posts-grid{ grid-template-columns:repeat(2, 1fr); grid-auto-rows:auto; }
  .card, .card--xl, .card--tall, .card--wide, .card--std{ grid-column:span 2; grid-row:span 1; }
  .card--xl .card__media, .card--tall .card__media, .card--wide .card__media, .card--std .card__media{ aspect-ratio:5/3; flex:none; }
  .card--std .card__excerpt{ display:block; }
  .footer-grid{ grid-template-columns:1fr; }
  .post-header__title{ font-size:26px; }
  .post-body{ font-size:16px; }
}

@media (max-width:560px){
  .footer-col--categories ul{ columns:1; }
  .posts-grid{ grid-template-columns:1fr; }
  .card, .card--xl, .card--tall, .card--wide, .card--std{ grid-column:span 1; }
}

@media (max-width:520px){
  .footer-bottom{ flex-direction:column; gap:8px; text-align:center; }
}

/* =========================================================
   11. МОДАЛЬНОЕ ОКНО «Задать вопрос редакции»
   ========================================================= */
.modal-overlay{
  position:fixed; inset:0; z-index:200;
  background:rgba(43,28,16,0.6);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.modal-overlay[hidden]{ display:none; }
.modal{
  position:relative;
  width:100%; max-width:440px;
  background:var(--white);
  border-radius:var(--radius-m);
  box-shadow:var(--shadow-card);
  padding:32px;
}
.modal__close{
  position:absolute; top:14px; right:14px;
  width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:1.5px solid var(--line); color:var(--ink-700);
  cursor:pointer;
}
.modal__close:hover{ border-color:var(--gold-500); color:var(--brown-600); }
.modal__title{ font-size:20px; font-weight:700; font-family:var(--font-head); margin:0 0 6px; padding-right:36px; }
.modal__hint{ font-size:13.5px; color:var(--ink-500); margin:0 0 20px; }
.modal-form{ display:flex; flex-direction:column; gap:14px; }
.modal-form__field{ display:flex; flex-direction:column; gap:6px; font-size:13.5px; font-weight:600; color:var(--ink-700); }
.modal-form__field input,
.modal-form__field textarea{
  height:44px; border-radius:10px; border:1.5px solid var(--line); padding:0 14px;
  font-size:14px; font-family:inherit; color:var(--ink-900);
}
.modal-form__field textarea{ height:auto; padding:10px 14px; resize:vertical; }
.modal-form__field input:focus,
.modal-form__field textarea:focus{ outline:none; border-color:var(--gold-500); }
.modal-form__status{ margin:0; font-size:13.5px; min-height:18px; }
.modal-form__status.is-success{ color:var(--green-600); }
.modal-form__status.is-error{ color:var(--red-500); }

/* После успешной отправки поля и кнопка скрываются — остаётся только сообщение */
.modal-form.is-submitted .modal-form__field,
.modal-form.is-submitted button[type="submit"]{ display:none; }
.modal-form.is-submitted .modal-form__status.is-success{ font-size:15px; font-weight:600; }
body.modal-open{ overflow:hidden; }

@media (max-width:520px){
  .modal{ padding:24px; }
}
