/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 95%;
    max-width: 1200px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 1.2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    color: #3498db;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    color: #fff;
    font-size: 70px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.5);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #3498db;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
    padding: 15px;
    max-width: 100%;
    overflow-x: auto;
}

.lightbox-thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.lightbox-thumbnail:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Loading indicator */
.lightbox-loading {
    color: #fff;
    font-size: 1.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.lightbox-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Image counter */
.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 35px;
    color: #fff;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 100000;
}

/* Room images with lightbox cursor */
.room-image-lightbox {
    cursor: zoom-in;
    transition: transform 0.3s;
}

.room-image-lightbox:hover {
    transform: scale(1.03);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .lightbox-content {
        width: 98%;
        height: 98vh;
        padding: 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 50px;
        width: 60px;
        height: 60px;
    }
    
    .lightbox-close {
        font-size: 35px;
        top: 15px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-caption {
        font-size: 1.1rem;
        padding: 15px 0;
    }
    
    .lightbox-thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .lightbox-counter {
        top: 20px;
        left: 20px;
        font-size: 1rem;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .lightbox-nav {
        padding: 0 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        width: 50px;
        height: 50px;
    }
    
    .lightbox-thumbnails {
        gap: 10px;
        padding: 10px;
    }
    
    .lightbox-thumbnail {
        width: 70px;
        height: 52px;
    }
    
    .lightbox-caption {
        font-size: 1rem;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        padding: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .lightbox-counter {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
}