On a budget, Sierra de Guadarrama Hike (Cercedilla) still earns its price.
Cercanías train ~€9 return
A real mountain escape an hour from the city: marked trails through Scots pines, alpine air, and summits like Peñalara, easy to reach without a car. The catch is it's weather-dependent, snowy and cold in winter, exposed in summer, and you need decent footwear and a plan — it's not a casual stroll.