"use client";

import Image from "next/image";
import { CalendarDays, Bike, Wallet } from "lucide-react";

export default function LandingExtras() {
const steps = [
  {
    title: "Select Travel Dates",
  },
  {
    title: "Choose Fleet",
  },
  {
    title: "Make Payment",
  },
];

  return (
    <div className="bg-white">

      {/* ================= FEATURE SECTION ================= */}
      <section className="max-w-7xl mx-auto px-4 sm:px-6 md:px-10 py-14 sm:py-20 space-y-20">

        {/* Book a Ride */}
        <div className="flex flex-col md:flex-row items-center gap-12">

          {/* Text */}
          <div className="flex-1 space-y-4 text-center md:text-left">
            <h2 className="text-2xl sm:text-3xl md:text-4xl font-bold text-primary">
              Book a Ride
            </h2>
            <p className="text-gray-600 text-base sm:text-lg max-w-md mx-auto md:mx-0">
              Down the street or across the country, find the perfect vehicle
              for your next adventure.
            </p>
          </div>

          {/* Image Box */}
          <div className="relative flex-1 flex items-center justify-center w-full">

            <div className="bg-blue-100 rounded-2xl p-6 sm:p-8 -rotate-2
                            aspect-[4/3] w-full max-w-xs sm:max-w-sm md:max-w-md" />

            <Image
              src="/duke.webp"
              alt="Ride"
              width={500}
              height={300}
              className="absolute object-contain rotate-2
                         w-[85%] sm:w-[80%] md:w-[90%] drop-shadow-xl"
            />
          </div>
        </div>

        {/* Become Host */}
        <div className="flex flex-col-reverse md:flex-row items-center gap-12">

          {/* Image */}
          <div className="flex-1 relative flex items-center justify-center w-full">

            <div className="bg-blue-100 rounded-2xl p-6 sm:p-8 rotate-2
                            aspect-[4/3] w-full max-w-xs sm:max-w-sm md:max-w-md" />

            <Image
              src="/man.png"
              alt="Become Host"
              width={500}
              height={300}
              className="absolute object-contain -rotate-2
                         w-[85%] sm:w-[80%] md:w-[90%]"
            />
          </div>

          {/* Text */}
          <div className="flex-1 space-y-4 text-center md:text-left">
            <h2 className="text-2xl sm:text-3xl md:text-4xl font-bold text-primary">
              Become A Host
            </h2>
            <p className="text-gray-600 text-base sm:text-lg max-w-md mx-auto md:mx-0">
              Start building your own vehicle rental business on MoveOnWheels
              and earn passive income.
            </p>
          </div>
        </div>

      </section>

      {/* ================= BOOKING STEPS ================= */}
<section className="max-w-7xl mx-auto px-4 sm:px-6 md:px-10 py-16 sm:py-20">

  <h2 className="text-3xl md:text-5xl font-light text-gray-900 text-center md:text-left mb-16">
    How to Book{" "}
    <span className="text-primary font-medium relative inline-block">
      Online
      <svg
        className="absolute left-0 -bottom-3 w-full"
        viewBox="0 0 120 12"
        fill="none"
      >
        <path
          d="M2 10C30 3 65 3 118 8"
          stroke="currentColor"
          strokeWidth="3"
          strokeLinecap="round"
        />
      </svg>
    </span>
  </h2>

  <div className="flex flex-col md:flex-row items-center justify-between gap-16 md:gap-6">

    {steps.map((step, index) => (
      <div
        key={index}
        className="flex flex-col items-center relative flex-1 w-full"
      >
        {/* Connector */}
        {index !== steps.length - 1 && (
          <div
            className="
              hidden md:flex
              absolute
              top-8
              left-[58%]
              w-[88%]
              items-center
              z-0
            "
          >
            <span className="w-2.5 h-2.5 rounded-full bg-primary"></span>
            <div className="flex-1 h-[2px] bg-primary"></div>
            <span className="w-2.5 h-2.5 rounded-full bg-primary"></span>
          </div>
        )}

        {/* Icon */}
        <div
          className="
            relative
            z-10
            w-20
            h-20
            rounded-lg
            bg-primary
            text-white
            flex
            items-center
            justify-center
            shadow-md
          "
        >
          {index === 0 && <CalendarDays className="w-10 h-10" />}
          {index === 1 && <Bike className="w-10 h-10" />}
          {index === 2 && <Wallet className="w-10 h-10" />}
        </div>

        {/* Title */}
        <h3 className="mt-8 text-2xl font-semibold text-center text-gray-900">
          {step.title}
        </h3>
      </div>
    ))}

  </div>

</section>

      {/* ================= MEMBERSHIP SECTION ================= */}
      <section className="max-w-7xl mx-auto px-4 sm:px-6 md:px-10 py-14 sm:py-20">

        <h2 className="text-2xl sm:text-3xl md:text-4xl font-semibold text-gray-900 mb-12 sm:mb-16 text-center md:text-left">
          Get Your Prime Membership Now
        </h2>

        <div className="flex flex-col lg:flex-row items-center gap-12">

          {/* Image */}
          <div className="flex-1 w-full">
            <div className="bg-blue-100 rounded-2xl -rotate-3
                            overflow-hidden h-64 sm:h-80 md:h-96
                            flex items-center justify-center">
              <Image
                src="/ride.png"
                alt="Membership"
                width={800}
                height={600}
                className="object-contain rotate-3 w-[85%]"
              />
            </div>
          </div>

          {/* Text */}
          <div className="flex-1 space-y-8 text-center lg:text-left">
            <h3 className="text-2xl sm:text-3xl md:text-4xl font-bold text-primary leading-tight">
              Experience the Ultimate Membership.
            </h3>

            <div className="space-y-6">

              <div>
                <p className="font-bold text-gray-800">Unlimited Access:</p>
                <p className="text-gray-600">
                  Ride anytime with unlimited rentals throughout the year.
                </p>
              </div>

              <div>
                <p className="font-bold text-gray-800">Exclusive Perks:</p>
                <p className="text-gray-600">
                  Priority bookings, special discounts and premium support.
                </p>
              </div>

              <div>
                <p className="font-bold text-gray-800">Ride Without Worry:</p>
                <p className="text-gray-600">
                  No hidden fees, insurance included and 24/7 assistance.
                </p>
              </div>

              <button className="bg-primary text-white px-8 sm:px-10 py-3
                                 rounded-xl font-bold shadow-lg
                                 hover:bg-primary transition">
                Buy Now
              </button>

            </div>
          </div>

        </div>

      </section>

    </div>
  );
}