/* =========================================================
   Care Journey — alinhado ao design system de styles.css
   ========================================================= */

/* ---- Highlight de seção: ativado pelo stepper da Jornada ---- */
.cj-section-highlight {
  position: relative;
  z-index: 0;
  animation: cj-hl-in .45s cubic-bezier(.2,.8,.3,1) forwards;
}

.cj-section-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0;
  box-shadow: inset 0 0 0 3px var(--brand-300);
  opacity: 0;
  animation: cj-hl-ring 2.8s cubic-bezier(.2,.8,.3,1) forwards;
  z-index: 1;
}

@keyframes cj-hl-in {
  0%   { transform: translateY(6px); opacity: .85; }
  100% { transform: translateY(0);   opacity: 1;   }
}

@keyframes cj-hl-ring {
  0%   { opacity: 0;   box-shadow: inset 0 0 0 0px var(--brand-300); }
  15%  { opacity: 1;   box-shadow: inset 0 0 0 3px var(--brand-300); }
  70%  { opacity: 1;   box-shadow: inset 0 0 0 3px var(--brand-300); }
  100% { opacity: 0;   box-shadow: inset 0 0 0 3px var(--brand-300); }
}

@media (prefers-reduced-motion: reduce) {
  .cj-section-highlight,
  .cj-section-highlight::before {
    animation: none;
  }
  .cj-section-highlight::before {
    opacity: 1;
    box-shadow: inset 0 0 0 3px var(--brand-300);
  }
}

/* ---- section wrapper: mesmo padrão de feature-section--white ---- */
.care-journey {
  padding-block: var(--section-space);
  background: var(--white);
}

/* acompanha --section-space do styles.css */
@media (min-width: 768px)  { .care-journey { padding-block: 56px; } }
@media (min-width: 1024px) { .care-journey { padding-block: 64px; } }
@media (min-width: 1280px) { .care-journey { padding-block: 80px; } }

.care-journey .cj-pin-slot {
  position: relative;
}

.care-journey .cj-pin {
  background: var(--white);
  transition:
    box-shadow .25s ease,
    background-color .25s ease,
    padding .25s ease;
}

/* Estado congelado após clique em uma etapa */
.care-journey.is-pinned .cj-pin {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  padding-block: 12px 14px;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid rgb(44 63 77 / 10%);
  box-shadow: 0 8px 24px rgb(44 63 77 / 8%);
  backdrop-filter: blur(12px);
}

.care-journey.is-pinned .cj-section-header {
  margin-bottom: .65rem;
  gap: 6px;
  max-width: none;
}

.care-journey.is-pinned .cj-section-header h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.25;
}

.care-journey.is-pinned .cj-section-header p {
  display: none;
}

.care-journey.is-pinned .cj-stepper {
  --cj-node: 52px;
}

.care-journey.is-pinned .cj-dot svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 640px) {
  .care-journey.is-pinned .cj-section-header h2 {
    font-size: 1rem;
  }

  .care-journey.is-pinned .cj-stepper {
    --cj-node: 44px;
  }

  .care-journey.is-pinned .cj-lab b {
    font-size: .85rem;
  }
}

/* ---- header: alinhado ao padrão feature__copy ---- */
.care-journey .cj-section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: clamp(1rem, 2.2vw, 1.65rem);
  max-width: 680px;
}

.care-journey .cj-section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.care-journey .cj-section-header h2 strong {
  font-weight: 700;
}

.care-journey .cj-section-header p {
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.6;
}

/* ---- stepper ---- */
.care-journey .cj-stepper {
  --cj-verde: #93e1c0;
  --cj-azul: var(--brand-300);
  --cj-node: 64px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-bottom: 0;
}

/* Linha de contexto: degradê discreto azul → verde ARBO */
.care-journey .cj-rail {
  position: absolute;
  top: calc(var(--cj-node) / 2);
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--cj-azul) 32%, #e8eef2),
    color-mix(in srgb, var(--cj-verde) 38%, #e8eef2)
  );
  border-radius: 2px;
  z-index: 0;
  transform: translateY(-50%);
  transition: filter .25s ease, opacity .25s ease;
}

.care-journey .cj-stepper:hover .cj-rail {
  filter: saturate(1.15);
  opacity: 1;
}

.care-journey .cj-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--cj-azul), var(--cj-verde));
  border-radius: 2px;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  opacity: .9;
}

.care-journey .cj-stp {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: .35rem .4rem .5rem;
  text-align: center;
  font-family: inherit;
  border-radius: var(--radius-md);
  transition: background .2s ease;
}

