/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 9999;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-out, background-color 0.4s ease-out, backdrop-filter 0.4s ease-out;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.lightbox-content {
    position: relative;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    transform-origin: center;
    transform: translateY(60px) scale(0.95);
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.32s, opacity 0.6s ease-out 0.5s;
    opacity: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.lightbox-overlay.active .lightbox-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.lightbox-content img,
#lightboxImage {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    display: block;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    clip-path: inset(0 round 12px);
    -webkit-clip-path: inset(0 round 12px);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(67, 61, 46, 0.8);
    border: 2px solid rgba(67, 61, 46, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 10000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.lightbox-overlay.active .lightbox-close {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease-out 0.2s, transform 0.4s ease-out 0.2s, all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(67, 61, 46, 1);
    border-color: rgba(67, 61, 46, 1);
}

.lightbox-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.lightbox-overlay.active .lightbox-zoom-controls {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.4s ease-out 0.2s, transform 0.4s ease-out 0.2s;
}

.lightbox-zoom-btn {
    background: rgba(67, 61, 46, 0.8);
    border: 2px solid rgba(67, 61, 46, 0.9);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.lightbox-zoom-btn:hover {
    background: rgba(67, 61, 46, 1);
    border-color: rgba(67, 61, 46, 1);
}

@media (min-width: 768px) {
    .lightbox-zoom-controls {
        display: none;
    }
}

