figure.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(8rem,1fr));
    gap:1rem !important;
}

figure.wp-block-gallery > figure {
width: 100% !important;
}

figure.wp-block-gallery > figure:has(a) {
transition: 0.2s;
outline:solid 0rem red;

}

figure.wp-block-gallery > figure:hover:has(a) {
   outline-width: 0.25rem;
   transform: scale(1.025);
    }