My question involves a careless driving ticket from the State of: Pennsylvania
Hello all,
I'm posting because of concern of the legality for me getting pulled over last Saturday. About 11:30PM I followed my friends into the driveway of their church parking lot to park in the lot and stay the night at my friends' house across the street. While within the confines of the private property/parking lot of the church, my friend dimmed her lights (just turned on daytime running lights), and since she goes through this parking lot every night, I thought it was due to respect the neighbors by not shining bright light through their windows, so I turned my daytime running lights on also (instead of the normal night headlights). About 5 seconds later I parked my vehicle in the church parking lot, got out, and locked my door. While shutting my door, I see lights turned on, and there was a cop car right behind me that didn't have his lights on the whole time!
The officer got out of the vehicle and then asked why I turned my headlights off, and I told him I didn't, my daytime lights were still on, I just dimmed my lights out of respect, and I wasn't on a road anymore, I was in a parking lot on private property I was given permission to park in. At this time he smelled alcohol on my breath, and I blew a .081, he arrested me, then took my keys, told me he was going to lock my car, but instead since it was already locked, he unlocked it and searched it, taking what was left from my case of beer for the night.
Anyways, where I'm getting at, is that I am wondering if the officer was in his legal rights to have tried ticketing me for "careless/unsafe" driving in the first place. I may be completely wrong, but I would like to know if I was actually guilty of that by turning my night-headlights off, and daytime running lights on. It was 11:30PM in a church/graveyard parking lot which was private property with nobody else on the property other than my friends, and no property was being damaged (I thought careless driving was constituted by a "disregard for the safety of people or property")
Any help is appreciated, I thank you all for reading!

