main { justify-content: center; }

ul { list-style: none; }

.image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }

.image-gallery > li { cursor: pointer; position: relative; flex: 1 1 auto; }

.image-gallery::after { content: ""; flex-grow: 999; }

.image-gallery li img { width: 100%; height: 100%; object-fit: cover; display: block; }

.overlay { position: absolute; width: 100%; height: 100%; background: rgba(57, 57, 57, 0.502); top: 0; left: 0; transform: scale(0); transition: all 0.2s 0.1s ease-in-out; color: #fff; border-radius: 5px; /* center overlay text */ display: flex; align-items: center; justify-content: center; }

/* hover */
.image-gallery li:hover .overlay { transform: scale(1); }

@media screen and (max-width: 1280px) { .image-gallery > li { height: auto; width: 100%; } }

/*# sourceMappingURL=news_gallery.css.map */