/* =========================================================
   EuroKeramika — тема для BryanCMS 1.3
   Терракота #b44b2a, камень (stone), тёмный сланец в подвале
   ========================================================= */

:root {
  --accent: #b44b2a;
  --accent-600: #9d3f22;
  --accent-700: #943719;
  --accent-50: #fff7f2;
  --accent-100: #ffeedf;

  --ink: #0f172a;          /* заголовки */
  --text: #1e293b;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --page-bg: #fcfbf9;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Noto Serif", Georgia, serif;

  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 24px -8px rgba(15, 23, 42, .14);
  --container: 1280px;
}

/* ---------- Цвета рубрик (по слагу рубрики) ----------
   --c — точка, --cd — плашка с белым текстом, --cl — светлый фон.
   Неизвестный слаг получает терракоту. Добавить рубрику: скопируйте строку и поменяйте слаг. */
.cat { --c: var(--accent); --cd: var(--accent); --cl: var(--accent-50); }
.cat[data-cat="plitka"], .cat[data-cat="materialy"] { --c: #f59e0b; --cd: #b45309; --cl: #fffbeb; }
.cat[data-cat="montazh"]     { --c: #3b82f6; --cd: #2563eb; --cl: #eff6ff; }
.cat[data-cat="dizajn"], .cat[data-cat="dizayn"] { --c: #f43f5e; --cd: #e11d48; --cl: #fff1f2; }
.cat[data-cat="santekhnika"] { --c: #14b8a6; --cd: #0f766e; --cl: #f0fdfa; }
.cat[data-cat="uhod"]        { --c: #10b981; --cd: #047857; --cl: #ecfdf5; }
.dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--c, var(--accent)); }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text);
  background: var(--page-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
button { font: inherit; cursor: pointer; }
h1 { margin: 0; color: var(--ink); line-height: 1.2; }
svg { width: 1em; height: 1em; flex: 0 0 auto; }
:focus-visible { outline: 3px solid rgba(180, 75, 42, .45); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow-md); color: var(--ink); }
.skip-link:focus { left: 8px; }

.page-main { flex: 1 0 auto; padding-top: 28px; padding-bottom: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: all .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(180, 75, 42, .55); }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--stone-200); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-dark { background: rgba(255,255,255,.06); color: #e7e5e4; border-color: rgba(255,255,255,.12); margin-top: 8px; }
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Прогресс чтения ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; }
.read-progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* ---------- Верхняя инфо-панель ---------- */
.topbar { background: var(--slate-900); color: var(--stone-300); font-size: 12px; border-bottom: 1px solid var(--slate-800); }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #e07a52; white-space: nowrap; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s ease-in-out infinite; }
.topbar-sep { color: var(--stone-500); }
.topbar-desc { color: var(--stone-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.topbar-updated { color: var(--stone-400); white-space: nowrap; }
.topbar-link { color: var(--stone-400); white-space: nowrap; }
.topbar-link:hover, .topbar-link.active { color: #fff; }
@media (max-width: 767px) {
  .topbar-sep, .topbar-desc, .topbar-updated { display: none; }
}

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--stone-200); box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--ink); }
.brand-logo { max-height: 46px; width: auto; }
.brand-icon {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #c85a32, var(--accent-700));
  box-shadow: 0 6px 14px -4px rgba(200, 90, 50, .4); transition: transform .2s;
}
.brand-icon svg { width: 24px; height: 24px; }
.brand:hover .brand-icon { transform: scale(1.05); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.brand:hover .brand-name { color: var(--accent-600); }
.brand-tagline { margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-400); }

.header-search { position: relative; display: none; flex: 1; max-width: 440px; margin: 0 24px; }
.header-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--stone-400); pointer-events: none; }
.header-search input, .mobile-search input {
  width: 100%; padding: 9px 16px 9px 40px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--stone-100); border: 1px solid var(--stone-200); border-radius: 999px; transition: all .2s;
}
.header-search input::placeholder, .mobile-search input::placeholder { color: var(--stone-400); }
.header-search input:focus, .mobile-search input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 75, 42, .15); }
.header-badge { display: none; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--stone-600); background: var(--stone-100); border: 1px solid var(--stone-200); }

.burger { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--stone-200); background: #fff; color: var(--slate-800); }
.burger:hover { background: var(--stone-100); }
.burger svg { width: 22px; height: 22px; }
.burger .ico-close, .burger[aria-expanded="true"] .ico-open { display: none; }
.burger[aria-expanded="true"] .ico-close { display: block; }

