/* global React */

const faqs = [
  {
    q: "Are you licensed and insured?",
    a: "Yes, fully. CSLB License #487201, with general liability and workers' comp coverage. We'll show you our license and current insurance certificates before we ever touch a tool. If a contractor won't, that's a sign to keep looking.",
  },
  {
    q: "How do estimates work? Is there a charge?",
    a: "Estimates are free for projects in our service area. Tom or Cole will come out, walk the property with you, and follow up within a few days with a written estimate. No pressure, no high-pressure 'today only' pricing — that's not how we operate.",
  },
  {
    q: "How far out are you booking?",
    a: "It depends on the season and the size of the job. Small repairs can usually happen within a couple of weeks. Larger projects like decks and re-roofs are typically 2–8 weeks out, longer in spring. We'll give you a real answer when we estimate, not a hopeful one.",
  },
  {
    q: "What if I find a problem after you've finished?",
    a: "Call us. We stand behind our work — labor on most projects is warrantied for 2 years, and we honor manufacturer warranties on materials. If something isn't right, we come back and fix it. We'd rather do that than have you tell your neighbor we didn't.",
  },
  {
    q: "Do you take on small jobs, or only big ones?",
    a: "Both. We have a handyman rate (two-hour minimum) for small jobs — fence repairs, door fixes, that sort of thing. We've found that small jobs often turn into bigger relationships, and we like keeping our long-term clients' lists short.",
  },
  {
    q: "How do you handle change orders and surprises?",
    a: "We document everything in writing. If we open up a wall and find something nobody could've predicted, we stop, we call you, we show you what we found, and we give you options before any new work begins. No surprise charges on the final invoice — ever.",
  },
  {
    q: "Do you work outside Calaveras County?",
    a: "Sometimes, for return clients or special projects. Our home turf is Murphys and the Highway 4 corridor — that's where we can give you the fastest response and the most attention. Outside that area, give us a call and we'll be honest about whether we're the right fit.",
  },
  {
    q: "What payments do you accept?",
    a: "Check, cash, ACH transfer, and credit cards (with a small processing fee). For projects over a few thousand dollars, we work on a deposit + progress payment schedule that we'll lay out clearly in your contract.",
  },
];

const FAQ = () => {
  const [open, setOpen] = React.useState(0);

  return (
    <section className="section faq" id="faq" data-screen-label="09 FAQ">
      <div className="container">
        <div className="section-head">
          <div>
            <div className="eyebrow">Honest answers</div>
            <h2>Questions we hear a lot.</h2>
          </div>
          <p className="lede">
            Hiring a contractor is a leap of trust. Here are the things people ask
            us most often — and don't see anything you're wondering about? Just call.
          </p>
        </div>

        <div className="faq-list">
          {faqs.map((f, i) => (
            <div key={i} className={`faq-item ${open === i ? "open" : ""}`}>
              <button className="faq-q" onClick={() => setOpen(open === i ? -1 : i)}>
                <span>{f.q}</span>
                <span className="plus" aria-hidden="true"></span>
              </button>
              <div className="faq-a">
                <div className="faq-a-inner">{f.a}</div>
              </div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

window.FAQ = FAQ;
