/* ═══════════════════════════════════════════
   CRM Tool Finder v2.0 — Frontend Styles
   crm-systeme.com
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.ctf-root *,
.ctf-root *::before,
.ctf-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ctf-root {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 860px;
  margin: 0 auto;
  color: #1a202c;
  line-height: 1.55;
}

/* ── CARD ── */
.ctf-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
}

/* ── HEADER ── */
.ctf-header {
  background: linear-gradient(135deg, #0f2d5e 0%, #1a4a8a 60%, #1e5fa8 100%);
  padding: 28px 32px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ctf-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.ctf-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.9);
}
.ctf-header h2 {
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ctf-header p {
  font-size: 14px;
  color: rgba(255,255,255,.72);
}
.ctf-progress-bar-wrap {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
}
.ctf-progress-bar-fill {
  height: 100%;
  background: #4ade80;
  border-radius: 10px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.ctf-progress-label {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 5px;
}

/* ── BODY ── */
.ctf-body { padding: 28px 32px; }

/* ── QUESTION ── */
.ctf-question { animation: ctfFadeUp .3s ease both; }
@keyframes ctfFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ctf-q-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3b82f6;
  margin-bottom: 6px;
}
.ctf-q-text {
  font-size: clamp(17px, 2.8vw, 22px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* ── ANSWER GRIDS ── */
/* 2-column default */
.ctf-answers--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* 1-column (industry, always stacked) */
.ctf-answers--1col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── ANSWER BUTTON — default (card) ── */
.ctf-answer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
  font-family: inherit;
  color: #1a202c;
  position: relative;
  overflow: hidden;
}
.ctf-answer-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(59,130,246,.14);
}
.ctf-answer-btn.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Row variant for 1-col list (wider layout) */
.ctf-answer-btn--row {
  padding: 12px 18px;
}

/* Priority variant */
.ctf-answer-btn--priority {
  user-select: none;
}
.ctf-answer-btn.ctf-prio-primary {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.ctf-answer-btn.ctf-prio-secondary {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.ctf-answer-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.ctf-answer-text { flex: 1; min-width: 0; }
.ctf-answer-label { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctf-answer-sub   { font-size: 12px; color: #64748b; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── PRIORITY BADGES ── */
.ctf-prio-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  pointer-events: none;
}
.ctf-prio-badge--1 { background: #2563eb; }
.ctf-prio-badge--2 { background: #7c3aed; }

/* ── PRIORITY WRAPPER ── */
.ctf-priority-wrapper { display: flex; flex-direction: column; gap: 14px; }
.ctf-priority-hint {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  transition: color .2s;
}
.ctf-priority-continue {
  align-self: flex-end;
  margin-top: 4px;
}

/* ── BUTTONS ── */
.ctf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .16s ease;
}
.ctf-btn-primary { background: #2563eb; color: #fff; }
.ctf-btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.ctf-btn-ghost   { background: transparent; color: #64748b; border: 2px solid #e2e8f0; }
.ctf-btn-ghost:hover { border-color: #cbd5e1; color: #334155; }

.ctf-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* ── RESULTS ── */
.ctf-results { animation: ctfFadeUp .35s ease both; }

.ctf-results-header { text-align: center; margin-bottom: 22px; }
.ctf-check {
  width: 52px; height: 52px;
  background: #dcfce7; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 12px;
}
.ctf-results-header h3 { font-size: clamp(18px,3vw,22px); font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.ctf-results-header p  { font-size: 13px; color: #64748b; }

/* ── WINNER CARD ── */
.ctf-winner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 2px solid #3b82f6;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 18px;
  position: relative;
}
.ctf-winner-ribbon {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37,99,235,.09);
  border: 1px solid rgba(37,99,235,.2);
  border-radius: 20px;
  padding: 3px 10px;
}
.ctf-tool-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ctf-tool-logo {
  width: 56px; height: 56px;
  object-fit: contain;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  padding: 5px;
  flex-shrink: 0;
}
.ctf-tool-info { flex: 1; min-width: 0; }
.ctf-tool-nameline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctf-tool-name  { font-size: 18px; font-weight: 800; color: #0f172a; }
.ctf-tool-tagline { font-size: 13px; color: #64748b; margin-top: 2px; }
.ctf-badge-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.ctf-stars-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.ctf-stars     { color: #f59e0b; font-size: 15px; letter-spacing: -1px; }
.ctf-stars-num { color: #374151; font-size: 13px; font-weight: 600; }
.ctf-best-for  { color: #64748b; font-size: 12px; margin-left: 4px; }

.ctf-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.ctf-price-from { font-size: 20px; font-weight: 800; color: #16a34a; }
.ctf-price-note { font-size: 13px; color: #64748b; }

.ctf-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 16px;
}
.ctf-highlight-item { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: #374151; }
.ctf-highlight-check { color: #16a34a; font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.ctf-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 20px;
  background: #2563eb;
  color: #fff !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all .16s ease;
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.ctf-cta-btn:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.38); color: #fff !important; }
.ctf-cta-disclaimer { text-align: center; font-size: 11px; color: #9ca3af; margin-top: 6px; }

/* ── ALTERNATIVES ── */
.ctf-alts-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.ctf-alt-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color .16s, background .16s;
}
.ctf-alt-card:hover { border-color: #3b82f6; background: #eff6ff; }

.ctf-alt-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ctf-alt-logo {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}
.ctf-alt-body   { flex: 1; min-width: 0; }
.ctf-alt-nameline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctf-alt-name   { font-size: 14px; font-weight: 700; color: #0f172a; }
.ctf-alt-badge  {
  padding: 1px 7px; border-radius: 10px; font-size: 10px;
  font-weight: 700; color: #fff;
}
.ctf-alt-price  { font-size: 12px; color: #16a34a; font-weight: 600; margin-top: 2px; }
.ctf-alt-cta {
  padding: 7px 13px;
  background: #fff;
  border: 1.5px solid #3b82f6;
  color: #2563eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .14s;
}
.ctf-alt-cta:hover { background: #2563eb; color: #fff; text-decoration: none; }

/* ── PASSUNG / MATCH BAR ── */
.ctf-match-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ctf-match-label {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 52px;
}
.ctf-match-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.ctf-match-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.ctf-match-pct {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── LOGO FALLBACK ── */
.ctf-logo-fallback {
  border-radius: 10px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

/* ── FOOTER ── */
.ctf-results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}
.ctf-restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all .14s;
}
.ctf-restart-btn:hover { border-color: #cbd5e1; color: #334155; }
.ctf-affiliate-note {
  font-size: 11px;
  color: #9ca3af;
  max-width: 300px;
  line-height: 1.5;
  text-align: right;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 640px) {
  .ctf-header  { padding: 22px 18px 18px; }
  .ctf-body    { padding: 20px 16px; }

  /* ALL question grids → single column on mobile */
  .ctf-answers--2col { grid-template-columns: 1fr; }
  .ctf-answers--1col { flex-direction: column; }

  .ctf-winner-ribbon { display: none; }
  .ctf-highlights { grid-template-columns: 1fr; }
  .ctf-results-footer { flex-direction: column; align-items: flex-start; }
  .ctf-affiliate-note { text-align: left; max-width: 100%; }
  .ctf-priority-continue { align-self: stretch; justify-content: center; }
  .ctf-tool-name { font-size: 16px; }
  .ctf-match-label { min-width: 44px; }
}

@media (max-width: 380px) {
  .ctf-answer-label { font-size: 13px; }
  .ctf-answer-sub   { display: none; }
  .ctf-alt-top { flex-wrap: wrap; }
}
