"use client"

import Link from "next/link"
import { useTranslation } from "@/lib/i18n"

export function Footer() {
  const { t } = useTranslation()
  const currentYear = new Date().getFullYear()

  return (
    <footer className="border-t border-border bg-muted/30 mt-24">
      <div className="container mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div className="grid grid-cols-1 md:grid-cols-5 gap-8">
          <div className="col-span-1 md:col-span-2">
            <div className="flex items-center gap-2 mb-4">
              <span className="text-xl font-semibold">GoHorse Jobs</span>
            </div>
            <p className="text-muted-foreground text-sm leading-relaxed max-w-md">
              {t('home.hero.subtitle')}
            </p>
          </div>

          <div>
            <h3 className="font-semibold mb-4">{t('footer.jobsByTech')}</h3>
            <ul className="space-y-2 text-sm text-muted-foreground">
              <li>
                <Link href="/jobs?tech=python" className="hover:text-foreground transition-colors">
                  Desenvolvedor Python
                </Link>
              </li>
              <li>
                <Link href="/jobs?tech=react" className="hover:text-foreground transition-colors">
                  Desenvolvedor React
                </Link>
              </li>
              <li>
                <Link href="/jobs?tech=dados" className="hover:text-foreground transition-colors">
                  Analista de Dados
                </Link>
              </li>
              <li>
                <Link href="/jobs?type=remoto" className="hover:text-foreground transition-colors">
                  {t('workMode.remote')}
                </Link>
              </li>
            </ul>
          </div>

          <div>
            <h3 className="font-semibold mb-4">{t('footer.company')}</h3>
            <ul className="space-y-2 text-sm text-muted-foreground">
              <li>
                <Link href="/sobre" className="hover:text-foreground transition-colors">
                  {t('footer.about')}
                </Link>
              </li>
              <li>
                <Link href="/contato" className="hover:text-foreground transition-colors">
                  {t('nav.contact')}
                </Link>
              </li>
              <li>
                <Link href="/jobs" className="hover:text-foreground transition-colors">
                  {t('nav.jobs')}
                </Link>
              </li>
            </ul>
          </div>

          <div>
            <h3 className="font-semibold mb-4">{t('footer.legal')}</h3>
            <ul className="space-y-2 text-sm text-muted-foreground">
              <li>
                <Link href="/privacidade" className="hover:text-foreground transition-colors">
                  {t('footer.privacy')}
                </Link>
              </li>
              <li>
                <Link href="/termos" className="hover:text-foreground transition-colors">
                  {t('footer.terms')}
                </Link>
              </li>
            </ul>
          </div>
        </div>

        <div className="mt-12 pt-8 border-t border-border text-center text-sm text-muted-foreground">
          <p>{t('footer.copyright', { year: currentYear })}</p>
        </div>
      </div>
    </footer>
  )
}

