Improve animation when section size changes