The calculated distance (air line) between Opatija and Pivka is approximately 25 miles respectively 39 kilometers.
By car or train, the actual journey to Pivka is certainly longer, as only the direct route (as the crow flies) between Opatija and Pivka has been calculated here.