.cptkit-gallery-v2 {
    width: 100%;
    --cptkit-gallery-columns-desktop: 3;
    --cptkit-gallery-columns-tablet: 2;
    --cptkit-gallery-columns-mobile: 1;
    --cptkit-gallery-gap: 16px;
    --cptkit-gallery-image-radius: 0px;
    --cptkit-gallery-image-padding: 0px;
    --cptkit-gallery-image-border-width: 0px;
    --cptkit-gallery-image-border-color: transparent;
    --cptkit-gallery-image-background: transparent;
    --cptkit-gallery-caption-overlay-size: 55%;
}

.cptkit-gallery-v2__items {
    width: 100%;
}

.cptkit-gallery-v2--grid .cptkit-gallery-v2__items,
.cptkit-gallery-v2--featured-grid .cptkit-gallery-v2__items {
    display: grid;
    grid-template-columns: repeat(var(--cptkit-gallery-columns-desktop), minmax(0, 1fr));
    gap: var(--cptkit-gallery-gap);
}

.cptkit-gallery-v2--masonry .cptkit-gallery-v2__items {
    column-count: var(--cptkit-gallery-columns-desktop);
    column-gap: var(--cptkit-gallery-gap);
}

.cptkit-gallery-v2__item {
    box-sizing: border-box;
    margin: 0;
}

.cptkit-gallery-v2--masonry .cptkit-gallery-v2__item {
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--cptkit-gallery-gap);
    break-inside: avoid;
}

.cptkit-gallery-v2--featured-grid .cptkit-gallery-v2__item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.cptkit-gallery-v2__trigger {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

button.cptkit-gallery-v2__trigger {
    cursor: pointer;
}

.cptkit-gallery-v2__trigger:focus {
    outline: 0;
}

.cptkit-gallery-v2__trigger:focus-visible {
    outline: 2px solid rgba(29, 35, 39, 0.75);
    outline-offset: 2px;
}

.cptkit-gallery-v2__media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--cptkit-gallery-image-radius);
    padding: var(--cptkit-gallery-image-padding);
    border: var(--cptkit-gallery-image-border-width) solid var(--cptkit-gallery-image-border-color);
    background: var(--cptkit-gallery-image-background);
}

.cptkit-gallery-v2__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    transition: opacity 180ms ease, transform 220ms ease;
}

.cptkit-gallery-v2--ratio-1-1 .cptkit-gallery-v2__media,
.cptkit-gallery-v2--ratio-4-3 .cptkit-gallery-v2__media,
.cptkit-gallery-v2--ratio-3-2 .cptkit-gallery-v2__media,
.cptkit-gallery-v2--ratio-16-9 .cptkit-gallery-v2__media {
    aspect-ratio: 1 / 1;
}

.cptkit-gallery-v2--ratio-4-3 .cptkit-gallery-v2__media {
    aspect-ratio: 4 / 3;
}

.cptkit-gallery-v2--ratio-3-2 .cptkit-gallery-v2__media {
    aspect-ratio: 3 / 2;
}

.cptkit-gallery-v2--ratio-16-9 .cptkit-gallery-v2__media {
    aspect-ratio: 16 / 9;
}

.cptkit-gallery-v2--ratio-1-1 .cptkit-gallery-v2__media img,
.cptkit-gallery-v2--ratio-4-3 .cptkit-gallery-v2__media img,
.cptkit-gallery-v2--ratio-3-2 .cptkit-gallery-v2__media img,
.cptkit-gallery-v2--ratio-16-9 .cptkit-gallery-v2__media img {
    height: 100%;
    object-fit: cover;
}

.cptkit-gallery-v2--hover-zoom button.cptkit-gallery-v2__trigger:hover img {
    transform: scale(1.04);
}

.cptkit-gallery-v2--hover-fade button.cptkit-gallery-v2__trigger:hover img {
    opacity: 0.82;
}

