Adjusted the layout for smaller devices.