/* Hope Council — Home wireframe, part 1
   Global chrome (utility strip, primary nav) + hero, urgent help, situation
   pathways, programs grid. Built on the Dooley Wireframe Kit. Grayscale only.
   Content-populated: production copy is imported in place of greeked bars. */

const K = window.DooleyWireframeKit_e41309;
const { useState } = React;

/* ---- shared helpers ------------------------------------------------------ */

// Numbered annotation marker, absolutely pinned to its parent (which must be
// position:relative). Hidden when the annotation layer is toggled off.
function Dot({ n, anno, top = -11, right = -11, left }) {
  const { Annotation } = K;
  if (!anno) return null;
  return React.createElement(Annotation, {
    n,
    style: { position: "absolute", top, right: left === undefined ? right : undefined, left, zIndex: 3 },
  });
}

// Real body copy. Accepts a string or an array of paragraphs.
function Para({ text, color = "var(--wf-ink-soft)", size = "var(--wf-text-body)", style, maxWidth }) {
  const arr = Array.isArray(text) ? text : [text];
  return (
    <div style={{ display: "flex", flexDirection: "column", gap: 12, maxWidth, ...style }}>
      {arr.map((t, i) => (
        <p key={i} style={{ margin: 0, font: `var(--wf-weight-regular) ${size}/var(--wf-leading-body) var(--wf-font-sans)`, color, textWrap: "pretty" }}>{t}</p>
      ))}
    </div>
  );
}

// Section band — full width of the page card, optional zone fill for rhythm,
// consistent inner max-width and vertical padding.
function Band({ fill = "surface", id, label, children, pad = "56px 56px", style }) {
  const fills = {
    surface: "var(--wf-surface)",
    zone: "var(--wf-zone)",
    alt: "var(--wf-zone-alt)",
  };
  return (
    <section
      data-screen-label={label}
      id={id}
      style={{ background: fills[fill], borderTop: "var(--wf-border)", ...style }}
    >
      <div style={{ maxWidth: 1160, margin: "0 auto", padding: pad }}>{children}</div>
    </section>
  );
}

// Real section heading + real intro copy.
function SectionHead({ kicker, title, intro, center, maxTitle = 640, introWidth = 760 }) {
  return (
    <div style={{ display: "flex", flexDirection: "column", gap: 14, alignItems: center ? "center" : "flex-start", textAlign: center ? "center" : "left", marginBottom: 32 }}>
      {kicker ? (
        <span style={{ font: "var(--wf-weight-bold) var(--wf-text-label)/1.2 var(--wf-font-sans)", letterSpacing: "var(--wf-tracking-label)", textTransform: "uppercase", color: "var(--wf-ink-muted)" }}>{kicker}</span>
      ) : null}
      <h2 style={{ margin: 0, font: "var(--wf-weight-bold) var(--wf-text-h2)/var(--wf-leading-tight) var(--wf-font-sans)", color: "var(--wf-ink)", maxWidth: maxTitle, textWrap: "balance" }}>{title}</h2>
      {intro ? (
        <Para text={intro} maxWidth={center ? 680 : introWidth} style={{ alignItems: center ? "center" : "flex-start", textAlign: center ? "center" : "left", marginLeft: center ? "auto" : 0, marginRight: center ? "auto" : 0 }} />
      ) : null}
    </div>
  );
}

