import React from "react";

export default function Section({
  title,
  subtitle,
  children,
}: {
  title?: string;
  subtitle?: string;
  children: React.ReactNode;
}) {
  return (
    <section className="bg-[#FAFAFA]">
      <div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-14">
        {title && (
          <h1 className="text-3xl sm:text-4xl font-semibold tracking-tight text-slate-900">
            {title}
          </h1>
        )}
        {subtitle && (
          <p className="mt-3 max-w-2xl text-slate-600">
            {subtitle}
          </p>
        )}
        <div className="mt-10">{children}</div>
      </div>
    </section>
  );
}
