'use client';

import { usePathname } from 'next/navigation';

// Keying by pathname forces React to remount this wrapper on every route
// change, which restarts the CSS animation — a subtle fade/slide-up on each
// step of the booking flow, no animation library required.
export function PageTransition({ children }: { children: React.ReactNode }) {
  const pathname = usePathname();
  return (
    <div key={pathname} className="animate-fade-in-up">
      {children}
    </div>
  );
}
