/* ============================================
   LIGHTBOX IMAGE GALLERY
   ============================================
   - Click-to-enlarge floor plan images
   - Full-screen modal overlay
   - Smooth zoom animation
   - Keyboard and click-outside-to-close
   ============================================ */

/* Gallery Trigger - Make images clickable */
.floor-plan-gallery {
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floor-plan-gallery:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.floor-plan-gallery::after {
    content: '🔍';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(201, 168, 105, 0.95);
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.floor-plan-gallery:hover::after {
    opacity: 1;
}

/* Lightbox Overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Lightbox Content Container */
.lightbox-content {
    position: relative;
    max-width: 1400px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox Image */
.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

/* Lightbox Caption */
.lightbox-caption {
    margin-top: 10px;
    text-align: center;
}

.lightbox-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.lightbox-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    bottom: -40px;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -10px;
    right: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Download Button (Optional) */
.lightbox-download {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    background: linear-gradient(135deg, #C9A869, #A37F4E);
    color: #FFFFFF;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.lightbox-download:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 168, 105, 0.4);
}

.lightbox-download svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Zoom Controls */
.lightbox-zoom-controls {
    position: absolute;
    top: -10px;
    left: 0;
    display: flex;
    gap: 10px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Loading Spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #C9A869;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Instructions Hint */
.lightbox-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    animation: fadeInUp 0.5s ease 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .lightbox-content {
        max-height: 95vh;
    }
    
    .lightbox-image {
        max-height: calc(95vh - 100px);
    }
    
    .lightbox-close {
        top: -40px;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .lightbox-title {
        font-size: 1.4rem;
    }
    
    .lightbox-description {
        font-size: 0.95rem;
    }
    
    .lightbox-download {
        bottom: -50px;
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .lightbox-zoom-controls {
        top: -40px;
    }
    
    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .floor-plan-gallery::after {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .lightbox-overlay {
        padding: 10px;
    }
    
    .lightbox-title {
        font-size: 1.2rem;
    }
    
    .lightbox-description {
        font-size: 0.85rem;
    }
    
    .lightbox-instructions {
        font-size: 0.8rem;
        bottom: 10px;
    }
}

/* Accessibility */
.lightbox-overlay:focus {
    outline: none;
}

.lightbox-close:focus,
.zoom-btn:focus {
    outline: 2px solid #C9A869;
    outline-offset: 2px;
}

/* Disable body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}