/* Навигация по рубрикам */
.cat-nav { border-top: 1px solid var(--stone-100); background: #fff; }
.cat-nav-row { display: none; align-items: center; justify-content: space-between; gap: 16px; }
.cat-nav-links { display: flex; align-items: center; gap: 4px; padding: 4px 0; overflow-x: auto; scrollbar-width: none; }
.cat-nav-links::-webkit-scrollbar { display: none; }
.cat-nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #334155; white-space: nowrap; }
.cat-nav-link:hover { color: var(--accent-600); background: var(--accent-50); }
.cat-nav-link.active { color: var(--accent-600); background: var(--accent-50); }
.cat-nav-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--stone-500); white-space: nowrap; }
.note-pill { padding: 2px 8px; border-radius: 6px; background: #d1fae5; color: #065f46; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; }

.mobile-menu { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; padding-bottom: 16px; border-top: 1px solid var(--stone-100); }
.mobile-menu[hidden] { display: none; }
.mobile-search { position: relative; margin-bottom: 8px; }
.mobile-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--stone-400); }
.mobile-search input { border-radius: 10px; padding-left: 36px; }
.mobile-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--slate-800); }
.mobile-link > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.mobile-link:hover, .mobile-link.active { background: var(--accent-50); color: var(--accent-600); }
.mobile-count { font-size: 12px; color: var(--stone-400); }
.mobile-sep { height: 1px; margin: 6px 0; background: var(--stone-100); }

@media (min-width: 640px) { .header-badge { display: inline-block; } }
@media (min-width: 1024px) {
  .header-search { display: block; }
  .cat-nav-row { display: flex; }
  .burger, .mobile-menu { display: none !important; }
}
@media (max-width: 420px) { .brand-name { font-size: 20px; } .brand-tagline { font-size: 10px; } }

