/* ═══════════════════════════════════════════════════════════════
   gallery.css — ประมวลภาพกิจกรรม (gallery.php · gallery_show.php) ใช้ร่วมกับ site.css + detail.css + list.css
   ═══════════════════════════════════════════════════════════════ */

/* ── รายการอัลบั้ม (gallery.php) ───────────────────────────── */
.ls-albums { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; }
.ls-albums > li { min-width: 0; }
.ls-albums .al { display: grid; gap: 8px; color: var(--navy); }
.ls-albums .al:hover { text-decoration: none; }
.ls-albums .ph { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--sky); color: var(--blue-2); box-shadow: 0 2px 8px rgba(18, 48, 107, .10); transition: box-shadow .25s, transform .25s; }
.ls-albums .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.ls-albums .al:hover .ph { box-shadow: 0 10px 22px rgba(18, 48, 107, .22); transform: translateY(-3px); }
.ls-albums .al:hover .ph img { transform: scale(1.06); }
.ls-albums .al:focus-visible .ph { outline: 3px solid var(--gold); outline-offset: 2px; }
.ls-albums .al-cnt { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(10, 25, 60, .72); color: #fff; font-size: .78rem; line-height: 1.5; }
.ls-albums .al-new { position: absolute; left: 8px; top: 8px; margin: 0; }
.ls-albums .al-tt { font-weight: 600; font-size: .98rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-albums .al:hover .al-tt { color: var(--blue); }
.ls-albums .al-mt { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: .82rem; }
.ls-albums .al-mt > span { display: inline-flex; align-items: center; gap: 5px; }

/* ── หน้าอัลบั้ม (gallery_show.php) ────────────────────────── */
.dt-lead { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.8; color: #3d4a66; }
.gl-sec:first-child { margin-top: 0; }
.gl-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gl-grid a { position: relative; }
.gl-grid a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 760px) {
  .ls-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .ls-albums .al-tt { font-size: .9rem; }
  .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .ls-albums .ph, .ls-albums .ph img { transition: none; } .ls-albums .al:hover .ph { transform: none; } }
