.ccg-gallery {
    width: 100%;
}

.ccg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ccg-item {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(10, 20, 40, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ccg-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(10, 20, 40, 0.14);
}

.ccg-item img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.ccg-lightbox[hidden] {
    display: none !important;
}

.ccg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 24px;
}

.ccg-lightbox-image {
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 80px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ccg-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

body.ccg-lightbox-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .ccg-grid {
        grid-template-columns: 1fr;
    }

    .ccg-item img {
        height: 240px;
    }
}


.ccg-lightbox-media-wrap {
    position: relative;
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 80px);
    display: inline-block;
}

.ccg-lightbox-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: none;
}