.cptkit-gallery-v2--has-shadow .cptkit-gallery-v2__media {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.cptkit-gallery-v2__caption {
    position: absolute;
    inset: var(--cptkit-gallery-image-padding);
    z-index: 1;
    display: flex;
    padding: 18px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.cptkit-gallery-v2--caption-v-bottom .cptkit-gallery-v2__caption {
    background: linear-gradient(180deg, rgba(7, 10, 14, 0) 0%, rgba(7, 10, 14, 0.78) var(--cptkit-gallery-caption-overlay-size), rgba(7, 10, 14, 0.92) 100%);
    align-items: flex-end;
}

.cptkit-gallery-v2--caption-v-top .cptkit-gallery-v2__caption {
    background: linear-gradient(0deg, rgba(7, 10, 14, 0) 0%, rgba(7, 10, 14, 0.78) var(--cptkit-gallery-caption-overlay-size), rgba(7, 10, 14, 0.92) 100%);
    align-items: flex-start;
}

.cptkit-gallery-v2--caption-h-left .cptkit-gallery-v2__caption {
    justify-content: flex-start;
    text-align: left;
}

.cptkit-gallery-v2--caption-h-center .cptkit-gallery-v2__caption {
    justify-content: center;
    text-align: center;
}

.cptkit-gallery-v2--caption-h-right .cptkit-gallery-v2__caption {
    justify-content: flex-end;
    text-align: right;
}

.cptkit-gallery-v2__lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(10, 12, 16, 0.92);
}

.cptkit-gallery-v2__lightbox[hidden] {
    display: none;
}

.cptkit-gallery-v2__lightbox-content {
    display: flex;
    width: 100%;
    max-width: 1200px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.cptkit-gallery-v2__lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--cptkit-gallery-image-radius);
}

.cptkit-gallery-v2__lightbox-caption {
    max-width: 860px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.cptkit-gallery-v2__lightbox-close,
.cptkit-gallery-v2__lightbox-nav {
    position: absolute;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 46px;
    text-align: center;
}

.cptkit-gallery-v2__lightbox-close {
    top: 20px;
    right: 20px;
}

.cptkit-gallery-v2__lightbox-prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.cptkit-gallery-v2__lightbox-next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.cptkit-gallery-v2__lightbox-close:hover,
.cptkit-gallery-v2__lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 1024px) {
    .cptkit-gallery-v2--grid .cptkit-gallery-v2__items,
    .cptkit-gallery-v2--featured-grid .cptkit-gallery-v2__items {
        grid-template-columns: repeat(var(--cptkit-gallery-columns-tablet), minmax(0, 1fr));
    }

    .cptkit-gallery-v2--masonry .cptkit-gallery-v2__items {
        column-count: var(--cptkit-gallery-columns-tablet);
    }
}

@media (max-width: 782px) {
    .cptkit-gallery-v2--grid .cptkit-gallery-v2__items,
    .cptkit-gallery-v2--featured-grid .cptkit-gallery-v2__items {
        grid-template-columns: repeat(var(--cptkit-gallery-columns-mobile), minmax(0, 1fr));
    }

    .cptkit-gallery-v2--masonry .cptkit-gallery-v2__items {
        column-count: var(--cptkit-gallery-columns-mobile);
    }

    .cptkit-gallery-v2--featured-grid .cptkit-gallery-v2__item:first-child {
        grid-column: auto;
        grid-row: auto;
    }

    .cptkit-gallery-v2__caption {
        padding: 14px;
        font-size: 13px;
    }

    .cptkit-gallery-v2__lightbox {
        padding: 20px 12px;
    }

    .cptkit-gallery-v2__lightbox-close,
    .cptkit-gallery-v2__lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
        line-height: 40px;
    }

    .cptkit-gallery-v2__lightbox-prev {
        left: 10px;
    }

    .cptkit-gallery-v2__lightbox-next,
    .cptkit-gallery-v2__lightbox-close {
        right: 10px;
    }
}
