/** ==================== CGALLERY ==================== **/

/* Base */
.cgallery_item img {
    height: 328px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--big_border_radius);
}

.cgallery_item_in {
    position: relative;
    padding: 0 12px;
}

.cgallery_item_in a {
    display: block;
    position: relative;
}

.cgallery_item_in a:after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background-color: var(--extra_color_opacity_20);
    border-radius: var(--big_border_radius);
    transition: opacity 0.3s;
}

.cgallery_item_in a:hover:after {
    opacity: 1;
}

/* Clipart type */
.type_clipart.cgallery a {
    display: flex;
    justify-content: center;
    align-items: center;
}

.type_clipart.cgallery a img {
    max-height: 90%;
    max-width: 90%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Preview mode */
.preview-mode .cgallery_container_wrap {
    max-width: 96%;
    width: 100%;
    margin: 0 auto;
}

.preview-mode .cgallery_container_row {
    display: flex;
}

.preview-mode .cgallery_container_row .cgallery_item {
    width: 33.333333%;
}

/* Tablet */
@media (max-width: 990px) {
    .cgallery_item img {
        height: 240px;
    }
    
    .cgallery_container_wrap_all {
        padding: 0 16px;
    }
    
    .cgallery_container_wrap_all .bottom-controls-wrapper,
    .cgallery_item_in {
        padding: 0 6px;
    }
}

/* Mobile */
@media (max-width: 495px) {
    .cgallery_item img {
        height: 170px;
    }
}

@media (max-width: 385px) {
    .cgallery_item img {
        height: 135px;
    }
}

/** ==================== MASONRY CGALLERY ==================== **/

.masonry_cgallery_container_row {
    columns: 3;
    column-gap: 16px;
}

.masonry_cgallery_container_row .masonry_cgallery_item {
    display: inline-block;
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.masonry_cgallery_item img {
    width: 100%;
    object-fit: cover;
    border-radius: var(--big_border_radius);
}

@media (max-width: 990px) {
    .masonry_cgallery_container_row {
        columns: 2;
    }
}

/** ==================== SIMPLE 2 CGALLERY ==================== **/

.simple_2_cgallery_item {
    margin-bottom: 24px;
}

.simple_2_cgallery_item img {
    height: 256px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--big_border_radius);
}