Just as the country is battling Donald Trump’s threats over the Panama Canal, a bitter environmental feud has reopened over the future of the country’s biggest mining project