.cmg-gallery {
    --cmg-gap: 5px;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--cmg-gap);
    align-items: flex-start;
    width: 100%;
}

.cmg-gallery *,
.cmg-gallery *::before,
.cmg-gallery *::after {
    box-sizing: border-box;
}

.cmg-column {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.cmg-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    background: #fafafa;
    margin-bottom: var(--cmg-gap);
    width: 100%;
    opacity: 0;
}

.cmg-item:last-child {
    margin-bottom: 0;
}

.cmg-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cmg-item img {
    display: block;
    width: 100%;
    height: auto;
}

.cmg-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cmg-load-more {
    display: block;
    margin: 32px auto;
    padding: 12px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cmg-load-more:hover {
    background: #135e96;
}

.cmg-load-more:disabled {
    background: #a7aaad;
    cursor: default;
}

@media (max-width: 768px) {
    .cmg-gallery[data-columns] .cmg-item {
        width: 100%;
    }
}