/* ---------- Слайдер ---------- */
.hero { padding-top: 24px; }
.slider {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--slate-900); color: #fff; box-shadow: 0 20px 40px -16px rgba(15, 23, 42, .45);
  height: 440px;
}
@media (min-width: 768px) { .slider { height: clamp(440px, 38vw, 500px); } }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease-in-out, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: brightness(.45); }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, .4) 55%, transparent 100%); }
.slide-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px 24px 56px; max-width: 820px; }
@media (min-width: 640px) { .slide-content { padding: 40px 40px 48px; } }
@media (min-width: 768px) { .slide-content { padding: 56px; } }
.badge {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--cd); box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
a.badge:hover { color: #fff; filter: brightness(1.08); }
.slide-title { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 12px; }
.slide-title a { color: #fff; }
.slide-title a:hover { color: #fbd5c5; }
@media (min-width: 640px) { .slide-title { font-size: 30px; } }
@media (min-width: 768px) { .slide-title { font-size: 38px; } }
.slide-excerpt {
  margin: 0 0 16px; color: var(--stone-300); font-size: 14px; font-weight: 400;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 640px) { .slide-excerpt { font-size: 16px; } }
.slide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--stone-400); }
.slide-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 12px;
  font-weight: 700; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.slide-btn:hover { background: rgba(255,255,255,.2); color: #fbd5c5; }
@media (max-width: 520px) { .slide-btn { margin-left: 0; } }
.slider-arrows { position: absolute; top: 20px; right: 20px; z-index: 2; display: flex; gap: 8px; }
.slider-arrow {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .2s;
}
.slider-arrow:hover { background: rgba(0,0,0,.7); }
.slider-arrow svg { width: 20px; height: 20px; }
.slider-dots { position: absolute; right: 24px; bottom: 22px; z-index: 2; display: flex; gap: 8px; }
.slider-dot { width: 12px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.5); transition: all .3s; }
.slider-dot:hover { background: #fff; }
.slider-dot.active { width: 26px; background: #c85a32; }
@media (max-width: 639px) { .slider-dots { left: 24px; right: auto; bottom: 20px; } }

/* ---------- Сетка ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.content { min-width: 0; }
.home .page-main, .page-home .page-main { padding-top: 48px; }

.feed-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--stone-200); }
.feed-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
@media (min-width: 640px) { .feed-title { font-size: 30px; } }
.feed-sub { margin: 4px 0 0; font-size: 14px; color: var(--stone-500); }
.feed-count { font-size: 12px; color: var(--stone-500); white-space: nowrap; }
.feed-count b { color: var(--accent-600); }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--stone-200); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-media { position: relative; display: block; height: 192px; overflow: hidden; background: var(--stone-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .badge { position: absolute; top: 12px; left: 12px; margin: 0; font-size: 10.5px; padding: 4px 10px; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--stone-400); }
.card-title { margin-bottom: 8px; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.card-title a:hover, .card:hover .card-title a { color: var(--accent-600); }
.card-excerpt { margin: 0 0 16px; font-size: 14px; color: var(--stone-600); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--stone-100); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.card-tags, .card-author { min-width: 0; color: var(--stone-500); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-author:hover { color: var(--accent-600); }
.card-more { color: var(--accent-600); font-weight: 700; white-space: nowrap; }
.card-more:hover { color: var(--accent-700); }
.empty { grid-column: 1 / -1; padding: 40px 24px; text-align: center; color: var(--stone-500); background: #fff; border: 1px dashed var(--stone-300); border-radius: var(--r); }

/* ---------- Блок «Популярно» ---------- */
.top-box { margin-top: 40px; padding: 24px; border-radius: var(--r-lg); background: rgba(245, 245, 244, .7); border: 1px solid var(--stone-200); }
@media (min-width: 640px) { .top-box { padding: 32px; } }
.top-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.top-title { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.top-sub { margin: 2px 0 0; font-size: 12px; color: var(--stone-500); }
.top-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); white-space: nowrap; }
.top-list { display: flex; flex-direction: column; gap: 14px; }
.top-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(231, 229, 228, .8); }
.top-item:hover { border-color: #c85a32; }
.top-item-body { display: flex; flex-direction: column; min-width: 0; }
.top-cat { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cd); }
.top-item-title { margin-top: 2px; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; transition: color .2s; }
.top-item:hover .top-item-title { color: var(--accent-600); }
.top-item-text { margin-top: 4px; font-size: 12px; color: var(--stone-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-num { font-family: var(--font-serif); font-size: 26px; font-weight: 700; line-height: 1; color: var(--stone-300); transition: color .2s; }
.top-item:hover .top-num { color: #c85a32; }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--stone-200); }
.pager-info { font-size: 12px; color: var(--stone-500); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination .page-numbers {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: #334155; background: #fff; border: 1px solid var(--stone-200);
}
.pagination a.page-numbers:hover { background: var(--stone-100); }
.pagination .page-numbers.current { background: #c85a32; border-color: #c85a32; color: #fff; box-shadow: var(--shadow-sm); }
.pagination .page-numbers.dots { background: none; border: 0; color: var(--stone-400); min-width: 16px; padding: 0 2px; }
.pagination .prev, .pagination .next { font-size: 12px; padding: 0 12px; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; }
.sidebar-inner { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1024px) { .page-post .sidebar-inner { position: sticky; top: 96px; } }
.widget { padding: 22px; background: #fff; border: 1px solid var(--stone-200); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--stone-100); }
.widget-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--ink); }
.bar { width: 6px; height: 16px; border-radius: 999px; background: #c85a32; }
.widget-note { font-size: 12px; color: var(--stone-400); }
.widget-ico { width: 16px; height: 16px; color: var(--stone-400); }

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cat-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: #334155; }
.cat-item-name { display: flex; align-items: center; gap: 10px; }
.cat-item .dot { width: 10px; height: 10px; flex-basis: 10px; }
.cat-item-count { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--stone-600); background: var(--stone-100); transition: all .2s; }
.cat-item:hover, .cat-item.active { background: var(--cl); color: var(--cd); }
.cat-item.active { font-weight: 700; }
.cat-item:hover .cat-item-count, .cat-item.active .cat-item-count { background: #fff; color: var(--cd); }

.archive-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.archive-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; color: var(--stone-600); }
.archive-list a > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.archive-list svg { width: 14px; height: 14px; color: var(--stone-400); }
.archive-list a:hover { color: var(--accent-600); }
.archive-count { font-size: 12px; color: var(--stone-400); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--stone-700); background: var(--stone-100); border: 1px solid var(--stone-200); }
.tag-item:hover { background: var(--accent-50); color: var(--accent-600); border-color: #f3c9b7; }

.latest { display: flex; flex-direction: column; }
.latest-item { display: block; padding: 11px 0; border-top: 1px solid var(--stone-100); }
.latest-item:first-child { padding-top: 0; border-top: 0; }
.latest-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--slate-800); transition: color .2s; }
.latest-item:hover .latest-title { color: var(--accent); }
.latest-date { display: block; margin-top: 4px; font-size: 11px; color: var(--stone-400); }

.widget-dark { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--slate-900), var(--slate-800)); border-color: #334155; box-shadow: 0 14px 30px -12px rgba(15, 23, 42, .5); scroll-margin-top: 110px; }
.widget-dark::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 28px; transform: rotate(18deg); background: rgba(200, 90, 50, .12); pointer-events: none; }
.dark-badge { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #e07a52; background: rgba(255,255,255,.08); }
.dark-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.dark-text { margin: 0 0 16px; font-size: 12px; line-height: 1.6; color: var(--stone-300); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { margin-bottom: 22px; font-size: 12px; color: var(--stone-400); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--stone-300); }
.breadcrumbs a { color: var(--stone-500); }
.breadcrumbs a:hover { color: var(--slate-900); }
.breadcrumbs li[aria-current] span { color: var(--slate-800); font-weight: 500; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
@media (max-width: 640px) { .breadcrumbs li[aria-current] span { max-width: 240px; } }

/* ---------- Заголовок ленты ---------- */
.listing-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--stone-200); }
.listing-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); }
.listing-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) { .listing-title { font-size: 34px; } }
.listing-desc { margin: 8px 0 0; max-width: 720px; font-size: 15px; color: var(--stone-500); }
.author-head { display: flex; align-items: center; gap: 18px; }
.author-head .author-avatar { width: 80px; height: 80px; font-size: 30px; }
.search-big { position: relative; display: flex; gap: 8px; max-width: 600px; margin-top: 20px; }
.search-big > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--stone-400); }
.search-big input { flex: 1; min-width: 0; padding: 12px 16px 12px 44px; font: inherit; font-size: 15px; color: var(--text); background: #fff; border: 1px solid var(--stone-200); border-radius: 12px; }
.search-big input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 75, 42, .15); }

