"use client";

import Link from "next/link";
import { Linkedin, Twitter, Mail, MapPin } from "lucide-react";

const footerLinks = {
  Products: [
    { label: "Android POS Device", href: "#products" },
    { label: "Ticketing Software", href: "#solutions" },
    { label: "Dashboard", href: "#" },
  ],
  Solutions: [
    { label: "Bus Ticketing", href: "#products" },
    { label: "Van & Transport", href: "#products" },
    { label: "Government Integration", href: "#government" },
  ],
  "Government Partnerships": [
    { label: "Request Demo", href: "#contact" },
    { label: "Contact Us", href: "#contact" },
  ],
  Contact: [
    { label: "Email", href: "mailto:info@sasium.com" },
    { label: "Partnerships", href: "#contact" },
  ],
};

const socialIcons = [
  { icon: Linkedin, href: "#", label: "LinkedIn" },
  { icon: Twitter, href: "#", label: "Twitter" },
  { icon: Mail, href: "mailto:info@sasium.com", label: "Email" },
];

export default function Footer() {
  return (
    <footer className="bg-[#0f172a] text-slate-300">
      <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div className="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 lg:gap-12">
          <div className="col-span-2 md:col-span-4 lg:col-span-1">
            <Link href="#" className="text-2xl font-bold text-white">
              Sasium
            </Link>
            <p className="mt-3 text-sm text-slate-400 max-w-xs">
              Smart ticketing solutions for public transport.
            </p>
            <div className="mt-6 flex gap-3">
              {socialIcons.map((item) => (
                <a
                  key={item.label}
                  href={item.href}
                  aria-label={item.label}
                  className="w-10 h-10 rounded-lg bg-white/5 flex items-center justify-center text-slate-400 hover:text-[#60a5fa] hover:bg-white/10 transition-colors"
                >
                  <item.icon size={20} />
                </a>
              ))}
            </div>
          </div>
          {Object.entries(footerLinks).map(([title, links]) => (
            <div key={title}>
              <h4 className="font-semibold text-white text-sm uppercase tracking-wider">
                {title}
              </h4>
              <ul className="mt-4 space-y-2">
                {links.map((link) => (
                  <li key={link.label}>
                    <Link
                      href={link.href}
                      className="text-sm text-slate-400 hover:text-white transition-colors"
                    >
                      {link.label}
                    </Link>
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
        <div className="mt-12 pt-8 border-t border-white/10 flex flex-col sm:flex-row items-center justify-between gap-4">
          <p className="text-sm text-slate-500">
            © {new Date().getFullYear()} Sasium. All rights reserved.
          </p>
          <div className="flex items-center gap-2 text-sm text-slate-500">
            <MapPin size={16} />
            <span>Technology for transport</span>
          </div>
        </div>
      </div>
    </footer>
  );
}
