"use client";

import { useState } from "react";
import ContactPopup from '@/components/common/ContactPopup/ContactPopup';

const floatingItems = [
    {
        className: "item-1",
        icon: "/assets/img/home/section1/custom.webp",
        title: "Custom Solutions",
        desc: "Built for your goals",
    },
    {
        className: "item-2",
        icon: "/assets/img/home/section1/seo.webp",
        title: "SEO Optimized",
        desc: "Better visibility",
    },
    {
        className: "item-3",
        icon: "/assets/img/home/section1/end.webp",
        title: "End-to-End Support",
        desc: "Design to launch",
    },
    {
        className: "item-4",
        icon: "/assets/img/home/section1/responsive.webp",
        title: "Responsive Design",
        desc: "All devices perfect",
    },
];

const BannerBottom = () => {
    const [isContactOpen, setIsContactOpen] = useState(false);

    return (
        <section className="bannerbottom-section website-service-strip">
            <div className="container">
                <div className="bottom-info-strip">
                    <div className="row align-items-center g-4">

                        {/* Left Column */}
                        <div className="col-lg-3 col-md-12">
                            <div className="info-column-left">
                                <h5 className="script-font">We Guarantee</h5>
                                <h4 className="title-font">Complete Website Development Solutions</h4>
                                <p className="desc-font">
                                    We design and develop high-performing websites tailored to your business goals. From strategy and UI/UX design to development and launch, every project is built for speed, scalability, and lead generation. Our focus is not just design — it’s measurable growth.
                                </p>
                            </div>
                        </div>

                        {/* Center Column - Illustration with Floating Icons */}
                        <div className="col-lg-6 col-md-12 text-center">
                            <div className="central-illustration-wrap position-relative">
                                <div className="floating-items-container">
                                    {floatingItems.map((item, idx) => (
                                        <div key={item.className} className={`floating-item ${item.className}`}>
                                            <div className={`floating-circle ${idx % 2 === 0 ? 'floating-slow' : 'floating-fast'}`}>
                                                <img src={item.icon} alt={item.title} />
                                            </div>
                                            <div className="floating-content">
                                                <h6>{item.title}</h6>
                                                <p>{item.desc}</p>
                                            </div>
                                        </div>
                                    ))}
                                </div>

                                {/* Central hero image */}
                                <img
                                    src="/assets/img/home/section1/second-section-centre-img.webp"
                                    alt="Digital Solutions Illustration"
                                    className="main-delivery-img img-fluid mt-2"
                                />
                            </div>
                        </div>

                        {/* Right Column */}
                        <div className="col-lg-3 col-md-12">
                            <div className="info-column-right text-md-end text-center">
                                <h4 className="title-font">High-Performance, Secure & Future-Ready Websites</h4>
                                <p className="desc-font mt-2">
                                    Our websites are designed for performance, speed, and scalability. With strong technical architecture and modern frameworks, we deliver fast-loading, secure, and user-friendly digital experiences that convert visitors into customers.
                                </p>
                                <div
                                    className="call-info-box d-flex align-items-center mt-3 justify-content-md-end justify-content-center"
                                    onClick={() => setIsContactOpen(true)}
                                    style={{ cursor: 'pointer' }}
                                >
                                    <div className="call-icon-bg">
                                        <img src="/assets/img/icons/phn1.svg" alt="Phone Icon" className="scooter-mini-icon" />
                                    </div>
                                    <div className="call-details ms-3">
                                        <span style={{ color: '#fff', fontWeight: 600 }}>Speak With Our Experts Today</span>

                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <ContactPopup isOpen={isContactOpen} onClose={() => setIsContactOpen(false)} />
        </section>
    );
};

export default BannerBottom;
