/* ========================================
   COMO FUNCIONA - ENERGIA CERTA BRASIL
   CSS dedicado para a seção de 3 passos
   ======================================== */

/* ========================================
   SEÇÃO PRINCIPAL
   ======================================== */
.how-it-works {
  padding: var(--spacing-2xl) 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.how-it-works .section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.how-it-works .section-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2e3d6a, #3d4c7a);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.how-it-works h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
  font-weight: 700;
}

.how-it-works h2 .highlight {
  color: #2e3d6a;
}

.how-it-works p {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   TIMELINE DE PROCESSO
   ======================================== */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3rem;
  position: relative;
  max-width: 100%;
  padding: 0;
  width: 100%;
}

/* Linha conectora entre os cards */
.process-timeline::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, #2e3d6a, #3d4c7a, #2e3d6a);
  border-radius: 2px;
  z-index: 1;
}

/* ========================================
   ITENS DO TIMELINE
   ======================================== */
.timeline-item {
  text-align: center;
  position: relative;
  z-index: 2;
}

/* ========================================
   NÚMEROS DOS PASSOS
   ======================================== */
.timeline-number {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2e3d6a, #3d4c7a);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin: 0 auto var(--spacing-md);
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 25px rgba(46, 61, 106, 0.3);
  border: 4px solid white;
  transition: all 0.3s ease;
}

.timeline-number:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(46, 61, 106, 0.4);
}

/* ========================================
   CONTEÚDO DOS CARDS
   ======================================== */
.timeline-content {
  background: var(--background-white);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  position: relative;
  border: 1px solid rgba(46, 61, 106, 0.1);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.timeline-content:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(46, 61, 106, 0.3);
}

/* ========================================
   ÍCONES COLORIDOS E CHAMATIVOS
   ======================================== */
.timeline-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  color: var(--text-white);
  font-size: var(--font-size-2xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Ícone do Passo 1 - Calculadora (Azul) */
.timeline-item:nth-child(1) .timeline-icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.timeline-item:nth-child(1) .timeline-icon:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.6);
}

/* Ícone do Passo 2 - Contrato (Verde) */
.timeline-item:nth-child(2) .timeline-icon {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.timeline-item:nth-child(2) .timeline-icon:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 12px 35px rgba(5, 150, 105, 0.6);
}

/* Ícone do Passo 3 - Check (Roxo) */
.timeline-item:nth-child(3) .timeline-icon {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.timeline-item:nth-child(3) .timeline-icon:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.6);
}

/* Efeito de brilho nos ícones */
.timeline-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.timeline-icon:hover::before {
  opacity: 1;
  animation: shine 1.5s ease;
}

@keyframes shine {
  0% { transform: rotate(45deg) translateX(-100%); }
  100% { transform: rotate(45deg) translateX(100%); }
}

/* ========================================
   TÍTULOS E DESCRIÇÕES
   ======================================== */
.timeline-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.timeline-content p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  flex: 1;
}

.timeline-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ========================================
   BADGES DE TEMPO
   ======================================== */
.timeline-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2e3d6a, #3d4c7a);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
  box-shadow: 0 4px 15px rgba(46, 61, 106, 0.3);
  transition: all 0.3s ease;
}

.timeline-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 61, 106, 0.4);
}

/* ========================================
   CTA INTERMEDIÁRIO
   ======================================== */
.how-it-works-cta {
  text-align: center;
  margin-top: var(--spacing-xl);
  padding: var(--spacing-xl);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(46, 61, 106, 0.1);
}

.how-it-works-cta h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

.how-it-works-cta p {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 1024px) {
  .process-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
  }
  
  .timeline-content {
    padding: var(--spacing-lg);
    min-height: 260px;
  }
  
  .timeline-number {
    width: 70px;
    height: 70px;
    font-size: var(--font-size-xl);
  }
  
  .timeline-icon {
    width: 70px;
    height: 70px;
    font-size: var(--font-size-xl);
  }
  
  /* Linha conectora ajustada */
  .process-timeline::before {
    top: 50px;
    left: 8%;
    right: 8%;
  }
}

@media (max-width: 768px) {
  .process-timeline {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .timeline-content {
    padding: var(--spacing-md);
    min-height: auto;
  }
  
  .timeline-number {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-lg);
  }
  
  .timeline-icon {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-lg);
  }
  
  /* Linha conectora removida em mobile */
  .process-timeline::before {
    display: none;
  }
  
  .how-it-works-cta {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .timeline-content {
    padding: var(--spacing-sm);
  }
  
  .timeline-number {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-base);
  }
  
  .timeline-icon {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-base);
  }
  
  .how-it-works h2 {
    font-size: var(--font-size-3xl);
  }
  
  .how-it-works-cta h3 {
    font-size: var(--font-size-xl);
  }
}
