.gp-masonry {
    column-count: 4;
    column-gap: 10px;
    column-fill: balance;
}
@media (max-width: 1200px) { .gp-masonry { column-count: 3; } }
@media (max-width: 768px) { .gp-masonry { column-count: 2; column-gap: 8px; } }
@media (max-width: 480px) { .gp-masonry { column-count: 1; } }

.gp-ms-item {
    break-inside: avoid;
    margin-bottom: 10px;
    position: relative;
    border-radius: var(--gp-radius);
    overflow: hidden;
    background: var(--gp-border-light);
}
@media (max-width: 768px) { .gp-ms-item { margin-bottom: 8px; } }

.gp-ms-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    line-height: 0;
    position: relative;
}
.gp-ms-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.45s var(--gp-ease), opacity 0.35s ease;
    opacity: 0;
}
.gp-ms-item img.loaded { opacity: 1; }
.gp-ms-item:hover img { transform: scale(1.03); }

.gp-ms-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg,
        rgba(0,0,0,0.82) 0%,
        rgba(0,0,0,0.5) 50%,
        transparent 100%
    );
    padding: 2.5rem 0.75rem 0.625rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    font-family: var(--gp-sans);
}
.gp-ms-item:hover .gp-ms-overlay { opacity: 1; }

.gp-ms-overlay-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gp-ms-overlay-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.7);
}

@keyframes gpMsReveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.gp-ms-item { animation: gpMsReveal 0.35s var(--gp-ease) both; }
.gp-ms-item:nth-child(1) { animation-delay: 0s; }
.gp-ms-item:nth-child(2) { animation-delay: 0.03s; }
.gp-ms-item:nth-child(3) { animation-delay: 0.06s; }
.gp-ms-item:nth-child(4) { animation-delay: 0.09s; }
.gp-ms-item:nth-child(5) { animation-delay: 0.12s; }
.gp-ms-item:nth-child(6) { animation-delay: 0.15s; }
.gp-ms-item:nth-child(7) { animation-delay: 0.18s; }
.gp-ms-item:nth-child(8) { animation-delay: 0.21s; }
.gp-ms-item:nth-child(n+9) { animation-delay: 0.24s; }

@media (max-width: 767px) {
    .gp-ms-overlay { display: none; }
}