/* Segmento até a próxima etapa — acende no hover */
.care-journey .cj-stp:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc(var(--cj-node) / 2);
  left: calc(50% + var(--cj-node) / 2 - 2px);
  width: calc(100% - var(--cj-node) + .5rem + 4px);
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--cj-azul), var(--cj-verde));
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity .25s ease;
  box-shadow: 0 0 8px color-mix(in srgb, var(--cj-azul) 35%, transparent);
}

.care-journey .cj-stp:hover:not(:last-child)::after,
.care-journey .cj-stp:focus-visible:not(:last-child)::after {
  opacity: .95;
}

.care-journey .cj-dot {
  width: var(--cj-node);
  height: var(--cj-node);
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid #d5dde3;
  display: grid;
  place-items: center;
  color: #8a99a2;
  transition:
    border-color .25s ease,
    background .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    transform .25s ease;
  position: relative;
  z-index: 1;
}

.care-journey .cj-dot svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Números integrados ao nó — baixo contraste inativo */
.care-journey .cj-num {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef2f5;
  color: #9aa6ad;
  border: 1.5px solid var(--white);
  font-size: .62rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.care-journey .cj-lab {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 16ch;
}

.care-journey .cj-lab b {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  transition: color .25s ease;
}

.care-journey .cj-lab span {
  font-size: .7rem;
  font-weight: 400;
  color: #9aa6ad;
  line-height: 1.35;
}

/* Hover: sobe 2px + ícone ganha cor */
.care-journey .cj-stp:hover .cj-dot {
  border-color: var(--cj-azul);
  color: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(44 63 77 / 10%);
}

.care-journey .cj-stp:hover .cj-lab b {
  color: var(--ink);
}

/* Done */
.care-journey .cj-stp.done .cj-dot {
  border-color: color-mix(in srgb, var(--cj-azul) 70%, var(--cj-verde));
  color: var(--brand-700);
}

.care-journey .cj-stp.done .cj-num {
  background: color-mix(in srgb, var(--cj-azul) 55%, #eef2f5);
  color: var(--brand-700);
}

/* Active: halo suave + #F4FAFD */
.care-journey .cj-stp.active .cj-dot {
  border-color: var(--cj-azul);
  background: #f4fafd;
  color: var(--brand-700);
  box-shadow:
    0 0 0 6px rgb(109 165 188 / 12%),
    0 4px 14px rgb(44 63 77 / 8%);
  transform: none;
}

.care-journey .cj-stp.active:hover .cj-dot {
  transform: translateY(-2px);
}

.care-journey .cj-stp.active .cj-num {
  background: var(--ink);
  color: #fff;
  border-color: var(--white);
}

.care-journey .cj-stp.active .cj-lab b {
  color: var(--ink);
}

.care-journey .cj-stp.active .cj-lab span {
  color: var(--text);
}

.care-journey .cj-stp:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .care-journey .cj-stp:hover .cj-dot,
  .care-journey .cj-stp.active:hover .cj-dot {
    transform: none;
  }
}

/* ---- stage wrap: card clean, alinhado com shadow-card ---- */
.care-journey .cj-stage-wrap {
  background: var(--white);
  border: 1px solid #e2e8ed;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgb(44 63 77 / 8%), 0 1px 3px rgb(44 63 77 / 5%);
  overflow: hidden;
}

/* ---- stage top bar ---- */
.care-journey .cj-stage-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid #edf1f4;
  background: var(--surface);
}

.care-journey .cj-hub {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.care-journey .cj-hub svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 2;
}

.care-journey .cj-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-300), transparent 60%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: cj-spin 6s linear infinite;
}

@keyframes cj-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .care-journey .cj-ring { animation: none; }
}

.care-journey .cj-st-title { display: flex; flex-direction: column; gap: 1px; }

.care-journey .cj-k {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-300);
}

.care-journey .cj-st-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

.care-journey .cj-st-title p {
  font-size: .82rem;
  color: var(--text);
  margin: 0;
}

.care-journey .cj-stage-badge {
  margin-left: auto;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.25rem;
  white-space: nowrap;
}

@media (max-width: 520px) { .care-journey .cj-stage-badge { display: none; } }

/* ---- panels ---- */
.care-journey .cj-stage-body {
  padding: clamp(.9rem, 2.5vw, 1.4rem);
}

.care-journey .cj-panel { display: none; }
.care-journey .cj-panel.active { display: block; }

/* ---- screenshot frame ---- */
.care-journey .cj-shot-frame {
  border: 1px solid #e2e8ed;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
  line-height: 0;
  box-shadow: 0 1px 4px rgb(44 63 77 / 8%);
}

.care-journey .cj-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: top center;
}

/* ---- feature list under screenshot ---- */
.care-journey .cj-shot-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .care-journey .cj-shot-meta { grid-template-columns: 1fr; gap: .65rem; }
}

