import { Section } from "../Section";
import { INSTRUCTORS_CONFIG } from "../../config/course";

export function InstructorsSection() {
  return (
    <Section>
      <h2 className="mb-4 text-center text-xl font-bold sm:text-2xl md:text-3xl">
        {INSTRUCTORS_CONFIG.title}
      </h2>
      <p className="mb-10 text-center text-[var(--muted-foreground)] sm:mb-12 md:mb-16">
        {INSTRUCTORS_CONFIG.subtitle}
      </p>
      <div className="grid gap-6 sm:grid-cols-2 md:gap-8 lg:grid-cols-3">
        {INSTRUCTORS_CONFIG.items.map((i) => (
          <div
            key={i.name}
            className="hover-shimmer rounded-xl border border-[var(--border)] bg-[var(--card)] p-5 text-center transition-all duration-300 hover:-translate-y-0.5 hover:border-[var(--accent)]/30 sm:rounded-2xl sm:p-6"
          >
            <div className="mb-3 flex justify-center sm:mb-4">
              <div className="flex h-16 w-16 items-center justify-center rounded-full bg-[var(--accent-muted)] text-xl font-bold text-[var(--accent)] sm:h-20 sm:w-20 sm:text-2xl">
                {i.name.slice(0, 1)}
              </div>
            </div>
            <h3 className="mb-1 font-semibold">{i.name}</h3>
            <p className="mb-1 text-sm text-[var(--accent)]">{i.role}</p>
            <p className="mb-2 text-sm text-[var(--muted-foreground)]">
              {i.desc}
            </p>
            <span className="inline-block rounded-full bg-[var(--accent-muted)] px-3 py-1 text-xs text-[var(--accent)]">
              {i.tag}
            </span>
          </div>
        ))}
      </div>
    </Section>
  );
}
