/* sections-denial.jsx — Denial Management page (hero, value, services, why, process, closing CTA) */

const DENIAL_SERIF = { fontFamily: '"Source Serif 4", Georgia, "Times New Roman", serif', fontStyle: "italic", fontWeight: 600, color: "#A9C2EE" };

const DENIAL_TILES = [
  { icon: "\u{1F4CA}", title: "Denial Analysis & Categorization", body: "Every denial is logged, coded, and categorized by payer, reason, CPT code, and provider, so nothing gets written off without understanding why it happened." },
  { icon: "\u{1F4E8}", title: "AI-Guided Corrections", body: "Our AI recommends the right fix for each denial, and we submit corrected claims and payer-specific appeal packages with supporting documentation, tracked through resolution." },
  { icon: "\u{1F4DE}", title: "Direct Payer Follow-Up", body: "Our team works denials directly with payers by phone and portal, escalating stalled claims instead of letting them age out." },
  { icon: "\u{1F50D}", title: "Root Cause Identification", body: "We trace denials back to their source (authorization gaps, eligibility issues, coding errors, or credentialing problems) and fix the underlying process." },
  { icon: "\u{1F4C8}", title: "Denial Trend Reporting", body: "Ongoing reporting shows denial rates, top denial reasons, recovery amounts, and payer trends, so you can see improvement month over month." },
];

const DENIAL_WHY = [
  "Up to 15% of ABA claims are denied on first submission, and most practices never rework the majority of them.",
  "Every unworked denial is revenue your practice already earned.",
  "Prevention beats rework: fixing root causes lowers your denial rate permanently.",
];

const DENIAL_STEPS = [
  { num: "01", title: "Intake", body: "Denials are captured and categorized within 48 hours." },
  { num: "02", title: "Rework", body: "Corrected claims and appeals submitted with full documentation, guided by AI-recommended fixes." },
  { num: "03", title: "Follow-Up", body: "Direct payer contact until resolution." },
  { num: "04", title: "Prevention", body: "Root causes fixed, trends reported, denial rate reduced." },
];

function DenialManagement({ onCta }) {
  return (
    <React.Fragment>
      <section className="svc-hero" id="denial-hero">
        <div className="wrap">
          <Reveal><span className="eyebrow"><span className="dot"></span>Denial Management</span></Reveal>
          <Reveal as="h1" delay={80} className="svc-hero-h1">
            Turn Denied Claims Into <em>Recovered Revenue</em>
          </Reveal>
          <Reveal as="p" delay={140} className="svc-hero-sub">
            Denied claims are one of the largest revenue leaks in ABA practices. Our denial management services go beyond resubmissions: we identify patterns, correct root causes, and prevent future denials.
          </Reveal>
        </div>
      </section>

      <section className="sec-pad" id="denial-value" style={{ paddingTop: 0 }}>
        <div className="wrap">
          <div className="sec-head">
            <Reveal><span className="eyebrow"><span className="dot"></span>Beyond resubmission</span></Reveal>
            <Reveal as="p" delay={100} className="sec-sub" style={{ maxWidth: 780 }}>
              Most billing teams stop at resubmission. We treat every denial as a signal, categorizing it, tracing it to its root cause, and fixing the process that created it. The result: recovered revenue today and fewer denials tomorrow, with a stronger billing operation overall.
            </Reveal>
          </div>
        </div>
      </section>

      <section className="svc-grid-sec" id="denial-services">
        <div className="wrap">
          <div className="svc-grid">
            {DENIAL_TILES.map((c, i) => (
              <Reveal key={c.title} className="svc-tile" delay={(i % 3) * 90} style={{ paddingBottom: 26 }}>
                <span className="svc-tile-ic" aria-hidden="true">{c.icon}</span>
                <h3 className="svc-tile-t">{c.title}</h3>
                <p className="svc-tile-b">{c.body}</p>
              </Reveal>
            ))}
          </div>
        </div>
      </section>

      <section className="sec-pad" id="denial-why">
        <div className="wrap">
          <div className="sec-head">
            <Reveal><span className="eyebrow"><span className="dot"></span>Why it matters</span></Reveal>
          </div>
          <div className="svc-grid">
            {DENIAL_WHY.map((t, i) => (
              <Reveal key={i} className="svc-tile" delay={i * 90} style={{ paddingBottom: 26 }}>
                <p className="svc-tile-b" style={{ fontSize: 15.5 }}>{t}</p>
              </Reveal>
            ))}
          </div>
        </div>
      </section>

      <section className="sec-pad" id="denial-process" style={{ paddingTop: 0 }}>
        <div className="wrap">
          <div className="sec-head">
            <Reveal><span className="eyebrow"><span className="dot"></span>How it works</span></Reveal>
            <Reveal as="h2" delay={80} className="sec-title">From denial to prevention</Reveal>
          </div>
          {DENIAL_STEPS.map((st, i) => (
            <div key={st.num} className="sol-pillar" style={{ marginTop: i === 0 ? 8 : 34 }}>
              <Reveal as="h3" className="sol-pillar-t"><span className="sol-pillar-num mono">{st.num}</span>{st.title}</Reveal>
              <Reveal as="p" delay={80} className="sol-pillar-sub" style={{ marginBottom: 0 }}>{st.body}</Reveal>
            </div>
          ))}
        </div>
      </section>

      <section className="sec-pad security" id="denial-cta">
        <div className="wrap" style={{ textAlign: "center" }}>
          <Reveal as="h2" className="sec-title sec-title-light">Stop Leaving Earned Revenue on the Table</Reveal>
          <Reveal as="p" delay={100} className="sec-sub sec-sub-light" style={{ margin: "14px auto 26px", maxWidth: 560 }}>
            Let's review your current denial rate and show you what's recoverable.
          </Reveal>
          <Reveal as="div" delay={180}>
            <button className="btn btn-primary btn-lg" onClick={onCta}>Get a Free Denial Assessment<I.arrow/></button>
          </Reveal>
        </div>
      </section>
    </React.Fragment>
  );
}

Object.assign(window, { DenialManagement });
