.work-item-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.image-box {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .image-box img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.work-item-info {
    text-align: center;
    color: #fff;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .work-item-info {
    transform: translateY(0);
}

.work-item-info h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #fff;
}

.work-item-info p {
    margin: 0 0 15px;
    font-size: 0.9em;
    opacity: 0.8;
}

.gallery-popup {
    color: #fff;
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.gallery-popup:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        grid-template-columns: 1fr;
        padding: 10px;
    }
} 