/* ================================================================
   Trip Builder page (/trip-builder) — one hero, two audiences: a "Khách lẻ"
   (B2C lead form, TripInquiryForm) and "Doanh nghiệp" (the B2BRequestWizard
   also mounted at /khach-doan; see corporate-events.css for the wizard's own
   styles — this file only owns the page's hero + the tab shell around both
   panels). Signature: the wizard's 5 real steps previewed as stops on a
   dashed route line — a travel-company way to say "here's the journey your
   request takes," using the site's existing ruler-tick eyebrow device. The
   route preview only makes sense for the B2B tab, so it's hidden on B2C.
   ================================================================ */
.tb {
  background: #f4fafd;
  color: #123642;
  font-family: var(--font-body);
  min-height: 100vh;
}

/* The [hidden] attribute must always win over component display rules. */
.tb [hidden] { display: none !important; }

/* ── Hero ── */
.tb-hero {
  position: relative;
  overflow: hidden;
  margin-top: 68px;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: #f4fafd;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(18, 54, 66, 0.08) 1px, transparent 0);
  background-size: 22px 22px;
}
/* Fade the dot grid out toward the left so it reads as texture behind the
   route stops, not noise behind the headline. Sits behind .tb-hero-inner
   (z-index below), not on top of it. */
.tb-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(ellipse at center, #f4fafd 30%, rgba(244, 250, 253, 0) 80%);
}
.tb-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 5rem);
  text-align: center;
}
.tb-hero-copy { max-width: 620px; margin: 0 auto; }
.tb-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ef7b45;
  margin-bottom: 1.1rem;
  position: relative;
  padding: 0 3.2rem;
}
/* Ruler tick — echoes the manifesto label's device */
.tb-hero-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2.4rem;
  height: 1px;
  background: #ef7b45;
}
.tb-hero-eyebrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 2.4rem;
  height: 1px;
  background: #ef7b45;
}
.tb-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #123642;
  margin: 0 0 1.15rem;
}
.tb-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: #08415c;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 10px 24px -12px rgba(8, 65, 92, 0.5);
}
.tb-hero-cta:hover {
  background: var(--rust, #1D5D82);
  transform: translateY(-1px);
}
.tb-hero-cta:focus-visible {
  outline: 3px solid var(--ochre, #2B7CB8);
  outline-offset: 2px;
}
.tb-hero-cta svg { transition: transform 0.25s; }
.tb-hero-cta:hover svg { transform: translateX(3px); }

/* ── Route preview — the wizard's 5 real steps as stops on a dashed line.
   Decorative wayfinding, not interactive: clicking anywhere still lands on
   the CTA above; this just previews what's ahead before the visitor commits. ── */
.tb-route {
  list-style: none;
  display: flex;
  gap: 0;
  max-width: 820px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tb-route::-webkit-scrollbar { display: none; }
.tb-route-stop {
  position: relative;
  flex: 1 0 auto;
  min-width: 118px;
  padding-top: 2.6rem;
  text-align: center;
}
/* Dashed connector running through every stop; hidden past the last one. */
.tb-route-stop::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  width: 100%;
  height: 0;
  border-top: 2px dashed rgba(18, 54, 66, 0.22);
}
.tb-route-stop:last-child::before { display: none; }
.tb-route-num {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  background: #fff;
  border: 2px solid #ef7b45;
  color: #08415c;
  z-index: 1;
}
.tb-route-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: #5c7680;
  line-height: 1.3;
  padding: 0 0.4rem;
}

/* ── Tabs: Khách lẻ (B2C) / Doanh nghiệp (B2B) ── */
.tb-tabs-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem);
  scroll-margin-top: 84px;
}
/* The form lives in one centred card under the switch; the B2C form is
   short so its card is narrower than the B2B wizard's (step nav + fields). */
