/* Галерея Masonry без отступов */
.masonry-section {
    padding: 40px 0;
    background: #f9fafb;
}

.masonry-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.masonry-title {
    text-align: center;
    margin-bottom: 30px;
    color: #1f2937;
    font-size: 28px;
    font-weight: 600;
}

.masonry-gallery {
    column-count: 4;
    column-gap: 0;
    width: 100%;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}

.masonry-item:hover {
    transform: scale(1.02);
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.masonry-item-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.masonry-item:hover .masonry-item-content {
    opacity: 1;
}

/* Адаптив для планшетов */
@media (max-width: 1024px) {
    .masonry-gallery {
        column-count: 3;
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .masonry-gallery {
        column-count: 2;
    }

    .masonry-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        column-count: 1;
    }

    .masonry-title {
        font-size: 20px;
    }

    .masonry-section {
        padding: 30px 0;
    }
}