/* Gallery Masonry Layout */
.gallery-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.gallery-masonry {
    column-count: 4;
    column-gap: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(37, 49, 80, 0.85), rgba(37, 49, 80, 0));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-icon {
    color: #fff;
    font-size: 3rem;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-icon {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive columns */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 991px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .gallery-masonry {
        column-count: 1;
    }
}
