Regional variation within a country often exceeds variation between countries, and packing for the spread matters more than packing for the average. The reliable gradients: big cities dress more liberally than small towns and countryside almost everywhere; coastal and tourist zones run more relaxed than interior regions; and religiously conservative regions, which exist within otherwise liberal countries, hold noticeably stricter expectations. Some countries formalize this with region-specific rules or strongly enforced norms, so a beach outfit acceptable in a resort enclave can be genuinely inappropriate, occasionally unlawful, an hour inland.
University towns and capital cities are usually the most forgiving places to miscalculate; villages, pilgrimage towns, and border regions the least, and women travelers report the difference more sharply than men in conservative areas.
Packing for the spread is easier than it sounds: layers and convertibles beat separate wardrobes. Lightweight long trousers and a long skirt, tops that cover shoulders, a shirt to throw over anything sleeveless, one scarf or shawl, and you can modulate from resort to temple town out of one daypack. My rule of thumb after years of this: pack for the most conservative place on your itinerary and undress toward the liberal ones, never the reverse, since adding modesty mid-trip is a shopping errand while having it in the bag costs nothing.