Modern trains are actually quite efficient at generating electricity through a process called regenerative braking. When an electric or hybrid train slows down, its electric motors run in reverse, acting as generators. This process converts the train's kinetic energy back into electrical energy, which is then fed back into the overhead power lines (the catenary system) or stored in onboard batteries for later use. This "recycled" electricity can be used by other trains on the same track or to power the train's internal systems like lighting, heating, and air conditioning. In some innovative "gravity train" concepts, such as those used in mining, heavily loaded trains traveling downhill can generate more electricity than they need to get back up empty, essentially becoming moving power plants. This technology significantly reduces the overall carbon footprint of rail travel, making it one of the most sustainable forms of mass transit available. Additionally, some experimental trains are being fitted with solar panels on their roofs to supplement the power needed for auxiliary on-board services.