// A wayfinding / content card: real title, optional ICO slot, real body copy,
// text CTA with a ▸ marker (real label).
function WireCard({ title, body, cta, icon = false, big = false }) {
  const { ImgPlaceholder } = K;
  return (
    <div style={{ border: "var(--wf-border)", borderRadius: "var(--wf-radius)", background: "var(--wf-surface)", padding: big ? 22 : 18, display: "flex", flexDirection: "column", gap: big ? 14 : 12, height: "100%" }}>
      {icon ? <ImgPlaceholder kind="image" label="ICO" width={40} height={40} style={{ aspectRatio: "auto", flexShrink: 0 }} /> : null}
      <h3 style={{ margin: 0, font: `var(--wf-weight-bold) ${big ? "var(--wf-text-h3)" : "15px"}/1.25 var(--wf-font-sans)`, color: "var(--wf-ink)" }}>{title}</h3>
      {body ? <Para text={body} size="var(--wf-text-small)" /> : null}
      {cta ? (
        <span style={{ marginTop: "auto", paddingTop: 4, display: "inline-flex", alignItems: "center", gap: 6, font: "var(--wf-weight-bold) var(--wf-text-small)/1 var(--wf-font-sans)", color: "var(--wf-ink)" }}>
          <span style={{ textDecoration: "underline", textUnderlineOffset: 3 }}>{cta}</span>
          <span aria-hidden="true">▸</span>
        </span>
      ) : null}
    </div>
  );
}

/* ---- 1. Utility strip ---------------------------------------------------- */

function SiteUtilityStrip({ anno }) {
  const link = { color: "var(--wf-ink)", textDecoration: "underline", textUnderlineOffset: 2 };
  return (
    <div style={{ position: "relative", background: "var(--wf-zone-alt)", borderBottom: "var(--wf-border-strong)" }}>
      <Dot n={1} anno={anno} top={8} right={8} />
      <div style={{ maxWidth: 1160, margin: "0 auto", padding: "8px 56px", display: "flex", flexWrap: "wrap", justifyContent: "space-between", gap: 16, fontSize: "var(--wf-text-small)", color: "var(--wf-ink-soft)" }}>
        <span style={{ maxWidth: 640 }}>
          Need help now? If someone is in immediate danger or may be overdosing, call <a href="tel:911" style={link}>911</a>. For mental health or substance use crisis support, call or text <a href="tel:988" style={link}>988</a>. Local 24/7 crisis support: <a href="tel:2626577188" style={link}>262-657-7188</a>.
        </span>
        <span style={{ display: "flex", gap: 18, alignItems: "center" }}>
          <a href="tel:2626588166" style={link}>262-658-8166</a>
          <span style={{ color: "var(--wf-ink-muted)" }}>6103 39th Ave., Kenosha, WI 53142</span>
          <a href="prototype-pages/donate.html" style={{ ...link, fontWeight: "var(--wf-weight-bold)" }}>Donate</a>
        </span>
      </div>
    </div>
  );
}

/* ---- 2. Primary navigation (dropdown / flyout stub) ---------------------- */

