import React from 'react';
import { motion, useReducedMotion } from 'framer-motion';

const fadeUpPreset = (delay = 0, duration = 1.2) => ({
  initial: { opacity: 0, y: 20 },
  whileInView: { opacity: 1, y: 0 },
  viewport: { once: true, amount: 0.2 },
  transition: { delay, duration, ease: "easeOut" }
});

const Team = () => {
  const shouldReduceMotion = useReducedMotion();

  if (shouldReduceMotion) {
    return (
      <section className="section-padding bg-white">
        <div className="container-custom">
          <div className="text-center mb-16">
            <h2 className="text-3xl lg:text-4xl font-bold text-gray-900 mb-4">
              Sargas Team
            </h2>
          </div>

          <div className="max-w-4xl mx-auto">
            <div className="bg-gray-50 rounded-2xl p-8 lg:p-12">
              <div className="text-center">
                <div className="w-24 h-24 bg-gray-200 rounded-full mx-auto mb-6"></div>
                <h3 className="text-2xl font-bold text-gray-900 mb-2">Meet Our Team</h3>
                <p className="text-gray-600 mb-8">
                  Our experienced team of developers, designers, and project managers are dedicated to delivering exceptional results.
                </p>
                <button className="btn-primary">
                  Get to Know Us
                </button>
              </div>
            </div>
          </div>
        </div>
      </section>
    );
  }

  return (
    <motion.section 
      {...fadeUpPreset(0.1, 0.8)}
      className="section-padding bg-white"
    >
      <div className="container-custom">
        <motion.div 
          {...fadeUpPreset(0.2, 0.8)}
          className="text-center mb-16"
        >
          <h2 className="text-3xl lg:text-4xl font-bold text-gray-900 mb-4">
            Sargas Team
          </h2>
        </motion.div>

        <motion.div 
          {...fadeUpPreset(0.3, 0.8)}
          className="max-w-4xl mx-auto"
        >
          <div className="bg-gray-50 rounded-2xl p-8 lg:p-12">
            <div className="text-center">
              <div className="w-24 h-24 bg-gray-200 rounded-full mx-auto mb-6"></div>
              <h3 className="text-2xl font-bold text-gray-900 mb-2">Meet Our Team</h3>
              <p className="text-gray-600 mb-8">
                Our experienced team of developers, designers, and project managers are dedicated to delivering exceptional results.
              </p>
              <button className="btn-primary">
                Get to Know Us
              </button>
            </div>
          </div>
        </motion.div>
      </div>
    </motion.section>
  );
};

export default Team;