#title h1 {
    color: #000000;
    letter-spacing: 1px;
    padding: 5px;
    margin: 5px;
    text-transform: capitalize;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 24px;
    font-style: italic;
    font-weight: bold;
}
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 300px)); /* responsive, max 300px */
    gap: 0.75rem; /* horizontal & vertical spacing */
    justify-content: center; /* center grid if row not full */
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1/1; /* perfect square */
    overflow: hidden;
    border-radius: 0px;
    display: block;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
    filter: brightness(1.05);
}
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* single column */
        justify-content: stretch;
    }
    .gallery-item {
        aspect-ratio: auto; /* remove square constraint */
        max-width: none;
    }
    .gallery-img {
        height: auto; /* natural height */
        object-fit: contain; /* show full image properly */
    }
}