/* =============================================
   stats.css — Stats section under hero
   ============================================= */

.stats-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 200, 240, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  background: var(--card-hover);
  border-color: rgba(58, 155, 220, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(17, 72, 160, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(17, 72, 160, 0.4), rgba(30, 111, 212, 0.2));
  border: 1px solid rgba(58, 155, 220, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue-5);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e8f4ff 0%, #7ec8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  min-width: 80px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.stat-live {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a9bdc;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* Loading shimmer */
.stat-value.loading {
  background: linear-gradient(90deg,
    rgba(58, 155, 220, 0.1) 0%,
    rgba(58, 155, 220, 0.25) 50%,
    rgba(58, 155, 220, 0.1) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 1.5s infinite;
  -webkit-text-fill-color: transparent;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error state */
.stat-value.error {
  font-size: 1.1rem;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    padding: 1.5rem;
  }
  .stat-value {
    font-size: 1.6rem;
  }
}
