import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { ArrowRight, CheckCircle2 } from "lucide-react";
import { Layout } from "@/components/layout/Layout";
import { Section, SectionHeader } from "@/components/ui/Section";
import { SEO } from "@/components/SEO";
import { useForceLanguage } from "@/hooks/useForceLanguage";

// Product images
import holoboxShowroom from "@/assets/solutions/holobox-fc-utrecht.png";
import holospinDisplay from "@/assets/solutions/holospin-cocacola.jpg";
import holomeshShark from "@/assets/solutions/holonet-samsung-stage.webp";
import invisibleScreenImage from "@/assets/solutions/invisible-screen-storefront.png";
import hologramPyramidCompact from "@/assets/solutions/hologram-pyramid-retail.jpg";
import merckWebarPos from "@/assets/solutions/magic-mirror-retail.jpg";

interface TechCard {
  title: string;
  description: string;
  bullets: string[];
  image: string;
  linkTo: string;
  linkLabel: string;
}

interface HologramTechnologyProps { forceLang?: "sv" | "en"; seoOverride?: React.ReactNode; }

export default function HologramTechnology({ forceLang, seoOverride }: HologramTechnologyProps) {
  const { t, i18n } = useTranslation();
  useForceLanguage(forceLang);
  const isSv = i18n.language === "sv";

  const cards: TechCard[] = [
    {
      title: "Holobox",
      description: isSv
        ? "Livsstor hologramdisplay för AI-avatarer, presentationer och digitala värdar i publika miljöer."
        : "Life-size hologram display for AI avatars, presentations and digital hosts in public environments.",
      bullets: isSv
        ? [
            "Visar människor i livsstorlek – AI-avatarer, inspelade personer eller livestream",
            "Interaktiv upplevelse via röst, touch eller sensorer",
            "Byggd för kontinuerlig drift i receptioner, event och offentliga miljöer",
          ]
        : [
            "Displays life-size humans – AI avatars, recorded people or livestream",
            "Interactive experience via voice, touch or sensors",
            "Built for continuous operation in receptions, events and public spaces",
          ],
      image: holoboxShowroom,
      linkTo: "/holobox",
      linkLabel: isSv ? "Läs mer om Holobox" : "Learn more about Holobox",
    },
    {
      title: "HoloSpin",
      description: isSv
        ? "Roterande hologramfläkt som skapar svävande 3D-visualiseringar i mässmontrar, butiker och event."
        : "Rotating hologram fan creating floating 3D visuals in trade show booths, stores and events.",
      bullets: isSv
        ? [
            "Skapar svävande roterande hologram som syns från långt håll",
            "Portabel lösning perfekt för mässor, retail och produktlanseringar",
            "Flera enheter kan kopplas samman till större hologramdisplayer",
          ]
        : [
            "Creates floating rotating holograms visible from a distance",
            "Portable solution perfect for trade shows, retail and product launches",
            "Multiple units can be linked into larger hologram displays",
          ],
      image: holospinDisplay,
      linkTo: "/holospin",
      linkLabel: isSv ? "Läs mer om HoloSpin" : "Learn more about HoloSpin",
    },
    {
      title: "HoloNet",
      description: isSv
        ? "Storskalig holograminstallation för scenproduktioner, event och publika miljöer."
        : "Large-scale hologram installation for stage productions, events and public environments.",
      bullets: isSv
        ? [
            "Skapar stora svävande hologram som dominerar rummet",
            "Transparent mesh gör installationsstrukturen nästan osynlig",
            "Kan installeras både inomhus och utomhus",
          ]
        : [
            "Creates large floating holograms that dominate the space",
            "Transparent mesh makes the installation structure nearly invisible",
            "Can be installed both indoors and outdoors",
          ],
      image: holomeshShark,
      linkTo: "/holonet",
      linkLabel: isSv ? "Läs mer om HoloNet" : "Learn more about HoloNet",
    },
    {
      title: "Invisible Screen",
      description: isSv
        ? "Transparent hologramdisplay för skyltfönster, glasfasader och arkitektoniska installationer."
        : "Transparent hologram display for storefronts, glass facades and architectural installations.",
      bullets: isSv
        ? [
            "Upp till 90% transparens – blockerar inte insyn eller dagsljus",
            "Förvandlar glasytor till digitala holografiska skyltfönster",
            "Hög ljusstyrka gör innehåll synligt även i dagsljus",
          ]
        : [
            "Up to 90% transparency – does not block visibility or daylight",
            "Transforms glass surfaces into digital holographic storefronts",
            "High brightness makes content visible even in daylight",
          ],
      image: invisibleScreenImage,
      linkTo: "/invisible-screen",
      linkLabel: isSv ? "Läs mer om Invisible Screen" : "Learn more about Invisible Screen",
    },
    {
      title: "Hologram Pyramid",
      description: isSv
        ? "3D-display för produktshowcase i retail, showroom och mässmontrar."
        : "3D display for product showcase in retail, showrooms and trade show booths.",
      bullets: isSv
        ? [
            "Kombinerar holografiskt innehåll med en fysisk produkt bakom glaset",
            "Synlig från fronten och båda sidor för maximal exponering",
            "Perfekt för produktlanseringar och premiumdisplayer",
          ]
        : [
            "Combines holographic content with a physical product behind the glass",
            "Visible from the front and both sides for maximum exposure",
            "Perfect for product launches and premium displays",
          ],
      image: hologramPyramidCompact,
      linkTo: "/3d-hologram",
      linkLabel: isSv ? "Läs mer om Hologram Pyramid" : "Learn more about Hologram Pyramid",
    },
    {
      title: "Magic Mirror",
      description: isSv
        ? "Interaktiv holografisk spegel för retail, showroom och upplevelsebaserade miljöer."
        : "Interactive holographic mirror for retail, showrooms and experience-based environments.",
      bullets: isSv
        ? [
            "Visar holografiska kampanjer och digital POS i butiksmiljö",
            "Touchbaserad interaktion för produktinformation och konfiguratorer",
            "Elegant spegellösning som integreras i premiumbutiker och showrooms",
          ]
        : [
            "Displays holographic campaigns and digital POS in retail environments",
            "Touch-based interaction for product information and configurators",
            "Elegant mirror solution that integrates into premium stores and showrooms",
          ],
      image: merckWebarPos,
      linkTo: "/magic-mirror",
      linkLabel: isSv ? "Läs mer om Magic Mirror" : "Learn more about Magic Mirror",
    },
  ];

  const pageTitle = isSv
    ? "Hologramteknik – Hologramlösningar för event, retail och installationer | Suteki Studios"
    : "Hologram Technology – Solutions for Events, Retail & Installations | Suteki Studios";
  const pageDescription = isSv
    ? "Utforska Suteki Studios hologramteknik för event, retail, mässor och arkitektur. Jämför Holobox, HoloSpin, HoloNet, Invisible Screen, Hologram Pyramid och Magic Mirror."
    : "Explore Suteki Studios hologram technology for events, retail, trade shows and architecture. Compare Holobox, HoloSpin, HoloNet, Invisible Screen, Hologram Pyramid and Magic Mirror.";

  return (
    <Layout>
      {seoOverride || (
        <SEO
          title="Hologramdisplayer – Teknik och lösningar | Suteki Studios"
          description="Översikt över alla hologramdisplayer: Holobox, HoloSpin, Invisible Screen och hologrampyramider."
          lang="sv"
          canonicalUrl="https://sutekistudios.com/hologramdisplayer"
          alternateSv="https://sutekistudios.com/hologramdisplayer"
          alternateEn="https://sutekistudios.com/hologram-technology"
        />
      )}

      {/* Hero with YouTube video background */}
      <section className="section-dark relative pt-32 sm:pt-40 pb-16 sm:pb-24 overflow-hidden" data-theme="dark">
        {/* YouTube background */}
        <div className="absolute inset-0 z-0 pointer-events-none">
          <iframe
            src="https://www.youtube.com/embed/OKydVnFmtY4?autoplay=1&mute=1&loop=1&playlist=OKydVnFmtY4&controls=0&showinfo=0&rel=0&modestbranding=1&playsinline=1&enablejsapi=1&origin=https://sutekistudios.lovable.app"
            title="Hologram technology showreel"
            allow="autoplay; encrypted-media"
            className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[180%] sm:w-[140%] aspect-video pointer-events-none"
            style={{ minHeight: "100%", minWidth: "100%" }}
            frameBorder="0"
          />
          <div className="absolute inset-0 bg-black/60" />
        </div>
        <div className="container mx-auto px-5 sm:px-6 lg:px-8 relative z-10">
          <div className="max-w-3xl">
            <p className="hero-eyebrow mb-4 text-xs sm:text-sm tracking-[0.2em]">
              {isSv ? "HOLOGRAMTEKNIK" : "HOLOGRAM TECHNOLOGY"}
            </p>
            <h1 className="display mb-5 hero-text-white text-3xl sm:text-4xl md:text-5xl leading-tight">
              {isSv
                ? "Hologramteknik för olika installationer"
                : "Hologram technology for different installations"}
            </h1>
            <p className="text-base sm:text-lg hero-text-body max-w-xl leading-relaxed">
              {isSv
                ? "Olika hologramlösningar passar olika miljöer – från mässmontrar och butiker till storskaliga event och arkitektoniska installationer. Nedan hittar du Suteki Studios hologramtekniker och hur de används för att skapa uppmärksamhet, engagemang och visuella upplevelser."
                : "Different hologram solutions suit different environments – from trade show booths and stores to large-scale events and architectural installations. Below you'll find Suteki Studios hologram technologies and how they're used to create attention, engagement and visual experiences."}
            </p>
          </div>
        </div>
      </section>

      {/* Technology Grid */}
      <Section className="section-white">
        <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6">
          {cards.map((card) => (
            <div
              key={card.title}
              className="enterprise-card rounded-xl overflow-hidden flex flex-col hover:shadow-lg transition-all duration-300 hover:-translate-y-1"
            >
              <div className="aspect-[4/3] overflow-hidden bg-muted/20">
                <img
                  src={card.image}
                  alt={`${card.title} hologram display`}
                  loading="lazy"
                  decoding="async"
                  className="w-full h-full object-cover"
                />
              </div>
              <div className="p-5 sm:p-6 flex flex-col flex-1">
                <h2 className="text-lg sm:text-xl font-semibold text-foreground mb-2">
                  {card.title}
                </h2>
                <p className="text-sm text-muted-foreground leading-relaxed mb-4">
                  {card.description}
                </p>
                <ul className="space-y-2 mb-5 flex-1">
                  {card.bullets.map((bullet, i) => (
                    <li key={i} className="flex items-start gap-2 text-sm text-muted-foreground">
                      <CheckCircle2 className="h-4 w-4 text-accent shrink-0 mt-0.5" />
                      <span>{bullet}</span>
                    </li>
                  ))}
                </ul>
                <Link
                  to={card.linkTo}
                  className="inline-flex items-center text-sm font-medium text-accent hover:underline"
                >
                  {card.linkLabel}
                  <ArrowRight className="ml-1 h-4 w-4" />
                </Link>
              </div>
            </div>
          ))}
        </div>
      </Section>

      {/* Internal link back to /hologram */}
      <Section className="section-beige">
        <div className="max-w-2xl mx-auto text-center">
          <h2 className="text-xl sm:text-2xl font-semibold mb-3 text-foreground">
            {isSv
              ? "Vill du se hologram i verkliga installationer?"
              : "Want to see holograms in real installations?"}
          </h2>
          <p className="text-muted-foreground text-sm sm:text-base mb-6">
            {isSv
              ? "Se hur varumärken använder hologram för event, retail och mässor."
              : "See how brands use holograms for events, retail and trade shows."}
          </p>
          <Link
            to="/hologram"
            className="btn-outline inline-flex items-center gap-2 px-6 py-3 text-sm sm:text-base"
          >
            {isSv ? "Se hologramlösningar" : "See hologram solutions"}
            <ArrowRight className="h-4 w-4" />
          </Link>
        </div>
      </Section>

      {/* CTA */}
      <section className="section-dark py-20 sm:py-28" data-theme="dark">
        <div className="container mx-auto px-5 sm:px-6 lg:px-8">
          <div className="max-w-2xl mx-auto text-center">
            <h2 className="text-2xl sm:text-3xl font-semibold mb-4 text-white">
              {isSv
                ? "Vilken hologramteknik passar ditt projekt?"
                : "Which hologram technology fits your project?"}
            </h2>
            <p className="text-base sm:text-lg mb-8" style={{ color: "rgba(226,232,240,0.6)" }}>
              {isSv
                ? "Börja med ett kort idé-möte – vi hjälper dig välja rätt teknik."
                : "Start with a short idea session – we'll help you choose the right technology."}
            </p>
            <a
              href="https://calendly.com/sutekistudios/strategic-project-discussion"
              target="_blank"
              rel="noopener noreferrer"
              className="btn-white inline-flex items-center gap-2 text-sm sm:text-base px-6 sm:px-8 py-3.5"
            >
              {isSv ? "Boka ett idé-möte" : "Book an idea session"}
              <ArrowRight className="h-4 w-4" />
            </a>
          </div>
        </div>
      </section>
    </Layout>
  );
}
