const { SectionHeading, Accordion, Button, Icon } = window.AntelopeDashDesignSystem_4664c0;

const FAQ_GROUPS = [
  {
    category: "Registration & Pricing",
    items: [
      { q: "How do I register?", a: <p style={{ margin: 0 }}>All registration is handled online through UltraSignup. Hit any <strong>Register</strong> button on this site to head straight to our sign-up page.</p> },
      { q: "How much does it cost?", a: <p style={{ margin: 0 }}>The 4-Mile Dash is <strong>$45</strong> and the 8-Mile Dash is <strong>$60</strong>. Prices increase as race day approaches, so register early to lock in the lowest rate.</p> },
      { q: "Is there race-day registration?", a: <p style={{ margin: 0 }}>We strongly encourage registering online in advance. Race-day registration may be available on a limited, first-come basis if the field hasn't filled — but we can't guarantee a spot or a shirt in your size.</p> },
      { q: "What is your refund or cancellation policy?", a: <p style={{ margin: 0 }}>All registrations are <strong>non-refundable</strong>. We're happy to help you change your race distance, but we can't refund the price difference.</p> },
    ],
  },
  {
    category: "Race Day",
    items: [
      { q: "What time do the races start?", a: <p style={{ margin: 0 }}>The 8-Mile Dash starts at <strong>9:00 AM</strong> and the 4-Mile Dash starts at <strong>9:15 AM</strong>. Plan to arrive early to park, pick up your packet, and warm up.</p> },
      { q: "When and where is packet pickup?", a: <p style={{ margin: 0 }}>Race-day packet pickup opens at <strong>7:30 AM</strong> at the start line in Curt Gowdy State Park. There is no early/expo pickup.</p> },
      { q: "Is there a course cut-off time?", a: <p style={{ margin: 0 }}>Yes — all runners must finish by <strong>12:00 PM</strong>. The course stays open until then, which is plenty of time for walkers and first-time trail runners to finish comfortably.</p> },
      { q: "What should I bring?", a: <p style={{ margin: 0 }}>Your own hydration (this is a cupless race), trail shoes, weather-appropriate layers, and park day-use fee. Wyoming mountain weather changes fast, so pack for sun and wind.</p> },
    ],
  },
  {
    category: "Course & Trails",
    items: [
      { q: "What is the terrain like?", a: <p style={{ margin: 0 }}>Single-track trail through Curt Gowdy's signature granite boulders and pine forest — rolling climbs, rocky technical sections, and fast, flowing descents.</p> },
      { q: "How much elevation gain is there?", a: <p style={{ margin: 0 }}>The 4-Mile Dash climbs roughly <strong>490 ft</strong> and the 8-Mile Dash roughly <strong>1,000 ft</strong>. Both are honest trail courses with real climbing.</p> },
      { q: "How is the course marked?", a: <p style={{ margin: 0 }}>The course is marked with <strong>colored flagging specific to each race distance</strong>, with volunteers at key junctions. We'll email additional details before race day, and route maps and GPX files are on the race cards.</p> },
      { q: "What's the headphones policy?", a: <p style={{ margin: 0 }}>Headphones are permitted but <strong>strongly discouraged</strong> for safety. If you run with music, please use bone-conduction headphones or keep one earbud out at all times so you can hear verbal cues from other runners.</p> },
      { q: "Can I preview the course beforehand?", a: <p style={{ margin: 0 }}>Absolutely. Curt Gowdy State Park is open year-round — download the GPX from each race card and run or hike the loop anytime (a day-use fee applies).</p> },
    ],
  },
  {
    category: "Logistics & Amenities",
    items: [
      { q: "Where do I park, and is there a fee?", a: <p style={{ margin: 0 }}>Please park at the <strong>Aspen Grove Trailhead</strong> in Curt Gowdy State Park. A Wyoming State Parks day-use fee applies and can be paid at the kiosk on entry (it's not included in registration). Parking is limited, so carpooling is highly encouraged.</p> },
      { q: "What's provided at the aid station?", a: <p style={{ margin: 0 }}>There is <strong>one aid station</strong> on course — 8-Mile runners reach it around mile 6 and 4-Mile runners around mile 2. It's stocked with water and basic electrolytes only. As this is the only official aid, plan accordingly and carry your own hydration (cupless event).</p> },
      { q: "Are dogs allowed on the course?", a: <p style={{ margin: 0 }}>Yes — dogs are welcome but must be <strong>leashed</strong>, and please bring supplies to clean up after your pet. These are narrow single-track trails, so be courteous when letting others pass.</p> },
      { q: "What else might I encounter on the trail?", a: <p style={{ margin: 0 }}>This is an open trail event, so you may share the trail with wildlife, horses, hikers, and mountain bikers. Stay alert and share the trail responsibly.</p> },
      { q: "Can I volunteer?", a: <p style={{ margin: 0 }}>We rely on volunteers to make this event a success! If you'd like to help out, email the race directors at <a href="mailto:volunteer@antelopedash.org" style={{ color: "var(--copper-600)", fontWeight: 600 }}>volunteer@antelopedash.org</a>.</p> },
    ],
  },
  {
    category: "Giving & Donations",
    items: [
      { q: "Can I make a donation?", a: <p style={{ margin: 0 }}>Yes, and thank you — donations help us keep entry fees low and give back to the trails and community we run on. If you'd like to contribute, email us at <a href="mailto:donations@antelopedash.org" style={{ color: "var(--copper-600)", fontWeight: 600 }}>donations@antelopedash.org</a> and we'll help you set it up.</p> },
      { q: "Where do donations go?", a: <p style={{ margin: 0 }}>Every gift supports two causes close to this race: <strong>Curt Gowdy State Park</strong> — trail maintenance, erosion repair, and course improvements that keep the singletrack wild and runnable — and <strong>Albany County Search &amp; Rescue</strong>, funding gear and training for the volunteer crews who answer the call when someone needs help in the backcountry.</p> },
    ],
  },
];

// Compact homepage teaser — links out to the full FAQ page.
function FaqCta() {
  return (
    <section id="faq" style={{ padding: "56px 24px", background: "#fff", borderTop: "1px solid var(--slate-200)" }}>
      <div style={{ maxWidth: "56rem", margin: "0 auto", background: "var(--slate-100)", border: "1px solid var(--slate-200)", borderRadius: "var(--radius-lg)", padding: "36px 32px", display: "flex", alignItems: "center", justifyContent: "space-between", gap: 24, flexWrap: "wrap" }}>
        <div style={{ display: "flex", alignItems: "center", gap: 20, minWidth: 260, flex: "1 1 auto" }}>
          <span style={{ background: "var(--teal-600)", color: "#fff", padding: 14, borderRadius: "var(--radius-md)", display: "inline-flex", flex: "none" }}><Icon name="help-circle" size={26} /></span>
          <div>
            <h3 style={{ fontFamily: "var(--font-heading)", fontWeight: 700, fontSize: 22, color: "var(--slate-800)", margin: 0 }}>Have questions about race day?</h3>
            <p style={{ margin: "4px 0 0", color: "var(--text-body)", lineHeight: 1.5 }}>Registration, parking, aid stations, dogs, headphones and more — it's all covered.</p>
          </div>
        </div>
        <Button variant="primary" as="a" href="faq.html">Read the Full FAQ <Icon name="arrow-right" size={18} /></Button>
      </div>
    </section>
  );
}

window.FAQ_GROUPS = FAQ_GROUPS;
window.FaqCta = FaqCta;
