'use client';

import { Link } from '@/i18n/navigation';
import Image from 'next/image';
import { MapPin, Globe } from 'lucide-react';
import { useTranslations } from 'next-intl';

export function LandingFooter() {
  const t = useTranslations('footer');
  const currentYear = new Date().getFullYear();

  return (
    <footer className="bg-brand-navy text-white py-16">
      <div className="max-w-7xl mx-auto px-6 lg:px-8">
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12 mb-12">
          {/* Company Info */}
          <div className="lg:col-span-2">
            <Image
              src="/assets/logos/logo-white.png"
              alt="Xpeditis"
              width={160}
              height={55}
              className="h-auto mb-6"
            />
            <p className="text-white/70 text-sm mb-6 leading-relaxed">{t('tagline')}</p>
            <div className="flex space-x-4">
              <a
                href="#"
                className="w-10 h-10 bg-white/10 hover:bg-brand-turquoise rounded-full flex items-center justify-center transition-colors"
              >
                <span className="sr-only">{t('social.linkedin')}</span>
                <svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" />
                </svg>
              </a>
              <a
                href="#"
                className="w-10 h-10 bg-white/10 hover:bg-brand-turquoise rounded-full flex items-center justify-center transition-colors"
              >
                <span className="sr-only">{t('social.twitter')}</span>
                <svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z" />
                </svg>
              </a>
            </div>
          </div>

          {/* Products */}
          <div>
            <h4 className="font-bold text-lg mb-4 text-white">{t('products.title')}</h4>
            <ul className="space-y-3 text-white/70 text-sm">
              <li>
                <Link href="/#features" className="hover:text-brand-turquoise transition-colors">
                  {t('products.features')}
                </Link>
              </li>
              <li>
                <Link href="/#tools" className="hover:text-brand-turquoise transition-colors">
                  {t('products.tools')}
                </Link>
              </li>
              <li>
                <Link href="/#pricing" className="hover:text-brand-turquoise transition-colors">
                  {t('products.pricing')}
                </Link>
              </li>
            </ul>
          </div>

          {/* Company */}
          <div>
            <h4 className="font-bold text-lg mb-4 text-white">{t('company.title')}</h4>
            <ul className="space-y-3 text-white/70 text-sm">
              <li>
                <Link href="/about" className="hover:text-brand-turquoise transition-colors">
                  {t('company.about')}
                </Link>
              </li>
              <li>
                <Link href="/contact" className="hover:text-brand-turquoise transition-colors">
                  {t('company.contact')}
                </Link>
              </li>
              <li>
                <Link href="/blog" className="hover:text-brand-turquoise transition-colors">
                  {t('company.blog')}
                </Link>
              </li>
            </ul>
          </div>

          {/* Legal */}
          <div>
            <h4 className="font-bold text-lg mb-4 text-white">{t('legal.title')}</h4>
            <ul className="space-y-3 text-white/70 text-sm">
              <li>
                <Link href="/privacy" className="hover:text-brand-turquoise transition-colors">
                  {t('legal.privacy')}
                </Link>
              </li>
              <li>
                <Link href="/terms" className="hover:text-brand-turquoise transition-colors">
                  {t('legal.terms')}
                </Link>
              </li>
              <li>
                <Link href="/cookies" className="hover:text-brand-turquoise transition-colors">
                  {t('legal.cookies')}
                </Link>
              </li>
              <li>
                <Link href="/compliance" className="hover:text-brand-turquoise transition-colors">
                  {t('legal.compliance')}
                </Link>
              </li>
            </ul>
          </div>
        </div>

        {/* Bottom Footer */}
        <div className="border-t border-white/10 pt-8">
          <div className="flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0">
            <div className="text-white/50 text-sm">{t('copyright', { year: currentYear })}</div>
            <div className="flex items-center space-x-6 text-sm text-white/50">
              <span className="flex items-center space-x-2">
                <MapPin className="w-4 h-4" />
                <span>{t('location')}</span>
              </span>
              <span className="flex items-center space-x-2">
                <Globe className="w-4 h-4" />
                <span>{t('countries')}</span>
              </span>
            </div>
          </div>
        </div>
      </div>
    </footer>
  );
}