.tb-panel {
  width: 100%;
  max-width: 1040px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #fff;
  border: 1px solid rgba(18, 54, 66, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 60px -30px rgba(18, 54, 66, 0.25);
}
#tbPanelB2c { max-width: 640px; }
.tb-panel .ce-wizard-section { padding: 0; }
.tb-panel .ce-section-title { text-align: center; }
/* Two-option segmented switch: a sliding thumb (.tb-tabs-thumb) moves under
   the active option — driven by data-active on .tb-tabs, set in the page
   script. Each option pairs an icon with a title + one-line audience hint. */
.tb-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: min(100%, 480px);
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(18, 54, 66, 0.12);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(18, 54, 66, 0.08);
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
}
.tb-tabs-thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 2);
  border-radius: 14px;
  background: linear-gradient(135deg, #2b7cb8, #1d5d82);
  box-shadow: 0 6px 16px rgba(29, 93, 130, 0.35);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tb-tabs[data-active="b2b"] .tb-tabs-thumb { transform: translateX(100%); }
.tb-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #5c7680;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s;
}
.tb-tab-icon { flex: none; }
.tb-tab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-tab-title { font-size: 0.95rem; font-weight: 700; line-height: 1.2; }
.tb-tab-sub { font-size: 0.72rem; font-weight: 500; opacity: 0.8; line-height: 1.2; }
.tb-tab:hover { color: #123642; }
.tb-tab.is-active,
.tb-tab.is-active:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .tb-tabs-thumb { transition: none; }
}
.tb-tab:focus-visible {
  outline: 3px solid var(--ochre, #2B7CB8);
  outline-offset: 2px;
}

/* ── B2C lead form (TripInquiryForm) — deliberately reuses the B2B wizard's
   own classes (.ce-panel/.field/.ce-panel-actions/.ce-form-status, all from
   corporate-events.css, already loaded on this page) instead of a second
   field/input style, so the two tabs read as one design system. Only the
   error text and the "related tours" bonus grid below the form are unique
   to this component. ── */
.tbc .ce-panel { max-width: 520px; margin: 0 auto 2.5rem; }
.tbc-fld-err {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #c62828;
}
.tbc-related-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #123642;
  margin: 0 0 1rem;
}
.tbc-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.tbc-related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(18, 54, 66, 0.12);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tbc-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(18, 54, 66, 0.3);
}
.tbc-related-card img,
.tbc-related-card-noimg {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #e3eef5;
}
.tbc-related-card-body { padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tbc-related-card-body strong { font-size: 0.92rem; color: #123642; line-height: 1.3; }
.tbc-related-card-meta { font-size: 0.78rem; color: #5c7680; }
.tbc-related-card-price { color: #ef7b45; font-weight: 600; }

/* ── Focus visibility ── */
.tb-hero-cta:focus-visible {
  outline: 3px solid var(--ochre, #2B7CB8);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 640px){
  .tb-route { justify-content: flex-start; }
  .tb-route-stop { min-width: 96px; }
  .tb-route-label { font-size: 0.7rem; }
  .tbc .ce-panel { max-width: none; }
}

/* ── A11Y — reduced motion ── */
@media (prefers-reduced-motion: reduce){
  .tb *,
  .tb *::before,
  .tb *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Pre-existing rules, unrelated to the trip-builder wizard above.
   Not touched by this redesign — TourDetailPage references .dst-tours but
   doesn't load this stylesheet, so these may already be dead; leaving as
   found. ── */
.dst-tours {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 5rem) clamp(4.5rem, 8vw, 7rem);
}
.dst-tours-toggle {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid #1c6e8c;
  border-radius: 8px;
  background: #fff;
  color: #1c6e8c;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  margin-bottom: 1.25rem;
}
.dst-tours-toggle:hover {
  background: #eef6f9;
}
.dst-tour-main {
  display: block;
  margin-top: 2rem;
}

/* Mobile field-guide: custom trip builder */
.tb-hero {
  margin-top: 60px;
  padding: 34px 0 26px;
  background-size: 18px 18px;
}
.tb-hero-inner { padding: 0 var(--m-gutter); }
.tb-hero-eyebrow {
  padding: 0;
  color: var(--m-departure);
  font-family: var(--m-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.tb-hero-eyebrow::before,
.tb-hero-eyebrow::after { display: none; }
.tb-hero-title {
  max-width: 13ch;
  margin-left: auto;
  margin-right: auto;
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.tb-hero-copy p { color: var(--m-muted); font-size: 15px; line-height: 1.65; }
.tb-hero-cta {
  width: 100%;
  min-height: 50px;
  justify-content: center;
  padding: 0 16px;
  color: var(--m-paper);
  background: var(--m-departure);
  border-radius: 14px;
}
.tb-route {
  margin: 30px calc(var(--m-gutter) * -1) 0;
  padding: 0 var(--m-gutter) 8px;
  scroll-snap-type: x mandatory;
}
.tb-route-stop { min-width: 104px; scroll-snap-align: start; }
.tb-route-num { font-family: var(--m-mono); color: var(--m-ocean-deep); border-color: var(--m-departure); }
.tb-tabs-wrap { padding: 22px var(--m-gutter) 56px; }
.tb-panel { padding: 20px 16px; border-radius: 20px; border-color: var(--m-line); box-shadow: var(--m-shadow); }
.tb-tabs {
  width: 100%;
  margin-bottom: 22px;
  padding: 5px;
  border-color: var(--m-line);
  border-radius: 18px;
}
.tb-tabs-thumb {
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 2);
  border-radius: 13px;
  background: var(--m-ocean-deep);
}
.tb-tab { min-height: 56px; padding: 8px 8px; gap: 8px; border-radius: 13px; }
.tb-tab-icon { width: 20px; height: 20px; }
.tb-tab-title { font-size: 14px; }
.tb-tab-sub { font-size: 11px; }
.tbc .ce-panel { max-width: none; margin-bottom: 30px; }
.tbc-related-title { font-family: Inter, Arial, sans-serif; font-size: 23px; font-weight: 800; }
.tbc-related-grid {
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--m-gutter) * -1);
  padding: 0 var(--m-gutter) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.tbc-related-card {
  flex: 0 0 min(78vw, 300px);
  border-color: var(--m-line);
  border-radius: 16px;
  scroll-snap-align: start;
}
.tbc-related-card img,
.tbc-related-card-noimg { height: auto; aspect-ratio: 16 / 10; }
