Imac 27 late 2013 shut down and doesn’t turn on

imac 27 late 2013 shut down after few hours ( sometimes after 3 hours, other times after 30 minutes ) and doesn't turn on.
To turn it on again, i have to unplug power cable for at least 30 minutes. When it shut down, If I don’t unplug power cable and plug it again, it doesn’t turn on. Have you ever had similar problem? Is it power supply or motherboard issue?
 
Top