/* OB Lightbox Styles */
.ob-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ob-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.ob-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.ob-lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ob-lightbox-content {
    position: relative;
    max-width: 1300px;
    max-height: 85vh;
    width: auto;
    height: auto;
}

.ob-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ob-lightbox.active .ob-lightbox-image {
    transform: scale(1);
}

.ob-lightbox-close {
    position: absolute;
    top: 18px;
    right: 28px;
    width: 22px;
    height: 22px;
    background: rgb(255 255 255 / 90%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #000;
    transition: all 0.3s ease;
    z-index: 9999991;
    border: 1px solid rgb(0 0 0 / 34%);
    box-sizing:border-box;
}

.ob-lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.ob-lightbox-close::before {
    content: "✕";
    font-family: Arial, sans-serif;
}

.ob-lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* Prevent body scroll when lightbox is open */
body.ob-lightbox-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {    
    .ob-lightbox-image {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .ob-lightbox-container {
        padding: 20px;
    }
    
    .ob-lightbox-image {
        max-height: 80vh;
    }
}

/* Handle images larger than 1300px */
@media (min-width: 1301px) {
    .ob-lightbox-content {
        max-width: 1300px;
    }
}

/* Animation for smooth opening/closing */
.ob-lightbox-container {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ob-lightbox.active .ob-lightbox-container {
    transform: scale(1);
}

/* Ensure images maintain aspect ratio */
.ob-lightbox-image {
    object-fit: contain;
}

/* Style for cursor on clickable elements */
img.ob_light_box,
a.ob_light_box {
    cursor: pointer;
}

/* Add subtle hover effect for lightbox images */
img.ob_light_box:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}