.scg-gallery {
    width: 100%
}

.scg-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: var(--scg-align);
    gap: var(--scg-gap);
    margin: 0 0 22px
}

.scg-filter {
    appearance: none;
    border: 1px solid var(--scg-button-border);
    background: var(--scg-button-bg);
    color: var(--scg-button-text);
    padding: var(--scg-pady) var(--scg-padx);
    border-radius: var(--scg-radius);
    font-size: var(--scg-font);
    line-height: 1.2;
    cursor: pointer;
    transition: .2s ease
}

.scg-filter:hover {
    background: var(--scg-hover-bg);
    color: var(--scg-hover-text)
}

.scg-filter.active {
    background: var(--scg-active-bg);
    color: var(--scg-active-text);
    border-color: var(--scg-active-bg)
}

.scg-grid {
    column-count: var(--scg-columns);
    column-gap: 8px;
}

.scg-card {
    break-inside: avoid;
    margin: 0 0 8px;
}

.scg-item-link {
    display: block;
    line-height: 0;
    overflow: hidden;
    border-radius: 2px
}

.scg-item-link img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    transition: transform .25s ease
}

.scg-item-link:hover img {
    transform: scale(1.025)
}

.scg-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px
}

.scg-modal img {
    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain
}

.scg-modal[hidden] {
    display: none
}

.scg-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer
}

@media(max-width: 1000px) {
    .scg-grid {
        column-count:3
    }
}

@media(max-width: 700px) {
    .scg-grid {
        column-count:2;
        column-gap: 12px
    }

    .scg-card {
        margin-bottom: 12px
    }
}

@media(max-width: 450px) {
    .scg-grid {
        column-count:1
    }
}
