/* eslint-disable */
// Sabbatical — trip-duration hub. Mirrors the three-day template's editorial vocabulary
// (cream/teal/tan, Playfair + DM Sans/Mono, numbered sections, hero masthead).

const { useState: useSBState } = React;

/* ---------- HERO ---------- */
const SBHero = () => (
  <section className="solo-hero">
    <div
      className="hero-bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1469474968028-56623f02e42e?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-duration/">Trip Duration</a>
        <span className="sep">/</span>
        <span className="here">Sabbatical</span>
      </div>

      <div className="solo-mast">
        <div className="lhs">
          <span className="layer-tag">A MONTH OR MORE · 32 GUIDES · {SB_META.newThisSeason} NEW THIS SEASON</span>
          <h1>
            Sabbatical<em>.</em>
          </h1>
          <p className="lede">
            The long trip you plan for. <em>One region, two-week bases,</em> a 25% buffer in a separate account. Long enough to stop being a tourist. Slow enough to come home different. Twelve regions worth a month or more, eight ways to take the time, and the brief on what changes when the trip is no longer a vacation.
          </p>
        </div>
        <div className="rhs">
          <div className="solo-meta-card">
            <div className="row">
              <span className="k">Guides on file</span>
              <span className="v"><em>{SB_META.count}</em></span>
            </div>
            <div className="row">
              <span className="k">New this season</span>
              <span className="v">{SB_META.newThisSeason}</span>
            </div>
            <div className="row">
              <span className="k">Trip length</span>
              <span className="v">30 – 180 days</span>
            </div>
            <div className="row">
              <span className="k">Most-read age</span>
              <span className="v">{SB_META.topAge}</span>
            </div>
            <div className="row last">
              <span className="k">Updated</span>
              <span className="v">{SB_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>Twelve regions</a>
        <span className="dot">·</span>
        <a href="#field"><span className="n">II</span>Field notes</a>
        <span className="dot">·</span>
        <a href="#itins"><span className="n">III</span>Eight ways</a>
        <span className="dot">·</span>
        <a href="#bucket"><span className="n">IV</span>Sabbatical matrix</a>
        <span className="dot">·</span>
        <a href="#reading"><span className="n">V</span>Reading list</a>
        <span className="dot">·</span>
        <a href="#voices"><span className="n">VI</span>The desk</a>
        <span className="dot">·</span>
        <a href="#practical"><span className="n">VII</span>The brief</a>
        <span className="dot">·</span>
        <a href="#faq"><span className="n">VIII</span>FAQ</a>
      </div>
    </div>

    <div className="hero-coord">FORM Nº 07 · 30+ DAYS · ONE REGION</div>
    <div className="hero-credit">PHOTO — FIELD DESK Nº 119 · IRIS</div>
  </section>
);

/* ---------- I · TWELVE REGIONS ---------- */
const SBPlaces = () => {
  const [region, setRegion] = useSBState("All");
  const regions = ["All", "Europe", "Asia", "Americas", "Africa", "Middle East"];
  const filtered = SB_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 regions,<em>the long way.</em></h2>
            <p>Picked because the place actually rewards a month-or-more study — visa-friendly, cost-honest, dense enough to repay staying put. Each card opens a real long-term plan, budget, or transit guide already on file.</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> days</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 {SB_PLACES.length}</span>
          <a href="/en/plan/trip-duration/">All trip durations <Icon name="arrow" size={12} /></a>
        </div>
      </div>
    </section>
  );
};

/* ---------- II · FIELD NOTES ---------- */
const SBField = () => (
  <section className="solo-practical" id="field" style={{ paddingTop: 110, paddingBottom: 110 }}>
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">II</div>
        <div className="titles">
          <h2>Field notes.<em>Why a month is the floor.</em></h2>
          <p>The opening pages of the desk's house essay on the sabbatical — what makes it different from a long vacation, and why the first month doesn't count.</p>
        </div>
        <div className="right">Read the full essay <Icon name="arrow" size={12} /></div>
      </div>

      <blockquote style={{
        fontFamily: "var(--serif)",
        fontSize: "clamp(22px, 2.4vw, 30px)",
        lineHeight: 1.45,
        color: "var(--cream)",
        fontStyle: "italic",
        maxWidth: 920,
        borderLeft: "1px solid var(--tan)",
        padding: "8px 0 8px 32px",
        marginBottom: 28,
      }}>
        "A sabbatical is the trip you stop being a tourist on. A two-week trip ends before that happens; a month-plus trip is built around the moment it does. The first three weeks, you're still on vacation — checking in, taking pictures, eating out twice a day. Then something shifts. You buy groceries. You learn the bus. You find the café you go back to. That's when the trip starts. Plan for a trip that begins on day 31."
      </blockquote>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
        marginBottom: 18,
      }}>
        The most common mistake is treating a three-month plan like a stretched two-week plan. It isn't. A two-week plan moves; a three-month plan plants. Two-week plans book everything; three-month plans book the first week. Two-week plans want a packed itinerary; three-month plans want margin — for the place you didn't expect to love, the friend you make in week three, the visa run that takes a day longer than you thought.
      </p>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
      }}>
        What you protect, in those long weeks, is the slowness itself. The plan isn't the trip. The plan is what makes room for the trip to surprise you on a Wednesday in week six.
      </p>
      <p style={{
        marginTop: 32,
        fontFamily: "var(--mono)",
        fontSize: 11,
        letterSpacing: "0.18em",
        color: "var(--tan)",
        textTransform: "uppercase",
      }}>— Iris Mendoza, Itineraries Desk · House essay Nº 07</p>
    </div>
  </section>
);

