"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"] }) {
// Настройки для 5 карточек в стильной Bento-сетке
// md:col-span-2 = широкая карточка (2/3 ширины)
// md:col-span-1 = узкая/квадратная карточка (1/3 ширины)
const bentoConfig = [
{
// 1: Широкая сверху
className:
"md:col-span-2 min-h-[300px] group overflow-hidden bg-card/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-6 md:p-10 flex flex-col justify-end hover:border-primary/50 transition-all duration-500 hover:shadow-[0_0_40px_rgba(0,240,255,0.1)] relative",
icon: ,
bgElement: (
),
},
{
// 2: Узкая справа
className:
"md:col-span-1 min-h-[300px] bg-card/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-6 md:p-10 flex flex-col group hover:border-secondary/60 transition-all duration-500 hover:shadow-[0_0_40px_rgba(112,0,255,0.15)] relative overflow-hidden",
icon: (
),
bgElement: (
),
},
{
// 3: Узкая слева в среднем ряду
className:
"md:col-span-1 min-h-[300px] bg-card/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-6 md:p-10 flex flex-col group hover:border-primary/50 transition-all duration-500 hover:shadow-[0_0_30px_rgba(0,240,255,0.1)] relative overflow-hidden",
icon: (
),
bgElement: (
),
},
{
// 4: Широкая справа в среднем ряду
className:
"md:col-span-2 min-h-[300px] bg-gradient-to-br from-card/40 to-background/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-6 md:p-10 flex flex-col justify-end group hover:border-secondary/50 transition-all duration-500 hover:shadow-[0_0_30px_rgba(112,0,255,0.1)] relative overflow-hidden",
icon: ,
bgElement: (
),
},
{
// 5: На всю ширину снизу
className:
"md:col-span-3 bg-gradient-to-r from-card/40 to-background/40 backdrop-blur-xl border border-border/50 rounded-[2.5rem] p-6 md:p-10 flex flex-col md:flex-row items-start md:items-center gap-6 md:gap-8 group hover:border-primary/50 transition-all duration-500 hover:shadow-[0_0_40px_rgba(0,240,255,0.1)] 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 (
// overflow-hidden и w-full здесь чинят горизонтальный скролл на мобильных телефонах
{/* Центрированный контейнер для контента */}
{/* Фоновое свечение (исправлено позиционирование, чтобы не ломало ширину) */}
{bentoConfig.map((config, idx) => {
const feature = dict.items[idx];
return (
{config.bgElement}
{config.icon}
{feature.title}
{feature.description}
);
})}
);
}