/* ─────────────────────────────────────────────────────────────
   Журнал (блог): витрина, плитки рубрик, фильтр, архивы
   Дополняет main.css. Переменные и .article-card* берутся оттуда.
   ───────────────────────────────────────────────────────────── */

/* ─── Hero журнала ─────────────────────────────────────────── */
.journal-hero-sub {
  color: rgba(255, 255, 255, .55);
  font-size: .98rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 6px 0 22px;
}
.journal-search {
  position: relative;
  max-width: 560px;
  display: flex;
  align-items: center;
}
.journal-search-input {
  width: 100%;
  padding: 15px 108px 15px 20px;
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-size: .95rem;
  transition: var(--tr);
}
.journal-search-input::placeholder { color: rgba(255, 255, 255, .38); }
.journal-search-input:focus {
  outline: none;
  border-color: var(--c3);
  background: rgba(255, 255, 255, .1);
}
.journal-search-count {
  position: absolute;
  right: 18px;
  font-size: .78rem;
  color: rgba(255, 255, 255, .4);
  pointer-events: none;
  white-space: nowrap;
}

/* ─── Плитки рубрик ────────────────────────────────────────── */
.journal-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 44px;
}
.journal-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 16px;
  border-radius: var(--r);
  background: #fff;
  border: 1.5px solid #F0E4E0;
  box-shadow: var(--shadow);
  transition: var(--tr);
}
.journal-tile:hover {
  transform: translateY(-3px);
  border-color: var(--c3);
  box-shadow: var(--shadow-hover);
}
.journal-tile-ico { font-size: 1.6rem; line-height: 1; }
.journal-tile-name { font-size: .9rem; font-weight: 700; line-height: 1.35; color: #2D2D2D; }
.journal-tile-count {
  font-size: .74rem;
  font-weight: 700;
  color: var(--c3d);
  background: var(--c2);
  border-radius: 20px;
  padding: 2px 9px;
}

/* ─── Тулбар-фильтр ────────────────────────────────────────── */
.journal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid #F0F0F0;
}
.jt-chip {
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  border: 1.5px solid #E9E0DD;
  background: #fff;
  color: var(--c4);
  cursor: pointer;
  transition: var(--tr);
  line-height: 1;
}
.jt-chip:hover { border-color: var(--c3); color: var(--c3d); }
.jt-chip.is-active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.jt-chip-n, .jt-chip .jt-chip-n {
  opacity: .7;
  font-size: .76rem;
  margin-left: 3px;
}

/* ─── Секции рубрик на витрине ─────────────────────────────── */
.journal-section { margin-bottom: 52px; scroll-margin-top: 90px; }
.journal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.journal-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.3px;
}
.journal-section-ico { font-size: 1.25rem; }
.journal-section-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--c3d);
  background: var(--c2);
  border-radius: 20px;
  padding: 2px 10px;
}
.journal-section-all {
  font-size: .86rem;
  font-weight: 700;
  color: var(--c3d);
  white-space: nowrap;
  transition: var(--tr);
}
.journal-section-all:hover { color: var(--c1); }

.journal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--c4);
  font-size: .95rem;
}

/* карточка-«ушла из фильтра» */
.article-card.is-hidden { display: none; }
.journal-section.is-hidden { display: none; }

/* ─── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .journal-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .journal-tiles { grid-template-columns: repeat(2, 1fr); }
  .journal-search-input { padding-right: 20px; }
  .journal-search-count { display: none; }
  .journal-section-head { flex-direction: column; gap: 6px; }
}