/* Аватары авторов (генерирует CMS) */
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.author-avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-100); color: var(--accent-700); font-weight: 800; text-transform: uppercase; }

/* ---------- Статья ---------- */
.post-card { min-width: 0; padding: 24px; background: #fff; border: 1px solid rgba(231, 229, 228, .9); border-radius: var(--r); box-shadow: var(--shadow-sm); }
@media (min-width: 640px) { .post-card { padding: 36px; } }
.page-wide { max-width: 960px; margin: 0 auto; }
.post-header { margin-bottom: 24px; }
.post-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; color: var(--stone-400); }
.kicker-sep { color: var(--stone-300); }
.badge-soft { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--cd, var(--accent)); background: var(--cl, var(--accent-50)); }
a.badge-soft:hover { filter: brightness(.97); }
.post-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 16px; }
@media (min-width: 640px) { .post-title { font-size: 32px; } }
@media (min-width: 1024px) { .post-title { font-size: 38px; } }
.page-lead { margin: 0; font-size: 17px; color: var(--stone-500); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--stone-100); border-bottom: 1px solid var(--stone-100); font-size: 12px; color: var(--stone-400); }
.post-meta-left, .post-meta-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-meta-right { color: var(--stone-500); }
.post-meta-right a:hover { color: var(--accent); }
.post-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--slate-800); }
.post-author:hover { color: var(--accent); }
.post-author .author-avatar { width: 28px; height: 28px; font-size: 12px; }
.post-cover { margin: 0 0 24px; }
.post-cover img { width: 100%; height: 260px; object-fit: cover; border-radius: 12px; }
@media (min-width: 640px) { .post-cover img { height: 360px; } }

