import Image from "next/image";
import { cn } from "cn";
import type { Dictionary } from "@/i18n/get-dictionary";
import { AwardIcon } from "@/components/icons";
import { FloatingCard } from "@/components/shared/floating-card";

type AboutImageProps = { t: Dictionary["home"]["about"]; className?: string };

/** Team photo with a mint tint and the floating "ISO Certified" card. */
export function AboutImage({ t, className }: AboutImageProps) {
  return (
    <div className={cn("relative", className)}>
      <div className="relative h-[263px] overflow-hidden rounded-3xl border border-white/8 md:h-[315px] lg:h-[417px]">
        <Image src="/images/home/about-team.jpg" alt={t.imageAlt} fill sizes="(min-width: 1024px) 556px, 100vw" className="object-cover" />
        <div aria-hidden className="absolute inset-0 bg-mint-tint" />
      </div>
      {/* Phone / tablet: the same card at 62% / 75% (Figma 390: 119×50, 744: 143×61). */}
      <FloatingCard className="absolute -bottom-6 end-4 p-5 max-md:[zoom:0.62] md:max-lg:[zoom:0.75] lg:-end-8">
        <AwardIcon className="size-7 shrink-0 text-white" />
        <div>
          <p className="text-xs leading-4 text-soft">{t.badgeLabel}</p>
          <p className="text-sm leading-5 font-bold text-heading">{t.badgeValue}</p>
        </div>
      </FloatingCard>
    </div>
  );
}
