Deep in a wooded gorge above Idrija, where the stream called Idrijska Bela tumbles over pale limestone, stands one of the strangest pieces of old engineering in Slovenia: a klavže, a water barrier built of massive dressed stone blocks across the narrow valley. Its job had nothing to do with power or flood control. Idrija's mercury mine, one of the two largest in the world for centuries, devoured timber for its shafts and smelters, and the forests close to town were soon exhausted. So the miners built these dams on mountain streams, let water build up behind them, piled cut logs in the bed below and then opened the gates. The released flood swept the timber all the way down to Idrija, where it was caught at a rake across the river.
The barriers date from the eighteenth century and were used well into the twentieth, and the walk along the Idrijska Bela to reach them is one of the loveliest short hikes in the region, through beech forest along water of an almost unreal turquoise. The mine itself, together with the Spanish mercury town of Almadén, is a UNESCO World Heritage site, and Idrija's old miners' houses, its castle and the giant wooden water wheel called the Kamšt make the town worth an hour on their own. Idrija lace, made with bobbins, is still produced, and the local dish is žlikrofi, little stuffed dumplings that every inn serves with its own sauce.
For a rider this corner of western Slovenia is excellent. The road from Idrija down to Ajdovščina and the Vipava valley climbs and twists through forest, with a mix of tight hairpins and faster sections, and the road north-east towards Logatec and Ljubljana is just as much fun. Surfaces are generally good, traffic is light outside weekday commuting hours and the scenery shifts from deep green gorges to the high karst plateau. Expect wet roads; this is one of the rainiest parts of the country.
There is nothing at the barrier itself except the forest and the sound of water, so park sensibly at the trailhead and take some food and water with you. Idrija, about seven kilometres away, has fuel, supermarkets, cafés and restaurants, and it is small enough to cross on foot after the walk.