"use client"; import { EyeOff, Lock, Globe, Gauge, Cpu } from "lucide-react"; import { motion, Variants } from "framer-motion"; import { Dictionary } from "@/lib/IDict"; export function Features({ dict }: { dict: Dictionary["features"] }) { // Универсальные классы для переиспользования и чистоты кода const verticalCardClass = "min-h-[320px] md:min-h-[360px] group bg-card/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-8 md:p-10 flex flex-col hover:border-primary/50 transition-all duration-500 hover:shadow-[0_0_40px_rgba(139,61,255,0.15)] relative overflow-hidden"; const iconContainerClass = "bg-secondary/10 w-14 h-14 rounded-[1.2rem] flex items-center justify-center border border-secondary/20 shadow-[0_0_15px_rgba(0,229,242,0.15)] relative z-10 transition-transform duration-500 group-hover:scale-110"; const bentoConfig = [ { // 1: DPI Evasion className: `md:col-span-2 ${verticalCardClass}`, icon: (
), bgElement: ( ), }, { // 2: Cryptography className: `md:col-span-1 ${verticalCardClass}`, icon: (
), bgElement: (
), }, { // 3: Adaptive Backpressure className: `md:col-span-1 ${verticalCardClass}`, icon: (
), bgElement: ( ), }, { // 4: Multi-Platform Core className: `md:col-span-2 ${verticalCardClass}`, icon: (
), bgElement: (
), }, { // 5: Global Network (Горизонтальная карточка) className: "md:col-span-3 bg-card/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-8 md:p-10 flex flex-col md:flex-row items-start md:items-center gap-8 md:gap-12 group hover:border-primary/50 transition-all duration-500 hover:shadow-[0_0_40px_rgba(139,61,255,0.15)] relative overflow-hidden", icon: (
), bgElement: (
), }, ]; const containerVariants: Variants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.15, }, }, }; const itemVariants: Variants = { hidden: { opacity: 0, y: 40, }, show: { opacity: 1, y: 0, transition: { type: "spring", stiffness: 260, damping: 20, }, }, }; if (!dict || !dict.items || dict.items.length < 5) return null; return (
{/* Центральное мягкое свечение секции */}

{dict.title}

{bentoConfig.map((config, idx) => { const feature = dict.items[idx]; // Проверяем, это последняя горизонтальная карточка или нет const isHorizontal = idx === 4; return ( {config.bgElement} {config.icon} {/* mt-auto прижимает текст к низу, pt-8 дает гарантированный отступ от иконки */}

{feature.title}

{feature.description}

); })}
); }