﻿/* ============================================================
   PAIN ANALYZER — Rediseño nativo al sistema de diseño Aigocy
   Josep.studio — Usa exactamente los mismos tokens, patrones
   y clases del styles.css del template.
   ============================================================ */

/* ────────────────────────────────────────────
   SECTION WRAPPER
   Igual a .section-tools — fondo blanco con
   imágenes decorativas flotantes
──────────────────────────────────────────── */
.section-pain-analyzer {
  position: relative;
  padding: 100px 0;
  background-color: var(--body);
  overflow: hidden;
}
@media (max-width: 767px) {
  .section-pain-analyzer {
    padding: 60px 0;
  }
}

/* ────────────────────────────────────────────
   STEP PROGRESS BAR
   Estilo basado en .section-process del template
──────────────────────────────────────────── */
.pa-steps-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 48px;
  gap: 0;
}

.pa-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.pa-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Urbanist", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  /* Estado inactivo — idéntico al .social-item neutral */
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, #F5F5F5, #F5F5F5);
  box-shadow: 0px -3px 0px 0px #E9E9E9 inset, 0px 1px 0px 0px rgba(255,255,255,0.698) inset, 0px 3px 3px 0px rgba(0,0,0,0.12);
  color: var(--neutral-400);
  transition: all 0.35s ease;
}

.pa-step-label {
  font-family: "Urbanist", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-400);
  transition: color 0.35s ease;
  white-space: nowrap;
}

/* Activo — usa el estilo .tf-btn exacto */
.pa-step-item.pa-active .pa-step-num {
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, #272727, #272727);
  box-shadow: 0px -3px 0px 0px #080808 inset, 0px 1px 0px 0px rgba(255,255,255,0.302) inset, 0px 2.77px 2.21px 0px rgba(0,0,0,0.12), 0px 6.65px 5.32px 0px rgba(0,0,0,0.13), 0px 12.52px 10.02px 0px rgba(0,0,0,0.13);
  color: var(--white);
}
.pa-step-item.pa-active .pa-step-label {
  color: var(--primary);
}

/* Completado — punto de color brand */
.pa-step-item.pa-completed .pa-step-num {
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, var(--brand), var(--brand));
  box-shadow: 0px -3px 0px 0px rgba(0,0,0,0.3) inset, 0px 1px 0px 0px rgba(255,255,255,0.3) inset;
  color: var(--white);
}
.pa-step-item.pa-completed .pa-step-label {
  color: var(--brand);
}

/* Línea conectora */
.pa-step-connector {
  flex: 1;
  height: 1px;
  background: var(--neutral-300);
  max-width: 64px;
  margin-top: 24px; /* alinear con centro del círculo */
  position: relative;
  overflow: hidden;
}
.pa-step-connector::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: var(--brand);
  transition: left 0.5s ease;
}
.pa-step-connector.pa-filled::after {
  left: 0;
}

/* ────────────────────────────────────────────
   MAIN ANALYZER CARD
   Basado en .form-contact del template
   (padding 56px, border-radius 40px, box-shadow)
──────────────────────────────────────────── */
.pa-card {
  padding: 56px;
  border-radius: 40px;
  background-color: var(--neutral-100);
  box-shadow: 0px 7.77px 16px 0px rgba(0,0,0,0.06), 0px 3px 3px 0px rgba(0,0,0,0.10), 0px -8px 0px 0px rgba(0,0,0,0.05) inset, 0px 4px 0px 0px rgba(255,255,255,0.6) inset;
  max-width: 780px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .pa-card {
    padding: 32px 24px;
    border-radius: 24px;
  }
}

/* ────────────────────────────────────────────
   PANEL TRANSITIONS
──────────────────────────────────────────── */
.pa-panel {
  display: none;
}
.pa-panel.pa-active {
  display: block;
  animation: paFadeIn 0.4s ease forwards;
}
@keyframes paFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────────────
   PANEL TYPOGRAPHY
   Misma escala que el template (.heading-title,
   .text-body, etc.)
──────────────────────────────────────────── */
.pa-panel-title {
  font-family: "Urbanist", sans-serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 48px;
  letter-spacing: -0.01em;
  color: var(--primary);
  margin-bottom: 8px;
}
@media (max-width: 767px) {
  .pa-panel-title {
    font-size: 26px;
    line-height: 34px;
  }
}

