/* Galerija strojev (/machines) */
.gallery { padding: 50px 0; }
.gallery .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.gallery h3 { text-align: center; margin: 0 0 30px; }

.galleryGrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px;
    grid-template-columns: repeat(3, 1fr); }
.galleryGrid li { margin: 0; padding: 0; overflow: hidden; background: #eee; aspect-ratio: 4 / 3; }
.galleryGrid a { display: block; width: 100%; height: 100%; }
.galleryGrid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.galleryGrid a:hover img, .galleryGrid a:focus img { transform: scale(1.06); }

@media (max-width: 900px) { .galleryGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .galleryGrid { grid-template-columns: 1fr; } }

/* Lightbox */
.galleryLightbox { display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, .9); align-items: center; justify-content: center; }
.galleryLightbox:target { display: flex; }
.galleryLightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.galleryLightbox a { position: absolute; color: #fff; text-decoration: none; line-height: 1;
    font-size: 48px; padding: 10px 18px; opacity: .8; }
.galleryLightbox a:hover { opacity: 1; }
.galleryClose { top: 10px; right: 10px; font-size: 56px !important; }
.galleryPrev { left: 5px; top: 50%; transform: translateY(-50%); }
.galleryNext { right: 5px; top: 50%; transform: translateY(-50%); }
