/* =============================================
   LIGHTBOX MODAL STYLES
   ============================================= */

.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 4, 0.98);
    /* Deep, near-perfect black */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.3s linear;
}

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

/* Close Button */
.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(15px);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    color: var(--photo-text);
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--photo-accent);
}

.lightbox-close:hover svg {
    color: var(--photo-accent);
    transform: rotate(90deg);
}

/* Content */
.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    animation: lightboxFadeIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(95vh - 120px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

/* Support both img and placeholders */
.lightbox-image img,
.lightbox-image .image-placeholder {
    max-width: 90vw;
    max-height: calc(95vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;

    /* Eye Protection - Subdued until hover in modal too */
    filter: brightness(0.9) contrast(1.05);
    transition: filter 0.5s ease;
}

.lightbox-image img:hover,
.lightbox-image .image-placeholder:hover {
    filter: brightness(1) contrast(1);
}

/* Info Section */
.lightbox-info {
    text-align: center;
    padding: 0 var(--space-lg);
}

.lightbox-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--photo-text);
    margin-bottom: var(--space-xs);
}

.lightbox-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--photo-accent);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-close {
        top: var(--space-md);
        right: var(--space-md);
        width: 44px;
        height: 44px;
    }

    .lightbox-title {
        font-size: 1.5rem;
    }

    .lightbox-image img,
    .lightbox-image .image-placeholder {
        max-width: 95vw;
    }
}