.gallery-image {
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 200px;
    display: block;
    object-fit: contain;
    background-color: #f8f8f8;
    margin: 0 auto;
    padding: 10px;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.category-title {
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

#imageModal .modal-header {
    border: none;
    padding: 0.5rem;
}

#imageModal .close {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1000;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    opacity: 1;
    padding: 0;
}

#imageModal .modal-body {
    padding: 0;
}

#imageModal .modal-body img {
    max-width: 100%;
    height: auto;
}

.gallery-card, 
.gallery-items .col-sm-6, 
.gallery-items .col-md-4, 
.gallery-items .col-lg-3 {
    height: 220px; /* leggermente più grande dell'immagine per padding */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    padding: 0;
}


/* Stile per il modal responsive */
#imageModal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

#modalImage {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 80vh;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Cursore pointer sulle immagini */
.gallery-image {
    cursor: pointer;
    transition: 0.3s;
}

.gallery-image:hover {
    opacity: 0.7;
}