/* ========================================
   SIMULADOR - CSS SEPARADO E DEDICADO
   Seguindo o padrão visual do site existente
   ======================================== */

/* ========================================
   CONTAINER DO SIMULADOR
   ======================================== */
.simulator-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 800px;
  margin: 2rem auto 0;
  align-items: start;
}

/* ========================================
   FORMULÁRIO DO SIMULADOR
   ======================================== */
.simulator-form {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h3 {
  font-size: 1.5rem;
  color: #2e3d6a;
  margin-bottom: 1.5rem;
  font-weight: 700;
}



/* ========================================
   FORMULÁRIO
   ======================================== */
.simulation-form {
  margin-bottom: 0;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.form-field input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-field input:focus {
  outline: none;
  border-color: #2e3d6a;
  box-shadow: 0 0 0 3px rgba(46, 61, 106, 0.1);
}

.form-field input::placeholder {
  color: #9ca3af;
}

.button-row {
  justify-content: center;
  margin-top: 2.5rem;
}





.btn-simulator {
  background: #10b981;
  color: white;
  border: none;
  padding: 1.5rem 3rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 320px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-simulator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.btn-simulator:hover::before {
  left: 100%;
}

.btn-simulator:hover {
  background: #059669;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.btn-simulator:active {
  transform: translateY(-1px) scale(1.02);
}



/* ========================================
   PRELOADER CONTAINERS
   ======================================== */
.preloader-container,
.contract-preloader {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  grid-column: 1 / -1;
}

.preloader-header {
  margin-bottom: 3rem;
}

.preloader-header h3 {
  font-size: 1.75rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
  font-weight: 700;
}

.preloader-header p {
  color: #6b7280;
  font-size: 1.125rem;
}

/* ========================================
   LOADING ANIMATION
   ======================================== */
.preloader-animation {
  margin-bottom: 3rem;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 4px solid #e5e7eb;
  border-left: 4px solid #2e3d6a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 2rem;
}

.contract-spinner {
  border-left: 4px solid #fbbf24;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-progress {
  max-width: 400px;
  margin: 0 auto;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e3d6a, #3d4c7a, #fbbf24);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 1rem;
  color: #2e3d6a;
  font-weight: 600;
}



/* ========================================
   ANALYSIS STEPS
   ======================================== */
.analysis-steps,
.contract-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.analysis-step,
.contract-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.analysis-step.completed,
.contract-step.completed {
  background: #f0f9ff;
  border-color: #2e3d6a;
}

.analysis-step i,
.contract-step i {
  font-size: 1.5rem;
  color: #2e3d6a;
  min-width: 24px;
}

.analysis-step span,
.contract-step span {
  flex: 1;
  font-size: 1rem;
  color: #374151;
  font-weight: 500;
}

.step-status {
  font-size: 1.25rem;
  min-width: 24px;
  text-align: center;
}

/* ========================================
   RESULTS CONTAINER
   ======================================== */
.results-container {
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
}

.results-header {
  text-align: center;
  margin-bottom: 3rem;
}

.success-badge {
  display: inline-block;
  background: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.results-header h3 {
  font-size: 1.75rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
  font-weight: 700;
}

.results-header p {
  color: #6b7280;
  font-size: 1.125rem;
}

/* ========================================
   ECONOMY RESULTS
   ======================================== */
.economy-results {
  margin-bottom: 3rem;
}

.main-result {
  background: #2e3d6a;
  color: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(46, 61, 106, 0.3);
}

.main-result .result-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.main-result .result-label {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.main-result .result-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.main-result .result-note {
  font-size: 0.875rem;
  opacity: 0.8;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.result-card {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(46, 61, 106, 0.15);
}

/* ========================================
   FOGOS DE ARTIFÍCIO ANIMADOS
   ======================================== */
.results-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, transparent 0%, rgba(255, 215, 0, 0.1) 50%, transparent 100%),
    radial-gradient(circle at 80% 20%, transparent 0%, rgba(255, 69, 0, 0.1) 50%, transparent 100%),
    radial-gradient(circle at 40% 40%, transparent 0%, rgba(138, 43, 226, 0.1) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Partículas de fogos de artifício */
.firework-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: firework-explosion 4s ease-out infinite;
}

.firework-particle:nth-child(1) { 
  background: #ffd700; 
  left: 20%; 
  animation-delay: 0s; 
}
.firework-particle:nth-child(2) { 
  background: #ff4500; 
  left: 30%; 
  animation-delay: 0.5s; 
}
.firework-particle:nth-child(3) { 
  background: #8a2be2; 
  left: 40%; 
  animation-delay: 1s; 
}
.firework-particle:nth-child(4) { 
  background: #00ff7f; 
  left: 50%; 
  animation-delay: 1.5s; 
}
.firework-particle:nth-child(5) { 
  background: #ff69b4; 
  left: 60%; 
  animation-delay: 2s; 
}
.firework-particle:nth-child(6) { 
  background: #1e90ff; 
  left: 70%; 
  animation-delay: 2.5s; 
}
.firework-particle:nth-child(7) { 
  background: #ffa500; 
  left: 80%; 
  animation-delay: 3s; 
}
.firework-particle:nth-child(8) { 
  background: #32cd32; 
  left: 90%; 
  animation-delay: 3.5s; 
}

/* Animação dos fogos de artifício */
@keyframes firework-explosion {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  50% {
    transform: translateY(50vh) scale(1.5);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }
}

/* Efeito de brilho pulsante */
.success-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 69, 0, 0.2) 30%, transparent 70%);
  border-radius: 50%;
  animation: success-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes success-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.6;
  }
}

/* Confete caindo */
.confetti {
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(45deg, #ffd700, #ff4500, #8a2be2, #00ff7f);
  animation: confetti-fall 5s linear infinite;
  pointer-events: none;
  z-index: 2;
  border-radius: 2px;
}

.confetti:nth-child(1) { left: 5%; animation-delay: 0s; }
.confetti:nth-child(2) { left: 15%; animation-delay: 0.6s; }
.confetti:nth-child(3) { left: 25%; animation-delay: 1.2s; }
.confetti:nth-child(4) { left: 35%; animation-delay: 1.8s; }
.confetti:nth-child(5) { left: 45%; animation-delay: 2.4s; }
.confetti:nth-child(6) { left: 55%; animation-delay: 3s; }
.confetti:nth-child(7) { left: 65%; animation-delay: 3.6s; }
.confetti:nth-child(8) { left: 75%; animation-delay: 4.2s; }
.confetti:nth-child(9) { left: 85%; animation-delay: 4.8s; }

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.8);
    opacity: 0;
  }
}

