import { Metadata } from "next";
import { generatePageMetadata } from "@/lib/metadata";
import { generateBreadcrumbSchema } from "@/lib/structured-data";
import { EMAIL, WHATSAPP_NUMBER, WHATSAPP_MESSAGE, INSTAGRAM } from "@/lib/constants";
import { Button } from "@/components/shared/Button";

export const metadata: Metadata = generatePageMetadata({
  title: "Contact Us — The Anatolian Edit",
  description:
    "Get in touch about booking a private experience, custom group tours, or any questions about Istanbul's Asian side.",
  path: "/contact",
});

export default function ContactPage() {
  const whatsappUrl = `https://wa.me/${WHATSAPP_NUMBER.replace("+", "")}?text=${encodeURIComponent(WHATSAPP_MESSAGE)}`;

  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{
          __html: JSON.stringify(generateBreadcrumbSchema([
            { name: "Home", url: "https://theanatolianedit.com" },
            { name: "Contact", url: "https://theanatolianedit.com/contact" },
          ])),
        }}
      />

      <section className="pt-28 md:pt-36 pb-16 section-padding">
        <div className="max-w-4xl mx-auto">
          <div className="text-center mb-12">
            <p className="text-bosphorus font-semibold text-sm tracking-widest uppercase mb-3">
              Get in Touch
            </p>
            <h1 className="font-display text-4xl md:text-5xl font-bold text-deep-nazar leading-tight mb-4">
              Let&apos;s Plan Your <span className="text-bosphorus italic">Edit</span>
            </h1>
            <p className="text-deep-nazar/70 text-lg max-w-xl mx-auto">
              Questions about our experiences, private bookings, or just want to say hello?
              We&apos;d love to hear from you.
            </p>
          </div>

          <div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
            <a
              href={whatsappUrl}
              target="_blank"
              rel="noopener noreferrer"
              className="bg-white rounded-3xl p-8 shadow-sm hover:shadow-md transition-shadow text-center group"
            >
              <div className="w-14 h-14 rounded-full bg-[#25D366]/10 flex items-center justify-center mx-auto mb-4 group-hover:bg-[#25D366]/20 transition-colors">
                <svg className="w-7 h-7 text-[#25D366]" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z" />
                </svg>
              </div>
              <h3 className="font-display font-bold text-deep-nazar mb-1">WhatsApp</h3>
              <p className="text-deep-nazar/50 text-sm">Fastest way to reach us</p>
            </a>

            <a
              href={`mailto:${EMAIL}`}
              className="bg-white rounded-3xl p-8 shadow-sm hover:shadow-md transition-shadow text-center group"
            >
              <div className="w-14 h-14 rounded-full bg-bosphorus/10 flex items-center justify-center mx-auto mb-4 group-hover:bg-bosphorus/20 transition-colors">
                <svg className="w-7 h-7 text-bosphorus" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
                </svg>
              </div>
              <h3 className="font-display font-bold text-deep-nazar mb-1">Email</h3>
              <p className="text-deep-nazar/50 text-sm">{EMAIL}</p>
            </a>

            <a
              href={`https://instagram.com/${INSTAGRAM}`}
              target="_blank"
              rel="noopener noreferrer"
              className="bg-white rounded-3xl p-8 shadow-sm hover:shadow-md transition-shadow text-center group"
            >
              <div className="w-14 h-14 rounded-full bg-coral-spritz/10 flex items-center justify-center mx-auto mb-4 group-hover:bg-coral-spritz/20 transition-colors">
                <svg className="w-7 h-7 text-coral-spritz" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" />
                </svg>
              </div>
              <h3 className="font-display font-bold text-deep-nazar mb-1">Instagram</h3>
              <p className="text-deep-nazar/50 text-sm">@{INSTAGRAM}</p>
            </a>
          </div>

          {/* Private Experiences inquiry */}
          <div className="bg-warm-sand rounded-3xl p-8 md:p-12 text-center">
            <h2 className="font-display text-2xl md:text-3xl font-bold text-deep-nazar mb-4">
              Interested in a Private Experience?
            </h2>
            <p className="text-deep-nazar/70 text-lg mb-6 max-w-xl mx-auto">
              Every experience is available as a private edition for couples, families,
              or groups of up to 12. Tell us what you&apos;re looking for and we&apos;ll craft
              the perfect day.
            </p>
            <Button href={whatsappUrl} external variant="coral" size="lg">
              Chat With Us on WhatsApp
            </Button>
            <p className="text-deep-nazar/40 text-sm mt-3">
              Starting from &euro;250 for private groups
            </p>
          </div>
        </div>
      </section>
    </>
  );
}
