/* AFEBAS Galeries V1 - Front */
.afg-wrap { margin: 1.25rem 0; }
.afg-head { margin-bottom: 1rem; }
.afg-title { margin: 0 0 .5rem; }
.afg-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.afg-chip { display: inline-block; padding: .35rem .65rem; border-radius: 999px; background: #eef3f8; font-size: .9rem; }

.afg-grid { display: grid; gap: 12px; }
.afg-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.afg-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.afg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.afg-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.afg-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.afg-item { display: block; overflow: hidden; border-radius: 10px; background: #f5f5f5; }
.afg-item img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform .25s ease; }
.afg-item:hover img { transform: scale(1.03); }

.afg-empty { padding: 16px 18px; border: 1px dashed #ccd4dd; border-radius: 10px; background: #fafbfd; }

.afg-archives { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.afg-card { border: 1px solid #e6e8eb; border-radius: 14px; overflow: hidden; background: #fff; }
.afg-card-cover { display: block; background: #f3f5f7; }
.afg-card-cover img { width: 100%; height: 220px; object-fit: cover; display: block; }
.afg-card-placeholder { display:flex; align-items:center; justify-content:center; height:220px; font-weight:bold; letter-spacing:1px; color:#0b2a5b; }
.afg-card-body { padding: 14px; }
.afg-card-title { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.3; }
.afg-card-title a { text-decoration: none; }
.afg-card-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:.9rem; color:#666; }

.afg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 99999; }
.afg-lightbox-content { position: absolute; inset: 5% 8%; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.afg-lightbox-content img { max-width: 100%; max-height: 85vh; object-fit: contain; }
.afg-lightbox-caption { color:#fff; margin-top:10px; text-align:center; max-width:900px; }
.afg-lightbox-close,
.afg-lightbox-prev,
.afg-lightbox-next { position:absolute; background:rgba(255,255,255,.12); border:0; color:#fff; cursor:pointer; width:48px; height:48px; border-radius:999px; font-size:30px; line-height:1; }
.afg-lightbox-close { top:18px; right:18px; }
.afg-lightbox-prev { left:18px; top:50%; margin-top:-24px; }
.afg-lightbox-next { right:18px; top:50%; margin-top:-24px; }

.afg-no-scroll { overflow:hidden; }

@media (max-width: 1100px) {
    .afg-cols-5, .afg-cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .afg-archives { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .afg-cols-4, .afg-cols-5, .afg-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .afg-cols-3, .afg-cols-4, .afg-cols-5, .afg-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .afg-item img, .afg-card-cover img, .afg-card-placeholder { height: 180px; }
    .afg-archives { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
