/**
 * TOP LEVEL GALLERY DESIGN - 2025 PROFESSIONAL STANDARDS
 * Following modern gallery patterns и best practices
 */

/* ===== PROFESSIONAL GALLERY MODAL - WORKING DISPLAY ===== */
.photo-modal {
    /* Perfect overlay */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    
    /* Modern backdrop */
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(32px) saturate(120%) !important;
    
    /* Perfect centering */
    display: none; /* Hidden by default - NO !important */
    align-items: center !important;
    justify-content: center !important;
    
    /* Smooth entrance */
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* When modal is shown via JavaScript */
.photo-modal[style*="display: flex"],
.photo-modal[style*="display: block"] {
    display: flex !important; /* Override to flex when shown */
}

/* ===== GALLERY CONTENT CONTAINER - PROFESSIONAL LAYOUT ===== */
.photo-modal-content {
    /* Perfect container */
    position: relative !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    
    /* Modern glassmorphism */
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(24px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    
    /* Perfect spacing */
    padding: 32px !important;
    
    /* Professional shadow */
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 8px 32px rgba(0, 0, 0, 0.4) !important;
    
    /* Smooth entrance animation */
    transform: scale(0.9) translateY(20px) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.photo-modal.active .photo-modal-content {
    transform: scale(1) translateY(0) !important;
}

/* ===== GALLERY IMAGE - PERFECT DISPLAY ===== */
.photo-modal-image {
    /* Perfect dimensions */
    width: 100% !important;
    height: auto !important;
    max-height: 75vh !important;
    
    /* Perfect image handling */
    object-fit: contain !important;
    object-position: center !important;
    
    /* Modern styling */
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4) !important;
    
    /* NUCLEAR FIX: Make image visible */
    opacity: 1 !important;
    transition: opacity 0.4s ease !important;
}

.photo-modal-image.loaded {
    opacity: 1 !important;
}

/* ===== GALLERY CONTROLS - PROFESSIONAL UX ===== */
.photo-modal-close {
    /* Perfect positioning */
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    
    /* Perfect dimensions */
    width: 44px !important;
    height: 44px !important;
    
    /* Modern styling */
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    
    /* Perfect typography */
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    
    /* Professional interaction */
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Perfect centering */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.photo-modal-close:hover {
    background: rgba(243, 159, 27, 0.9) !important;
    color: #000000 !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 8px 24px rgba(243, 159, 27, 0.4) !important;
}

/* ===== GALLERY NAVIGATION - PROFESSIONAL CONTROLS ===== */
.photo-modal-nav {
    /* Perfect positioning */
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    
    /* Perfect layout */
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 24px !important;
    pointer-events: none !important;
    transform: translateY(-50%) !important;
}

.photo-nav-btn {
    /* Perfect dimensions */
    width: 52px !important;
    height: 52px !important;
    
    /* Modern styling */
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    
    /* Perfect typography */
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    
    /* Professional interaction */
    cursor: pointer !important;
    pointer-events: all !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Perfect centering */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Professional shadow */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.photo-nav-btn:hover {
    background: rgba(243, 159, 27, 0.9) !important;
    color: #000000 !important;
    transform: scale(1.15) !important;
    box-shadow: 0 12px 32px rgba(243, 159, 27, 0.4) !important;
}

.photo-nav-btn:active {
    transform: scale(1.05) !important;
}