import Link from 'next/link';
import { ArrowUpRight, CalendarClock, ShieldCheck } from 'lucide-react';

import { C, SERIF } from './hubTheme';

const OFFICIAL_LINKS = [
  {
    label: 'Texas Algebra I standards — 19 TAC §111.39',
    href: 'https://tea.texas.gov/laws-and-rules/sboe-rules-tac/sboe-tac-currently-effect/ch111c.pdf',
  },
  {
    label: 'Official Texas assessment resources',
    href: 'https://tea.texas.gov/data-reports/staar/staar-resources',
  },
  {
    label: 'TEA House Bill 8 assessment changes',
    href: 'https://tea.texas.gov/data-reports/student-assessment-overview/house-bill-8-student-assessment',
  },
];

export default function HubStandards() {
  return (
    <section id="texas-standards" className="scroll-mt-16 bg-white px-5 py-16 lg:py-20">
      <div className="mx-auto grid max-w-6xl gap-8 lg:grid-cols-[1.05fr_0.95fr] lg:items-start">
        <div>
          <p className="mb-2 text-[10px] font-bold uppercase tracking-[0.22em]" style={{ color: C.goldDeep }}>Accuracy before marketing claims</p>
          <h2 className="text-2xl font-extrabold sm:text-3xl" style={{ color: C.maroon, fontFamily: SERIF }}>
            Texas Algebra 1 Standards and Assessment Information
          </h2>
          <p className="mt-4 text-sm leading-7 sm:text-base" style={{ color: C.ink }}>
            The worksheet cards identify published TEKS references for specific skills. A topic reference does not
            mean that one worksheet covers every part of that student expectation or an entire reporting category.
          </p>
          <div className="mt-6 flex items-start gap-3 rounded-2xl bg-[#FAF6EF] p-5">
            <ShieldCheck className="mt-0.5 h-5 w-5 shrink-0" style={{ color: C.goldDeep }} aria-hidden="true" />
            <p className="text-sm leading-6" style={{ color: C.ink }}>
              Cambridge Veritas materials are independently produced and are not official Texas Education Agency
              materials. Use TEA sources for authoritative curriculum and assessment requirements.
            </p>
          </div>
          <p className="mt-6 text-sm leading-7" style={{ color: C.ink }}>
            Need a broader study sequence? Read the{' '}
            <Link href="/algebra-1/staar-eoc-study-guide" className="font-extrabold text-[#731F32] underline decoration-[#D4AF37] decoration-2 underline-offset-4">
              Texas Algebra I EOC study guide
            </Link>{' '}
            and use the{' '}
            <Link href="/algebra-1/skills-checklist" className="font-extrabold text-[#731F32] underline decoration-[#D4AF37] decoration-2 underline-offset-4">
              Algebra 1 skills checklist
            </Link>{' '}
            to select practice from evidence.
          </p>
        </div>

        <aside className="rounded-3xl border border-[#E6CFA0] bg-[#FAF6EF] p-6 sm:p-8" aria-label="Official Texas references">
          <h3 className="text-lg font-extrabold" style={{ color: C.maroon, fontFamily: SERIF }}>Official sources</h3>
          <ul className="mt-5 space-y-3">
            {OFFICIAL_LINKS.map((item) => (
              <li key={item.href}>
                <a
                  href={item.href}
                  target="_blank"
                  rel="noreferrer"
                  className="flex items-start justify-between gap-3 rounded-xl bg-white px-4 py-3 text-sm font-bold text-[#4A1429] hover:underline"
                >
                  <span>{item.label}</span>
                  <ArrowUpRight className="mt-0.5 h-4 w-4 shrink-0 text-[#B8912E]" aria-hidden="true" />
                </a>
              </li>
            ))}
          </ul>
          <div className="mt-6 flex items-start gap-3 border-t border-[#E6CFA0] pt-5">
            <CalendarClock className="mt-0.5 h-5 w-5 shrink-0 text-[#B8912E]" aria-hidden="true" />
            <p className="text-xs leading-6" style={{ color: C.ink }}>
              <strong>Assessment context:</strong> These resources reference STAAR Algebra I information relevant to
              the 2026–27 academic year. Texas has announced assessment-system changes beginning in 2027–28. Check
              TEA for the requirements that apply to the student’s school year.
            </p>
          </div>
        </aside>
      </div>
    </section>
  );
}