.pa-panel-subtitle {
  font-size: 16px;
  line-height: 24px;
  color: var(--secondary);
  margin-bottom: 32px;
}

/* ────────────────────────────────────────────
   SECTOR CHIPS
   Basados en .list-tags del template
──────────────────────────────────────────── */
.pa-sector-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 14px;
}

.pa-sector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.pa-sector-chip {
  /* idéntico a .list-tags a */
  display: flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 99px;
  color: var(--secondary);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-300);
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
  user-select: none;
}
.pa-sector-chip:hover {
  border-color: var(--neutral-400);
  color: var(--primary);
}
.pa-sector-chip.pa-selected {
  /* mismo estilo que .heading-sub (brand tag) */
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, #F5F5F5, #F5F5F5);
  box-shadow: 0px -3px 0px 0px #E9E9E9 inset, 0px 1px 0px 0px rgba(255,255,255,0.698) inset, 0px 3px 3px 0px rgba(0,0,0,0.14);
  border-color: var(--brand);
  color: var(--brand);
}

/* ────────────────────────────────────────────
   TEXTAREA / INPUT
   Igual que form textarea del template:
   border-bottom only, fondo transparente
──────────────────────────────────────────── */
.pa-textarea {
  width: 100%;
  min-height: 130px;
  padding: 0 0 11px 0;
  border: 0;
  border-bottom: 1px solid var(--neutral-300);
  border-radius: 0;
  background-color: transparent;
  color: var(--primary);
  font-family: "Urbanist", sans-serif;
  font-size: 16px;
  line-height: 24px;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease;
}
.pa-textarea::placeholder {
  color: var(--secondary);
}
.pa-textarea:focus {
  border-color: var(--brand);
}

.pa-char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 6px;
}
.pa-char-counter.pa-warn {
  color: var(--brand);
}

/* ────────────────────────────────────────────
   QUESTION INPUTS (Step 2)
   Mismo estilo que form input
──────────────────────────────────────────── */
.pa-question-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pa-question-item {
  border-bottom: 1px solid var(--neutral-200);
  padding: 20px 0;
}
.pa-question-item:first-child {
  border-top: 1px solid var(--neutral-200);
}

.pa-question-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pa-q-num {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, #272727, #272727);
  box-shadow: 0px -3px 0px 0px #080808 inset, 0px 1px 0px 0px rgba(255,255,255,0.302) inset;
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pa-question-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--primary);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
}

.pa-question-input {
  width: 100%;
  padding: 0 0 11px 0;
  border: 0;
  border-bottom: 1px solid var(--neutral-300);
  background-color: transparent;
  color: var(--primary);
  font-family: "Urbanist", sans-serif;
  font-size: 16px;
  line-height: 24px;
  outline: none;
  transition: border-color 0.3s ease;
}
.pa-question-input::placeholder {
  color: var(--secondary);
}
.pa-question-input:focus {
  border-color: var(--brand);
}

/* ────────────────────────────────────────────
   AI THINKING STATE
   Spinner basado en el .spinner-circle del template
──────────────────────────────────────────── */
.pa-thinking {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 56px 0 40px;
  gap: 20px;
}
.pa-thinking.pa-show {
  display: flex;
}

.pa-thinking-label {
  font-family: "Urbanist", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary);
}

.pa-dots {
  display: flex;
  gap: 8px;
}
.pa-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--brand);
  animation: paDotBounce 1.4s ease-in-out infinite;
}
.pa-dots span:nth-child(2) { animation-delay: 0.2s; }
.pa-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes paDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ────────────────────────────────────────────
   RESULT CARD
──────────────────────────────────────────── */
.pa-result {
  display: none;
}
.pa-result.pa-show {
  display: block;
  animation: paFadeIn 0.4s ease forwards;
}

