/* Galeria: albumes, cuadricula de fotos y visor. */
.gal { max-width: 1248px; margin: 0 auto; padding: 24px 16px 8px; font-family: 'Inter', sans-serif; }
html body .gal h1 { margin: 0 0 8px; font-size: 28px; overflow-wrap: anywhere; }
.gal-back { display: inline-block; margin-bottom: 12px; font-size: 14px; }
.gal-meta { color: #5B647E; font-size: 14px; margin: 0 0 8px; }
.gal-desc { margin: 0 0 10px; max-width: 70ch; }
.gal-empty { text-align: center; color: #5B647E; padding: 60px 0; }
html body .gal a.gal-btn { display: inline-block; background: #101A3D; color: #fff; font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 6px; text-decoration: none; margin: 4px 0 14px; }
.gal-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 18px; }
html body .gal a.gal-album { display: block; color: #101A3D; text-decoration: none; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(16, 26, 61, .09); padding-bottom: 12px; }
.gal-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: #E4E7EF; overflow: hidden; }
.gal-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gal-cover em { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .68); padding: 4px 9px; border-radius: 4px; }
.gal-album:hover .gal-cover img { transform: scale(1.04); }
.gal-album b, .gal-album small { display: block; padding: 0 14px; }
.gal-album b { margin-top: 10px; font-size: 15px; line-height: 1.35; }
.gal-album small { color: #5B647E; font-size: 12px; margin-top: 4px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.gal-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #E4E7EF; }
.gal-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gal-photo:hover img { transform: scale(1.04); }
.gal-match { margin-top: 20px; }
.gal-match-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gal-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(4, 6, 12, .96); display: flex; align-items: center; justify-content: center; }
.gal-lb[hidden] { display: none; }
.gal-lb figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 16px; box-sizing: border-box; }
.gal-lb figure img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; }
.gal-lb figcaption { color: #D5DAEA; font: 13px 'Inter', sans-serif; text-align: center; padding-top: 12px; }
.gal-lb button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 28px; line-height: 1; cursor: pointer; z-index: 1; }
.gal-lb button:hover { background: #E4232C; }
.gal-lb-close { top: 10px; right: 12px; }
.gal-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.gal-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
    .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .gal-albums { grid-template-columns: minmax(0, 1fr); }
    .gal-lb-prev, .gal-lb-next { top: auto; bottom: 12px; transform: none; }
}
