/* Gallery Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    width: 100%;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper {
    width: 100%;
    height: 100%;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

#lightboxImage {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: grab;
    user-select: none;
}

#lightboxImage:active {
    cursor: grabbing;
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
}

.lightbox-info {
    margin-top: 20px;
    text-align: center;
    color: white;
}

.lightbox-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.lightbox-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    z-index: 10;
}

.lightbox-control-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.lightbox-control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gallery Item Hover Effects */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1 !important;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        font-size: 1.2rem;
    }

    .lightbox-controls {
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 15px;
        bottom: 10px;
    }

    .lightbox-control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-title {
        font-size: 1.2rem;
    }

    #lightboxImage {
        max-height: 60vh;
    }

    .lightbox-image-wrapper {
        max-height: 60vh;
    }
}

/* Fullscreen Styles */
.gallery-lightbox:fullscreen {
    background: rgba(0, 0, 0, 1);
}

.gallery-lightbox:fullscreen .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
}

.gallery-lightbox:fullscreen #lightboxImage {
    max-height: 90vh;
}

.gallery-lightbox:fullscreen .lightbox-image-wrapper {
    max-height: 90vh;
}

