/* ==========================================================================
   Lightbox Component
   ========================================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

.lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.lightbox.active .lightbox__image {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-mist-white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
}

.lightbox__close:hover {
    background: var(--color-aged-gold);
    color: var(--color-deep-ocean);
    transform: rotate(90deg);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-mist-white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
}

.lightbox__nav:hover {
    background: var(--color-aged-gold);
    color: var(--color-deep-ocean);
}

.lightbox__nav--prev {
    left: var(--space-6);
}

.lightbox__nav--next {
    right: var(--space-6);
}

.lightbox__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox__nav:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-mist-white);
}

/* Gallery Item Click State */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--color-deep-ocean-rgb), 0);
    transition: background var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover::after {
    background: rgba(var(--color-deep-ocean-rgb), 0.3);
}

.gallery-item::before {
    content: '\F52D'; /* Bootstrap Icons expand icon */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: var(--color-mist-white);
    font-size: 2rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox__close,
    .lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox__close {
        top: var(--space-4);
        right: var(--space-4);
    }

    .lightbox__nav--prev {
        left: var(--space-2);
    }

    .lightbox__nav--next {
        right: var(--space-2);
    }
}
