"use client"; import { memo } from "react"; import SectionNumber from "../sections/SectionNumber"; export type NumberCardSizeValue = "small" | "medium" | "large" | "xlarge"; interface NumberCardProps { number: number; text: string; size?: NumberCardSizeValue; iconShape?: string; iconColor?: string; } const NumberCard = memo(({ number, text, size: sizeProp }) => { const baseClasses = "bg-[var(--color-surface-inverse-primary)] rounded-[12px] shadow-lg"; if (sizeProp) { const size = sizeProp; const sizeClasses = { small: "flex flex-col items-end justify-center gap-4 p-5 relative", medium: "flex flex-row items-center gap-8 p-8 relative", large: "flex flex-col items-start justify-end gap-[22px] h-[238px] p-8 relative", xlarge: "flex flex-col items-start justify-end gap-[22px] h-[238px] p-8 relative", }; const textClasses = { small: "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[#141414]", medium: "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", large: "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", xlarge: "font-bricolage-grotesque font-medium text-[32px] leading-[32px] text-[#141414]", }; const sectionNumberWrapperClasses = { small: "relative shrink-0", medium: "flex justify-start flex-shrink-0", large: "absolute top-8 right-8", xlarge: "absolute top-8 right-8", }; const contentClasses = { small: "min-w-full relative shrink-0", medium: "flex-1", large: "absolute bottom-8 left-8 right-16", xlarge: "absolute bottom-8 left-8 right-16", }; if (size === "small") { return (
{/* Section Number - Direct child for Small */} {/* Card Content */}

{text}

); } return (
{/* Section Number */}
{/* Card Content */}

{text}

); } // Responsive breakpoints for backward compatibility (matches original behavior) // Maps to: Small (mobile) -> Medium (sm) -> Large (lg) -> XLarge (xl) return (
{/* Section Number - Responsive positioning */}
{/* Card Content - Responsive positioning */}

{text}

); }); NumberCard.displayName = "NumberCard"; export default NumberCard;