/* Badge de viabilidad — basado en .heading-section .heading-sub */
.pa-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 6px 16px 6px 30px;
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  background: radial-gradient(62.56% 62.56% at 28.14% -10.42%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%), linear-gradient(0deg, #F5F5F5, #F5F5F5);
  box-shadow: 0px -3px 0px 0px #E9E9E9 inset, 0px 1px 0px 0px rgba(255,255,255,0.698) inset, 0px 3px 3px 0px rgba(0,0,0,0.14);
}
.pa-badge::before {
  position: absolute;
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}
.pa-badge.pa-yes  { color: #15803d; }
.pa-badge.pa-yes::before  { background: #22c55e; }
.pa-badge.pa-partial { color: #b45309; }
.pa-badge.pa-partial::before { background: #f59e0b; }
.pa-badge.pa-no   { color: var(--brand); }
.pa-badge.pa-no::before   { background: var(--brand); }

/* Complexity dots — basado en .pagi-dot del template */
.pa-complexity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.pa-complexity-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-right: 4px;
}
.pa-complexity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--neutral-300);
  transition: background 0.3s;
}
.pa-complexity-dot.pa-low    { background: #22c55e; }
.pa-complexity-dot.pa-medium { background: #f59e0b; }
.pa-complexity-dot.pa-high   { background: #ef4444; }
.pa-complexity-dot.pa-critical { background: var(--brand); }
.pa-complexity-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* Summary text */
.pa-summary {
  font-size: 18px;
  line-height: 28px;
  color: var(--primary);
  margin-bottom: 28px;
}

/* Solution vision — basado en .box-quotes del template */
.pa-solution {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 32px 28px;
  border-radius: 24px;
  background-color: var(--neutral-100);
  box-shadow: 0px 7.77px 16px 0px rgba(0,0,0,0.06), 0px 3px 3px 0px rgba(0,0,0,0.10), 0px -8px 0px 0px rgba(0,0,0,0.05) inset, 0px 4px 0px 0px rgba(255,255,255,0.6) inset;
  margin-bottom: 28px;
}
.pa-solution-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.pa-solution-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 8px;
}
.pa-solution-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--primary);
}

/* Resultado grid — .grid-2 del template */
.pa-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 575px) {
  .pa-result-grid {
    grid-template-columns: 1fr;
  }
}
.pa-result-item {
  padding: 20px 20px 16px;
  border-radius: 20px;
  background-color: var(--neutral-100);
  box-shadow: 0px 3px 3px 0px rgba(0,0,0,0.10), 0px -8px 0px 0px rgba(0,0,0,0.05) inset, 0px 4px 0px 0px rgba(255,255,255,0.6) inset;
}
.pa-result-item .ri-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 6px;
}
.pa-result-item .ri-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

/* Services chips — idéntico a .list-tags del template */
.pa-services-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 12px;
}
.pa-services-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.pa-s-chip {
  display: flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 99px;
  color: var(--brand);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-300);
  font-family: "Urbanist", sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
}

/* Next steps list — .list-text.type-check del template */
.pa-steps-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 12px;
}
.pa-steps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pa-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 15px;
  color: var(--primary);
  line-height: 1.5;
}
.pa-steps-list li:first-child {
  border-top: 1px solid var(--neutral-200);
}
.pa-steps-list li .icon {
  color: var(--brand);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ────────────────────────────────────────────
   DIVIDER — igual que .br-line del template
──────────────────────────────────────────── */
.pa-divider {
  width: 100%;
  height: 1px;
  background: var(--neutral-200);
  margin: 32px 0;
}

/* ────────────────────────────────────────────
   BUTTONS
   Reutilizamos directamente .tf-btn y .tf-btn-2
   del template. Solo añadimos el estado disabled.
──────────────────────────────────────────── */
.tf-btn:disabled,
.tf-btn-2:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pa-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ────────────────────────────────────────────
   ERROR BANNER
──────────────────────────────────────────── */
.pa-error {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: rgba(147, 51, 234, 0.06);
  border: 1px solid rgba(147, 51, 234, 0.2);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  font-family: "Urbanist", sans-serif;
}
.pa-error.pa-show {
  display: flex;
}

/* ────────────────────────────────────────────
   CTA TEASER BANNER (antes del card)
   Estilo .review-box del template
──────────────────────────────────────────── */
.pa-teaser {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 780px;
  margin: 0 auto 40px;
  padding: 32px 40px;
  border-radius: 24px;
  background-color: var(--neutral-100);
  box-shadow: 0px 7.77px 16px 0px rgba(0,0,0,0.06), 0px 3px 3px 0px rgba(0,0,0,0.10), 0px -8px 0px 0px rgba(0,0,0,0.05) inset, 0px 4px 0px 0px rgba(255,255,255,0.6) inset;
}
@media (max-width: 575px) {
  .pa-teaser {
    padding: 24px 20px;
  }
}
.pa-teaser-icon {
  font-size: 44px;
  flex-shrink: 0;
  line-height: 1;
}
.pa-teaser-title {
  font-family: "Urbanist", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.pa-teaser-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--secondary);
}
