"use client";
import { useScroll } from '../hooks/useScroll';
import LotusLogo from './LotusLogo';

function Footer() {
  const { scrollToSectionWithHeader } = useScroll();
  return (
    <footer className="bg-white border-t border-gray-100">
      {/* Main Footer Content */}
      <div className="max-w-5xl mx-auto px-6 sm:px-8 lg:px-10 py-16">
        <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12">

          {/* Brand Column */}
          <div className="lg:col-span-2">
            <div className="flex items-center gap-3 mb-6">
              <LotusLogo className="w-11 h-11 drop-shadow-sm" />
              <div className="text-2xl font-bold bg-gradient-to-r from-primary-500 to-primary-600 bg-clip-text text-transparent">
                آرام جان
              </div>
            </div>
            <p className="text-gray-600 leading-relaxed mb-6 max-w-md">
              همراه شما در مسیر رسیدن به آرامش درونی. با ابزارهای علمی و تخصصی
              برای زندگی بهتر و ذهنی آرام‌تر.
            </p>
            <div className="flex gap-4">
              {/* Social Media Icons - You can add actual links later */}
              <div className="w-10 h-10 bg-primary-500/10 rounded-xl flex items-center justify-center cursor-pointer hover:bg-primary-500/20 transition-colors">
                <span className="text-primary-500">📱</span>
              </div>
              <div className="w-10 h-10 bg-primary-500/10 rounded-xl flex items-center justify-center cursor-pointer hover:bg-primary-500/20 transition-colors">
                <span className="text-primary-500">💬</span>
              </div>
              <div className="w-10 h-10 bg-primary-500/10 rounded-xl flex items-center justify-center cursor-pointer hover:bg-primary-500/20 transition-colors">
                <span className="text-primary-500">📸</span>
              </div>
            </div>
          </div>

          {/* Quick Links */}
          <div>
            <h3 className="font-bold text-gray-900 mb-6 text-lg">لینک‌های سریع</h3>
            <ul className="space-y-3">
              {[
                { name: 'ویژگی‌ها', section: 'features' },
                { name: 'امکانات', section: 'what-you-can-do' },
                { name: 'چرا آرام جان', section: 'why-aramland' },
                { name: 'ارتباط با تیم', href: 'https://approagency.ir/' }
              ].map((link) => (
                <li key={link.name}>
                  <a
                    href={link.href}
                    onClick={() => scrollToSectionWithHeader(link.section)}
                    target="_blank"
                    className="text-gray-600 hover:text-primary-500 transition-colors duration-200"
                  >
                    {link.name}
                  </a>
                </li>
              ))}
            </ul>
          </div>

          {/* Agency Contact */}
          <div>
            <h3 className="font-bold text-gray-900 mb-6 text-lg">توسعه‌دهنده</h3>
            <div className="space-y-4">
              <div className="flex items-center gap-3">
                <div className="w-10 h-10 bg-gradient-to-r from-primary-500 to-primary-600 rounded-xl flex items-center justify-center">
                  <span className="text-white text-sm">AP</span>
                </div>
                <div>
                  <p className="font-medium text-gray-900">اپرو‌اجنسی</p>
                  <p className="text-sm text-gray-500">Approagency</p>
                </div>
              </div>

              <div className="space-y-3">
                <a
                  href="mailto:approagency@gmail.com"
                  className="flex items-center gap-2 text-gray-600 hover:text-primary-500 transition-colors group"
                >
                  <div className="w-8 h-8 bg-primary-500/10 rounded-lg flex items-center justify-center group-hover:bg-primary-500/20 transition-colors">
                    <span className="text-primary-500 text-sm">✉️</span>
                  </div>
                  <span className="text-sm">approagency@gmail.com</span>
                </a>

                <a
                  href="tel:+989362957108"
                  className="flex items-center gap-2 text-gray-600 hover:text-primary-500 transition-colors group"
                >
                  <div className="w-8 h-8 bg-primary-500/10 rounded-lg flex items-center justify-center group-hover:bg-primary-500/20 transition-colors">
                    <span className="text-primary-500 text-sm">📞</span>
                  </div>
                  <span className="text-sm">۰۹۳۶۲۹۵۷۱۰۸</span>
                </a>
              </div>
            </div>
          </div>
        </div>

        {/* Divider */}
        <div className="h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent mb-8"></div>

        {/* Bottom Section */}
        <div className="flex flex-col md:flex-row justify-between items-center gap-4">
          <div className="text-center md:text-right">
            <p className="text-gray-600 mb-2">
              © 1404 آرام جان - همراه تو برای یک زندگی آرام‌تر
            </p>
            <p className="text-gray-500 text-sm">
              ساخته شده با عشق برای مردم ایران
            </p>
          </div>

          <div className="flex flex-col md:flex-row items-center gap-6">
            {/* Enamad Badge */}
            <div className="mt-4 md:mt-0">
              <a 
                referrerPolicy='origin' 
                target='_blank' 
                href='https://trustseal.enamad.ir/?id=684477&Code=O0VD9spjoV48pvyakFsJgoY361OXvszk'
                className="inline-block"
              >
                <img 
                  referrerPolicy='origin' 
                  src='https://trustseal.enamad.ir/logo.aspx?id=684477&Code=O0VD9spjoV48pvyakFsJgoY361OXvszk' 
                  alt='Enamad Trust Seal' 
                  style={{cursor: 'pointer'}} 
                  code='O0VD9spjoV48pvyakFsJgoY361OXvszk'
                  className="h-12 w-auto"
                />
              </a>
            </div>

            {/* Additional Links */}
            <div className="flex gap-6 text-sm">
              <a href="#" className="text-gray-500 hover:text-primary-500 transition-colors">
                حریم خصوصی
              </a>
              <a href="#" className="text-gray-500 hover:text-primary-500 transition-colors">
                شرایط استفاده
              </a>
              <a href="#" className="text-gray-500 hover:text-primary-500 transition-colors">
                پشتیبانی
              </a>
            </div>
          </div>
        </div>
      </div>

      {/* Floating CTA */}
      <div className="bg-gradient-to-r from-primary-500/5 to-primary-600/5 border-t border-primary-500/10">
        <div className="max-w-5xl mx-auto px-6 sm:px-8 lg:px-10 py-6">
          <div className="flex flex-col md:flex-row justify-between items-center gap-4">
            <div>
              <p className="font-medium text-gray-900">آماده شروع سفر آرامش؟</p>
              <p className="text-gray-600 text-sm">همین حالا رایگان شروع کنید</p>
            </div>
            <button onClick={() => scrollToSectionWithHeader('download')} className="bg-gradient-to-r from-primary-500 to-primary-600 text-white font-medium py-3 px-8 rounded-2xl hover:shadow-lg transition-all duration-300 transform hover:scale-105 whitespace-nowrap">
              دانلود اپلیکیشن
            </button>
          </div>
        </div>
      </div>
    </footer>
  );
}

export default Footer;