/* Mobile Fixes for Venobox Image Lightbox */

/* Header transition when toggling visibility */
.main-header {
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Ensure venobox overlay is above everything when open */
.vbox-overlay {
    z-index: 999999 !important;
}

/* Ensure close button is always visible on ALL devices (Desktop + Mobile) */
.vbox-close {
    display: block !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 55px !important;
    height: 55px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: none !important;
    border-radius: 50% !important;
    z-index: 9999999 !important;
    font-size: 32px !important;
    line-height: 55px !important;
    text-align: center !important;
    color: #2c3e50 !important;
    padding: 0 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 
                0 2px 6px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.vbox-close:before {
    content: "✕" !important;
    display: block !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 55px !important;
    color: #2c3e50 !important;
    transition: all 0.3s ease;
}

.vbox-close:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    color: #fff !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4), 
                0 4px 8px rgba(243, 156, 18, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.vbox-close:hover:before {
    color: #fff !important;
}

.vbox-close:active {
    transform: scale(0.95) rotate(90deg) !important;
}

/* Ensure close button is always visible and large enough on mobile */
@media (max-width: 767px) {
    .vbox-close {
        display: block !important;
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        width: 50px !important;
        height: 50px !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
        border-radius: 50% !important;
        z-index: 9999 !important;
        font-size: 30px !important;
        line-height: 50px !important;
        text-align: center !important;
        color: #fff !important;
        padding: 0 !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }
    
    .vbox-close:before {
        content: "×" !important;
        display: block !important;
        font-size: 40px !important;
        font-weight: 300 !important;
        line-height: 50px !important;
    }
    
    /* Make navigation arrows more visible on mobile */
    .vbox-next, .vbox-prev {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50px !important;
        height: 50px !important;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: none !important;
        border-radius: 50% !important;
        z-index: 9999999 !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 
                    0 2px 6px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .vbox-prev {
        left: 15px !important;
    }
    
    .vbox-next {
        right: 15px !important;
    }
    
    .vbox-next span, .vbox-prev span {
        border-color: #2c3e50 !important;
        border-top-color: #2c3e50 !important;
        border-right-color: #2c3e50 !important;
        width: 12px !important;
        height: 12px !important;
        transition: all 0.3s ease !important;
    }
    
    .vbox-prev:active, .vbox-next:active {
        transform: scale(0.9) !important;
    }
    
    /* Ensure overlay is properly sized on mobile */
    .vbox-overlay {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Make title visible on mobile if needed */
    .vbox-title {
        display: block !important;
        padding: 10px 60px !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
        color: #fff !important;
        font-size: 14px !important;
    }
    
    /* Better touch targets for mobile */
    .vbox-close,
    .vbox-next,
    .vbox-prev {
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Tablet fixes */
@media (min-width: 768px) and (max-width: 991px) {
    .vbox-close {
        width: 55px !important;
        height: 55px !important;
        line-height: 55px !important;
    }
    
    .vbox-close:before {
        line-height: 55px !important;
        font-size: 28px !important;
    }
}

/* Desktop/Large screen enhancements */
@media (min-width: 992px) {
    .vbox-close {
        width: 60px !important;
        height: 60px !important;
        top: 25px !important;
        right: 25px !important;
        line-height: 60px !important;
    }
    
    .vbox-close:before {
        font-size: 30px !important;
        line-height: 60px !important;
    }
    
    /* Make navigation arrows more visible on desktop */
    .vbox-next, .vbox-prev {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 55px !important;
        height: 55px !important;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: none !important;
        border-radius: 50% !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 
                    0 2px 6px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        z-index: 9999999 !important;
    }
    
    .vbox-prev {
        left: 25px !important;
    }
    
    .vbox-next {
        right: 25px !important;
    }
    
    .vbox-next span, .vbox-prev span {
        border-color: #2c3e50 !important;
        border-top-color: #2c3e50 !important;
        border-right-color: #2c3e50 !important;
        width: 14px !important;
        height: 14px !important;
        border-width: 3px !important;
        transition: all 0.3s ease !important;
    }
    
    .vbox-next:hover, .vbox-prev:hover {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
        transform: scale(1.15) !important;
        box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4), 
                    0 4px 8px rgba(243, 156, 18, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    }
    
    .vbox-next:hover span, .vbox-prev:hover span {
        border-color: #fff !important;
        border-top-color: #fff !important;
        border-right-color: #fff !important;
    }
    
    .vbox-next:active, .vbox-prev:active {
        transform: scale(0.95) !important;
}

/* Make sure close button works on touch devices */
.vbox-close {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
}

.vbox-close:active {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Add subtle animation on venobox open */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vbox-close, .vbox-next, .vbox-prev {
    animation: fadeInScale 0.4s ease-out;
}

/* Improve overlay appearance */
.vbox-overlay {
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Add pulse effect on hover for better UX */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 
                    0 2px 6px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    50% {
        box-shadow: 0 8px 24px rgba(243, 156, 18, 0.3), 
                    0 4px 8px rgba(243, 156, 18, 0.2),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

/* Better focus states for accessibility */
.vbox-close:focus,
.vbox-next:focus,
.vbox-prev:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.4), 
                0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Image number counter styling */
.vbox-num {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
    color: #2c3e50 !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    top: 20px !important;
    left: 20px !important;
    display: block !important;
}

/* Title styling */
.vbox-title {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 15px 80px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}