/* ---------- III · EIGHT WAYS ---------- */
const SBItins = () => (
  <section className="solo-itins" id="itins">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">III</div>
        <div className="titles">
          <h2>Eight ways<em>to take the time.</em></h2>
          <p>The packing lists, visa briefs, and rail passes that turn a month-or-more idea into a moving trip. Each is a complete operational guide already on file, hand-walked by the desk.</p>
        </div>
        <div className="right">All 32 long-form plans <Icon name="arrow" size={12} /></div>
      </div>

      <div className="itins-grid">
        {SB_ITINS.map(it => (
          <a key={it.ref} href={it.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 · MATRIX ---------- */
const SBByStyle = () => (
  <section className="solo-length" id="bucket">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">IV</div>
        <div className="titles">
          <h2>The sabbatical<em>matrix.</em></h2>
          <p>Six honest shapes for a month-or-more trip. Pick the row that matches the life you're trying to interrupt — not the trip you think you should want.</p>
        </div>
        <div className="right">Pace planner <Icon name="arrow" size={12} /></div>
      </div>

      <div className="length-table">
        <div className="row head">
          <div>Sabbatical shape</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>
        {SB_BY_STYLE.map(l => (
          <a href="/en/plan/trip-duration/" key={l.len} className="row">
            <div className="lbl">{l.len}</div>
            <div className="d"><em>{l.days}</em></div>
            <div className="ct">{l.count} guides</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 · READING LIST ---------- */
const SBReading = () => (
  <section className="solo-reading" id="reading">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">V</div>
        <div className="titles">
          <h2>Eight reads,<em>by depth.</em></h2>
          <p>The pieces sitting one click below this page. The first is the house method; the rest are real budgets and on-the-ground transit guides, hand-built. Read in order or skip to the region you're already half-planning.</p>
        </div>
        <div className="right">All long-form essays <Icon name="arrow" size={12} /></div>
      </div>

      <div className="reading-list">
        {SB_READING.map((r, i) => (
          <a key={i} href={r.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>
);

/* ---------- VI · DESK ---------- */
const SBVoices = () => (
  <section className="solo-voices" id="voices">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">VI</div>
        <div className="titles">
          <h2>The Itineraries desk.<em>Three editors on the long form.</em></h2>
          <p>The sabbatical is the trip the desk takes most often and writes about least. These are the people writing it — what they go for, and what they keep coming back to.</p>
        </div>
        <div className="right">Desk masthead <Icon name="arrow" size={12} /></div>
      </div>

      <div className="voices-grid">
        {SB_VOICES.map(v => (
          <article key={v.name} className="voice">
            <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} field trips</span>
              <a href="/en/plan/trip-duration/">Read their lane <Icon name="arrow" size={12} /></a>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VII · BRIEF ---------- */
const SBPractical = () => (
  <section className="solo-practical" id="practical">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">VII</div>
        <div className="titles">
          <h2>The brief.<em>Six tips, in order of importance.</em></h2>
          <p>The non-obvious things. Tested on the road, ordered by how much they matter to the month-or-more form.</p>
        </div>
        <div className="right">Full planning guide <Icon name="arrow" size={12} /></div>
      </div>

      <div className="practical-grid">
        {SB_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>
);

/* ---------- VIII · FAQ ---------- */
const SBFAQ = () => {
  const [open, setOpen] = useSBState(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>readers send in.</em></h2>
                <p>Lightly edited reader letters about the sabbatical. If yours isn't here, the planning desk reads every email.</p>
              </div>
            </div>
            <a href="mailto:itineraries@howto.travel" className="ask">Ask the desk →</a>
          </div>
          <div className="rhs">
            {SB_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 SBCTA = () => (
  <section className="solo-cta">
    <div
      className="bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1528127269322-539801943592?w=2000&q=80)` }}
    ></div>
    <div className="inner">
      <div className="kicker">PICK ONE REGION · LOCK THE DATES · BOOK ONE WEEK</div>
      <h2>Plan a sabbatical<em>that ends well.</em></h2>
      <p>Open a region, copy the long-form plan, read the brief, lock the dates with HR. A month or more. One base every two weeks. The version of the trip you come home from changed.</p>
      <div className="cta-actions">
        <a href="/en/types/long-term/how-to-plan-sabbatical" className="btn-p">Read the full method →</a>
        <a href="/en/plan/trip-duration/" className="btn-g">↑ Back to Trip Duration</a>
      </div>
    </div>
    <div className="coord">SABBATICAL · FORM Nº 07 · UPDATED 06.05.2026</div>
    <div className="coord right">FIELD DESK Nº 119</div>
  </section>
);

/* ---------- COMPOSE ---------- */
const SBApp = () => (
  <div data-screen-label="Sabbatical">
    <SBHero />
    <SBPlaces />
    <SBField />
    <SBItins />
    <SBByStyle />
    <SBReading />
    <SBVoices />
    <SBPractical />
    <SBFAQ />
    <SBCTA />
    <Footer />
  </div>
);

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