"use client"; import { useMemo, useState } from "react"; import { motion } from "framer-motion"; type ServicesAndPricingProps = { lang: "es" | "en"; onContact: () => void; }; type ServiceCard = { id: string; icon: string; title: string; for: string; description: string[]; sections?: { title: string; items: string[] }[]; setup: string; monthly: number | null; term: string; features: string[]; optional: string[]; cta: string; popular?: boolean; subtext?: string; }; const fadeUp = { hidden: { opacity: 0, y: 24 }, visible: { opacity: 1, y: 0 }, }; const content = { es: { sectionTitle: "Servicios y Precios", sectionEyebrow: "Servicios y Precios", headline: "Convertimos tu web en un vendedor inteligente que trabaja 24/7", subheadline: "En 2026, los clientes esperan respuestas instantáneas, reservas sin fricción y experiencias personalizadas. Si tu web no puede hacerlo, están yendo a tu competencia.", yearlyLabel: "Pago anual", yearlyDesc: "Paga anual y ahorra 15%", saveLabel: "Descuento 15%", setupLabel: "Instalación", fromLabel: "Desde", perMonth: "/mes", billedAnnually: "(facturado anualmente)", examplesTitle: "Casos de uso reales en Costa del Sol", examplesCta: "Descubre tu plan ideal", fairUseNote: "Todos los planes incluyen un uso generoso de IA para un negocio típico. Se aplica una", fairUseLink: "política de uso justo", fairUseEnd: ", sin cargos sorpresa.", fairUseTitle: "Uso justo", fairUseQuestion: 'Qué significa "uso justo"?', close: "Cerrar", fairUseBody: [ "Cada plan incluye suficientes mensajes de IA, llamadas y conversaciones de WhatsApp para un negocio típico de tu tamaño.", "Si tu uso se mantiene muy por encima de lo normal (por ejemplo, porque añades nuevas marcas, locales o campañas), haremos lo siguiente:", ], fairUseList: [ "Te avisaremos primero.", "Te enviaremos un informe sencillo de uso.", "Te propondremos opciones (seguir igual con algunos límites o subir de plan / añadir más capacidad).", ], fairUseEndBody: "Nunca aplicamos cargos extra sin hablar contigo antes.", popular: "Más popular", }, en: { sectionTitle: "Services & Pricing", sectionEyebrow: "Services & Pricing", headline: "Turn your website into a 24/7 intelligent salesperson", subheadline: "In 2026, customers expect instant answers, frictionless bookings, and personalized experiences. If your site can't deliver, they're going to your competitors.", yearlyLabel: "Pay yearly", yearlyDesc: "Pay yearly - Save 15%", saveLabel: "Save 15%", setupLabel: "Setup", fromLabel: "From", perMonth: "/month", billedAnnually: "(billed annually)", examplesTitle: "Real use cases on the Costa del Sol", examplesCta: "Find your ideal plan", fairUseNote: "All plans include generous AI usage for a typical business. A", fairUseLink: "fair use policy", fairUseEnd: " applies, no surprise charges.", fairUseTitle: "Fair use", fairUseQuestion: 'What does "fair use" mean?', close: "Close", fairUseBody: [ "Each plan includes enough AI messages, calls and WhatsApp conversations for a typical business of your size.", "If your usage stays well above normal (e.g. you add new brands, locations or campaigns), we will:", ], fairUseList: [ "Notify you first.", "Send you a simple usage report.", "Propose options (continue as-is with some limits, or upgrade / add capacity).", ], fairUseEndBody: "We never apply extra charges without speaking to you first.", popular: "Most popular", }, } as const; const serviceCards: Record<"es" | "en", ServiceCard[]> = { es: [ { id: "starter", icon: "💬", title: "AI Chat + Reservas Automatizadas", for: "Restaurantes, clínicas, negocios locales con web existente", description: [ "¿Tu web pierde clientes fuera de horario? Tu sitio responde preguntas, toma reservas y captura leads mientras duermes.", ], sections: [ { title: "Resultados típicos:", items: [ "24/7 reservas sin intervención humana", "Reduce llamadas repetitivas en un 70%", "ROI positivo en el primer mes", ], }, ], setup: "900 €", monthly: 299, term: "6-12 meses", features: [ "Chat IA en la web (1 idioma)", "Reservas y captación de leads", "Analíticas básicas", ], optional: ["+WhatsApp (+100€/mes)", "+Idioma extra (+80€/mes)"], cta: "Empezar", }, { id: "site", icon: "🌐", title: "Web Inteligente Completa", for: "Negocios listos para una web moderna + cerebro IA", description: [ "Construimos tu nuevo sitio web Next.js (rápido, seguro, SEO) e integramos IA que vende, reserva y da soporte en español e inglés.", ], sections: [ { title: "Incluye:", items: [ "Sitio que convierte visitas en ventas", "Chat + WhatsApp incluidos", "2 idiomas desde el día uno", "Analíticas avanzadas", ], }, ], setup: "3.500 €", monthly: 749, term: "6-12 meses", features: [ "Todo lo de Starter", "Nuevo sitio web Next.js", "WhatsApp incluido", "2 idiomas (ES+EN)", ], optional: ["+Llamadas de voz (+150€/mes)", "+Ubicación extra (+120€/mes)"], cta: "Empezar", popular: true, }, { id: "growth", icon: "🚀", title: "Partner Estratégico de IA", for: "Grupos de restaurantes, inmobiliarias, cadenas de alquiler", description: [ "Socio estratégico: IA multicanal (web, WhatsApp, llamadas), integraciones CRM y consultoría mensual.", ], sections: [ { title: "Incluye:", items: [ "Todo lo de Smart Site", "Llamadas de voz incluidas", "Soporte multiubicación", "Integraciones CRM", "Llamada estratégica mensual", ], }, ], setup: "5.000 €", monthly: 1950, term: "12 meses", features: [ "Todo lo de Smart Site", "Llamadas de voz incluidas", "Integraciones CRM", "Soporte prioritario", ], optional: ["+Pack contenido IA (+200€/mes)"], cta: "Hablemos", }, { id: "enterprise", icon: "🎯", title: "Enterprise / A medida", for: "Operaciones a escala con necesidades custom", description: [ "Todo adaptado a tu operación: multimarca, white-label, account manager dedicado y SLA de rendimiento.", ], setup: "Personalizado", monthly: null, term: "Definimos el alcance contigo", features: [ "Todo a medida", "Multimarca y white-label", "Account manager dedicado", "SLA de rendimiento", ], optional: [], cta: "Contactar", subtext: "Hablemos", }, ], en: [ { id: "starter", icon: "💬", title: "AI Chat + Automated Bookings", for: "Restaurants, clinics, local businesses with existing websites", description: [ "Is your website losing customers after hours? Your site answers questions, takes bookings, and captures leads while you sleep.", ], sections: [ { title: "Typical results:", items: [ "24/7 bookings without human intervention", "Reduce repetitive calls by 70%", "Positive ROI in the first month", ], }, ], setup: "900 €", monthly: 299, term: "6-12 months", features: [ "AI website chat (1 language)", "Booking & lead capture", "Basic analytics", ], optional: ["+WhatsApp (+100€/mo)", "+Extra language (+80€/mo)"], cta: "Get started", }, { id: "site", icon: "🌐", title: "Full Smart Website", for: "Businesses ready for a modern site + AI brain", description: [ "We build your new Next.js website (fast, secure, SEO) and integrate AI that sells, books, and supports in Spanish and English.", ], sections: [ { title: "Includes:", items: [ "Site that converts visits into sales", "Chat + WhatsApp included", "2 languages from day one", "Advanced analytics", ], }, ], setup: "3,500 €", monthly: 749, term: "6-12 months", features: [ "Everything in Starter", "New Next.js website", "WhatsApp included", "2 languages (ES+EN)", ], optional: ["+Voice calls (+150€/mo)", "+Extra location (+120€/mo)"], cta: "Get started", popular: true, }, { id: "growth", icon: "🚀", title: "AI Strategy Partner", for: "Restaurant groups, real estate teams, rental chains", description: [ "Strategic partner: multichannel AI (web, WhatsApp, calls), CRM integrations, monthly consulting.", ], sections: [ { title: "Includes:", items: [ "Everything in Smart Site", "Voice calls included", "Multi-location support", "CRM integrations", "Monthly strategy call", ], }, ], setup: "5,000 €", monthly: 1950, term: "12 months", features: [ "Everything in Smart Site", "Voice calls included", "CRM integrations", "Priority support", ], optional: ["+AI content pack (+200€/mo)"], cta: "Let's talk", }, { id: "enterprise", icon: "🎯", title: "Enterprise / Custom", for: "Large-scale operations with custom needs", description: [ "Everything tailored: multi-brand, white-label, dedicated account manager, performance SLA.", ], setup: "Custom", monthly: null, term: "Let us scope it", features: [ "Everything tailored", "Multi-brand & white-label", "Dedicated account manager", "Performance SLAs", ], optional: [], cta: "Contact us", subtext: "Let's talk", }, ], }; const examples = { es: [ { title: "🍽️ Restaurantes", text: "Reservas a las 3 AM, respuestas sobre alérgenos, sugerencias de platos." }, { title: "🏠 Inmobiliarias", text: "IA responde dudas, agenda visitas, cualifica leads." }, { title: "🚗 Rent a Car", text: "Cotiza y reserva en 3 idiomas sin intervención humana." }, ], en: [ { title: "🍽️ Restaurants", text: "Reservations at 3 AM, allergy answers, dish suggestions." }, { title: "🏠 Real Estate", text: "AI answers questions, books viewings, qualifies leads." }, { title: "🚗 Rent a Car", text: "Quote and book in 3 languages with no human intervention." }, ], }; export default function ServicesAndPricing({ lang, onContact, }: ServicesAndPricingProps) { const [yearly, setYearly] = useState(false); const [showFairUse, setShowFairUse] = useState(false); const t = content[lang]; const cards = serviceCards[lang]; const formatMonthly = (value: number) => { const price = yearly ? Math.round(value * 0.85) : value; return `${price} €${t.perMonth}`; }; return (

{t.sectionEyebrow}

{t.sectionTitle}

{t.subheadline}

{t.yearlyLabel}

{t.yearlyDesc}

{cards.map((card, index) => ( {card.popular && ( {t.popular} )}
{card.icon}

{card.title}

{card.for}

{card.description.map((p, i) => (

{p}

))}
{card.sections?.map((section) => (

{section.title}

    {section.items.map((item) => (
  • • {item}
  • ))}
))}

{t.setupLabel}: {card.setup}

{card.monthly === null ? card.subtext : card.monthly !== null ? `${t.fromLabel} ${formatMonthly(card.monthly)}` : null}

{card.term} {card.monthly !== null && yearly && ( {t.billedAnnually} )}

    {card.features.map((f) => (
  • ✓ {f}
  • ))}
{card.optional.length > 0 && (

{card.optional.join(" · ")}

)}
))}

{t.examplesTitle}

{examples[lang].map((ex) => (

{ex.title}

"{ex.text}"

))}

{t.fairUseNote}{" "} {t.fairUseEnd}

{showFairUse && (
setShowFairUse(false)} />

{t.fairUseTitle}

{t.fairUseQuestion}

{t.fairUseBody.map((p) => (

{p}

))}
    {t.fairUseList.map((item) => (
  1. {item}
  2. ))}

{t.fairUseEndBody}

)}
); }