/* eslint-disable */
// Adventure — leaf menu page. Layout mirrors solo-app.jsx.
// CSS class names preserved: solo-page body class, solo-* prefixes throughout.

const { useState: useAState } = React;

/* ---------- HERO ---------- */
const AdventureHero = () => (
  <section className="solo-hero">
    <div
      className="hero-bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=2400&q=85)` }}
    ></div>
    <div className="hero-scrim"></div>
    <Nav />

    <div className="container">
      <div className="solo-crumbs">
        <a href="/">Home</a>
        <span className="sep">/</span>
        <a href="/en/plan/">Plan</a>
        <span className="sep">/</span>
        <a href="/en/plan/trip-types/">Trip Types</a>
        <span className="sep">/</span>
        <span className="here">Adventure</span>
      </div>

      <div className="solo-mast">
        <div className="lhs">
          <span className="layer-tag">FOR THE BODY · {ADVENTURE_META.count} GUIDES · {ADVENTURE_META.newThisSeason} NEW THIS SEASON</span>
          <h1>
            Adventure<em>Travel.</em>
          </h1>
          <p className="lede">
            When the trip <em>is</em> the activity. Trekking, diving, climbing — the routes where the gear list is long, the elevation profile is not decorative, and "comfortable" was never on the table.
          </p>
        </div>
        <div className="rhs">
          <div className="solo-meta-card">
            <div className="row">
              <span className="k">Guides on file</span>
              <span className="v"><em>{ADVENTURE_META.count}</em></span>
            </div>
            <div className="row">
              <span className="k">New this season</span>
              <span className="v">{ADVENTURE_META.newThisSeason}</span>
            </div>
            <div className="row">
              <span className="k">Avg trip length</span>
              <span className="v">{ADVENTURE_META.avgLengthDays} days</span>
            </div>
            <div className="row">
              <span className="k">Most-read age</span>
              <span className="v">{ADVENTURE_META.topAge}</span>
            </div>
            <div className="row last">
              <span className="k">Updated</span>
              <span className="v">{ADVENTURE_META.updated}</span>
            </div>
          </div>
        </div>
      </div>

      <div className="solo-toc">
        <span className="lbl">In this issue</span>
        <a href="#places"><span className="n">I</span>The shortlist</a>
        <span className="dot">·</span>
        <a href="#styles"><span className="n">II</span>Six disciplines</a>
        <span className="dot">·</span>
        <a href="#itins"><span className="n">III</span>Itineraries</a>
        <span className="dot">·</span>
        <a href="#length"><span className="n">IV</span>By trip length</a>
        <span className="dot">·</span>
        <a href="#practical"><span className="n">V</span>The brief</a>
        <span className="dot">·</span>
        <a href="#reading"><span className="n">VI</span>Reading list</a>
        <span className="dot">·</span>
        <a href="#voices"><span className="n">VII</span>The desk</a>
        <span className="dot">·</span>
        <a href="#faq"><span className="n">VIII</span>FAQ</a>
      </div>
    </div>

    <div className="hero-coord">49°19′S · 72°53′W · EL CHALTÉN</div>
    <div className="hero-credit">PHOTO — FIELD DESK Nº 088 · CALLUM</div>
  </section>
);

/* ---------- I · SHORTLIST ---------- */
const AdventurePlaces = () => {
  const [region, setRegion] = useAState("All");
  const regions = ["All", "Americas", "Europe", "Asia", "Oceania"];
  const filtered = ADVENTURE_PLACES.filter(p => region === "All" || p.region === region);

  return (
    <section className="solo-places" id="places">
      <div className="container">
        <div className="solo-section-head">
          <div className="num">I</div>
          <div className="titles">
            <h2>Twelve destinations,<em>field-tested.</em></h2>
            <p>Picked by editors who have done the routes — not because they're scenic, but because the terrain, the operators, and the access make for a trip that holds up when the weather turns.</p>
          </div>
          <div className="filter-pills">
            {regions.map(r => (
              <button
                key={r}
                className={`f-pill ${region === r ? "on" : ""}`}
                onClick={() => setRegion(r)}
              >{r}</button>
            ))}
          </div>
        </div>

        <div className="places-grid">
          {filtered.map((p, i) => (
            <a key={p.id} href={p.href || "#"} className={`place-card ${i === 0 ? "feature" : ""}`}>
              <div className="img" style={{ backgroundImage: `url(${p.img})` }}></div>
              <div className="scrim"></div>
              <span className="rank">No. {String(p.rank).padStart(2, "0")}</span>
              {p.tag && <span className="tag">{p.tag}</span>}
              <div className="body">
                <div className="loc">
                  <span className="city">{p.city}</span>
                  <span className="country">{p.country}</span>
                </div>
                <p className="why">{p.why}</p>
                <div className="meta">
                  <span><em>{p.nights}</em> nights</span>
                  <span className="sep">·</span>
                  <span>{p.budget}</span>
                  <span className="sep">·</span>
                  <span>{p.season}</span>
                </div>
                <div className="best-for">
                  {p.best.map(b => <span key={b}>{b}</span>)}
                </div>
                <div className="coord">{p.coord}</div>
              </div>
            </a>
          ))}
        </div>
        <div className="places-foot">
          <span className="ct">Showing {filtered.length} of {ADVENTURE_PLACES.length}</span>
          <a href="#">All {ADVENTURE_META.count} adventure destinations <Icon name="arrow" size={12} /></a>
        </div>
      </div>
    </section>
  );
};

