/* ===== PREMIUM LIGHTBOX MODAL ===== */

.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(0, 0, 0, 0.95) 0px,
            rgba(0, 0, 0, 0.95) 10px,
            rgba(253, 225, 0, 0.08) 10px,
            rgba(253, 225, 0, 0.08) 20px
        ),
        radial-gradient(circle at center, rgba(253, 225, 0, 0.1), rgba(0, 0, 0, 0.98));
    backdrop-filter: blur(20px);
    animation: stripeMove 20s linear infinite;
}

@keyframes stripeMove {
    0% { background-position: 0 0, center; }
    100% { background-position: 40px 40px, center; }
}

.lightbox-content {
    position: relative;
    z-index: 2;
    width: 90vw;
    max-width: 1200px;
    max-height: 85vh;
    margin-top: 1.5rem;
    background: 
        linear-gradient(135deg, 
            rgba(30, 30, 30, 0.98), 
            rgba(20, 20, 20, 0.98)
        );
    border-radius: 24px;
    padding: 2rem;
    padding-top: 5.25rem; /* Platz für absoluten Header (70px) + Abstand, damit das Bild nicht hinter dem Titel verschwindet */
    box-shadow: 
        0 0 0 3px rgba(253, 225, 0, 0.4),
        0 0 60px rgba(253, 225, 0, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(253, 225, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: calc(85vh - 240px);
    margin-bottom: 1.25rem;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    background: #000;
}

.lightbox-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(253, 225, 0, 0.2);
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(253, 225, 0, 0.05) 8px,
            rgba(253, 225, 0, 0.05) 10px
        );
    padding-bottom: 0.5rem;
    border-radius: 0 0 24px 24px;
}

.lightbox-counter {
    display: none;
}

.lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FDE100, #e5ca00);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(253, 225, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.lightbox-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.lightbox-download:hover::before {
    left: 100%;
}

.lightbox-download:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(253, 225, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lightbox-download:active {
    transform: translateY(0);
}

.lightbox-download svg {
    width: 20px;
    height: 20px;
}

/* Header Bar mit Close Button */
.lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: linear-gradient(135deg, #FDE100, #e5ca00);
    border-radius: 24px 24px 0 0;
    border-bottom: 3px solid rgba(0, 0, 0, 0.2);
    z-index: 3;
    box-shadow: 0 4px 20px rgba(253, 225, 0, 0.3);
}

.lightbox-title {
    color: #000;
    font-size: 1.125rem;
    font-weight: 700;
    text-shadow: none;
    letter-spacing: 0.3px;
    flex: 1;
    padding-right: 1rem;
    line-height: 1.3;
}

/* Close Button (im Header) */
.lightbox-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.lightbox-close:hover {
    background: #000;
    color: #FDE100;
    border-color: #000;
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Navigation Buttons (eleganter) */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(253, 225, 0, 0.1);
    border: 2px solid rgba(253, 225, 0, 0.3);
    border-radius: 16px;
    color: #FDE100;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #FDE100;
    color: #000;
    border-color: #FDE100;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 28px;
    height: 28px;
}

/* Mobile Responsive */
@media (max-width: 1280px) {
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 95vw;
        max-height: 90vh;
        padding: 1rem;
        padding-top: 4.5rem; /* Platz für Header (~60px) + Abstand */
        border-radius: 20px;
    }
    
    .lightbox-header {
        height: auto;
        min-height: 60px;
        padding: 0.75rem 1rem;
    }
    
    .lightbox-title {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .lightbox-image {
        max-height: calc(90vh - 220px);
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
    
    .lightbox-info {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .lightbox-download {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Smooth Loading State */
.lightbox-image[style*="opacity: 0"] {
    filter: blur(10px);
}