const NAV = [
  { label: "Get Help", href: "prototype-pages/get-help.html", items: [
    ["Find Help", "prototype-pages/get-help.html"],
    ["For Myself", "prototype-pages/get-help-for-myself.html"],
    ["For a Loved One", "prototype-pages/get-help-for-a-loved-one.html"],
  ] },
  { label: "About", href: "prototype-pages/about.html", items: [
    ["About Us", "prototype-pages/about.html"],
    ["Mission & History", "prototype-pages/mission-history.html"],
    ["Staff & Board", "prototype-pages/staff-board.html"],
    ["Partners & Funders", "prototype-pages/partners-funders.html"],
    ["Impact", "prototype-pages/impact.html"],
    ["News", "prototype-pages/news.html"],
    ["Recovery Meeting Calendar", "prototype-pages/recovery-meeting-calendar.html"],
  ] },
  { label: "Get Involved", href: "prototype-pages/get-involved.html", items: [
    ["Ways to Help", "prototype-pages/get-involved.html"],
    ["Volunteer", "prototype-pages/volunteer.html"],
    ["Careers", "prototype-pages/careers.html"],
    ["Share Your Story", "prototype-pages/share-your-story.html"],
    ["Sponsor", "prototype-pages/sponsor.html"],
    ["Donate", "prototype-pages/donate.html"],
    ["Events", "prototype-pages/events.html"],
  ] },
  { label: "Programs & Services", href: "prototype-pages/programs-services.html", wide: true, groups: [
    { head: ["Services Overview", "prototype-pages/programs-services.html"], items: [] },
    { head: ["Court-Referred & Diversion", "prototype-pages/court-referred-diversion.html"], items: [
      ["Intoxicated Driver Program", "prototype-pages/intoxicated-driver-program.html"],
      ["AODA Assessments", "prototype-pages/aoda-assessments.html"],
      ["UDAAP", "prototype-pages/udaap.html"],
      ["Hold-Open / Alternative Agreements", "prototype-pages/hold-open-alternative-agreements.html"],
    ] },
    { head: ["Alcohol & Drug Testing", "prototype-pages/alcohol-drug-testing.html"], items: [
      ["Direct Biomarker", "prototype-pages/direct-biomarker.html"],
      ["Urine Testing", "prototype-pages/urine-testing.html"],
      ["Breathalyzer", "prototype-pages/breathalyzer.html"],
      ["Child Guard", "prototype-pages/child-guard.html"],
    ] },
    { head: ["Family Services", "prototype-pages/family-services.html"], items: [
      ["Supervised Visitation / Parenting Time", "prototype-pages/supervised-visitation-parenting-time.html"],
      ["Loved Ones Support Group", "prototype-pages/loved-ones-support-group.html"],
      ["Parent Peer Support", "prototype-pages/parent-peer-support.html"],
    ] },
    { head: ["Prevention & Advocacy", "prototype-pages/prevention-advocacy.html"], items: [
      ["Evidence-Based Prevention Programming", "prototype-pages/evidence-based-prevention-programming.html"],
      ["Mental Health First Aid", "prototype-pages/mental-health-first-aid.html"],
      ["Kenosha County Substance Abuse Coalition", "prototype-pages/kenosha-county-substance-abuse-coalition.html"],
      ["KRW Tobacco-Free Coalition", "prototype-pages/krw-tobacco-free-coalition.html"],
    ] },
    { head: ["Treatment", "prototype-pages/treatment.html"], items: [
      ["Peer Support", "prototype-pages/peer-support.html"],
      ["Moral Reconation Therapy", "prototype-pages/moral-reconation-therapy.html"],
      ["Individual & Group Counseling", "prototype-pages/individual-group-counseling.html"],
    ] },
    { head: ["Risk Reduction", "prototype-pages/risk-reduction.html"], items: [
      ["Public Health Vending Machine", "prototype-pages/public-health-vending-machine.html"],
      ["Safer-Use Support & Supplies", "prototype-pages/safer-use-support-supplies.html"],
    ] },
  ] },
  { label: "Resources", href: "prototype-pages/resources.html", wide: true, groups: [
    { head: ["Resource Library", "prototype-pages/resources.html"], items: [] },
    { head: ["Substance Information", "prototype-pages/substance-information.html"], items: [
      ["Alcohol", "prototype-pages/alcohol.html"],
      ["Cannabis", "prototype-pages/cannabis.html"],
      ["Opioids", "prototype-pages/opioids.html"],
      ["Fentanyl & Xylazine", "prototype-pages/fentanyl-xylazine.html"],
      ["Vaping & E-Cigarettes", "prototype-pages/vaping.html"],
      ["Tobacco & Nicotine", "prototype-pages/tobacco-nicotine.html"],
    ] },
    { head: ["Youth and Teens", "prototype-pages/youth-and-teens.html"], items: [
      ["Talking to Youth About Substance Use", "prototype-pages/talking-to-youth-about-substance-use.html"],
      ["Talking to Teens About Substance Use", "prototype-pages/talking-to-teens-about-substance-use.html"],
      ["Vaping & Nicotine", "prototype-pages/vaping-nicotine.html"],
    ] },
    { head: ["Recovery & Support", "prototype-pages/recovery-support.html"], items: [
      ["Recovery Options", "prototype-pages/recovery-options.html"],
      ["Supporting a Loved One", "prototype-pages/supporting-a-loved-one.html"],
      ["Stigma & Language", "prototype-pages/stigma-and-language.html"],
      ["How to Help Someone Who Does Not Want Help", "prototype-pages/help-someone-who-does-not-want-help.html"],
    ] },
    { head: ["Overdose Prevention", "prototype-pages/overdose-prevention.html"], items: [
      ["Signs of Opioid Overdose", "prototype-pages/signs-of-opioid-overdose.html"],
      ["How to Use Naloxone", "prototype-pages/how-to-use-naloxone.html"],
      ["After an Overdose", "prototype-pages/after-an-overdose.html"],
    ] },
    { head: ["Local Directories", "prototype-pages/local-directories.html"], items: [
      ["Treatment Providers", "prototype-pages/treatment-providers.html"],
      ["MAT Providers", "prototype-pages/mat-providers.html"],
      ["Crisis & Immediate Support", "prototype-pages/crisis-and-immediate-support.html"],
      ["Safe Medication Disposal", "prototype-pages/safe-medication-disposal.html"],
      ["Syringe Service Providers", "prototype-pages/syringe-service-providers.html"],
      ["Vending Machines", "prototype-pages/vending-machines.html"],
    ] },
  ] },
  { label: "Contact", href: "prototype-pages/contact.html", items: [
    ["Contact Us", "prototype-pages/contact.html"],
    ["General Inquiry", "prototype-pages/general-inquiry.html"],
    ["Referral Form", "prototype-pages/referral-form.html"],
    ["Volunteer Interest", "prototype-pages/volunteer-interest.html"],
    ["Request a Speaker", "prototype-pages/request-a-speaker.html"],
  ] },
];

