import Image from "next/image";

export type FeatureCardItem = {
  title: string;
  description: string;
  icon: string;
};

type FeatureCardProps = {
  item: FeatureCardItem;
};

const FeatureCard = ({ item }: FeatureCardProps) => {
  return (
    <article className="flex items-center gap-3.5 rounded-2xl bg-brand px-4 py-3.5 sm:gap-4 sm:rounded-[18px] sm:px-5 sm:py-4">
      <span className="flex size-11 shrink-0 items-center justify-center rounded-xl bg-[#293D81] sm:size-12">
        <Image
          src={item.icon}
          alt=""
          width={24}
          height={24}
          className="size-5 sm:size-6"
          aria-hidden
        />
      </span>
      <div className="min-w-0">
        <h3 className="text-base font-semibold leading-tight text-white sm:text-lg">
          {item.title}
        </h3>
        <p className="mt-1 text-sm leading-snug text-white/80 sm:text-[15px]">
          {item.description}
        </p>
      </div>
    </article>
  );
};

export default FeatureCard;
