A common geographical confusion: Croatia is not the capital of any country. It is a sovereign nation in Central and Southeast Europe, bordered by Slovenia, Hungary, Serbia, Bosnia and Herzegovina, and Montenegro, with a long Adriatic coastline.
If you're looking for the capital of Croatia, it's Zagreb. If you're asking which country has Zagreb as its capital, the answer is Croatia.