/* Gallery Grid */
.dgb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.dgb-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 4px;
    background-color: #eee;
}

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

.dgb-gallery-item:hover img {
    transform: scale(1.05);
}

.dgb-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 40px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Lightbox Modal */
.dgb-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.dgb-lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    position: relative;
}

.dgb-lightbox-content img,
.dgb-lightbox-content video {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.dgb-lightbox-caption {
    color: #fff;
    margin-top: 15px;
    text-align: center;
    font-family: sans-serif;
}

.dgb-lightbox-caption h4 {
    margin: 0;
    font-size: 1.1em;
}

.dgb-lightbox-caption p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #ccc;
}

/* Controls */
.dgb-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
}

.dgb-lightbox-prev,
.dgb-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.dgb-lightbox-prev:hover,
.dgb-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

.dgb-lightbox-prev {
    left: 20px;
}

.dgb-lightbox-next {
    right: 20px;
}