import Image from 'next/image';
import { getTranslations } from 'next-intl/server';
import { Link } from '@/i18n/navigation';
import { site } from '@/content/site';
import { Container } from '@/components/ui/Container';
import { PhoneLink } from '@/components/ui/PhoneLink';
import { ProjectMark } from '@/components/ui/ProjectMark';
import { cssVars } from '@/lib/cssVars';

/** Bottom row of the hero: location mark · Wyndham partnership · hotline (echoes the old poster). */
export async function HeroPartnerStrip() {
  const t = await getTranslations('hero');
  const common = await getTranslations('common');

  return (
    <div className="rise border-t border-line" style={cssVars({ '--d': '950ms' })}>
      <Container className="grid items-center gap-6 py-7 md:grid-cols-3">
        <div className="hidden md:block">
          <ProjectMark className="text-lg" />
        </div>

        <div className="flex flex-col items-center gap-3">
          <p className="tracked text-[0.7rem] uppercase tracking-[0.22em] text-mist">{t('partnerLabel')}</p>
          {/* Logo and notice share one link so the logo is clickable without a duplicate adjacent link. */}
          <Link href="/#partnership" className="group flex flex-col items-center gap-3">
            <Image
              src="/images/wyndham.png"
              alt={t('partnerAlt')}
              width={1000}
              height={306}
              sizes="176px"
              className="h-auto w-36 transition-opacity duration-300 group-hover:opacity-80 sm:w-44"
            />
            <span className="inline-flex min-h-11 items-center text-xs text-mist underline decoration-line-strong underline-offset-4 transition-colors duration-300 group-hover:text-gold-hi group-hover:decoration-gold">
              {t('partnerNote')}
            </span>
          </Link>
        </div>

        <div className="hidden justify-end md:flex">
          <PhoneLink label={common('callNumber', { number: site.hotline.display })} />
        </div>
      </Container>
    </div>
  );
}
