/* ===== NEXXGENE QUIZ FUNNEL ===== */

/* --- Modal Overlay --- */
.nxq-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nxq-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Quiz Container --- */
.nxq-container {
  background: var(--white);
  width: 96%;
  max-width: 620px;
  max-height: 92vh;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.nxq-overlay.active .nxq-container {
  transform: translateY(0) scale(1);
}

/* --- Close Button --- */
.nxq-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.nxq-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

/* --- Progress Bar --- */
.nxq-progress {
  padding: 24px 32px 0;
}
.nxq-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.nxq-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
}
.nxq-progress-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

/* --- Screen Content Area --- */
.nxq-body {
  padding: 28px 32px 32px;
}
.nxq-screen {
  display: none;
  animation: nxqFadeIn 0.3s ease;
}
.nxq-screen.active {
  display: block;
}
@keyframes nxqFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Entry Screen --- */
.nxq-entry-title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 600;
  color: var(--purple);
  line-height: 1.2;
  margin-bottom: 12px;
}
.nxq-entry-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}
.nxq-entry-badges {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.nxq-entry-badge {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Question Screens --- */
.nxq-question {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 600;
  color: var(--purple);
  line-height: 1.3;
  margin-bottom: 24px;
}

/* --- Option Cards --- */
.nxq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nxq-option {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--off-white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.nxq-option:hover {
  border-color: var(--purple);
  background: rgba(62, 32, 94, 0.03);
  transform: translateY(-1px);
}
.nxq-option.selected {
  border-color: var(--purple);
  background: rgba(62, 32, 94, 0.06);
  font-weight: 500;
}

/* --- Back Button --- */
.nxq-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.nxq-back:hover {
  color: var(--purple);
}

/* --- Name Input (Q6) --- */
.nxq-name-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.nxq-name-input:focus {
  border-color: var(--purple);
}
.nxq-name-input::placeholder {
  color: var(--text-muted);
}

/* --- CTA Buttons --- */
.nxq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  text-decoration: none;
}
.nxq-btn--primary {
  background: var(--purple);
  color: var(--white);
}
.nxq-btn--primary:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(62, 32, 94, 0.25);
}
.nxq-btn--green {
  background: var(--green);
  color: var(--white);
}
.nxq-btn--green:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 92, 58, 0.25);
}
.nxq-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
}
.nxq-btn--ghost:hover {
  color: var(--purple);
}
.nxq-skip-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.nxq-skip-row .nxq-btn { flex: 1; }

/* --- Result Screen --- */
.nxq-result-header {
  text-align: center;
  margin-bottom: 24px;
}
.nxq-result-greeting {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
  color: var(--purple);
  line-height: 1.3;
  margin-bottom: 8px;
}
.nxq-result-greeting.green { color: var(--green); }
.nxq-result-product-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.nxq-result-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.nxq-result-card h4 {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--purple);
  margin-bottom: 8px;
}
.nxq-result-card.green h4 { color: var(--green); }
.nxq-result-card p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.nxq-result-objection {
  background: rgba(62, 32, 94, 0.04);
  border-left: 3px solid var(--purple);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
}
.nxq-result-objection.green {
  background: rgba(26, 92, 58, 0.04);
  border-left-color: var(--green);
}
.nxq-result-objection p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.nxq-result-objection strong {
  color: var(--purple);
}
.nxq-result-objection.green strong {
  color: var(--green);
}
.nxq-result-price {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.nxq-result-price strong {
  font-size: 24px;
  color: var(--purple);
  font-weight: 700;
}
.nxq-result-price.green strong {
  color: var(--green);
}
.nxq-result-trust {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* --- WhatsApp Opt-in --- */
.nxq-whatsapp-box {
  background: rgba(37, 211, 102, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
}
.nxq-whatsapp-box h4 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.nxq-whatsapp-input-row {
  display: flex;
  gap: 10px;
}
.nxq-whatsapp-input-row input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
.nxq-whatsapp-input-row input:focus {
  border-color: #25D366;
}
.nxq-whatsapp-input-row button {
  background: #25D366;
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.nxq-whatsapp-input-row button:hover {
  background: #1EBE5A;
}
.nxq-whatsapp-consent {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.nxq-whatsapp-consent input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #25D366;
}

/* --- FAQ Accordion --- */
.nxq-faq {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.nxq-faq-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 16px;
}
.nxq-faq-item {
  border-bottom: 1px solid var(--border);
}
.nxq-faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 14px 0;
  cursor: pointer;
  gap: 12px;
}
.nxq-faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.nxq-faq-q[aria-expanded="true"]::after {
  content: '\2212';
}
.nxq-faq-a {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 0;
}
.nxq-faq-a.open {
  max-height: 300px;
  padding: 0 0 14px;
}

/* --- Both Products Side-by-Side --- */
.nxq-both-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* --- Quiz Trigger Button (homepage) --- */
.nxq-trigger {
  background: linear-gradient(135deg, var(--purple), var(--gold));
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nxq-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(62, 32, 94, 0.3);
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .nxq-container {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }
  .nxq-body {
    padding: 20px 20px 28px;
  }
  .nxq-progress {
    padding: 16px 20px 0;
  }
  .nxq-entry-title {
    font-size: 26px;
  }
  .nxq-question {
    font-size: 20px;
  }
  .nxq-result-greeting {
    font-size: 24px;
  }
  .nxq-both-grid {
    grid-template-columns: 1fr;
  }
  .nxq-whatsapp-input-row {
    flex-direction: column;
  }
}
