/* Fixed Lightbox Styles with White Background */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 10px;
    border-radius: 20px;
}

.lightbox.show {
    display: flex;
}

.lightbox-container {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 800px;
    max-height: 95vh;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.popup-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 20px 20px 0 0;
}

.popup-header h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.lightbox-content {
    width: 100%;
    height: auto;
    max-height: 65vh;
    min-height: 350px;
    object-fit: contain;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 5px;
    transition: all 0.4s ease-in-out;
    flex-shrink: 0;
    border-radius: 25px;
}

.image-intro {
    font-size: 16px;
    color: #666;
    margin: 5px 20px 20px 20px;
    padding: 0;
    font-weight: 400;
    line-height: 1.4;
    flex-shrink: 0;
}

/* Slide Animations */
.slide-in-right {
    animation: slideInRight 0.4s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-in-out;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    background: transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 20;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Updated Slim Arrow Styles */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
    padding: 15px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.prev:hover,
.next:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.prev {
    left: 20px;
    border-radius: 0 25px 25px 0;
}

.next {
    right: 20px;
    border-radius: 25px 0 0 25px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lightbox-container {
        max-width: 95%;
        border-radius: 15px;
    }

    .popup-header {
        padding: 15px;
        border-radius: 15px 15px 0 0;
    }

    .popup-header h4 {
        font-size: 20px;
    }

    .lightbox-content {
        max-height: 100%;
        min-height: auto;
        padding: 15px;
        border-radius: 20px;
    }

    .prev,
    .next {
        font-size: 16px;
        width: 25px;
        height: 25px;
        padding: 12px 6px;
    }

    .prev {
        left: 15px;
    }

    .next {
        right: 15px;
    }

    .close {
        top: 10px;
        right: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }

    .image-intro {
        font-size: 14px;
        margin: 1px 15px 15px 15px;
    }
}
