/* Фильтры списков: рубрики, годы, месяцы */

/* Рубрики: кнопки на широких экранах, список */
.filter-group { padding: 0 3.75rem; }
.filter-chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: .375rem;                    /* 6 — минимальный зазор между плашками */
}
.filter-chips--start { justify-content: flex-start; gap: .625rem; }
.filter-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 2.8125rem;           /* 45 */
  padding: .75rem 1.25rem;         /* 12 / 20 — высота плашки те же 45 */
  white-space: nowrap;
  border: 1px solid #0a1226;
  border-radius: var(--radius);
  background: none;
  color: #0a1226;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.filter-chip:hover,
.filter-chip:focus-visible { color: var(--orange); border-color: var(--orange); }
.filter-chip.is-active,
.filter-chip.is-active:hover,
.filter-chip.is-active:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
/* Рубрика без новостей: плашка на месте, но приглушена и не нажимается */
.filter-chip[disabled] { opacity: .4; cursor: default; }
.filter-chip[disabled]:hover { color: #0a1226; border-color: #0a1226; }
/* Кнопка-аккордеон нужна только мобильной версии */
.filter-accordion__toggle { display: none; }

/* Лента */
.filter-empty { padding: 1.25rem 0; font-size: 1.25rem; color: #0a1226; }
.filter-empty[hidden] { display: none; }

/* Архив новостей (news-archive.html, node 3210-3344 / 3210-4255) */
.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;                    /* 20 между годами и месяцами */
  margin-bottom: -.5rem;           /* до карточек в макете 37, а не общие 40 */
  padding: 0 3.75rem;
}
.filter-groups .filter-groups__group { padding: 0; }
/* Годы: девять плашек во всю ширину строки, зазор 6 — как в макете */
.filter-chips--years { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .375rem; }
/* Месяцы: строка текстом, между пунктами тонкие разделители */
.filter-months { display: flex; align-items: stretch; padding-top: 1.5rem; }
.filter-month {
  flex: 1 1 0;
  min-width: 0;
  padding: .1875rem .625rem;
  border: 0;
  border-left: 1px solid rgba(10, 18, 38, .35);
  background: none;
  color: #0a1226;
  font-family: inherit;
  font-size: 1.25rem;              /* 20 caps, как в макете */
  line-height: 1.375rem;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: color .2s ease;
}
.filter-month:first-child { border-left: 0; }
.filter-month:hover,
.filter-month:focus-visible { color: var(--orange); }
.filter-month.is-active { color: var(--orange); }

/* Планшет (< 1280) */
@media (max-width: 1279px) {
  .filter-group,
  .filter-groups { padding: 0 1rem; }
  .filter-chips { flex-wrap: wrap; justify-content: flex-start; }
  .filter-chip { min-height: 2.25rem; padding: .5rem .875rem; font-size: .8125rem; }
  .filter-groups { gap: 1rem; margin-bottom: 0; }
  .filter-months { flex-wrap: wrap; padding-top: 1rem; }
  .filter-month { flex: 0 0 auto; font-size: .875rem; line-height: 1.25rem; }
}

/* Мобильная (< 768, макет 866-21109) */
@media (max-width: 767px) {
  .filter-group { padding: 0 16px; }
  .filter-groups { flex-direction: row; gap: 12px; margin: 20px 0 12px; padding: 0 16px; }
  .filter-groups .filter-groups__group { margin-top: 0; }
  .filter-groups .filter-groups__group { flex: 1 1 0; min-width: 0; }
  .filter-chips--years { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .filter-months { display: flex; flex-direction: column; gap: 10px; padding-top: 0; }
  .filter-group:not(.is-open) .filter-group__months { display: none; }
  .filter-month {
    flex: none;
    min-height: 44px;
    padding: 12px 17px;
    border: 1px solid #0a1226;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
  }
  .filter-month.is-active { border-color: var(--orange); background: var(--orange); color: #fff; }
  .filter-group { display: flex; flex-direction: column; gap: 10px; margin-top: -5px; }
  /* 15 от заголовка */
  .filter-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #0a1226;
    border-radius: var(--radius);
    background: none;               /* в макете плашка без заливки — сквозь неё виден фон страницы */
    color: #0a1226;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
  }
  .filter-accordion__arrow {
    flex: none;
    width: 16px;                    /* вектор 14 × 7 плюс обводка 2 */
    height: 9px;
    background: url('../../../img/icon-chevron-down.svg') no-repeat center / 100% 100%;
    transition: transform .2s ease;
  }
  .filter-group.is-open .filter-group__arrow { transform: rotate(180deg); }
  .filter-chips { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-group:not(.is-open) .filter-group__chips { display: none; }
  .filter-chip { justify-content: flex-start; min-height: 44px; padding: 12px 17px; font-size: 14px; }
  .filter-empty { font-size: 16px; }
}

/* Мобильная (< 768, макет 716-3695): поля 20, альбомы в */
@media (max-width: 767px) {
  .inner--pgallery .filter-group { margin-top: 0; padding: 0 20px; }
  .inner--pgallery .filter-accordion__toggle { font-weight: 600; }
}
