San Marino 's foreign policy is aligned with that of the European Union , although it is not a member ; social and political trends in the republic track closely with those of its larger neighbor , Italy .