.result-card .result-icon {
  font-size: 2rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
}

.result-card .result-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-card .result-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2e3d6a;
}

/* ========================================
   CONTRACT SECTION
   ======================================== */
.contract-section {
  background: #f9fafb;
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
}

.contract-info {
  margin-bottom: 2rem;
}

.contract-info h4 {
  font-size: 1.5rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
  font-weight: 700;
}

.contract-info p {
  color: #6b7280;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.contract-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.benefit-item i {
  color: #10b981;
  font-size: 1.125rem;
}

.benefit-item span {
  color: #374151;
  font-weight: 500;
}

.contract-cta {
  text-align: center;
}

.btn-mega {
  background: #2e3d6a;
  color: white;
  border: none;
  padding: 1.25rem 2rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  min-width: 300px;
  justify-content: center;
  margin-bottom: 1rem;
}

.btn-mega:hover {
  background: #1e2d5a;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(46, 61, 106, 0.4);
}

.contract-note {
  margin-top: 1rem;
}

.contract-note small {
  color: #6b7280;
  font-size: 0.875rem;
}

/* ========================================
   FINAL MESSAGE
   ======================================== */
.final-message {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  grid-column: 1 / -1;
}

.success-animation {
  margin-bottom: 3rem;
}

.success-icon {
  font-size: 5rem;
  color: #10b981;
  margin-bottom: 1rem;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

.final-message h3 {
  font-size: 2rem;
  color: #2e3d6a;
  font-weight: 700;
  margin-bottom: 2rem;
}

.final-content {
  max-width: 600px;
  margin: 0 auto;
}

.final-info {
  margin-bottom: 3rem;
}

.final-info h4 {
  font-size: 1.5rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
}

.final-info p {
  color: #6b7280;
  font-size: 1.125rem;
  line-height: 1.6;
}

.next-steps {
  margin-bottom: 3rem;
}

.step-card {
  background: #f9fafb;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.step-icon {
  font-size: 2.5rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
}

.step-content h5 {
  font-size: 1.25rem;
  color: #2e3d6a;
  margin-bottom: 1rem;
  font-weight: 700;
}

.step-content p {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.step-content ul {
  list-style: none;
  padding: 0;
}

.step-content li {
  color: #374151;
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.whatsapp-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #25d366;
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: 600;
}

.whatsapp-alert i {
  font-size: 1.5rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ========================================
   ERROR NOTIFICATION
   ======================================== */
.error-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ef4444;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.error-notification.show {
  transform: translateX(0);
}

.error-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error-notification i {
  font-size: 1.25rem;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
  .simulator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-guarantees {
    grid-template-columns: 1fr;
  }
  

  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .contract-benefits {
    grid-template-columns: 1fr;
  }
  
  .btn-mega {
    min-width: 100%;
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
  }
  
  .contact-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .simulator-form,

  .preloader-container,
  .contract-preloader,
  .results-container,
  .final-message {
    padding: 1.5rem;
  }
  
  .form-header h3 {
    font-size: 1.25rem;
  }
  
  .progress-step {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .progress-step:not(:last-child)::after {
    width: 1rem;
  }
  
  .main-result .result-value {
    font-size: 2rem;
  }
  
  .result-card .result-value {
    font-size: 1.5rem;
  }
  
  .btn-mega {
    font-size: 1rem;
    padding: 0.875rem 1rem;
  }
}
