/* ===========================================
   LIGHTBOX GALLERY STYLESHEET
   =========================================== */

/* Lightbox Modal Container */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Main Image Container */
.lightbox-image-container {
    position: relative;
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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

/* Caption Container */
.lightbox-caption-container {
    text-align: center;
    max-width: 90vw;
}

/* Image Caption */
.lightbox-caption {
    color: white;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 15px;
    max-width: 90vw;
    font-family: 'Noto Sans', sans-serif;
    margin-bottom: 5px;
}

/* Counter Display */
.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 5px;
    font-family: 'Noto Sans', sans-serif;
    margin-bottom: 0;
}

/* Navigation Buttons */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.lightbox-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-btn-prev {
    left: 20px;
}

.lightbox-btn-next {
    right: 20px;
}

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

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 1001;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

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

/* Thumbnail Navigation */
.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    max-width: 90vw;
    overflow-x: auto;
    padding: 10px 0;
}

.lightbox-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lightbox-thumbnail:hover {
    opacity: 0.9;
}

.lightbox-thumbnail.active {
    border-color: white;
    opacity: 1;
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* Keyboard Navigation Hint */
.lightbox-hint {
    position: absolute;
    bottom: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 20px 10px;
    }

    .lightbox-image-container {
        max-width: 95vw;
        max-height: 70vh;
        margin-bottom: 15px;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-btn-prev {
        left: 10px;
    }

    .lightbox-btn-next {
        right: 10px;
    }

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

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

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

    .lightbox-caption {
        font-size: 1rem;
    }

    .lightbox-thumbnails {
        gap: 8px;
        margin-top: 15px;
    }

    .lightbox-thumbnail {
        width: 50px;
        height: 50px;
    }

    .lightbox-hint {
        bottom: 15px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        padding: 15px 5px;
    }

    .lightbox-image-container {
        max-width: 100vw;
        max-height: 60vh;
        margin-bottom: 10px;
    }

    .lightbox-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .lightbox-btn-prev {
        left: 5px;
    }

    .lightbox-btn-next {
        right: 5px;
    }

    .lightbox-thumbnails {
        gap: 6px;
    }

    .lightbox-thumbnail {
        width: 45px;
        height: 45px;
    }

    .lightbox-hint {
        display: none;
    }
}

/* Make gallery items clickable */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item:hover {
    opacity: 0.9;
}

/* Disable scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}