import Image from "next/image";
import { cn } from "cn";

/**
 * Riyadh-at-night photo behind the top of the Career pages and the not-found page (Figma: 65% photo + violet glow + fade to the page color).
 * `className` sets its height (745px on the list and job pages, 942px on the empty and apply pages).
 */
export function PageHeroBackground({ alt, className }: { alt: string; className?: string }) {
  return (
    <div aria-hidden={alt ? undefined : true} className={cn("absolute inset-x-0 top-0 -z-10", className)}>
      <Image src="/images/career/riyadh-night.jpg" alt={alt} fill priority sizes="100vw" className="object-cover opacity-65" />
      <div className="absolute inset-0 bg-career-hero-overlay" />
    </div>
  );
}
