/* 活动掠影页：图片分类 / 子分类筛选样式 */
.gallery-filter {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.gallery-filter-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 每个大类独立成块（一级+二级写在一起），display:contents 让前端效果保持不变 */
.gallery-filter-item {
  display: contents;
}

.gallery-sub-group {
  order: 1;
  flex: 1 1 100%;
  margin: 2px 0 0;
  padding: 12px 0 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px dashed var(--line);
}

.gallery-sub-group[hidden] {
  display: none;
}

.gallery-sub-group > li {
  display: flex;
}

.gallery-cat,
.gallery-sub {
  min-height: 44px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cadcf0;
  border-radius: 7px;
  color: #345575;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-sub {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
}

.gallery-cat:hover,
.gallery-cat:focus-visible,
.gallery-sub:hover,
.gallery-sub:focus-visible {
  color: var(--blue-900);
  border-color: #6ea4df;
  background: #e8f2ff;
  box-shadow: 0 3px 10px rgba(4, 42, 91, 0.08);
}

.gallery-cat.is-active,
.gallery-sub.is-active {
  color: #fff;
  border-color: var(--blue-800);
  background: var(--blue-800);
  box-shadow: 0 5px 12px rgba(7, 89, 181, 0.23);
}

.gallery-card[hidden] {
  display: none;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

@media (max-width: 680px) {
  .gallery-filter {
    gap: 10px;
    margin-bottom: 20px;
  }

  .gallery-filter-cats,
  .gallery-sub-group {
    gap: 8px;
  }

  .gallery-cat {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .gallery-sub {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 13px;
  }
}
