"use client";

import { useState, useRef, FormEvent } from 'react';
import { useTranslations, useLocale } from 'next-intl';
import { motion, AnimatePresence } from 'framer-motion';

interface FormData {
  firstName: string;
  lastName: string;
  phone: string;
  email: string;
  companyName: string;
  foundationDate: string;
  sector: string;
  stage: string;
  employeeCount: string;
  isIncorporated: string;
  lookingForInvestment: string;
  incorporationLocation: string;
  currentLocation: string;
  companyDescription: string;
  previousInvestment: string;
  investmentAmount: string;
  websiteLink: string;
  presentationFile: File | null;
  founderCount: string;
  founderName: string;
  founderLinkedin: string;
}

interface FormField {
  name: string;
  label: string;
  type: string;
  required: boolean;
  placeholder?: string;
  options?: { value: string; label: string }[];
  accept?: string;
}

// ContactForm props ekleniyor
interface ContactFormProps {
  isModal?: boolean;
  onSubmitSuccess?: () => void;
}

export default function ContactForm({ isModal = false, onSubmitSuccess }: ContactFormProps) {
  const t = useTranslations('apply');
  const locale = useLocale();
  const formRef = useRef<HTMLFormElement>(null);
  
  const initialFormData: FormData = {
    firstName: '',
    lastName: '',
    phone: '',
    email: '',
    companyName: '',
    foundationDate: '',
    sector: '',
    stage: '',
    employeeCount: '',
    isIncorporated: '',
    lookingForInvestment: '',
    incorporationLocation: '',
    currentLocation: '',
    companyDescription: '',
    previousInvestment: '',
    investmentAmount: '',
    websiteLink: '',
    presentationFile: null,
    founderCount: '',
    founderName: '',
    founderLinkedin: ''
  };
  
  const [formData, setFormData] = useState<FormData>(initialFormData);
  const [currentStep, setCurrentStep] = useState(0);
  const [isSubmitting, setIsSubmitting] = useState(false);
  const [isSubmitted, setIsSubmitted] = useState(false);
  const [errors, setErrors] = useState<Record<string, string>>({});
  
  // Form adımları
  const formSteps = [
    { title: t('step1'), icon: 'user' },
    { title: t('step2'), icon: 'company' },
    { title: t('step3'), icon: 'details' }
  ];
  
  // Form alanları (adımlara göre)
  const formFields: FormField[][] = [
    // Adım 1: Kişisel Bilgiler
    [
      { name: 'firstName', label: 'Adınız', type: 'text', required: true },
      { name: 'lastName', label: 'Soyadınız', type: 'text', required: true },
      { name: 'phone', label: 'Telefon Numarası', type: 'tel', required: true },
      { name: 'email', label: 'E-Posta', type: 'email', required: true },
    ],
    // Adım 2: Şirket Bilgileri
    [
      { name: 'companyName', label: 'Startup İsmi', type: 'text', required: true },
      { name: 'foundationDate', label: 'Kuruluş Tarihi', type: 'date', required: true },
      { 
        name: 'sector', 
        label: 'Hangi Sektör', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: 'tech', label: t('techIndustry') },
          { value: 'fintech', label: t('fintechIndustry') },
          { value: 'health', label: t('healthIndustry') },
          { value: 'education', label: t('educationIndustry') },
          { value: 'ecommerce', label: t('ecommerceIndustry') },
          { value: 'other', label: t('otherIndustry') },
        ]
      },
      { 
        name: 'stage', 
        label: 'Aşaması', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: 'idea', label: t('stageIdea') },
          { value: 'mvp', label: t('stageMvp') },
          { value: 'early', label: t('stageEarly') },
          { value: 'growth', label: t('stageGrowth') },
          { value: 'scale', label: t('stageScale') },
        ]
      },
      { 
        name: 'employeeCount', 
        label: 'Çalışan Sayısı', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: '1-10', label: '1-10' },
          { value: '11-50', label: '11-50' },
          { value: '51-100', label: '51-100' },
          { value: '101-200', label: '101-200' },
          { value: '201+', label: '201+' },
        ]
      },
      { 
        name: 'isIncorporated', 
        label: 'Şirketleşme Durumu', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: 'yes', label: 'Evet' },
          { value: 'no', label: 'Hayır' },
        ]
      },
    ],
    // Adım 3: Detaylar ve Belgeler
    [
      { 
        name: 'lookingForInvestment', 
        label: 'Yatırım Arayışınız Var mı?', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: 'yes', label: 'Evet' },
          { value: 'no', label: 'Hayır' },
        ]
      },
      { name: 'incorporationLocation', label: 'Şirketleştiği ülke-şehir', type: 'text', required: false },
      { name: 'currentLocation', label: 'Bulunduğu Ülke/Şehir', type: 'text', required: true },
      { 
        name: 'companyDescription', 
        label: 'Startup hakkında kısa bilgi', 
        type: 'textarea', 
        required: true,
        placeholder: 'Startup\'ınız hakkında kısa bir bilgi yazın...'
      },
      { 
        name: 'previousInvestment', 
        label: 'Projeniz Daha Önce Yatırım Aldı mı?', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: 'yes', label: 'Evet' },
          { value: 'no', label: 'Hayır' },
        ]
      },
      { name: 'investmentAmount', label: 'Yatırım miktarı', type: 'text', required: false },
      { name: 'websiteLink', label: 'Website veya demo linki', type: 'url', required: false },
      { 
        name: 'presentationFile', 
        label: 'Sunum Yükle', 
        type: 'file', 
        required: false,
        accept: '.pdf,.ppt,.pptx,.doc,.docx' 
      },
      { 
        name: 'founderCount', 
        label: 'Kurucu ortak sayısı', 
        type: 'select', 
        required: true,
        options: [
          { value: '', label: t('select') },
          { value: '1', label: '1' },
          { value: '2', label: '2' },
          { value: '3', label: '3' },
          { value: '4', label: '4' },
          { value: '5+', label: '5+' },
        ]
      },
      { name: 'founderName', label: 'İsim-soyad', type: 'text', required: true },
      { name: 'founderLinkedin', label: 'Linkedin', type: 'url', required: false },
    ]
  ];
  
  // Form verilerini güncelle
  const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
    const { name, value } = e.target;
    
    // Dosya yükleme kontrolü
    if ((e.target as HTMLInputElement).files) {
      const files = (e.target as HTMLInputElement).files;
      if (files && files.length > 0) {
        setFormData({ ...formData, [name]: files[0] });
      }
    } else {
      setFormData({ ...formData, [name]: value });
    }
    
    // Hata varsa temizle
    if (errors[name]) {
      setErrors({ ...errors, [name]: '' });
    }
  };
  
  // Formu doğrula
  const validateForm = (step: number): boolean => {
    const newErrors: Record<string, string> = {};
    let isValid = true;
    
    formFields[step].forEach(field => {
      if (field.required && !formData[field.name as keyof FormData]) {
        newErrors[field.name] = t('required');
        isValid = false;
      }
      
      // E-posta doğrulama
      if (field.name === 'email' && formData.email && !/\S+@\S+\.\S+/.test(formData.email)) {
        newErrors.email = t('invalidEmail');
        isValid = false;
      }
      
      // Telefon doğrulama
      if (field.name === 'phone' && formData.phone && !/^[0-9\s\+\-\(\)]{10,15}$/.test(formData.phone)) {
        newErrors.phone = t('invalidPhone');
        isValid = false;
      }
    });
    
    setErrors(newErrors);
    return isValid;
  };
  
  // Sonraki adıma geç
  const handleNext = () => {
    if (validateForm(currentStep)) {
      setCurrentStep(currentStep + 1);
    }
  };
  
  // Önceki adıma dön
  const handlePrevious = () => {
    setCurrentStep(currentStep - 1);
  };
  
  // Formu gönder
  const handleSubmit = (e: FormEvent) => {
    e.preventDefault();
    
    if (validateForm(currentStep)) {
      setIsSubmitting(true);
      
      // Burada gerçek bir API çağrısı yapılabilir
      setTimeout(() => {
        console.log('Form verileri:', formData);
        setIsSubmitted(true);
        setIsSubmitting(false);
        
        // Formu sıfırla
        setFormData(initialFormData);
        setCurrentStep(0);
        
        // Form başarıyla gönderildiğinde callback'i çağır
        if (onSubmitSuccess) {
          setTimeout(() => {
            onSubmitSuccess();
          }, 2000); // Kullanıcıya başarı mesajını göstermek için 2 saniye bekle
        }
      }, 1500);
    }
  };
  
  // Yeni başvuru yap
  const handleNewApplication = () => {
    setIsSubmitted(false);
    setFormData(initialFormData);
    setCurrentStep(0);
  };
  
  // İkon Bileşenleri
  const icons = {
    user: (
      <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
        <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
      </svg>
    ),
    company: (
      <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
        <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
      </svg>
    ),
    details: (
      <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
        <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
      </svg>
    ),
  };
  
  // Animasyon varyantları
  const cardVariants = {
    hidden: { opacity: 0, y: 50 },
    visible: { 
      opacity: 1, 
      y: 0,
      transition: { duration: 0.5, ease: "easeOut" }
    },
    exit: { 
      opacity: 0, 
      y: -50,
      transition: { duration: 0.3 }
    }
  };
  
  // Adım göstergesi animasyonu
  const stepItemVariants = {
    inactive: { scale: 1, opacity: 0.7 },
    active: { 
      scale: 1.1, 
      opacity: 1,
      transition: { duration: 0.3 }
    },
    completed: { 
      scale: 1, 
      opacity: 1,
      transition: { duration: 0.3 }
    }
  };

  // Formda daha sonra düzgün şekilde render için özel işlev oluşturalım
  const renderField = (field: FormField) => {
    if (field.type === 'textarea') {
      return (
        <textarea
          id={field.name}
          name={field.name}
          value={formData[field.name as keyof FormData] as string || ''}
          onChange={handleChange}
          placeholder={field.placeholder}
          className={`w-full px-4 py-3 bg-slate-700/50 border ${
            errors[field.name] ? 'border-red-500' : 'border-slate-600'
          } rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500`}
          rows={4}
        />
      );
    } else if (field.type === 'select') {
      return (
        <select
          id={field.name}
          name={field.name}
          value={formData[field.name as keyof FormData] as string || ''}
          onChange={handleChange}
          className={`w-full px-4 py-3 bg-slate-700/50 border ${
            errors[field.name] ? 'border-red-500' : 'border-slate-600'
          } rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`}
        >
          {field.options?.map((option) => (
            <option key={option.value} value={option.value}>
              {option.label}
            </option>
          ))}
        </select>
      );
    } else if (field.type === 'file') {
      return (
        <div className="flex items-center">
          <label
            htmlFor={field.name}
            className="flex items-center justify-center px-4 py-2 bg-gradient-to-r from-blue-600 to-indigo-600 rounded-lg text-white cursor-pointer hover:bg-blue-700 transition-colors"
          >
            <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path>
            </svg>
            {formData.presentationFile ? 'Dosya Seçildi' : 'Dosya Seç'}
          </label>
          <input
            id={field.name}
            name={field.name}
            type="file"
            onChange={handleChange}
            accept={field.accept}
            className="hidden"
          />
          <span className="ml-3 text-sm text-gray-400">
            {formData.presentationFile ? (formData.presentationFile as File).name : 'Dosya seçilmedi'}
          </span>
        </div>
      );
    } else {
      return (
        <input
          id={field.name}
          name={field.name}
          type={field.type}
          value={formData[field.name as keyof FormData] as string || ''}
          onChange={handleChange}
          placeholder={field.placeholder}
          className={`w-full px-4 py-3 bg-slate-700/50 border ${
            errors[field.name] ? 'border-red-500' : 'border-slate-600'
          } rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500`}
          accept={field.accept}
        />
      );
    }
  };

  // Formu göndermek için FormData nesnesi oluştur
  const createFormDataObject = () => {
    const data = new FormData();
    
    // Form verilerini FormData'ya ekle
    Object.keys(formData).forEach(key => {
      const value = formData[key as keyof FormData];
      // File nesnesi kontrolü
      if (value instanceof File) {
        data.append(key, value);
      } else if (value !== null) {
        data.append(key, value as string);
      }
    });
    
    return data;
  };

  return (
    <div className={`${!isModal ? 'bg-gradient-to-br from-slate-900 to-slate-800 py-16 md:py-24' : ''}`}>
      <div className={`${!isModal ? 'container mx-auto px-4 sm:px-6 lg:px-8' : ''}`}>
        {!isModal && (
          <div className="text-center mb-12">
            <h1 className="text-3xl md:text-4xl font-bold mb-4 text-white">
              {t('title')}
            </h1>
            <p className="text-lg text-blue-200/80 max-w-2xl mx-auto">
              {t('subtitle')}
            </p>
          </div>
        )}
        
        {/* Ana içerik kartı */}
        <div className={`${isModal ? '' : 'max-w-4xl mx-auto'}`}>
          {/* Adım göstergesi */}
          <div className="flex justify-center mb-8">
            <div className="relative flex items-center justify-between w-full max-w-md">
              {/* Bağlantı çizgisi */}
              <div className="absolute h-1 bg-gray-700 top-1/2 left-0 right-0 -translate-y-1/2 z-0"></div>
              
              {/* İlerleme çizgisi - Tamamlanan adımlar için */}
              <motion.div 
                className="absolute h-1 bg-gradient-to-r from-blue-600 to-indigo-600 top-1/2 left-0 -translate-y-1/2 z-1"
                initial={{ width: '0%' }}
                animate={{ 
                  width: `${(currentStep / (formSteps.length - 1)) * 100}%` 
                }}
                transition={{ duration: 0.5, ease: "easeInOut" }}
              />
              
              {/* Adım İkonları */}
              {formSteps.map((step, index) => (
                <motion.div
                  key={index}
                  className={`relative z-10 flex items-center justify-center w-12 h-12 rounded-full ${
                    index < currentStep ? 'bg-green-500' : 
                    index === currentStep ? 'bg-gradient-to-r from-blue-600 to-indigo-600' : 'bg-gray-700'
                  } text-white shadow-lg ${index === currentStep ? 'shadow-blue-500/30' : ''}`}
                  variants={stepItemVariants}
                  initial="inactive"
                  animate={
                    index < currentStep ? "completed" : 
                    index === currentStep ? "active" : "inactive"
                  }
                >
                  {index < currentStep ? (
                    <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                      <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M5 13l4 4L19 7"></path>
                    </svg>
                  ) : (
                    <motion.div
                      initial={{ scale: 0.8 }}
                      animate={{ scale: index === currentStep ? 1 : 0.8 }}
                      transition={{ duration: 0.3 }}
                    >
                      {icons[step.icon as keyof typeof icons]}
                    </motion.div>
                  )}
                </motion.div>
              ))}
            </div>
          </div>
          
          {/* Adım içeriği */}
          <AnimatePresence mode="wait">
            {isSubmitted ? (
              <motion.div
                key="success"
                variants={cardVariants}
                initial="hidden"
                animate="visible"
                exit="exit"
                className="bg-gradient-to-b from-slate-800/95 to-slate-900/95 backdrop-blur-lg rounded-2xl border border-slate-700/50 p-8 md:p-10 shadow-xl"
              >
                <div className="text-center">
                  <div className="w-20 h-20 mx-auto mb-6 bg-green-500/20 rounded-full flex items-center justify-center">
                    <svg className="w-10 h-10 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                      <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M5 13l4 4L19 7"></path>
                    </svg>
                  </div>
                  
                  <h3 className="text-2xl font-bold text-white mb-4">
                    {t('success')}
                  </h3>
                  
                  <p className="text-gray-300 mb-6">
                    {t('successMessage')}
                  </p>
                  
                  <div className="space-y-4">
                    <button
                      onClick={handleNewApplication}
                      className="px-8 py-3 bg-gradient-to-r from-blue-600 to-indigo-600 text-white rounded-full transition-colors duration-300 hover:shadow-lg hover:shadow-blue-500/30"
                    >
                      {t('newApplication')}
                    </button>
                  </div>
                </div>
              </motion.div>
            ) : (
              <motion.div
                key={`form-step-${currentStep}`}
                variants={cardVariants}
                initial="hidden"
                animate="visible"
                exit="exit"
                className={`bg-gradient-to-b from-slate-800/95 to-slate-900/95 backdrop-blur-lg rounded-2xl border border-slate-700/50 ${isModal ? 'p-6 sm:p-8' : 'p-8 md:p-10'} shadow-xl`}
              >
                <h3 className="text-xl font-semibold text-white mb-6 flex items-center">
                  <div className="w-10 h-10 rounded-full bg-gradient-to-r from-blue-600 to-indigo-600 flex items-center justify-center mr-3 shadow-lg shadow-blue-500/20">
                    {icons[formSteps[currentStep].icon as keyof typeof icons]}
                  </div>
                  <span>{formSteps[currentStep].title}</span>
                </h3>
                
                <form ref={formRef} onSubmit={handleSubmit} className="space-y-6">
                  <div className="grid grid-cols-1 sm:grid-cols-2 gap-6">
                    {formFields[currentStep].map((field) => (
                      <div 
                        key={field.name} 
                        className={`space-y-2 ${
                          field.type === 'textarea' || field.type === 'file' ? 'sm:col-span-2' : ''
                        }`}
                      >
                        <label 
                          htmlFor={field.name} 
                          className="block text-sm font-medium text-gray-300"
                        >
                          {field.label}
                          {field.required && <span className="text-red-500 ml-1">*</span>}
                        </label>
                        
                        {renderField(field)}
                        
                        {errors[field.name] && (
                          <p className="text-sm text-red-500">{errors[field.name]}</p>
                        )}
                      </div>
                    ))}
                  </div>
                  
                  <div className="flex justify-between pt-6">
                    {currentStep > 0 && (
                      <motion.button
                        type="button"
                        onClick={handlePrevious}
                        className="px-6 py-2.5 border border-gray-600 text-gray-300 rounded-full hover:bg-gray-700 transition-colors duration-300 flex items-center"
                        whileHover={{ scale: 1.03, x: -3 }}
                        whileTap={{ scale: 0.97 }}
                      >
                        <svg className="w-5 h-5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                          <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 19l-7-7 7-7"></path>
                        </svg>
                        {t('previous')}
                      </motion.button>
                    )}
                    
                    {currentStep < formSteps.length - 1 ? (
                      <motion.button
                        type="button"
                        onClick={handleNext}
                        className={`${currentStep > 0 ? 'ml-auto' : 'w-full'} px-6 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 text-white rounded-full transition-all duration-300 flex items-center justify-center hover:shadow-lg hover:shadow-blue-500/30`}
                        whileHover={{ scale: 1.03, x: 3 }}
                        whileTap={{ scale: 0.97 }}
                      >
                        {t('continue')}
                        <svg className="w-5 h-5 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                          <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 5l7 7-7 7"></path>
                        </svg>
                      </motion.button>
                    ) : (
                      <motion.button
                        type="submit"
                        disabled={isSubmitting}
                        className={`${currentStep > 0 ? 'ml-auto' : 'w-full'} px-6 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 text-white rounded-full transition-all duration-300 flex items-center justify-center hover:shadow-lg hover:shadow-blue-500/30 ${
                          isSubmitting ? 'opacity-70 cursor-not-allowed' : ''
                        }`}
                        whileHover={{ scale: isSubmitting ? 1 : 1.03 }}
                        whileTap={{ scale: isSubmitting ? 1 : 0.97 }}
                      >
                        {isSubmitting ? (
                          <>
                            <svg className="w-5 h-5 mr-2 animate-spin" viewBox="0 0 24 24">
                              <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"></circle>
                              <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                            </svg>
                            {t('submitting')}
                          </>
                        ) : (
                          <>
                            {t('submit')}
                            <svg className="w-5 h-5 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                              <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 5l7 7-7 7M5 12h14"></path>
                            </svg>
                          </>
                        )}
                      </motion.button>
                    )}
                  </div>
                </form>
              </motion.div>
            )}
          </AnimatePresence>
          
          {/* Adım göstergesi metni */}
          {!isSubmitted && (
            <p className="text-center text-gray-400 text-sm mt-6">
              {locale === 'tr' 
                ? `Adım ${currentStep + 1} / ${formSteps.length}`
                : `Step ${currentStep + 1} of ${formSteps.length}`
              }
            </p>
          )}
        </div>
        
        {/* İletişim bilgileri - sadece tam sayfada göster */}
        {!isModal && (
          <div className="mt-20 max-w-4xl mx-auto">
            <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
              <div className="bg-gradient-to-b from-slate-800/80 to-slate-900/80 backdrop-blur-sm rounded-xl p-6 border border-slate-700/50">
                <div className="w-12 h-12 bg-blue-500/20 rounded-full flex items-center justify-center mb-4">
                  <svg className="w-6 h-6 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path>
                  </svg>
                </div>
                <h4 className="text-lg font-medium text-white mb-2">
                  {t('contactInfo.phone')}
                </h4>
                <p className="text-gray-300 mb-2">{t('contactInfo.phoneNumber')}</p>
                <p className="text-gray-400 text-sm">
                  {t('contactInfo.phoneHours')}
                </p>
              </div>
              
              <div className="bg-gradient-to-b from-slate-800/80 to-slate-900/80 backdrop-blur-sm rounded-xl p-6 border border-slate-700/50">
                <div className="w-12 h-12 bg-indigo-500/20 rounded-full flex items-center justify-center mb-4">
                  <svg className="w-6 h-6 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>
                  </svg>
                </div>
                <h4 className="text-lg font-medium text-white mb-2">
                  {t('contactInfo.email')}
                </h4>
                <p className="text-gray-300 mb-2">{t('contactInfo.emailAddress')}</p>
                <p className="text-gray-400 text-sm">
                  {t('contactInfo.emailResponse')}
                </p>
              </div>
              
              <div className="bg-gradient-to-b from-slate-800/80 to-slate-900/80 backdrop-blur-sm rounded-xl p-6 border border-slate-700/50">
                <div className="w-12 h-12 bg-purple-500/20 rounded-full flex items-center justify-center mb-4">
                  <svg className="w-6 h-6 text-purple-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path>
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path>
                  </svg>
                </div>
                <h4 className="text-lg font-medium text-white mb-2">
                  {t('contactInfo.address')}
                </h4>
                <p className="text-gray-300 mb-2">
                  {t('contactInfo.addressLine')}
                </p>
                <p className="text-gray-400 text-sm">
                  {t('contactInfo.country')}
                </p>
              </div>
            </div>
          </div>
        )}
      </div>
    </div>
  );
} 