/* ===============================================================
   Customer Journey section — partner page
   Uses tokens already defined in partners-base.css
   =============================================================== */

.cj-section {
  background: var(--paper-3, #FBFAF6);
  position: relative;
}

/* ── Partner Dashboard section ─────────────────────────────── */
.pd-section { background: #fff; }
.pd-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 920px) { .pd-grid { grid-template-columns: 1fr; gap: 24px; } }

.pd-shot {
  display: block;
}
.pd-shot-frame {
  all: unset;
  cursor: zoom-in;
  display: block;
  position: relative;
  background: var(--paper-3, #FBFAF6);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 24px 60px -28px rgba(10, 18, 48, .30);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pd-shot-frame:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 70px -28px rgba(10, 18, 48, .38);
}
.pd-shot-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
.pd-zoom-hint {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(10, 18, 48, .85);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Zoom modal */
.pd-zoom {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 18, 48, .78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: pdFade .2s ease-out;
}
@keyframes pdFade { from { opacity: 0; } to { opacity: 1; } }
.pd-zoom-img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  height: auto;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55);
  cursor: default;
}
.pd-zoom-close {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #0A1230;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .18s, background .18s, color .18s;
  z-index: 10;
}
.pd-zoom-close:hover { background: #0A1230; color: #fff; transform: rotate(90deg); }

.pd-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pd-point {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--paper-3, #FBFAF6);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pd-point:hover {
  transform: translateY(-2px);
  border-color: rgba(3, 93, 252, .25);
  box-shadow: 0 16px 32px -22px rgba(10, 18, 48, .18);
}
.pd-point-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--blue-soft, #F0F5FF);
  color: var(--blue, #035DFC);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pd-point-icon svg { width: 22px; height: 22px; }
.pd-point-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.005em;
  margin: 0 0 6px;
}
.pd-point-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-3, var(--muted));
}

/* ── Booking Portal Viewer ───────────────────────────────────── */
.bpv-block { margin-bottom: 56px; }
.bpv-head { text-align: start; margin-bottom: 22px; max-width: 720px; }

