The sentence below is a complex sentence. A complex sentence has an independent clause and a dependent clause that has a subordinating conjunction before it. The dependent clause of the sentence is "Because the city was on a hill surrounded by canyons and caverns" and the subordinating conjunction that comes before it is "because". The independent clause is "its location was very safe". Hope this helped!