A Gallery with the custom-class: flexed-gallery

.flexed-gallery .avia-gallery-thumb {
  display: flex !important;
  flex-flow: row wrap;
  justify-content: space-evenly;
}

.flexed-gallery .avia-gallery-thumb > a {
  flex: 0 1 11.1%;
  width: unset !important;
  margin: 0 0 10px;
  padding: 0;
}

@media only screen and (max-width: 989px) {
  .flexed-gallery .avia-gallery-thumb > a {
    flex: 0 1 24%;
  }
}

@media only screen and (max-width: 767px) {
  .flexed-gallery .avia-gallery-thumb > a {
    flex: 0 1 32%;
  }
}

@media only screen and (max-width: 479px) {
  .flexed-gallery .avia-gallery-thumb > a {
    flex: 1 1 100%;
  }
}