You seem to have added your styling within a @media (max-width:768px){ ... } rule. This rule basically instructs the CSS code to only apply to viewports equal or smaller than 768px which is normally a mobile screen.
For your CSS styles to apply on desktop as well, you’ll have to remove the @media rule that specifies the style to only apply on mobile.