"use client";

import { useLocaleDirection } from "@/hooks/useLocale";

interface TimelineStepProps {
  title: string;
  description: string;
}

export default function TimelineStep({
  title,
  description,
}: TimelineStepProps) {
  const { isRTL } = useLocaleDirection();

  return (
    <div className="relative flex gap-4 md:gap-6">
      <div
        className={`absolute z-10 shrink-0 ${
          isRTL ? "right-[5px]" : "left-[5px]"
        }`}
        style={{
          transform: isRTL ? "translateX(50%)" : "translateX(-50%)",
        }}
      >
        <div className="w-3 h-3 rounded-full [background:var(--color-gradient-text)]"></div>
      </div>

      <div className={`flex-1 pt-1 ${isRTL ? "mr-8 text-right" : "ml-8"}`}>
        <h3 className="font-semibold text-white text-[14px] mb-2">{title}</h3>
        <p className="text-gray-300 text-[10px] md:text-[12px] leading-relaxed">
          {description}
        </p>
      </div>
    </div>
  );
}
