/* ============================================
   BUSINESS MATCH QUIZ — business-match.css
   ============================================ */

/* ---- Layout ---- */
.quiz-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 64px;
  align-items: start;
}
.quiz-main { min-width: 0; }
.quiz-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
}

/* ---- Quiz Card (shared shell) ---- */
.quiz-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 40px 44px;
  min-height: 480px;
}
.quiz-card.hidden { display: none; }

/* ---- Progress Bar ---- */
.quiz-progress {
  width: 100%;
  height: 8px;
  background: var(--off-white);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--teal) 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 100px;
}
.quiz-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* ---- Question ---- */
.question-container { animation: fadeInUp 0.35s ease both; }

.question-title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 8px;
}
.question-help {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ---- Option buttons ---- */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.options-grid.cols-1 { grid-template-columns: 1fr; }

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  transition: all 0.18s ease;
}
.option-btn:hover {
  border-color: var(--green);
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46,125,85,0.12);
}
.option-btn:focus-visible {
  outline: 3px solid rgba(46,125,85,0.35);
  outline-offset: 2px;
}
.option-btn.selected {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 4px 14px rgba(46,125,85,0.18);
}
.option-btn .option-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.option-btn .option-label { flex: 1; }
.option-btn .option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.option-btn.selected .option-check {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.option-btn .option-check svg { opacity: 0; transition: opacity 0.15s ease; }
.option-btn.selected .option-check svg { opacity: 1; }

/* ---- Quiz nav ---- */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.btn-back { padding: 11px 20px; font-size: 14px; }
.btn-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-light);
  border-color: var(--text-light);
  transform: none;
  box-shadow: none;
}

/* ---- Email Gate ---- */
.email-gate {
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 0;
  animation: fadeInUp 0.35s ease both;
}
.email-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.email-gate h2 {
  font-size: 26px;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.email-gate-sub {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 28px;
}
.email-gate-sub strong { color: var(--green); }

.lead-form { text-align: left; }
.lead-form .form-group { margin-bottom: 16px; }
.lead-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.form-error {
  background: var(--red-light);
  color: #a32525;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 0 12px;
  font-weight: 600;
}
.full-width { width: 100%; justify-content: center; margin-top: 8px; }
.form-fineprint {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-top: 14px;
  line-height: 1.55;
}
.form-fineprint a { color: var(--text-mid); text-decoration: underline; }

/* Loading state on submit button */
.btn-submit-loading {
  pointer-events: none;
  position: relative;
}
.btn-submit-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Results ---- */
.results-header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.4s ease both;
}
.results-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 12px;
  color: var(--text-dark);
}
.results-header h2 .name-highlight { color: var(--green); }
.results-sub {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}

.result-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 26px 28px;
  background: var(--white);
  transition: all 0.2s ease;
  animation: fadeInUp 0.45s ease both;
}
.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.15s; }
.result-card:nth-child(3) { animation-delay: 0.25s; }

.result-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
}
.result-card.top-match {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-light) 0%, var(--white) 60%);
}
.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.result-card-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result-card-title .rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(46,125,85,0.12);
  padding: 4px 10px;
  border-radius: 100px;
}
.result-card-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.result-card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.result-card-stat svg { color: var(--green); }
.result-card-stat span { color: var(--text-dark); }

.result-card-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 12px 0 16px;
}
.result-fit {
  background: var(--off-white);
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.result-fit-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}
.result-fit-text {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.55;
}

.result-steps {
  margin-top: 8px;
}
.result-steps-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 10px;
}
.result-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-steps-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.55;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Results CTA Card ---- */
.results-cta-card {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 36px 36px 32px;
  border-radius: 16px;
  margin-top: 8px;
}
.results-cta-card h3 {
  color: var(--white);
  font-size: 22px;
  margin: 0 0 12px;
  line-height: 1.3;
}
.results-cta-card h3 em {
  color: var(--green-light);
  font-style: italic;
  font-weight: 800;
}
.results-cta-card p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.65;
  margin-bottom: 24px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-actions .btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.cta-actions .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* ---- Restart ---- */
.results-footer {
  text-align: center;
  margin-top: 28px;
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.15s ease;
  font-family: inherit;
}
.btn-text:hover { color: var(--green); }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .quiz-wrap { grid-template-columns: 1fr; }
  .quiz-sidebar { position: static; }
  .quiz-card { padding: 32px 28px; min-height: auto; }
}

@media (max-width: 600px) {
  .quiz-card { padding: 24px 20px; }
  .options-grid { grid-template-columns: 1fr; }
  .quiz-nav { flex-direction: row; }
  .btn-back, .btn-next { flex: 1; justify-content: center; }
  .result-card { padding: 22px 20px; }
  .results-cta-card { padding: 28px 22px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; justify-content: center; }
}
