/* Gallery Grid */
.projects-gallery-grid {
    display: grid;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item a {
    display: block;
    height: 100%;
}

/* Masonry Layout */
.masonry .projects-gallery-grid {
    display: block;
    column-gap: 15px;
}

.masonry .gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    height: auto !important;
}

.masonry .gallery-item img,
.masonry .gallery-item video {
    height: auto;
}

/* Hover Overlay */
.has-overlay .gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.has-overlay .gallery-item:hover::before {
    opacity: 1;
}

/* Zoom Effect */
.has-zoom .gallery-item:hover img,
.has-zoom .gallery-item:hover video {
    transform: scale(1.1);
}

/* Play Icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .play-icon {
    opacity: 1;
}

/* Responsive */
@media (max-width: 767px) {
    .play-icon {
        font-size: 36px;
    }
}
