/* ============================================ */
/* LIGHTBOX MODAL - Image Gallery */
/* ============================================ */

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

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

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    width: 95%;
    height: 92%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-image-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--dark);
    transition: all 0.3s;
    z-index: 10002;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary);
    color: white;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--dark);
    transition: all 0.3s;
    z-index: 10002;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
    background: var(--primary);
    color: white;
}

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

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: bold;
    color: var(--dark);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10002;
}

/* Make images clickable */
.photo-frame,
.monitoring-grid>div,
[class*="grid"] img {
    cursor: pointer;
}