.bpv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
}
.bpv-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Horizontal thumbnail strip — 5 in a single row */
.bpv-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-content: start;
}
.bpv-thumb {
  all: unset;
  cursor: pointer;
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line-soft);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.bpv-thumb img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  opacity: .75;
  transition: opacity .2s ease;
}
.bpv-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--blue, #035DFC);
}
.bpv-thumb:hover img { opacity: 1; }
.bpv-thumb.is-active {
  border-color: var(--blue, #035DFC);
  box-shadow: 0 14px 30px -14px rgba(3, 93, 252, .35);
}
.bpv-thumb.is-active img { opacity: 1; }

.bpv-thumb-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 2px 4px;
}
.bpv-thumb-num {
  font-family: var(--font-mono), monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.bpv-thumb.is-active .bpv-thumb-num { color: var(--blue, #035DFC); }
.bpv-thumb-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink, #0A1230);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 720px) {
  .bpv-thumbs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .bpv-thumb { padding: 4px; }
  .bpv-thumb-title { font-size: 9.5px; }
  .bpv-thumb-num { display: none; }
}
.bpv-main-frame {
  background: var(--paper-3, #FBFAF6);
  border: 1px solid var(--line-soft, #E6E0D0);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Stabilize dimensions — avoid reflow as images load */
  aspect-ratio: 9 / 18;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.bpv-main-img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  max-width: none;
  object-fit: contain;
  object-position: center top;
  display: block;
  border-radius: 14px;
  box-shadow: 0 22px 50px -22px rgba(10, 18, 48, .25);
}
.bpv-main-img[data-dir="next"] { animation: bpvSlideNext .9s cubic-bezier(.22, 1, .36, 1); }
.bpv-main-img[data-dir="prev"] { animation: bpvSlidePrev .9s cubic-bezier(.22, 1, .36, 1); }
.bpv-main-caption[data-dir="next"] { animation: bpvCapSlideNext .7s cubic-bezier(.22, 1, .36, 1); }
.bpv-main-caption[data-dir="prev"] { animation: bpvCapSlidePrev .7s cubic-bezier(.22, 1, .36, 1); }

@keyframes bpvSlideNext {
  0%   { opacity: 0; transform: translateX(40px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes bpvSlidePrev {
  0%   { opacity: 0; transform: translateX(-40px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes bpvCapSlideNext {
  0%   { opacity: 0; transform: translateX(16px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes bpvCapSlidePrev {
  0%   { opacity: 0; transform: translateX(-16px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* RTL: flip slide directions to match reading order */
[dir="rtl"] .bpv-main-img[data-dir="next"] { animation-name: bpvSlidePrev; }
[dir="rtl"] .bpv-main-img[data-dir="prev"] { animation-name: bpvSlideNext; }
[dir="rtl"] .bpv-main-caption[data-dir="next"] { animation-name: bpvCapSlidePrev; }
[dir="rtl"] .bpv-main-caption[data-dir="prev"] { animation-name: bpvCapSlideNext; }

/* Auto-advance progress indicator on active thumb */
.bpv-thumb-progress {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 3px;
  background: rgba(3, 93, 252, .12);
  border-radius: 2px;
  overflow: hidden;
}
.bpv-thumb-progress-bar {
  display: block;
  height: 100%;
  background: var(--blue, #035DFC);
  border-radius: 2px;
  transform-origin: left center;
  animation: bpvProgress 4.5s linear forwards;
}
[dir="rtl"] .bpv-thumb-progress-bar { transform-origin: right center; }
@keyframes bpvProgress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.bpv-main-caption {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.bpv-main-num {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--blue-soft, #F0F5FF);
  color: var(--blue, #035DFC);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono), monospace;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.bpv-main-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0A1230);
  letter-spacing: -.005em;
  margin-bottom: 4px;
  line-height: 1.3;
}
.bpv-main-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3, var(--muted));
}

/* Thumbnails */

.cj-section .section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* ── Milestones rail (top overview) ─────────────────────────── */
.cj-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 36px auto 64px;
  padding: 14px 22px;
  background: #fff;
  border: 1px solid var(--line-soft, #E6E0D0);
  border-radius: 999px;
  max-width: fit-content;
  box-shadow: 0 18px 36px -22px rgba(10, 18, 48, .12);
}
.cj-rail-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}
.cj-rail-n {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue, #035DFC);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  font-weight: 700;
}
.cj-rail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #0A1230);
}
.cj-rail-sep {
  color: var(--muted, #5C6480);
  font-size: 14px;
  opacity: .55;
}
[dir="rtl"] .cj-rail-sep { transform: scaleX(-1); }

/* ── Block wrapper ──────────────────────────────────────────── */
.cj-block {
  margin-bottom: 56px;
}
.cj-block-head {
  text-align: start;
  margin-bottom: 22px;
  max-width: 660px;
}
.cj-block-head .h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.008em;
  color: var(--ink, #0A1230);
  margin: 8px 0 6px;
}
.cj-block-sub {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-3, var(--muted));
}

/* ── Entry-point cards (3 columns) ──────────────────────────── */
.cj-entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .cj-entries { grid-template-columns: 1fr; gap: 12px; } }

.cj-entry {
  position: relative;
  background: #fff;
  border: 1px solid var(--line-soft, #E6E0D0);
  border-radius: 16px;
  padding: 22px 22px 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cj-entry::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 22px;
  inset-inline-end: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--phase-color, var(--blue, #035DFC));
  opacity: .85;
}
.cj-entry[data-phase="create"]  { --phase-color: #6B7280; }
.cj-entry[data-phase="approve"] { --phase-color: #035DFC; }
.cj-entry[data-phase="exec"]    { --phase-color: #1F8A5B; }
.cj-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 18, 48, .14);
  box-shadow: 0 18px 38px -22px rgba(10, 18, 48, .18);
}

.cj-entry-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cj-entry-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--phase-color, var(--blue));
  letter-spacing: -.01em;
  line-height: 1;
}
.cj-entry-code {
  font-family: var(--font-mono), monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--phase-color) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--phase-color) 22%, transparent);
}
.cj-entry-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #0A1230);
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -.005em;
}
.cj-entry-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-3, var(--muted));
  margin-bottom: 14px;
}
.cj-entry-features {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 0; margin: 0;
}
.cj-entry-features li {
  font-size: 12.5px;
  color: var(--ink, #0A1230);
  font-weight: 500;
  position: relative;
  padding-inline-start: 18px;
}
.cj-entry-features li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phase-color, var(--blue));
  opacity: .75;
}

/* ── Converge arrow row ─────────────────────────────────────── */
.cj-converge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--blue-soft, #F0F5FF);
  border: 1px dashed rgba(3, 93, 252, .25);
  border-radius: 14px;
  font-size: 14px;
  color: var(--ink, #0A1230);
  font-weight: 500;
}
.cj-converge strong {
  color: var(--blue, #035DFC);
  font-weight: 700;
}
.cj-converge-arrow {
  color: var(--blue);
  font-size: 16px;
}

/* ── Split: Booking + Service Day ───────────────────────────── */
.cj-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 920px) { .cj-split { grid-template-columns: 1fr; gap: 20px; } }

.cj-half {
  background: #fff;
  border: 1px solid var(--line-soft, #E6E0D0);
  border-radius: 18px;
  padding: 22px 20px 20px;
  margin: 0;
}

.cj-points, .cj-stages {
  gap: 8px;
}

/* ── Numbered points (booking) ──────────────────────────────── */
.cj-points {
  list-style: none;
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
}
.cj-point {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
}
.cj-point-n {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--blue-soft, #F0F5FF);
  color: var(--blue, #035DFC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono), monospace;
  font-size: 13px;
  font-weight: 700;
}
.cj-point-t {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #0A1230);
  line-height: 1.5;
  margin: 0;
}
.cj-point-d {
  display: none;
}

/* ── Smart scheduling sub-cards ─────────────────────────────── */
.cj-sched {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--line-soft);
}
.cj-sched-head {
  margin-bottom: 12px;
}
.cj-sched-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #0A1230);
  letter-spacing: -.003em;
  margin-top: 6px;
}
.eyebrow-sm {
  font-size: 10px !important;
  padding: 3px 9px !important;
}
.cj-sched-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 540px) { .cj-sched-cards { grid-template-columns: 1fr; } }
.cj-sched-card {
  padding: 14px 14px;
  background: var(--paper-3, #FBFAF6);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.cj-sched-card[data-kind="pickup"] {
  border-top: 2px solid var(--blue, #035DFC);
}
.cj-sched-card[data-kind="shipping"] {
  border-top: 2px solid #C8961D;
}
.cj-sched-code {
  font-family: var(--font-mono), monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.cj-sched-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.cj-sched-d {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3, var(--muted));
}

/* ── Service Day stages (vertical) ──────────────────────────── */
.cj-stages {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0; margin: 0;
}
.cj-stage {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--paper-3, #FBFAF6);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  position: relative;
}
.cj-stage[data-kind="gold"] {
  background: linear-gradient(180deg, #fff 0%, rgba(200, 150, 29, .07) 100%);
  border-color: rgba(200, 150, 29, .35);
}
.cj-stage-n {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--ink, #0A1230);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono), monospace;
  font-size: 13px;
  font-weight: 700;
}
.cj-stage[data-kind="blue"] .cj-stage-n {
  color: var(--blue, #035DFC);
  background: var(--blue-soft, #F0F5FF);
  border-color: rgba(3, 93, 252, .22);
}
.cj-stage[data-kind="gold"] .cj-stage-n {
  color: #C8961D;
  background: rgba(200, 150, 29, .10);
  border-color: rgba(200, 150, 29, .35);
}
.cj-stage-t {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}
.cj-stage-d, .cj-stage-tag {
  display: none;
}

/* ── End banner ─────────────────────────────────────────────── */
.cj-end {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--ink, #0A1230);
  color: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cj-end-kicker {
  font-family: var(--font-mono), monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .55);
}
.cj-end-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.003em;
}

/* ── Mobile condensed mode ──────────────────────────────────── */
@media (max-width: 720px) {
  .cj-rail {
    padding: 12px 14px;
    border-radius: 18px;
    width: 100%;
    justify-content: space-between;
  }
  .cj-rail-step { padding: 2px 0; }
  .cj-rail-label { display: none; }
  .cj-rail-n { width: 28px; height: 28px; }
  .cj-rail-sep { font-size: 12px; }

  .cj-entry { padding: 18px 18px; }
  .cj-entry-desc { font-size: 12.5px; }
  .cj-entry-features li { font-size: 12px; }

  .cj-half { padding: 22px 18px; }
  .cj-end { flex-direction: column; align-items: flex-start; gap: 8px; }
}
