.cc-gallery {
    --cc-gallery-gap: 40px;
    --cc-gallery-caption-color: inherit;
    --cc-gallery-button-size: 52px;
}

.cc-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--cc-gallery-gap);
}

.cc-gallery__item {
    margin: 0;
}

.cc-gallery__link {
    display: block;
    text-decoration: none;
}

.cc-gallery__image {
    display: block;
    width: 100%;
    height: auto;
}

.cc-gallery__caption {
    margin-top: 14px;
    color: var(--cc-gallery-caption-color);
}

.pswp {
    --pswp-bg: #000000;
    --pswp-root-z-index: 99999;
    --pswp-icon-color: #ffffff;
    --pswp-icon-color-secondary: transparent;
    --pswp-icon-stroke-color: transparent;
    --pswp-icon-stroke-width: 0px;
}

.pswp__counter {
    position: absolute;
    top: 18px;
    left: 18px;
    min-width: 70px;
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent);
    color: #ffffff;
    opacity: 0.85;
    font-size: 15px;
    line-height: 1;
    z-index: 10;
}

.cc-gallery-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(900px, calc(100% - 32px));
    text-align: center;
    color: #ffffff;
    z-index: 100000;
    pointer-events: none;
}

@media (max-width: 767px) {
    .cc-gallery__grid {
        grid-template-columns: 1fr;
    }

    .pswp__button--arrow--prev,
    .pswp__button--arrow--next,
    .pswp__button--close {
        width: 46px;
        height: 46px;
    }

    .pswp__button--close {
        margin-top: 12px;
        margin-right: 12px;
    }

    .pswp__button--arrow--prev {
        margin-left: 12px;
    }

    .pswp__button--arrow--next {
        margin-right: 12px;
    }

    .pswp__counter {
        top: 12px;
        left: 12px;
        min-width: 62px;
        height: 46px;
        padding: 0 14px;
        font-size: 14px;
    }

    .cc-gallery-lightbox__caption {
        bottom: 16px;
        width: calc(100% - 24px);
        font-size: 14px;
    }
}