/* Galeria imprezy (Figma: Szkolenie_szczegóły › Galeria; mobile: Galeria 375×200) i zdjęcie na karcie listy */
.gallery { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 192px); gap: var(--gap); margin-top: var(--space-4); }
.gallery__item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); background: var(--gray-50); }
.gallery__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:focus-visible { outline: 3px solid var(--primary-500); outline-offset: 2px; }
.gallery__item:first-child { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.gallery--1 .gallery__item:first-child { grid-column: 1 / -1; }
.gallery--2 .gallery__item:nth-child(2) { grid-column: 3 / span 2; grid-row: 1 / span 2; }
.gallery--3 .gallery__item:nth-child(n+2) { grid-column: 3 / span 2; }
.gallery--4 .gallery__item:nth-child(4) { grid-row: 1 / span 2; }
.gallery__more { position: absolute; right: calc(var(--gutter) + var(--space-4)); bottom: var(--space-3); display: inline-flex; align-items: center; height: 48px; padding: 0 var(--space-4); border: 1px solid var(--primary-700); border-radius: var(--radius-full); background: var(--primary-100); color: var(--primary-700); font-weight: 700; text-decoration: none; }
.gallery__more:hover { background: var(--primary-200); }
.gallery__more--narrow { display: none; }

.lightbox__slide { display: none; }
.lightbox__slide:target { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; margin: 0; padding: 56px 72px; background: rgba(15, 18, 45, .94); }
.lightbox__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-md); }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 16px; color: var(--white); font-size: var(--fs-body-3); text-align: center; }
.lightbox__close, .lightbox__nav { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .14); color: var(--white); font-size: 28px; line-height: 1; text-decoration: none; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 12px; right: 12px; font-size: 20px; }
.lightbox__nav { top: 50%; margin-top: -24px; }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }

.event-card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }
.event-card__image--photo { background: var(--gray-50); overflow: hidden; }
.event-card__image .event-card__badge { z-index: 1; }

@media (max-width: 1199px) {
    .gallery { grid-template-rows: repeat(2, 160px); }
}

@media (max-width: 767px) {
    .gallery { grid-template-rows: repeat(2, 96px); gap: var(--space-2); margin-top: var(--space-3); }
    .gallery__item { border-radius: var(--radius-md); }
    .gallery__item:nth-child(n+4) { display: none; }
    .gallery--4 .gallery__item:nth-child(n+2), .gallery--5 .gallery__item:nth-child(n+2) { grid-column: 3 / span 2; grid-row: auto; }
    .gallery__more--wide { display: none; }
    .gallery__more--narrow { display: inline-flex; right: calc(var(--gutter) + var(--space-2)); bottom: var(--space-2); height: 32px; padding: 0 12px; font-size: var(--fs-small); }
    .lightbox__slide:target { padding: 56px 8px; }
    .lightbox__nav { top: auto; bottom: 8px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery__item img { transition: none; }
}
