/* =====================================================================
   Trip Builder page (page-trip-builder.php)
   Navy + green. Tokens come from assets/css/style.css; the shared tm-*
   primitives (wrap / breadcrumb / arrow / check) come from trade-mission.css.
   ===================================================================== */
.tb {
  --tb-navy: var(--ast-primary, #16255c);
  --tb-navy-deep: #0f1c48;
  --tb-green: var(--ast-accent, #2d9145);
  --tb-soft: #f4f6fb;
  --tb-green-soft: #eaf6ee;
  background: var(--tb-soft);
  color: var(--ast-ink);
}

.tb * {
  box-sizing: border-box;
}

.tb-main > .tm-wrap {
  position: relative;
  padding-top: 100px;
}

/* ── HERO ─────────────────────────────────────────────────────────────── */
.tb-hero {
  position: relative;
  overflow: hidden;
  background: var(--tb-navy);
  color: #fff;
  padding-block: 34px 54px;
}

.tb-hero__img {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0;
  width: min(58%, 900px);
  height: 100%;
  object-fit: cover;
  object-position: center;
  mask-image: linear-gradient(-100deg, black 62%, transparent 90%);
  z-index: 0;
}

[dir="rtl"] .tb-hero__img {
  mask-image: linear-gradient(100deg, black 62%, transparent 90%);
}

.tb-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tb-hero__inner > * {
  max-width: 560px;
}

.tb-hero .tm-breadcrumb,
.tb-hero .tm-breadcrumb a,
.tb-hero .tm-breadcrumb__current,
.tb-hero .tm-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.72);
}

.tb-hero .tm-breadcrumb a:hover {
  color: #fff;
}

.tb-hero__eyebrow {
  font-size: 15px;
  font-weight: 700;
  color: var(--tb-green);
}

.tb-hero__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
}

.tb-hero__title-2 {
  color: var(--tb-green);
}

.tb-hero__text {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.86);
}

/* ── STEP RAIL ────────────────────────────────────────────────────────── */
.tb-main {
  padding-block: 34px 60px;
}

.tb-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.tb-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--ast-muted);
  font-size: 13.5px;
}

/* Connector line between the numbered bullets */
.tb-step::before {
  content: "";
  position: absolute;
  inset-block-start: 21px;
  inset-inline-start: 50%;
  width: 100%;
  height: 2px;
  background: var(--ast-line, #e3e7f0);
}

.tb-step:last-child::before {
  display: none;
}

.tb-step__num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--ast-line, #e3e7f0);
  background: #fff;
  font-weight: 700;
  color: var(--ast-muted);
}

.tb-step__title {
  font-weight: 600;
}

.tb-step.is-active {
  color: var(--tb-navy);
}

.tb-step.is-active .tb-step__num {
  background: var(--tb-navy);
  border-color: var(--tb-navy);
  color: #fff;
}

.tb-step.is-active .tb-step__title {
  font-weight: 800;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--tb-green);
}

/* ── LAYOUT ───────────────────────────────────────────────────────────── */
.tb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 28px;
}

.tb-content {
  min-width: 0;
}

.tb-form {
  background: #fff;
  border: 1px solid var(--ast-line);
  border-radius: var(--ast-radius, 14px);
  box-shadow: 0 8px 30px rgba(15, 27, 76, 0.07);
  padding: 28px 26px;
}

.tb-form__note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ast-muted);
}

.tb-form__note-icon svg {
  width: 17px;
  height: 17px;
  color: var(--tb-navy);
}

/* Gravity Forms submit/next buttons inside the builder */
#gf_page_steps_13 {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  justify-content: space-between;
  width: 100%;
  padding-right: 40px;
  overflow: auto;
}
#gf_page_steps_13::-webkit-scrollbar {
  display: none;
}
#field_13_36 .gfield_label {
  color: var(--ast-accent);
}

.tb-form .gform_wrapper .gform_footer input[type="submit"],
.tb-form .gform_wrapper .gform_page_footer input[type="button"],
.tb-form .gform_wrapper .gform_page_footer input[type="submit"],
.tb-form .gform_wrapper button.gform_next_button {
  background: var(--tb-green);
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  padding: 13px 26px;
  cursor: pointer;
}

.tb-form
  .gform_wrapper
  .gform_page_footer
  input[type="button"].gform_previous_button {
  background: #fff;
  border: 1px solid var(--ast-line);
  color: var(--tb-navy);
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────── */
.tb-aside {
  position: sticky;
  top: calc(var(--ast-header-height, 72px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tb-card {
  border-radius: var(--ast-radius, 14px);
  overflow: hidden;
}

.tb-summary {
  background: #fff;
  border: 1px solid var(--ast-line);
  box-shadow: 0 8px 30px rgba(15, 27, 76, 0.07);
  padding: 24px 22px;
}

.tb-help {
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--tb-green-soft);
}

.tb-help__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--tb-navy);
}

.tb-help__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.tb-help__list li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tb-help__tick .tm-check {
  width: 18px;
  height: 18px;
}

/* Assistance card */
.tb-cta {
  position: relative;
  background: var(--tb-navy-deep);
  color: #fff;
  padding: 26px 24px;
}

.tb-cta__img {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 42%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom left;
  opacity: 0.35;
}

.tb-cta__body {
  position: relative;
  z-index: 1;
  margin-inline-start: 38%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-cta__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--tb-green);
}

.tb-cta__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.84);
}

.tb-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid var(--tb-green);
  border-radius: 10px;
  color: var(--tb-green);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.tb-cta__btn:hover {
  background: var(--tb-green);
  color: #fff;
}

/* ── TRUST STRIP ──────────────────────────────────────────────────────── */
.tb-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  margin-top: 32px;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--ast-line);
  border-radius: var(--ast-radius, 14px);
}

.tb-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.tb-trust__item + .tb-trust__item {
  border-inline-start: 1px solid var(--ast-line);
  padding-inline-start: 26px;
}

.tb-trust__icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--tb-navy);
}

.tb-trust__icon svg,
.tb-trust__icon img {
  width: 30px;
  height: 30px;
}

.tb-trust__title {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--tb-navy);
  margin-bottom: 4px;
}

.tb-trust__text {
  display: block;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ast-muted);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tb-layout {
    grid-template-columns: 1fr;
  }

  .tb-aside {
    position: static;
  }

  .tb-hero__img {
    width: 100%;
    opacity: 0.22;
    mask-image: none;
  }
}

@media (max-width: 780px) {
  #gf_page_steps_13 {
    top: 0;
    left: 0;
    grid-template-columns: repeat(3, 1fr);
    justify-content: normal;
    gap: 8px;
    padding: 0 20px;
  }
  #gf_page_steps_13 .gf_step {
    gap: 6px;
  }
  #gf_page_steps_13 .gf_step_label {
    font-size: 12px;
    line-height: 1.4;
  }

  .tb-steps {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px 8px;
  }

  .tb-step::before {
    display: none;
  }

  .tb-trust__item + .tb-trust__item {
    border-inline-start: 0;
    padding-inline-start: 0;
  }

  .tb-cta__img {
    display: none;
  }

  .tb-cta__body {
    margin-inline-start: 0;
  }
}