function DropLink({ label, href, strong }) {
  const [hover, setHover] = useState(false);
  return (
    <a href={href}
      onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}
      style={{ display: "block", padding: "5px 8px", margin: "1px -8px", borderRadius: "var(--wf-radius)", fontSize: strong ? "var(--wf-text-body)" : "var(--wf-text-small)", fontWeight: strong ? "var(--wf-weight-bold)" : "var(--wf-weight-regular)", color: hover || strong ? "var(--wf-ink)" : "var(--wf-ink-soft)", background: hover ? "var(--wf-zone)" : "transparent", textDecoration: hover ? "underline" : "none", textUnderlineOffset: 2 }}>{label}</a>
  );
}

function SiteNav({ anno }) {
  const { ImgPlaceholder, CtaButton } = K;
  const [open, setOpen] = useState(-1);
  const [homeHover, setHomeHover] = useState(false);
  const closeTimer = React.useRef(null);
  const cancelClose = () => { if (closeTimer.current) { clearTimeout(closeTimer.current); closeTimer.current = null; } };
  const openHub = (i) => { cancelClose(); setOpen(i); };
  const scheduleClose = () => { cancelClose(); closeTimer.current = setTimeout(() => setOpen(-1), 180); };
  const itemStyle = (active) => ({
    display: "inline-flex", alignItems: "center", gap: 5, cursor: "pointer", padding: "6px 2px",
    font: `var(--wf-weight-${active ? "bold" : "medium"}) var(--wf-text-body)/1 var(--wf-font-sans)`,
    color: "var(--wf-ink)", background: "none", border: "none",
    borderBottom: active ? "2px solid var(--wf-ink)" : "2px solid transparent",
  });
  return (
    <div style={{ position: "relative", background: "var(--wf-surface)", borderBottom: "var(--wf-border-strong)", zIndex: 5 }}>
      <Dot n={2} anno={anno} top={10} right={8} />
      <div style={{ maxWidth: 1160, margin: "0 auto", padding: "14px 56px", display: "flex", alignItems: "center", justifyContent: "space-between", gap: 24 }}>
        <a href="Hope Council - Home.html" style={{ flexShrink: 0 }}>
          <ImgPlaceholder kind="logo" width={132} height={40} style={{ aspectRatio: "auto" }} />
        </a>
        <nav style={{ display: "flex", alignItems: "center", gap: 22 }} onMouseEnter={cancelClose} onMouseLeave={scheduleClose}>
          <a href="Hope Council - Home.html" style={{ ...itemStyle(true), textDecoration: "none" }} onMouseEnter={() => { openHub(-1); setHomeHover(true); }} onMouseLeave={() => setHomeHover(false)}>Home</a>
          {NAV.map((hub, i) => (
            <div key={i} style={{ position: "relative" }} onMouseEnter={() => openHub(i)}>
              <a href={hub.href} style={{ ...itemStyle(open === i), textDecoration: "none" }} aria-haspopup="true" aria-expanded={open === i}>
                {hub.label}<span aria-hidden="true" style={{ fontSize: 9, color: "var(--wf-ink-muted)" }}>▾</span>
              </a>
              {open === i ? (
                <div style={{ position: "absolute", top: "100%", left: hub.wide ? "auto" : 0, right: hub.wide ? 0 : "auto", paddingTop: 8, zIndex: 10 }}>
                  <div style={{ background: "var(--wf-surface)", border: "var(--wf-border-strong)", borderRadius: "var(--wf-radius)", padding: hub.wide ? 20 : "12px 16px", minWidth: hub.wide ? 720 : 240 }}>
                  {hub.wide ? (
                    <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "18px 28px" }}>
                      {hub.groups.map((g, gi) => (
                        <div key={gi}>
                          <DropLink label={g.head[0]} href={g.head[1]} strong />
                          {g.items.map((it, ii) => <DropLink key={ii} label={it[0]} href={it[1]} />)}
                        </div>
                      ))}
                    </div>
                  ) : (
                    hub.items.map((it, ii) => <DropLink key={ii} label={it[0]} href={it[1]} strong={ii === 0} />)
                  )}
                  </div>
                </div>
              ) : null}
            </div>
          ))}
          <span onMouseEnter={() => openHub(-1)}><CtaButton label="Get Help" size="sm" style={{ whiteSpace: "nowrap" }} onClick={() => (window.location.href = "prototype-pages/get-help.html")} /></span>
        </nav>
      </div>
    </div>
  );
}

