'use client';
import { useTranslator } from '@/contexts/TranslatorContext';
import { Button } from '@/components/ui/button';
import Image from 'next/image';

const ImageSection = () => {
  const { translations } = useTranslator() || {};

  return (
    <section className='relative w-full py-8 md:py-12 lg:py-16 overflow-hidden flex flex-col items-center justify-center'>
      <div className='container relative z-10 flex flex-col items-center justify-center text-center px-4 md:px-6 w-full'>
        <div className='relative bg-[#092346] rounded-xl p-6 md:p-8 lg:p-10 w-full max-w-6xl mx-auto'>
          <Image
            src='/images/Clip path group (3).png'
            alt='3D blue open box'
            width={160}
            height={160}
            className='absolute left-0 bottom-0 w-[160px] h-[160px] object-contain'
          />

          <Image
            src='/images/blocks-icon 1.png'
            alt='3D blue cube'
            width={160}
            height={160}
            className='absolute right-1 -top-22 w-[180px] h-[330px] object-contain'
          />

          <div className='space-y-4 relative z-20'>
            <h2 className='text-white text-sm md:text-base lg:text-lg font-bold leading-tight'>
              {translations?.imageSection_heading ||
                'هل تحتاج تراخيص لتشغيل الخادم الخاص بك؟'}
            </h2>

            <p className='text-white/90 text-xs md:text-sm lg:text-base'>
              {translations?.imageSection_paragraph ||
                'نحن نوفرها لك بأقل تكلفة'}
            </p>

            <Button className='bg-white text-[#092346] rounded-lg hover:bg-gray-100 px-8 py-3 text-md font-semibold shadow-md'>
              {translations?.imageSection_button || 'اطلب الان!'}
            </Button>
          </div>
        </div>
      </div>
    </section>
  );
};

export default ImageSection;
