"use client";

import { motion } from "framer-motion";
import type React from "react";

interface PageTransitionProps {
  children: React.ReactNode;
  className?: string;
}

export function PageTransition({ children, className }: PageTransitionProps) {
  return (
    <motion.div
      initial={{ opacity: 0, y: 10 }}
      animate={{ opacity: 1, y: 0 }}
      exit={{ opacity: 0, y: -10 }}
      transition={{
        duration: 0.4,
        ease: [0.22, 1, 0.36, 1], // Custom cubic-bezier for smoother feel
      }}
      className={className}
    >
      {children}
    </motion.div>
  );
}