/* ---- 3. Hero ------------------------------------------------------------- */

function Hero({ anno }) {
  const { ImgPlaceholder, CtaButton } = K;
  return (
    <Band fill="surface" label="Hero" style={{ borderTop: "none" }} pad="56px 56px 52px">
      <div style={{ position: "relative", display: "grid", gridTemplateColumns: "1.1fr 0.9fr", gap: 48, alignItems: "center" }}>
        <Dot n={3} anno={anno} top={-12} left={-12} />
        <div style={{ display: "flex", flexDirection: "column", gap: 20 }}>
          <span style={{ font: "var(--wf-weight-bold) var(--wf-text-label)/1.2 var(--wf-font-sans)", letterSpacing: "var(--wf-tracking-label)", textTransform: "uppercase", color: "var(--wf-ink-muted)" }}>Hope Council</span>
          <h1 style={{ margin: 0, font: "var(--wf-weight-bold) var(--wf-text-h1)/var(--wf-leading-tight) var(--wf-font-sans)", color: "var(--wf-ink)", textWrap: "balance" }}>
            Substance Use Support, Prevention, and Recovery Resources in Kenosha County
          </h1>
          <Para text="Hope Council meets people where they are with practical, judgment-free support for substance use, recovery, prevention, diversion, testing, family needs, and risk reduction. Whether you need help for yourself, someone you love, or your community, you can start here." size="var(--wf-text-h3)" />
          <div style={{ display: "flex", flexWrap: "wrap", gap: 12, marginTop: 6 }}>
            <CtaButton label="Get Help" size="lg" style={{ whiteSpace: "nowrap" }} onClick={() => (window.location.href = "prototype-pages/get-help.html")} />
            <CtaButton label="Contact Hope Council" emphasis="secondary" size="lg" style={{ whiteSpace: "nowrap" }} onClick={() => (window.location.href = "prototype-pages/contact.html")} />
            <CtaButton label="Programs & Services" emphasis="text" size="lg" style={{ whiteSpace: "nowrap" }} onClick={() => (window.location.href = "prototype-pages/programs-services.html")} />
          </div>
        </div>
        <div style={{ position: "relative" }}>
          <Dot n={4} anno={anno} />
          <ImgPlaceholder kind="image" ratio="4:3" note="Hero image — slot, TBD" />
        </div>
      </div>
    </Band>
  );
}