.care-journey .cj-mi {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(12px);
}

.care-journey .cj-panel.active .cj-shot-frame {
  opacity: 0;
  transform: translateY(10px);
  animation: cj-rise .4s cubic-bezier(.2,.7,.3,1) forwards;
}

.care-journey .cj-panel.active .cj-mi {
  animation: cj-rise .4s cubic-bezier(.2,.7,.3,1) forwards;
}

.care-journey .cj-panel.active .cj-mi:nth-child(2) { animation-delay: .08s; }
.care-journey .cj-panel.active .cj-mi:nth-child(3) { animation-delay: .16s; }

@keyframes cj-rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .care-journey .cj-panel.active .cj-shot-frame,
  .care-journey .cj-panel.active .cj-mi {
    opacity: 1; transform: none; animation: none;
  }
}

.care-journey .cj-ci {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--brand-700);
  display: grid;
  place-items: center;
  flex: none;
}

.care-journey .cj-ci svg { width: 14px; height: 14px; }

.care-journey .cj-mi b {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.care-journey .cj-mi span > span {
  font-size: .8rem;
  color: var(--text);
  line-height: 1.4;
}

/* ---- review note ---- */
.care-journey .cj-review-note {
  display: flex;
  align-items: flex-start;
  gap: .4em;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .75rem;
  line-height: 1.4;
}

.care-journey .cj-review-note svg {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 1px;
  color: var(--brand-300);
}

/* ---- controls bar ---- */
.care-journey .cj-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem clamp(1rem, 3vw, 1.5rem);
  border-top: 1px solid #edf1f4;
  background: var(--surface);
}

.care-journey .cj-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: inherit;
  font-weight: 500;
  font-size: .875rem;
  padding: .5em 1em;
  border-radius: var(--radius-pill);
  border: 1px solid #d0d8df;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.care-journey .cj-nav-btn:hover:not(:disabled) {
  border-color: var(--brand-300);
  background: var(--surface-alt);
}

.care-journey .cj-nav-btn:disabled { opacity: .4; cursor: not-allowed; }

.care-journey .cj-nav-btn.primary {
  background: var(--brand-300);
  color: var(--white);
  border-color: var(--brand-300);
}

.care-journey .cj-nav-btn.primary:hover:not(:disabled) {
  background: #5b94ad;
  border-color: #5b94ad;
  box-shadow: 0 4px 14px rgb(109 165 188 / 28%);
}

.care-journey .cj-nav-btn svg { width: 1em; height: 1em; }

.care-journey .cj-play {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  background: transparent;
  border: 0;
  color: var(--brand-700);
  font-weight: 600;
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  padding: .35em .5em;
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.care-journey .cj-play:hover { background: var(--surface-alt); }

.care-journey .cj-pic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-300);
  display: grid;
  place-items: center;
}

.care-journey .cj-pic svg { width: 12px; height: 12px; }

.care-journey .cj-prog {
  margin-left: auto;
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) { .care-journey .cj-prog { display: none; } }

/* ---- trust row ---- */
.care-journey .cj-trust {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #edf1f4;
}

@media (max-width: 900px) { .care-journey .cj-trust { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .care-journey .cj-trust { grid-template-columns: repeat(2, 1fr); } }

.care-journey .cj-tr-item {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}

.care-journey .cj-ti {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--brand-700);
  display: grid;
  place-items: center;
  flex: none;
}

.care-journey .cj-ti svg { width: 15px; height: 15px; }

.care-journey .cj-tr-item b {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
}

.care-journey .cj-tr-item span {
  font-size: .75rem;
  color: var(--text);
  line-height: 1.35;
}

/* ---- tagline ---- */
.care-journey .cj-tagline {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--text);
}

.care-journey .cj-tagline b { color: var(--ink); }

/* ---- CTA footer: mesma estrutura das outras seções ---- */
/* .care-journey__footer removido */

/* ---- responsive stepper ---- */
@media (max-width: 640px) {
  .care-journey .cj-stepper {
    --cj-node: 48px;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .care-journey .cj-rail { display: none; }
  .care-journey .cj-stp:not(:last-child)::after { display: none; }
  .care-journey .cj-stp {
    flex-direction: row;
    justify-content: flex-start;
    gap: .6rem;
    text-align: left;
    padding: .4rem .6rem;
  }
  .care-journey .cj-dot svg { width: 20px; height: 20px; }
  .care-journey .cj-lab { max-width: none; }
  .care-journey .cj-lab span { display: none; }
  .care-journey.is-pinned .cj-lab span {
    display: block;
    font-size: .65rem;
  }
}

@media (max-width: 400px) {
  .care-journey .cj-stepper { grid-template-columns: 1fr; }
}