/* Оглавление (генерирует CMS) */
.toc-box { margin: 0 0 28px; padding: 16px 18px; background: var(--stone-50); border: 1px solid rgba(231, 229, 228, .8); border-radius: 12px; }
.toc-title { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.toc-item { position: relative; padding-left: 14px; }
.toc-item::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: #c85a32; }
.toc-list a { color: var(--stone-600); }
.toc-list a:hover { color: var(--accent); }
.toc-subitem { padding-left: 20px; font-size: 13px; }
.toc-subitem > a::before { content: "— "; color: var(--stone-300); }

/* Типографика текста статьи */
.prose { font-size: 16px; line-height: 1.75; color: var(--stone-700); overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-of-type { color: var(--stone-600); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(180, 75, 42, .35); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-700); text-decoration-color: currentColor; }
.prose strong, .prose b { color: var(--ink); font-weight: 700; }
.prose h2 { margin: 1.8em 0 .7em; padding-top: .9em; border-top: 1px solid var(--stone-100); font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); scroll-margin-top: 110px; }
@media (min-width: 640px) { .prose h2 { font-size: 23px; } }
.prose h3 { margin: 1.5em 0 .6em; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); scroll-margin-top: 110px; }
.prose h4 { margin: 1.4em 0 .5em; font-size: 16px; font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .45em; padding-left: 4px; }
.prose ul > li::marker { color: var(--accent); }
.prose ol > li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: 16px 20px; border-left: 4px solid #c85a32; background: var(--stone-50); border-radius: 0 12px 12px 0; font-style: italic; color: #334155; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; font-weight: 600; color: var(--stone-500); }
.prose img { border-radius: 12px; margin: 1.5em auto; cursor: zoom-in; }
.prose picture { display: block; }
.prose figure { margin: 1.6em 0; }
.prose figure img, .prose figure picture img { margin: 0; width: 100%; }
.prose figcaption { margin-top: 8px; font-size: 12px; text-align: center; color: var(--stone-400); }
.prose code { padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--stone-100); color: var(--accent-700); }
.prose pre { margin: 1.4em 0; padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: var(--slate-900); color: #e2e8f0; font-size: 14px; }
.prose pre code { padding: 0; background: none; color: inherit; }
.prose table { display: block; width: 100%; max-width: 100%; overflow-x: auto; margin: 1.5em 0; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--stone-200); text-align: left; vertical-align: top; }
.prose th { background: var(--stone-100); color: var(--ink); font-weight: 700; }
.prose tr:nth-child(even) td { background: var(--stone-50); }
.prose iframe, .prose video { max-width: 100%; border: 0; border-radius: 12px; margin: 1.4em 0; }
.prose iframe[src*="youtube"], .prose iframe[src*="rutube"], .prose iframe[src*="vk.com"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose hr { border: 0; height: 1px; margin: 2em 0; background: var(--stone-200); }
.prose-page > p:first-of-type { color: inherit; }

.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--stone-200); }
.post-tags-label { margin-right: 6px; font-size: 12px; font-weight: 600; color: var(--stone-400); }
.post-tags .tag-item { padding: 4px 10px; border-radius: 6px; border: 0; color: var(--stone-600); }
.post-tags .tag-item:hover { background: var(--stone-200); color: var(--ink); }

.post-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.post-share-label { font-size: 12px; color: var(--stone-400); }
.post-share-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--stone-600); background: #fff; border: 1px solid var(--stone-200); }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-copy svg { width: 16px; height: 16px; }

.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; border-radius: 12px; background: var(--stone-50); border: 1px solid var(--stone-200); }
.author-box .author-avatar { width: 64px; height: 64px; font-size: 24px; border-radius: 14px; }
.author-box-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); }
.author-box-name { display: inline-block; margin: 2px 0 6px; font-size: 17px; font-weight: 800; color: var(--ink); }
.author-box-name:hover { color: var(--accent); }
.author-box-bio { margin: 0; font-size: 14px; color: var(--stone-600); }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--stone-200); }
@media (min-width: 640px) { .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-nav-item { display: block; padding: 16px; border-radius: 12px; border: 1px solid var(--stone-200); }
.post-nav-item:hover { border-color: rgba(180, 75, 42, .5); background: var(--stone-50); }
.post-nav-label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--stone-400); }
.post-nav-title { display: block; font-size: 14px; font-weight: 700; color: var(--slate-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-nav-item:hover .post-nav-title { color: var(--accent); }
@media (min-width: 640px) { .post-nav-item.is-right { text-align: right; } }

/* ---------- Комментарии (готовый блок CMS, классы .bc-*) ---------- */
.post-card .bc-comments { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--stone-200); }
.bc-comments .bc-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 17px; font-weight: 800; color: var(--ink); }
.bc-comments .bc-title span { opacity: 1; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--stone-100); color: var(--stone-600); }
.bc-comments .bc-list { display: flex; flex-direction: column; gap: 12px; }
.bc-comments .bc-thread { padding: 16px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--stone-50); }
.bc-comments .bc-avatar { flex-basis: 36px; height: 36px; font-size: 13px; color: var(--accent-700); background: var(--accent-100); }
.bc-comments .bc-admin .bc-avatar { background: var(--accent); color: #fff; }
.bc-comments .bc-badge { background: var(--accent); }
.bc-comments .bc-reply { margin: 12px 0 0 44px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--stone-200); }
.bc-comments .bc-name { font-size: 14px; color: var(--ink); }
.bc-comments .bc-head time { font-size: 11px; color: var(--stone-400); }
.bc-comments .bc-text { font-size: 14px; color: var(--stone-600); }
.bc-comments .bc-reply-btn { opacity: 1; color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 600; }
.bc-comments .bc-form { margin-top: 20px; padding: 20px; border-radius: 12px; background: #fff; border: 1px solid var(--stone-200); }
.bc-comments .bc-form-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.bc-comments .bc-field span { font-size: 12px; color: var(--stone-700); }
.bc-comments .bc-field input, .bc-comments .bc-field textarea { border: 1px solid var(--stone-200); border-radius: 10px; background: var(--stone-50); color: var(--text); font-size: 14px; }
.bc-comments .bc-field input:focus, .bc-comments .bc-field textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 75, 42, .15); }
.bc-comments .bc-check { color: var(--stone-500); }
.bc-comments .bc-check input { accent-color: var(--accent); }
.bc-comments .bc-check a { color: var(--accent); }
.bc-comments .bc-submit { border-radius: 10px; background: var(--accent); font-size: 14px; }
.bc-comments .bc-submit:hover { background: var(--accent-600); }

