I updated my answer to add this information.
I also added .category-heading in the selector to prevent subcategories from having the same text under their image, and removed the max-height from the image container because it may hide the text below the image.