/* Lightbox Gallery Styles */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10002;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-caption {
    color: #fff;
    margin-top: 20px;
    font-size: 1rem;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    color: #fff;
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Navigation Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10003;
    transition: all 0.3s ease;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    line-height: 1;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px 15px;
    line-height: 1;
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px 15px;
    line-height: 1;
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Thumbnails Strip */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    max-width: 90vw;
    overflow-x: auto;
    z-index: 10003;
    backdrop-filter: blur(10px);
}

.lightbox-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.lightbox-thumbnail {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lightbox-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 1.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 15px 12px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-caption {
        font-size: 0.9rem;
        margin-top: 15px;
        padding: 0 10px;
    }

    .lightbox-thumbnails {
        bottom: 10px;
        padding: 10px;
        gap: 8px;
    }

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox.active {
    animation: fadeIn 0.3s ease;
}

/* Loading State */
.lightbox-image[src=""] {
    display: none;
}

/* Hover hint for clickable images in modal */
.modal-image:hover,
.modal-gallery-image:hover,
.media-item img:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}
