/**
 * JORNADA DE CUIDADO - Timeline/Process Styles
 * Seção 5 etapas com design moderno e responsivo
 */

/* ═══════════════════════════════════════════
   TIMELINE CONTAINER
   ═══════════════════════════════════════════ */

.journey-container {
  position: relative;
  padding: var(--spacing-xl) 0;
}

/* Linha de conexão (desktop) */
.journey-container::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-primary) 48%,
    transparent 50%,
    var(--color-primary) 52%,
    var(--color-primary) 100%
  );
  z-index: 1;
  display: none;
}

@media (min-width: 1024px) {
  .journey-container::before {
    display: block;
  }
}

/* Grid para as 5 etapas */
.journey-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .journey-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
  }
}

@media (min-width: 1024px) {
  .journey-steps {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
  }
}

/* ═══════════════════════════════════════════
   STEP ITEM - Individual
   ═══════════════════════════════════════════ */

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* Número do passo (círculo) */
.journey-step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 4px 12px rgba(0, 61, 122, 0.15);
  transition: var(--transition-base);
  flex-shrink: 0;
  line-height: 1;
}

.journey-step:hover .journey-step-number {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 61, 122, 0.25);
}

/* Responsivo - círculos menores em mobile */
@media (max-width: 640px) {
  .journey-step-number {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
  }
}

/* ═══════════════════════════════════════════
   STEP CONTENT - Titulo e Descrição
   ═══════════════════════════════════════════ */

.journey-step-content {
  flex: 1;
}

.journey-step h4 {
  font-size: var(--text-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.journey-step p {
  font-size: var(--text-body-sm);
  color: var(--color-gray-medium);
  line-height: var(--line-height-normal);
  margin: 0;
}

/* ═══════════════════════════════════════════
   TIMELINE CONNECTOR LINE (mobile)
   ═══════════════════════════════════════════ */

.journey-step::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 70px;
  width: 3px;
  height: calc(100% + var(--spacing-xl));
  background: var(--color-primary);
  opacity: 0.3;
  display: block;
}

/* Esconder a linha do último item */
.journey-step:last-child::before {
  display: none;
}

/* Esconder linhas em tablet+ */
@media (min-width: 768px) {
  .journey-step::before {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   DESKTOP TIMELINE (1024px+)
   ═══════════════════════════════════════════ */

@media (min-width: 1024px) {
  .journey-step {
    padding-top: var(--spacing-lg);
  }

  /* Adiciona efeito hover diferente em desktop */
  .journey-step:hover {
    transform: translateY(-8px);
  }

  .journey-step h4 {
    font-size: var(--text-h4);
  }
}

/* ═══════════════════════════════════════════
   ALTERNATING LAYOUT (desktop - zig-zag)
   ═══════════════════════════════════════════ */

@media (min-width: 1024px) {
  /* Etapas ímpares (1, 3, 5) ficam embaixo */
  .journey-step:nth-child(odd) {
    transform: translateY(var(--spacing-lg));
  }

  /* Etapas pares (2, 4) ficam em cima */
  .journey-step:nth-child(even) {
    transform: translateY(calc(var(--spacing-lg) * -1));
  }
}

/* ═══════════════════════════════════════════
   COLOR VARIATIONS (opcional - para cada etapa)
   ═══════════════════════════════════════════ */

/* Comentado - usar se quiser cores diferentes por etapa */
/*
.journey-step:nth-child(1) .journey-step-number {
  background: linear-gradient(135deg, #003d7a, #0052a3);
}

.journey-step:nth-child(2) .journey-step-number {
  background: linear-gradient(135deg, #0052a3, #0066cc);
}

.journey-step:nth-child(3) .journey-step-number {
  background: linear-gradient(135deg, #00a651, #00cc66);
}

.journey-step:nth-child(4) .journey-step-number {
  background: linear-gradient(135deg, #0052a3, #003d7a);
}

.journey-step:nth-child(5) .journey-step-number {
  background: linear-gradient(135deg, #003d7a, #002244);
}
*/

/* ═══════════════════════════════════════════
   ANIMATION ON SCROLL
   ═══════════════════════════════════════════ */

.journey-step {
  animation: slideUp 0.6s ease-out backwards;
}

.journey-step:nth-child(1) { animation-delay: 0.1s; }
.journey-step:nth-child(2) { animation-delay: 0.2s; }
.journey-step:nth-child(3) { animation-delay: 0.3s; }
.journey-step:nth-child(4) { animation-delay: 0.4s; }
.journey-step:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE TYPOGRAPHY
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  .journey-step h4 {
    font-size: 1.125rem;
  }

  .journey-step p {
    font-size: 0.8125rem;
    line-height: var(--line-height-normal);
  }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════ */

.journey-step:focus-within .journey-step-number {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove animações se usuário prefere motion reduzido */
@media (prefers-reduced-motion: reduce) {
  .journey-step {
    animation: none;
  }

  .journey-step:hover .journey-step-number,
  .journey-step:hover {
    transform: none;
  }

  .journey-step-number {
    transition: none;
  }
}

/* ═══════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════ */

@media print {
  .journey-container::before,
  .journey-step::before {
    display: none;
  }

  .journey-steps {
    grid-template-columns: repeat(5, 1fr);
  }

  .journey-step {
    page-break-inside: avoid;
  }
}
