/* Lightbox - Vanilla JS replacement for FancyBox */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.lightbox-visible {
    opacity: 1;
}

.lightbox-image-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.lightbox-image-wrap img.lightbox-img-visible {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    line-height: 1;
    opacity: 0.8;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 5px 10px;
    font-family: Arial, sans-serif;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    opacity: 0.7;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 20px 15px;
    font-family: Arial, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    opacity: 0.7;
    font-family: Arial, sans-serif;
    z-index: 100001;
}

.lightbox-title {
    color: #fff;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    opacity: 0.9;
    font-family: Arial, sans-serif;
}

/* Hide nav buttons when only one image */
.lightbox-single .lightbox-nav,
.lightbox-single .lightbox-counter {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-image-wrap {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-nav {
        font-size: 30px;
        padding: 15px 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 26px;
    }

    .lightbox-counter {
        bottom: 10px;
        font-size: 12px;
    }
}
