Refactored media CSS and HTML