/* ARTEM-CONTENT-ARCHITECTURE-20261127 — стили разделов Блог и Группы.
   Палитра и типографика повторяют Психологическую лабораторию отношений. */
:root {
  --sec-ink: #24180f;
  --sec-brown: #3b2a1c;
  --sec-gold: #d9b78b;
  --sec-gold-soft: #f0d7ae;
  --sec-cream: #f8f0e4;
  --sec-line: rgba(217, 183, 139, .28);
}

.section-page { background: var(--sec-cream); color: var(--sec-ink); }
.s-main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

.s-hero {
  background: radial-gradient(ellipse at 50% 20%, #312216 0%, #21160e 58%, #180e08 100%);
  color: var(--sec-gold-soft);
  padding: 48px 0;
}
.s-hero h1 { margin: 6px 0 12px; font-size: clamp(30px, 5vw, 48px); line-height: 1.1; color: #f6ecd8; }
.s-hero p { max-width: 760px; margin: 0; line-height: 1.6; color: #dfcaa9; }
.s-hero a { color: var(--sec-gold); }
.s-eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sec-gold); }
.s-hero--program { padding-bottom: 36px; }

.s-section { padding: 34px 0 56px; }
.s-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.s-search input, .s-sort select {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--sec-line);
  border-radius: 10px; background: #fff; color: var(--sec-ink); font: inherit;
}
.s-search input { min-width: 240px; }
.s-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.s-btn {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--sec-line); background: transparent; color: var(--sec-brown); font: inherit;
}
.s-btn.is-active, .s-btn:hover { background: var(--sec-brown); color: var(--sec-gold-soft); border-color: var(--sec-brown); }
.s-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; }

.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.s-card {
  display: flex; flex-direction: column; gap: 10px; box-sizing: border-box;
  background: #fffaf2; border: 1px solid var(--sec-line); border-radius: 16px;
  padding: 22px; min-height: 190px; overflow-wrap: anywhere;
}
.s-card h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.s-card h2 a { color: var(--sec-brown); text-decoration: none; }
.s-card h2 a:hover { color: #8c6a3e; text-decoration: underline; }
.s-card p { margin: 0; line-height: 1.5; }
.s-card-badge {
  align-self: flex-start; font-size: 12px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; background: #efe0c9; color: var(--sec-brown);
}
.s-card-meta, .s-card-source { font-size: 13px; color: #6e5b48; }
.s-card--group .btn { align-self: flex-start; margin-top: auto; }
.s-status--open, .s-status--few_places { background: #2f6b46; color: #fff; }
.s-status--draft, .s-status--planned { background: #efe0c9; color: var(--sec-brown); }
.s-status--closed, .s-status--finished, .s-status--archive { background: #d7d0c7; color: #4a4038; }

.s-pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.s-pager button {
  min-width: 44px; min-height: 44px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--sec-line); background: #fff; color: var(--sec-brown); font: inherit;
}
.s-pager button.is-active { background: var(--sec-brown); color: var(--sec-gold-soft); }
.s-cover { display: block; border-radius: 12px; overflow: hidden; background: #efe0c9; }
.s-cover img { display: block; width: 100%; height: 140px; object-fit: cover; }
.s-upcoming { align-self: flex-start; margin: 0; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #2f6b46; color: #fff; }
.s-empty, .s-note { color: #6e5b48; line-height: 1.6; }

/* Каталог статей: шесть рубрик, поиск, счётчики */
.article-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 24px 0; }
.article-cat-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; min-height: 110px; text-align: left; cursor: pointer; background: #fffaf2; border: 1px solid var(--sec-line); border-radius: 16px; color: var(--sec-brown); font: inherit; transition: border-color .2s, transform .2s; }
.article-cat-card:hover, .article-cat-card.is-active { border-color: var(--sec-gold); transform: translateY(-2px); background: #f6ead7; }
.article-cat-card strong { font-size: 17px; }
.article-cat-card > span:last-child { font-size: 13px; color: #6e5b48; }
.article-cat-count { font: 400 12px/1 system-ui; color: #8c6a3e; letter-spacing: .08em; }
.article-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.article-controls input, .article-controls select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--sec-line); border-radius: 10px; font: inherit; background: #fff; color: var(--sec-ink); }
.article-controls input { flex: 1 1 240px; }
.article-counter { margin-left: auto; font-size: 14px; color: #6e5b48; }
.article-tag { display: inline-block; margin: 0 6px 6px 0; padding: 3px 8px; border-radius: 999px; background: #efe0c9; font-size: 11px; color: var(--sec-brown); }
.article-card-tags { margin: 8px 0 0; }
.s-note { margin-top: 26px; font-size: 14px; }

.s-fields { margin: 0 0 28px; }
.s-field { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sec-line); }
.s-field dt { font-weight: 600; color: var(--sec-brown); }
.s-field dd { margin: 0; }
.s-block h2 { font-size: 24px; margin-top: 28px; }

/* Six equal tabs, no horizontal overflow, safe-area aware. */
.mobile-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  box-sizing: border-box;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: #24180f; border-top: 1px solid var(--sec-line);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-width: 0; min-height: 52px; text-decoration: none;
  color: var(--sec-gold); font-size: 11px; line-height: 1.1; text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tabbar-item svg { flex: 0 0 auto; width: 22px; height: 22px; }
.tabbar-item.is-active { color: #fff8ee; }
.tabbar-item.is-active::after { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--sec-gold); }
.tabbar-item:focus-visible { outline: 2px solid var(--sec-gold); outline-offset: -2px; }

body.lab-v11 .mobile-tabbar { display: none; }
body.lab-v11 .mobile-tabbar .tabbar-item { flex: initial; max-width: none; min-width: 0; }
body.lab-v11 .mobile-tabbar .tabbar-item.is-active { color: #fff8ee; }
@media (max-width: 767px) {
  .mobile-tabbar, body.lab-v11 .mobile-tabbar { display: grid !important; }
  .s-main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .s-search input { width: 100%; min-width: 0; }
  .s-sort { margin-left: 0; }
  .s-grid { grid-template-columns: 1fr; }
  .s-field { grid-template-columns: 1fr; gap: 4px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .s-btn, .s-card, .tabbar-item { transition: none !important; }
}
