.popup-overlay {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: #fff;
    padding: 10px;
    max-width: 70vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    overflow: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2147483647 !important;
}

.popup-close {
    position: absolute;
    top: 2vh;
    right: 1vw;
    font-size: 4vw;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    color: black;
    background: white;
    height: 3vw;
    width: 3vw;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-timer {
    position: absolute;
    bottom: 10px; right: 15px;
    font-size: 14px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.popup-gallery {
    width: 100%;
}

.popup-slide img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    cursor: zoom-in;
}

.popup-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483647 !important;
}

.popup-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    touch-action: pinch-zoom;
    object-fit: contain;
    display: block;
    margin: auto;
}




.popup-button {
    display: inline-block;
    margin-top: 10px;
    background: #0073aa;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.popup-button:hover {
    background: #005d8a;
}

.swiper-button-prev, .swiper-button-next {
    color: #0073aa;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.swiper-button-prev::after, .swiper-button-next::after {
    font-size: 14px;
}

.swiper-pagination {
    bottom: 15px !important;
}

/* Mobile Hochformat */
@media screen and (max-width: 768px) {
    .popup-content {
        max-width: 95vw;
        max-height: 85vh;
        padding: 10px;
    }

    .popup-slide img {
        max-height: 60vh;
    }

    .popup-close {
        font-size: 11vw;
        top: 1.5vh;
        right: 3vw;
        width: 8vw;
        height: 8vw;
    }

    .popup-timer {
        font-size: 12px;
        bottom: 8px;
        right: 12px;
        padding: 2px 6px;
    }
}

/* Mobile Querformat */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    .popup-content {
        max-width: 98vw;
        max-height: 95vh;
    }
    .popup-slide img {
        max-width: 100%;
        max-height: 85vh;
    }
    .popup-lightbox img {
        max-width: 95vw;
        max-height: 90vh;
        object-fit: contain;
        display: block;
        margin: auto;
    }
}
