What I understand so far: in processes where the form of energy is replaced with another form and/or energy is transferred (and so work is done), there is always some degree of loss of energy as heat which is indicated by a change in entropy and which makes the process irreversible (getting the process back to where it began, will require an additional external energy expenditure to compensate for the loss). The Carnot cycle is a theoretical process which exhibits a zero entropy change and is therefore reversible.
When an atom absorbs a photon, its energy is completely transferred causing an increase in the potential energy of the system that is the atom. The photon energy equals this increase and the possible increases for the atom are quantized. So this is a zero-entropy process? There is no decay of some of the photon's energy? Since then it wouldn't be able to be absorbed anymore because that's not allowed by the quality of the system being a quantized one? When the atom returns to the ground state, the same photon is reproduced and emitted, so without any loss of energy as heat?
Related to thermal energy and work: why is it that thermal energy sometimes can do work(nuclear energy drives generators, pushes pistons to drive cars...) but in the case of entropy is considered as the forever loss of potential work. Is it because of 'density of the thermal energy' or because of the specific organization of the system (closed chamber with a movable piston) in which it is produced?
Help in elucidating and clearing this up is greatly appreciated