.cst-gallery {
    display: grid;
    width: 100%;
    gap: 20px;
}

.elementor-grid-1 .cst-gallery { grid-template-columns: repeat(1, 1fr); }
.elementor-grid-2 .cst-gallery { grid-template-columns: repeat(2, 1fr); }
.elementor-grid-3 .cst-gallery { grid-template-columns: repeat(3, 1fr); }
.elementor-grid-4 .cst-gallery { grid-template-columns: repeat(4, 1fr); }
.elementor-grid-5 .cst-gallery { grid-template-columns: repeat(5, 1fr); }
.elementor-grid-6 .cst-gallery { grid-template-columns: repeat(6, 1fr); }


@media (max-width: 1024px) {
    .elementor-grid-tablet-1 .cst-gallery { grid-template-columns: repeat(1, 1fr); }
    .elementor-grid-tablet-2 .cst-gallery { grid-template-columns: repeat(2, 1fr); }
    .elementor-grid-tablet-3 .cst-gallery { grid-template-columns: repeat(3, 1fr); }
    .elementor-grid-tablet-4 .cst-gallery { grid-template-columns: repeat(4, 1fr); }
    .elementor-grid-tablet-5 .cst-gallery { grid-template-columns: repeat(5, 1fr); }
    .elementor-grid-tablet-6 .cst-gallery { grid-template-columns: repeat(6, 1fr); }
}


@media (max-width: 767px) {
    .elementor-grid-mobile-1 .cst-gallery { grid-template-columns: repeat(1, 1fr); }
    .elementor-grid-mobile-2 .cst-gallery { grid-template-columns: repeat(2, 1fr); }
    .elementor-grid-mobile-3 .cst-gallery { grid-template-columns: repeat(3, 1fr); }
    .elementor-grid-mobile-4 .cst-gallery { grid-template-columns: repeat(4, 1fr); }
    .elementor-grid-mobile-5 .cst-gallery { grid-template-columns: repeat(5, 1fr); }
    .elementor-grid-mobile-6 .cst-gallery { grid-template-columns: repeat(6, 1fr); }
}

.cst-gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
}

.cst-gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cst-gallery-item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.cst-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cst-gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cst-gallery-item:hover .caption {
    opacity: 1;
}

.cst-gallery-item:hover img {
    transform: scale(1.1);
}

.glightbox-clean .gnext, .glightbox-clean .gprev {
    top: 45% !important;
}

.goverlay {
    background: rgba(0,0,0,.8) !important;
}

button.gprev.gbtn, .glightbox-clean .gnext, button.gclose.gbtn {
    background-image: none !important;
    background-color: rgba(0, 0, 0, .5);
}

.glightbox-clean .gnext {
    right:0 !important;
}

.glightbox-clean .gclose, .glightbox-clean .gnext, .glightbox-clean .gprev {
    border-radius: 0 !important;
    padding:10px 8px !important;
}

.glightbox-clean .gprev {
    left:0 !important;
}

.plyr__video-embed, .plyr__video-wrapper--fixed-ratio {
    aspect-ratio: 16 / 16 !important;
}

@media (max-width: 1024px) {
    .plyr__video-embed, .plyr__video-wrapper--fixed-ratio {
        aspect-ratio: 11 / 16 !important;
    }
}