.gallery {
    position: relative;
    background-color: var(--section-bg-color);
}

.gallery .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.gallery .container .item {
    padding: 10px;
    background-color: white;
    box-shadow: 0 12px 20px 0 rgba(0, 0, 0, 13%), 0 2px 4px 0 rgba(0, 0, 0, 12%);
}

.gallery .item .image {
    position: relative;
    overflow: hidden;
}

.gallery .item .image::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.2);
    width: 0;
    height: 0;
    opacity: 0;
    z-index: 1;
}

.gallery .item .image:hover::before {
    animation: flashing 0.7s;
}

@keyframes flashing {

    0%,
    40% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        width: 200%;
        height: 200%;
    }
}

.gallery .image img {
    max-width: 100%;
    transition: var(--transition-duration);
}

.gallery .image:hover img {
    transform: scale(1.1) rotate(6deg);
}