The Yellow-crowned Night-Heron is a species where the plumage differences between adults and juveniles is pretty marked. They inhabit rivers and marshes, but can be seen resting on other places during the day. I saw two juveniles in Playa Montezuma; they were foraging near a small creek that goes into the beach, covered in dark shade due to almond trees.
Juvenile bird standing on a fallen tree
It probably felt safe because the shade of the big trees meant it was really dark
The pictures below were taken during a boat tour in the Tárcoles River, on June 18th, 2017. The tour was guided by Randall Ortega, an expert birder and owner of Mangrove Birding Journey.
An adult individual captured from far away; note the striking face pattern, totally different from the juvenile
This juvenile stood for half an hour on this branch, entirely motionless, it did not even change posture
Another juvenile was nearby in the mangrove and stayed motionless as well for quite some time