/* ---- 4. Urgent Help Panel ------------------------------------------------ */

function UrgentHelpPanel({ anno }) {
  const tel = { color: "var(--wf-ink)", fontWeight: "var(--wf-weight-bold)", textDecoration: "underline", textUnderlineOffset: 2 };
  const lines = [
    ["If someone is in immediate danger, call ", "911", "tel:911", "."],
    ["If someone may be overdosing, call ", "911", "tel:911", ", give naloxone if available, and stay with the person until help arrives."],
    ["For mental health or substance use crisis support, call or text ", "988", "tel:988", "."],
    ["For local 24/7 crisis support, call ", "262-657-7188", "tel:2626577188", "."],
    ["For Hope Council support during business hours, call ", "262-658-8166", "tel:2626588166", "."],
  ];
  const related = [
    ["Crisis & Immediate Support", "prototype-pages/crisis-and-immediate-support.html"],
    ["Signs of Opioid Overdose", "prototype-pages/signs-of-opioid-overdose.html"],
    ["How to Use Naloxone", "prototype-pages/how-to-use-naloxone.html"],
  ];
  return (
    <Band fill="surface" label="Urgent Help Panel" pad="40px 56px">
      <div style={{ position: "relative", border: "2px solid var(--wf-ink)", borderRadius: "var(--wf-radius)", background: "var(--wf-zone)", padding: "28px 32px" }}>
        <Dot n={5} anno={anno} />
        <div style={{ display: "grid", gridTemplateColumns: "1.6fr 1fr", gap: 36 }}>
          <div style={{ display: "flex", flexDirection: "column", gap: 14 }}>
            <h2 style={{ margin: 0, font: "var(--wf-weight-bold) var(--wf-text-h3)/1.2 var(--wf-font-sans)", color: "var(--wf-ink)" }}>Need help right now?</h2>
            <p style={{ margin: 0, fontSize: "var(--wf-text-body)", color: "var(--wf-ink-soft)" }}>If this is an emergency, use the fastest help available.</p>
            <ul style={{ margin: 0, padding: 0, listStyle: "none", display: "flex", flexDirection: "column", gap: 9 }}>
              {lines.map((l, i) => (
                <li key={i} style={{ fontSize: "var(--wf-text-body)", color: "var(--wf-ink-soft)", paddingLeft: 16, position: "relative", lineHeight: 1.5 }}>
                  <span aria-hidden="true" style={{ position: "absolute", left: 0, color: "var(--wf-ink)" }}>—</span>
                  {l[0]}<a href={l[2]} style={tel}>{l[1]}</a>{l[3]}
                </li>
              ))}
            </ul>
          </div>
          <div style={{ display: "flex", flexDirection: "column", gap: 10, borderLeft: "var(--wf-border)", paddingLeft: 28 }}>
            <span style={{ font: "var(--wf-weight-bold) var(--wf-text-label)/1.2 var(--wf-font-sans)", letterSpacing: "var(--wf-tracking-label)", textTransform: "uppercase", color: "var(--wf-ink-muted)" }}>Related Links</span>
            {related.map((r, i) => (
              <a key={i} href={r[1]} style={{ fontSize: "var(--wf-text-body)", color: "var(--wf-ink)", textDecoration: "underline", textUnderlineOffset: 3 }}>{r[0]}</a>
            ))}
          </div>
        </div>
      </div>
    </Band>
  );
}

/* ---- 5. Situation Pathways (primary wayfinding — dominant) --------------- */

