Refactored media queries and added max-device-width queries