/* 骑行图集页（ride.html）专属样式，基础风格复用 styles.css */

.gallery {
  width: min(1240px, calc(100% - 64px));
  margin: 56px auto 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.shot { margin: 0; }
.shot-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 24px; }
.shot-frame {
  display: block;
  overflow: hidden;
  background: #222;
  border: 7px solid #222;
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}
.shot-btn:hover .shot-frame,
.shot-btn:focus-visible .shot-frame {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .2);
}
.shot-frame img { width: 100%; height: auto; }
.shot figcaption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.shot figcaption span { color: var(--orange); font-weight: 900; }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: rgba(15, 16, 16, .92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; }
.lightbox img { max-width: min(460px, 92vw); max-height: 78vh; border-radius: 18px; }
.lb-count { margin: 0; color: rgba(255, 255, 255, .72); font-size: 12px; font-weight: 800; letter-spacing: .22em; }
.lb-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease;
}
.lb-btn:hover { background: var(--orange); }
.lb-prev { left: 28px; }
.lb-next { right: 28px; }
.lb-close { top: 24px; right: 24px; transform: none; }

@media (max-width: 1000px) {
  .gallery { margin-top: 40px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 720px) {
  .gallery { width: calc(100% - 36px); margin-top: 30px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .shot-frame { border-width: 5px; border-radius: 18px; }
  .shot-btn:focus-visible { border-radius: 18px; }
  .shot figcaption { margin-top: 10px; font-size: 10px; }
  .lightbox { padding: 16px; }
  .lightbox img { max-height: 72vh; }
  .lb-btn { top: auto; bottom: 18px; transform: none; width: 42px; height: 42px; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }
  .lb-count { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); }
  .lb-close { top: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .shot-frame { transition: none; }
  .lightbox { transition: none; }
}
