/* ============================================================
   红色征程 · 图集页样式 gallery.css
   ============================================================ */

/* ---------- 筛选 ---------- */
.gal-filter-wrap { padding: 34px 0 0; }
.gal-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.gf-btn {
  padding: 9px 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 2px;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.gf-btn:hover { border-color: var(--gold); color: var(--red); }
.gf-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: transparent;
  color: #fff;
}

/* ---------- 网格 ---------- */
.gal-section { padding-top: 40px; }
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.gal-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  background: #fff;
  border: 1px solid var(--line);
  animation: galIn .5s ease both;
}
@keyframes galIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gal-item.filtered { display: none; }
.gal-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .55s ease;
}
.gal-item:hover img { transform: scale(1.07); }
.gal-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(60, 8, 8, .82));
  opacity: 0;
  transition: opacity .4s;
}
.gal-item:hover .gal-mask { opacity: 1; }
.gal-mask h4 {
  font-family: var(--serif);
  color: var(--gold-light);
  font-size: 19px;
  letter-spacing: 2px;
}
.gal-mask p {
  color: rgba(255, 255, 255, .88);
  font-size: 12.5px;
  margin-top: 4px;
  letter-spacing: 1px;
}
.gal-cat {
  position: absolute;
  left: 12px; top: 12px;
  background: rgba(109, 0, 5, .82);
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 2px;
  padding: 3px 12px;
  border-radius: 999px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ---------- 计数 ---------- */
.gal-count {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 2px;
}

/* ---------- 灯箱（复用 sites 灯箱样式） ---------- */
.lightbox { flex-direction: column; gap: 18px; }
.lb-figure {
  max-width: min(860px, 92vw);
  text-align: center;
  animation: lbIn .35s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}
.lb-figure img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.lb-figure figcaption {
  margin-top: 14px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 3px;
}
.lb-figure figcaption small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .75);
}
.lb-close {
  position: absolute;
  right: 5%; top: 4%;
  width: 46px; height: 46px;
  font-size: 34px;
  color: #fff;
  line-height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  transition: all .25s;
}
.lb-close:hover { background: var(--red); }
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 24px;
  line-height: 52px;
  text-align: center;
  transition: background .25s;
}
.lb-btn:hover { background: var(--red); }
.lb-prev { left: 4%; }
.lb-next { right: 4%; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) { .gal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  {
  .gal-grid { grid-template-columns: 1fr; }
  .lb-btn { display: none; }
}
