/* dw_gallery.css - Wiederverwendbarer Medien-Lightbox-Standard (siehe dw_gallery.js) */

.dw-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
}

.dw-gallery-overlay.is-open {
    display: block;
}

.dw-gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 35, 0.92);
}

.dw-gallery-dialog {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dw-gallery-stage {
    position: relative;
    max-width: 1100px;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.dw-gallery-media {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 100%;
    width: 100%;
}

.dw-gallery-image,
.dw-gallery-video {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dw-gallery-caption {
    color: #e9eef5;
    margin-top: 0.75rem;
    text-align: center;
    max-width: 800px;
    font-size: 0.95rem;
}

.dw-gallery-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.dw-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    color: #fff;
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.dw-gallery-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dw-gallery-prev {
    left: 1rem;
}

.dw-gallery-next {
    right: 1rem;
}

.dw-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0.25rem 0.25rem;
    max-width: 100%;
    flex: 0 0 auto;
}

.dw-gallery-thumb {
    border: 2px solid transparent;
    padding: 0;
    background: none;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
    opacity: 0.65;
    transition: opacity 0.15s, border-color 0.15s;
    position: relative;
}

.dw-gallery-thumb img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    display: block;
}

.dw-gallery-thumb.is-active,
.dw-gallery-thumb:hover {
    opacity: 1;
    border-color: #4a90d9;
}

.dw-gallery-thumb.is-video::after {
    content: '\25B6';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Klickbare Gallery-Kacheln (Display-Grid) */
.dw-gallery-trigger {
    cursor: zoom-in;
    display: block;
}

body.dw-gallery-open {
    overflow: hidden;
}

@media (max-width: 575px) {
    .dw-gallery-image,
    .dw-gallery-video {
        max-height: 60vh;
    }

    .dw-gallery-nav {
        width: 40px;
        height: 40px;
    }
}