/* ---------- Контакты ---------- */
.contact-card { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; padding: 22px; border-radius: 14px; background: var(--accent-50); border: 1px solid #f6d6c8; }
@media (min-width: 768px) { .contact-card { flex-direction: row; align-items: center; } }
.contact-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
.contact-icon svg { width: 22px; height: 22px; }
.contact-body { flex: 1; min-width: 0; }
.contact-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); }
.contact-mail { display: inline-block; margin: 2px 0 4px; font-size: 22px; font-weight: 800; color: var(--ink); word-break: break-all; }
.contact-mail:hover { color: var(--accent); }
.contact-note { margin: 0; font-size: 13px; color: var(--stone-600); }

/* ---------- 404 ---------- */
.notfound { max-width: 680px; margin: 16px auto 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.notfound-tiles { display: flex; gap: 10px; margin-bottom: 20px; }
.notfound-tiles span { width: 84px; height: 84px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 52px; font-weight: 800; color: var(--ink); background: #fff; border: 1px solid var(--stone-200); box-shadow: var(--shadow-sm); }
.notfound-tiles .tile-mid { color: #fff; background: linear-gradient(135deg, #c85a32, var(--accent-700)); border: 0; }
.notfound-tiles .tile-mid svg { width: 40px; height: 40px; }
.notfound .search-big { width: 100%; margin: 24px 0 16px; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 64px; padding-top: 56px; padding-bottom: 32px; background: var(--slate-900); color: var(--stone-300); border-top: 1px solid var(--slate-800); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 44px; border-bottom: 1px solid var(--slate-800); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.footer-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #c85a32; color: #fff; }
.footer-icon svg { width: 20px; height: 20px; }
.footer-about p { margin: 14px 0; max-width: 380px; font-size: 13px; line-height: 1.65; color: var(--stone-400); }
.footer-contacts { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-contacts a { display: inline-flex; align-items: center; gap: 8px; color: var(--stone-400); }
.footer-contacts a:hover { color: #e07a52; }
.footer-contacts svg { width: 15px; height: 15px; }
.footer-title { margin-bottom: 14px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-list a { color: var(--stone-400); }
.footer-list a:hover { color: #e07a52; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; padding-top: 28px; font-size: 12px; color: var(--stone-500); text-align: center; }
@media (min-width: 900px) { .footer-bottom { flex-direction: row; text-align: left; } }
.footer-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-pages a { color: var(--stone-500); }
.footer-pages a:hover { color: var(--stone-300); }

/* ---------- Toast и лайтбокс ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 80; padding: 12px 18px; border-radius: 12px; background: var(--slate-900); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(80px); pointer-events: none; transition: all .3s; }
.toast.show { opacity: 1; transform: none; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; object-fit: contain; border-radius: 14px; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; color: var(--slate-800); background: var(--stone-100); }
.lightbox-close svg { width: 20px; height: 20px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
