'use client';

import { motion } from 'framer-motion';

const BackGroundSection = () => {
  return (
    <div className="md:pt-68 pt-32 relative w-full h-[60vh] md:h-screen bg-white overflow-hidden flex items-center justify-center ">
      {/* المثلث الأزرق اليسار */}
      <motion.div
        className="absolute top-0 left-0 w-1/4 h-[60vh] md:h-screen bg-[#0F2C4F] z-0"
        style={{ clipPath: "polygon(0 0, 100% 50%, 0 100%)" }}
        initial={{ opacity: 0, x: -20 }}
        whileInView={{ opacity: 1, x: 0, transition: { duration: 0.6, ease: 'easeOut' } }}
        viewport={{ once: true }}
      />
      {/* المثلث الأزرق اليمين */}
      <motion.div
        className="absolute top-0 right-0 w-1/4 h-[60vh] md:h-screen bg-[#0F2C4F] z-0"
        style={{ clipPath: "polygon(100% 0, 0 50%, 100% 100%)" }}
        initial={{ opacity: 0, x: 20 }}
        whileInView={{ opacity: 1, x: 0, transition: { duration: 0.6, ease: 'easeOut' } }}
        viewport={{ once: true }}
      />
      {/* الصورة في النص - أجسام تطفو */}
      <motion.div
        className="relative z-10 w-[90%] max-w-[900px] aspect-[900/907]"
        initial={{ opacity: 0, scale: 0.95 }}
        whileInView={{ opacity: 1, scale: 1, transition: { duration: 0.5, ease: 'easeOut' } }}
        viewport={{ once: true }}>
        <img
          src="/images/Group19550.svg"
          alt="Center Illustration"
          className="object-contain animate-float animate-float-slow"
        />
      </motion.div>
    </div>
  );
};

export default BackGroundSection;
