.gallery .img-section {
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery .img-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery .img-section img {
    transform: scale(1);
    transition: transform 0.5s ease;
    animation: fadeIn 0.8s ease-out;
}

.gallery .img-section:hover img {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered loading animation */
.gallery .img-section {
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply staggered delay to images */
.gallery .img-section:nth-child(1) { animation-delay: 0.1s; }
.gallery .img-section:nth-child(2) { animation-delay: 0.2s; }
.gallery .img-section:nth-child(3) { animation-delay: 0.3s; }
.gallery .img-section:nth-child(4) { animation-delay: 0.4s; }
.gallery .img-section:nth-child(5) { animation-delay: 0.5s; }
.gallery .img-section:nth-child(6) { animation-delay: 0.6s; }
.gallery .img-section:nth-child(7) { animation-delay: 0.7s; }
.gallery .img-section:nth-child(8) { animation-delay: 0.8s; }
.gallery .img-section:nth-child(n+9) { animation-delay: 0.9s; }