Both headlights stopped working at the same time?

I have a 97' Honda Civic. Driving down the highway both low beam headlights went out. The following day both high beams went out at the same time. All other lights work fine. Fuses are fine and the bulbs are relatively new so I don't think they burned out. I was having alternator problems at the time so I replaced it but still no lights. Does anyone have experience with this sort of thing?

There are 3 wires for each headlight. One is the ground. One is for low beams and one for high beams.
If the low went out on one day and the high soon after, I'd check the wire harness' for a loose ground OR an intermittent short, power to ground. Check where the wires go through the frame behind the lights and see if there's any copper showing through the plastic wiring.
If the fuse for the headlights is good, the short is not a DEAD short, which means, it's not a hard contact to metal. You may recover the lights by moving the wire harness off of the metal frame. If that works for you, tape the harness along the point where it goes through the frame.
A hard, or DEAD short, will blow the fuse.

Unplug one of the bulbs and use a test light or volt meter to see if you have power at the plug. If you have power, try a new bulb. If you don't have power, trace the wiring back until you find the problem.

Yes, I have almost 50 years experience in electrical circuits. The problem, is that I can't talk to you.

Get a wiring diagram for your car. See if your city library or nearby college library has an online subscription to Alldata. That's where I get all my diagrams. There will be the headlight bulbs, headlught sockets, wiring, on-off switch, high-low beam switch, and maybe fuse(s). Look on the diagram and trace the 12 volts through the curcuit. It sounds like the high-low beam switch. You can use a voltmeter or 12 volt test light. Get the diagram. Otherwise see a mechanic.

Find and fix the short, then change the fuse.

If the alternator was causing voltage spikes that burnt out the headlights feel lucky the car still runs. It could have easily fried the computer too! It was time for new headlights anyway.