/* includes/gallery.php — винесено з inline <style> 20260908_2104 */
/* ГАЛЕРЕЯ З ZOOM */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-container {
    position: relative;
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    user-select: none;
    transition: transform 0.2s ease-out;
    cursor: default;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.gallery-close:hover {
    color: #ff6b6b;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.gallery-thumbnails {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.7);
    padding: 15px;
    border-radius: 25px;
    max-width: 90%;
    overflow-x: auto;
}

.gallery-thumb {
    width: 60px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    object-fit: cover;
    border: 2px solid transparent;
    flex-shrink: 0;
    user-select: none;
}

.gallery-thumb:hover {
    opacity: 0.9;
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.5);
}

.gallery-thumb.active {
    opacity: 1 !important;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    transform: scale(1.1);
}

/* МОБІЛЬНА ВЕРСІЯ */
@media (max-width: 768px) {
    .gallery-image-container {
        width: 95%;
        height: 70%;
    }

    .gallery-modal img {
        max-width: 100%;
        max-height: 100%;
    }
    
    .gallery-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .gallery-thumbnails {
        bottom: 15px;
        padding: 10px;
        gap: 8px;
    }
    
    .gallery-thumb {
        width: 50px;
        height: 67px;
    }
}
    
