/* VK Gallery System - CSS */

.vk-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.vk-gallery-item {
    width: 100%;
    /* Keep a perfectly square aspect ratio for uniformity */
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #f5f5f5;
}

.vk-gallery-img-wrap {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.vk-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.vk-gallery-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vk-gallery-item:hover .vk-gallery-img-wrap {
    transform: scale(1.08);
}

.vk-gallery-item:hover .vk-gallery-overlay {
    opacity: 1;
}

.vk-gallery-item:hover .vk-gallery-icon {
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .vk-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}
