Fix grid alignment issues in gallery and footer