function SituationPathways({ anno }) {
  const cards = [
    ["I need help for myself", "If substance use is affecting your health, relationships, work, safety, or peace of mind, Hope Council can help you talk through options without judgment.", "Help for Myself"],
    ["I am worried about someone", "If you are concerned about a spouse, child, parent, friend, or someone else you care about, you can reach out too. Support is available for loved ones and families.", "Help for a Loved One"],
    ["I have a court or citation requirement", "Hope Council provides court-referred and diversion services, including IDP, AODA assessments, UDAAP, DAAP, Hold-Open / Alternative Agreements, General Diversion, and related requirements.", "Court-Referred & Diversion"],
    ["I need alcohol or substance testing", "Hope Council provides appointment-based testing pathways, including Direct Biomarker, Urine Testing, Breathalyzer, and Child Guard.", "Alcohol & Substance Testing"],
    ["I need naloxone or safer-use supplies", "Hope Council supports risk reduction and harm prevention through the Public Health Vending Machine, naloxone, fentanyl and xylazine test strips, safer-use supplies, safe disposal kits, and no-judgment supply access.", "Risk Reduction"],
    ["I am a parent or caregiver", "Parents and caregivers can find support for talking with youth, understanding changing substance risks, recognizing warning signs, and staying connected.", "Teen Substance Prevention"],
  ];
  return (
    <Band fill="alt" label="Situation Pathways">
      <div style={{ position: "relative" }}>
        <Dot n={6} anno={anno} top={-12} left={-12} />
        <SectionHead kicker="Start here" title="What brings you here today?" intro="You do not need to know the right program name to take a first step. Choose the situation that sounds closest to what you need." />
        <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 22 }}>
          {cards.map((c, i) => <WireCard key={i} title={c[0]} body={c[1]} cta={c[2]} icon big />)}
        </div>
      </div>
    </Band>
  );
}

/* ---- 6. Programs & Services grid ----------------------------------------- */

function ProgramsServices({ anno }) {
  const { CtaButton } = K;
  const cards = [
    ["Court-Referred & Diversion", "Support for court or citation-related requirements, including Intoxicated Driver Program, AODA Assessments, UDAAP, DAAP, Hold-Open / Alternative Agreements, General Diversion, and related pathways.", "View Court-Referred & Diversion"],
    ["Alcohol & Substance Testing", "Appointment-based testing pathways, including Direct Biomarker, Urine Testing, Breathalyzer, Child Guard, and related testing services.", "View Alcohol & Substance Testing"],
    ["Family Services", "Support for families and loved ones, including Supervised Visitation / Parenting Time, Loved Ones Support Group, and Parent Peer Support.", "View Family Services"],
    ["Prevention & Advocacy", "Evidence-based prevention programming, Mental Health First Aid, Trauma-Informed Care Training, coalition work, tobacco-free advocacy, and community education.", "View Prevention & Advocacy"],
    ["Treatment & Recovery Support", "Support for people navigating substance use, recovery, and next steps, including Peer Support, Recovery Coaching, Navigation, Moral Reconation Therapy, and Individual & Group Counseling.", "View Treatment & Recovery Support"],
    ["Risk Reduction & Harm Prevention", "No-judgment access to practical tools and support, including the Public Health Vending Machine, naloxone, fentanyl and xylazine test strips, safer-use supplies, and safe disposal kits.", "View Risk Reduction"],
  ];
  return (
    <Band fill="surface" label="Programs & Services">
      <div style={{ position: "relative" }}>
        <Dot n={7} anno={anno} top={-12} left={-12} />
        <SectionHead kicker="What we offer" title="Programs &amp; Services" intro="Hope Council's services are organized around practical starting points: court-referred and diversion services, testing, family services, prevention and advocacy, treatment and recovery support, and risk reduction." />
        <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 18 }}>
          {cards.map((c, i) => <WireCard key={i} title={c[0]} body={c[1]} cta={c[2]} />)}
        </div>
        <div style={{ marginTop: 28 }}>
          <CtaButton label="View All Programs & Services" emphasis="secondary" style={{ whiteSpace: "nowrap" }} onClick={() => (window.location.href = "prototype-pages/programs-services.html")} />
        </div>
      </div>
    </Band>
  );
}

Object.assign(window, {
  Dot, Para, Band, SectionHead, WireCard,
  SiteUtilityStrip, SiteNav, Hero, UrgentHelpPanel, SituationPathways, ProgramsServices,
});
