/* ═══ Blog Visual Components ═══
   Rich editorial visuals: stat rings, bar charts, timelines,
   comparison tables, checklists, callouts, and step connectors.
*/

/* ── Stat Cards with SVG Ring ── */
.vis-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.vis-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
  transition: all .25s ease;
}

.vis-stat:hover {
  border-color: rgba(99, 102, 241, .2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  transform: translateY(-2px);
}

.vis-stat__ring {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto .75rem;
}

.vis-stat__ring svg {
  width: 80px;
  height: 80px;
  display: block;
}

.vis-stat__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 800;
  color: #6366f1;
}

.vis-stat h3 {
  margin: 0 0 .3rem;
  font-size: .9rem;
  font-weight: 700;
}

.vis-stat p {
  margin: 0;
  font-size: .8rem;
  line-height: 1.55;
}

/* ── Bar Chart ── */
.vis-bars {
  display: grid;
  gap: 1rem;
}

.vis-bar-row {
  padding: 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
}

.vis-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}

.vis-bar-label strong {
  font-size: .88rem;
}

.vis-bar-label span {
  font-size: .75rem;
  color: var(--text-2, #64648b);
}

.vis-bar-track {
  height: 28px;
  background: rgba(99, 102, 241, .06);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.vis-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: .65rem;
  min-width: 36px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.vis-bar-fill span {
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
}

.vis-bar-row p {
  margin: .5rem 0 0;
  font-size: .8rem;
  line-height: 1.55;
}

/* ── Comparison Table ── */
.vis-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--r-md, 12px);
  overflow: hidden;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  background: var(--surface, #fff);
}

.vis-table th {
  padding: .65rem .85rem;
  background: rgba(99, 102, 241, .04);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6366f1;
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
}

.vis-table td {
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
  font-size: .85rem;
  vertical-align: top;
  line-height: 1.6;
}

.vis-table tr:last-child td {
  border-bottom: none;
}

.vis-table tr:hover td {
  background: rgba(99, 102, 241, .02);
}

.vis-table-val {
  font-weight: 700;
  color: #6366f1;
  white-space: nowrap;
}

/* ── Timeline ── */
.vis-timeline {
  position: relative;
  padding-left: 2.5rem;
}

.vis-timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #6366f1, #a78bfa, rgba(167, 139, 250, .2));
  border-radius: 1px;
}

.vis-tl-item {
  position: relative;
  padding-bottom: 1.5rem;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}

.vis-tl-item:last-child {
  padding-bottom: 0;
}

.vis-tl-dot {
  position: absolute;
  left: -2.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}

.vis-tl-dot span {
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
}

.vis-tl-content {
  padding: .85rem 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
  flex: 1;
  transition: all .25s ease;
}

.vis-tl-content:hover {
  border-color: rgba(99, 102, 241, .2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.vis-tl-content h3 {
  margin: 0 0 .3rem;
  font-size: .9rem;
  font-weight: 700;
}

.vis-tl-content p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
}

/* ── Checklist ── */
.vis-checklist {
  display: grid;
  gap: .65rem;
}

.vis-check-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
  transition: all .25s ease;
}

.vis-check-item:hover {
  border-color: rgba(16, 185, 129, .25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.vis-check-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
}

.vis-check-icon svg {
  width: 28px;
  height: 28px;
}

.vis-check-item h3 {
  margin: 0 0 .2rem;
  font-size: .88rem;
  font-weight: 700;
}

.vis-check-item p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
}

/* ── Callout ── */
.vis-callout {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1.15rem;
  border-radius: var(--r-md, 12px);
  background: linear-gradient(135deg, rgba(99, 102, 241, .06), rgba(139, 92, 246, .04));
  border: 1px solid rgba(99, 102, 241, .12);
  margin-bottom: .75rem;
}

.vis-callout:last-child {
  margin-bottom: 0;
}

.vis-callout-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 2px;
}

.vis-callout-icon svg {
  width: 32px;
  height: 32px;
}

.vis-callout h3 {
  margin: 0 0 .3rem;
  font-size: .92rem;
  font-weight: 700;
  color: #6366f1;
}

.vis-callout p {
  margin: 0;
  font-size: .85rem;
  line-height: 1.65;
}

/* ── Steps with connector ── */
.vis-steps {
  display: grid;
  gap: .65rem;
  counter-reset: step-counter;
}

.vis-step {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border, rgba(0,0,0,.06));
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
  transition: all .25s ease;
}

.vis-step:hover {
  border-color: rgba(99, 102, 241, .2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  transform: translateY(-1px);
}

.vis-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vis-step h3 {
  margin: 0 0 .25rem;
  font-size: .9rem;
  font-weight: 700;
}

.vis-step p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
}

/* ── FAQ with icon ── */
.faq-grid .faq-icon {
  width: 28px;
  height: 28px;
  margin-bottom: .4rem;
}

.faq-grid .faq-icon svg {
  width: 28px;
  height: 28px;
}

/* ── Responsive ── */
@media (max-width: 760px) {
  .vis-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vis-timeline {
    padding-left: 2rem;
  }

  .vis-tl-dot {
    left: -2rem;
    width: 24px;
    height: 24px;
  }

  .vis-tl-dot span {
    font-size: .6rem;
  }
}

@media (max-width: 480px) {
  .vis-stat-grid {
    grid-template-columns: 1fr;
  }
}