/* ---------- II · DISCIPLINES ---------- */
const AdventureStyles = () => (
  <section className="solo-styles" id="styles">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">II</div>
        <div className="titles">
          <h2>Six disciplines.<em>One trip.</em></h2>
          <p>Adventure travel is not one thing. The logistics, fitness requirements, and safety briefing for a liveaboard dive trip are different from a ridge traverse. Pick the discipline; we'll point you to the right guides.</p>
        </div>
        <div className="right">All six lanes <Icon name="arrow" size={12} /></div>
      </div>

      <div className="styles-grid">
        {ADVENTURE_STYLES.map(s => (
          <a key={s.id} href="#" className="style-card">
            <div className="pic" style={{ backgroundImage: `url(${s.img})` }}>
              <span className="num-r">{s.num}</span>
            </div>
            <div className="body">
              <h3>{s.title} <em>{s.em}</em></h3>
              <p>{s.desc}</p>
              <div className="foot">
                <span className="ct">{s.count}</span>
                <span className="go">Open lane <Icon name="arrow" size={12} /></span>
              </div>
            </div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- III · ITINERARIES ---------- */
const AdventureItins = () => (
  <section className="solo-itins" id="itins">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">III</div>
        <div className="titles">
          <h2>Eight itineraries<em>to copy.</em></h2>
          <p>Day-by-day plans built and walked by the desk. Each covers approach logistics, acclimatization days, and a realistic budget that includes gear hire and emergency funds.</p>
        </div>
        <div className="right">All itineraries <Icon name="arrow" size={12} /></div>
      </div>

      <div className="itins-grid">
        {ADVENTURE_ITINS.map(it => (
          <a key={it.ref} href="#" className="itin-card">
            <div className="pic" style={{ backgroundImage: `url(${it.img})` }}>
              <span className="ref-pill">{it.ref}</span>
              <span className="day-pill"><em>{it.days}</em><span className="d">days</span></span>
            </div>
            <div className="body">
              <h4>{it.title}<em> {it.em}</em></h4>
              <div className="tags">
                {it.tags.map(t => <span key={t}>{t}</span>)}
              </div>
              <div className="foot">
                <span className="by">By {it.author}</span>
                <span className="price">{it.price}</span>
              </div>
            </div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- IV · BY LENGTH ---------- */
const AdventureByLength = () => (
  <section className="solo-length" id="length">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">IV</div>
        <div className="titles">
          <h2>By the<em>day count.</em></h2>
          <p>How long do you have? Pick a row. Some of the most satisfying adventure trips in this guide are under nine days. Others need three weeks to do them honestly.</p>
        </div>
        <div className="right">Pace planner <Icon name="arrow" size={12} /></div>
      </div>

      <div className="length-table">
        <div className="row head">
          <div>Trip window</div>
          <div className="d">Days</div>
          <div className="ct">Guides</div>
          <div className="ex">Best examples</div>
          <div className="pr">Starting</div>
          <div></div>
        </div>
        {ADVENTURE_BY_LENGTH.map(l => (
          <a href="#" key={l.len} className="row">
            <div className="lbl">{l.len}</div>
            <div className="d"><em>{l.days}</em></div>
            <div className="ct">{l.count}</div>
            <div className="ex">{l.examples}</div>
            <div className="pr">{l.price}</div>
            <div className="go"><Icon name="arrow" size={14} /></div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- V · PRACTICAL BRIEF ---------- */
const AdventurePractical = () => (
  <section className="solo-practical" id="practical">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">V</div>
        <div className="titles">
          <h2>The brief.<em>Six things that matter, in order.</em></h2>
          <p>What the guidebooks summarize in three sentences, unpacked. The order is intentional: fitness first, insurance last only because most people get the others right first.</p>
        </div>
        <div className="right">Full safety guide <Icon name="arrow" size={12} /></div>
      </div>

      <div className="practical-grid">
        {ADVENTURE_PRACTICAL.map((p, i) => (
          <div key={i} className="pr-card">
            <div className="num">{String(i + 1).padStart(2, "0")}</div>
            <div className="kind">{p.k}</div>
            <h4>{p.h}</h4>
            <p>{p.b}</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VI · READING LIST ---------- */
const AdventureReading = () => (
  <section className="solo-reading" id="reading">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">VI</div>
        <div className="titles">
          <h2>The reading list.<em>Eight essays from the field.</em></h2>
          <p>The pieces written after the trip, not before it. If you read two, read the altitude one and the insurance one — both have saved readers significant money and one has saved a life.</p>
        </div>
        <div className="right">All Adventure essays <Icon name="arrow" size={12} /></div>
      </div>

      <div className="reading-list">
        {ADVENTURE_READING.map((r, i) => (
          <a key={i} href="#" className="r-row">
            <div className="n">{String(i + 1).padStart(2, "0")}</div>
            <div className="tag">{r.tag}</div>
            <div className="t">{r.title}<em>{r.em}</em></div>
            <div className="by">{r.author}</div>
            <div className="dur">{r.duration}</div>
            <div className="go"><Icon name="arrow" size={12} /></div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VII · THE DESK ---------- */
const AdventureDesk = () => (
  <section className="solo-voices" id="voices">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">VII</div>
        <div className="titles">
          <h2>The Adventure desk.<em>Four editors, 125 expeditions.</em></h2>
          <p>The desk covers four disciplines and three continents of regular rotation. These are the people writing it — what draws them back and what they've learned to stop doing.</p>
        </div>
        <div className="right">Desk masthead <Icon name="arrow" size={12} /></div>
      </div>

      <div className="voices-grid" style={{ gridTemplateColumns: "repeat(4, 1fr)" }}>
        {ADVENTURE_DESK.map((v, idx) => (
          <article key={v.name} className="voice"
            style={idx === 0 ? { paddingLeft: 0, paddingRight: 36 } : idx === ADVENTURE_DESK.length - 1 ? { paddingLeft: 36, paddingRight: 0, borderRight: "none" } : { paddingLeft: 36, paddingRight: 36 }}>
            <div className="av" style={{ backgroundImage: `url(${v.av})` }}></div>
            <div className="who">
              <div className="name">{v.name}</div>
              <div className="role">{v.role}</div>
            </div>
            <p className="line">"{v.line}"</p>
            <div className="foot">
              <span className="trips">{v.trips} expeditions</span>
              <a href="#">Read their lane <Icon name="arrow" size={12} /></a>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VIII · FAQ ---------- */
const AdventureFAQ = () => {
  const [open, setOpen] = useAState(0);
  return (
    <section className="solo-faq" id="faq">
      <div className="container">
        <div className="faq-shell">
          <div className="lhs">
            <div className="solo-section-head stacked">
              <div className="num">VIII</div>
              <div className="titles">
                <h2>The questions<em>we get a lot.</em></h2>
                <p>Questions from readers in the planning phase, answered without the hedging you find in most outdoor guides.</p>
              </div>
            </div>
            <a href="mailto:adventure@howto.travel" className="ask">Ask the desk →</a>
          </div>
          <div className="rhs">
            {ADVENTURE_FAQS.map((f, i) => (
              <div key={i} className={`f-item ${open === i ? "open" : ""}`} onClick={() => setOpen(open === i ? -1 : i)}>
                <div className="q">
                  <span className="qt">{f.q}</span>
                  <span className="tg">+</span>
                </div>
                <div className="a">{f.a}</div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

/* ---------- CTA ---------- */
const AdventureCTA = () => (
  <section className="solo-cta">
    <div
      className="bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=2000&q=80)` }}
    ></div>
    <div className="inner">
      <div className="kicker">PICK A ROUTE · BOOK A PERMIT · TRAIN FOR THE LOAD</div>
      <h2>Plan an adventure trip<em>the right way.</em></h2>
      <p>Open the shortlist, copy an itinerary, read the brief. The preparation takes longer than the trip. That is the point.</p>
      <div className="cta-actions">
        <button className="btn-p">Open the shortlist →</button>
        <a href="/en/plan/trip-types/" className="btn-g">↑ Back to Trip Types</a>
      </div>
    </div>
    <div className="coord">ADVENTURE · LANE 05 · UPDATED 26.04.2026</div>
    <div className="coord right">FIELD DESK Nº 088</div>
  </section>
);

/* ---------- COMPOSE ---------- */
const AdventureApp = () => (
  <div data-screen-label="Adventure Lane">
    <AdventureHero />
    <AdventurePlaces />
    <AdventureStyles />
    <AdventureItins />
    <AdventureByLength />
    <AdventurePractical />
    <AdventureReading />
    <AdventureDesk />
    <AdventureFAQ />
    <AdventureCTA />
    <Footer />
  </div>
);

ReactDOM.createRoot(document.getElementById("root")).render(<AdventureApp />);
