.workgallery-block {
    background: var(--rb-concrete, #141618);
    padding: 128px 0;
}

.workgallery-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

.workgallery-head .rb-display {
    margin: 0;
}

.workgallery-all {
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 0, 144, 0.5);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--rb-muted, rgba(255, 255, 255, 0.72));
    transition: color 0.2s;
}

.workgallery-all:hover,
.workgallery-all:focus-visible {
    color: var(--rb-pink, #ff0090);
}

.workgallery-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.workgallery-item {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.workgallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.05);
    transition: transform 0.5s;
}

.workgallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.workgallery-item:hover .workgallery-img {
    transform: scale(1.06);
}

.workgallery-item:hover::after {
    background: rgba(212, 0, 122, 0.45);
}

.workgallery-label {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1;
    font-family: 'Anton', sans-serif;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s;
}

.workgallery-item:hover .workgallery-label {
    opacity: 1;
}

@media (max-width: 1199px) {
    .workgallery-block {
        padding: 96px 0;
    }
}

@media (max-width: 767px) {
    .workgallery-block {
        padding: 72px 0;
    }

    .workgallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}
