/* ============================================================
   DIGITAL SAMAAJ — STATISTICS CARDS v2.0
   Larger icons · gradient numbers · hover lift · equal height
   ============================================================ */

/* ── STRIP CONTAINER ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: transparent;
  border-top: none;
  border-bottom: none;
  padding: 20px 16px;
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── INDIVIDUAL CARD ── */
.stat-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  margin: 0 6px;
  padding: 24px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition:
    transform .25s cubic-bezier(.4,0,.2,1),
    box-shadow .25s cubic-bezier(.4,0,.2,1),
    border-color .25s cubic-bezier(.4,0,.2,1),
    background .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 12px rgba(91,76,255,.06);
}

/* subtle top-edge colour bar */
.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8B5CF6);
  border-radius: 20px 20px 0 0;
  opacity: 0;
  transition: opacity .25s;
}

/* glow spot in background */
.stat-item::after {
  content: '';
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,76,255,.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

/* ── HOVER STATE ── */
.stat-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 12px 36px rgba(91,76,255,.16),
    0 4px 16px rgba(91,76,255,.10);
  border-color: var(--primary);
  background: linear-gradient(160deg, var(--surface) 60%, var(--primary-light) 100%);
}
.stat-item:hover::before { opacity: 1; }
.stat-item:hover::after  { opacity: 1; }
.stat-item:hover .stat-icon { transform: scale(1.15) rotate(-4deg); }
.stat-item:hover .stat-num  { transform: scale(1.06); }

/* ── ICON ── */
.stat-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 2px;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 2px 6px rgba(91,76,255,.25));
  line-height: 1;
  user-select: none;
}

/* ── NUMBER ── */
.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  display: block;
  transition: transform .2s cubic-bezier(.4,0,.2,1);
  /* gradient text */
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 60%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* suffix (K, +, %) inherits gradient */
.stat-suffix {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LABEL ── */
.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .6px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  transition: color .2s;
}
.stat-item:hover .stat-label { color: var(--primary); }

/* ── SUBTEXT (optional) ── */
.stat-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-light);
  text-align: center;
  margin-top: -2px;
  white-space: nowrap;
}

/* ── STRIP WRAPPER: card row with correct gap ── */
.stats-strip {
  padding-left: 10px;
  padding-right: 10px;
}
/* first/last card: flush with section edges */
.stat-item:first-child { margin-left: 0; }
.stat-item:last-child  { margin-right: 0; }

/* ============================================================
   MOBILE (< 480px): 2 × 2 grid
   ============================================================ */
@media (max-width: 479px) {
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px 12px;
  }
  .stat-item {
    margin: 0;
    padding: 20px 8px 16px;
    border-radius: 16px;
  }
  .stat-icon  { font-size: 24px; }
  .stat-num   { font-size: 22px; }
  .stat-label { font-size: 10px; letter-spacing: .4px; }
}

/* ── Very tiny screens ── */
@media (max-width: 360px) {
  .stats-strip { padding: 12px 8px; gap: 8px; }
  .stat-item   { padding: 16px 6px 12px; }
  .stat-icon   { font-size: 20px; }
  .stat-num    { font-size: 19px; }
}

/* ============================================================
   TABLET (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 24px 28px;
  }
  .stat-item  {
    margin: 0 8px;
    padding: 28px 16px 22px;
    border-radius: 22px;
  }
  .stat-item:first-child { margin-left: 0; }
  .stat-item:last-child  { margin-right: 0; }
  .stat-icon  { font-size: 34px; }
  .stat-num   { font-size: 32px; }
  .stat-label { font-size: 12px; }
}

/* ============================================================
   DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .stats-strip {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 48px;
    gap: 0;
  }
  .stat-item  {
    margin: 0 10px;
    padding: 32px 20px 26px;
    border-radius: 24px;
    gap: 8px;
  }
  .stat-item:first-child { margin-left: 0; }
  .stat-item:last-child  { margin-right: 0; }
  .stat-icon  { font-size: 40px; }
  .stat-num   { font-size: 38px; letter-spacing: -1.5px; }
  .stat-suffix { font-size: 22px; }
  .stat-label { font-size: 13px; letter-spacing: .8px; }
  .stat-sub   { font-size: 11px; }
  .stat-item::after {
    width: 100px; height: 100px;
    top: -24px;
  }
}

/* ============================================================
   WIDE DESKTOP (1280px+)
   ============================================================ */
@media (min-width: 1280px) {
  .stats-strip { padding: 32px 48px; }
  .stat-item   { padding: 36px 24px 28px; margin: 0 12px; }
  .stat-icon   { font-size: 44px; }
  .stat-num    { font-size: 42px; }
  .stat-suffix { font-size: 26px; }
  .stat-label  { font-size: 14px; }
}

/* ============================================================
   DARK THEME
   ============================================================ */
.dark-theme .stat-item {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.dark-theme .stat-item:hover {
  background: linear-gradient(160deg, var(--surface) 60%, var(--surface-2) 100%);
  border-color: var(--primary);
  box-shadow:
    0 12px 36px rgba(0,0,0,.4),
    0 4px 16px rgba(91,76,255,.2);
}
.dark-theme .stat-num {
  background: linear-gradient(135deg, #7B6FFF 0%, #A78BFA 60%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   COUNT-UP ANIMATION (JS target: data-target attribute)
   ============================================================ */
@keyframes statPop {
  0%   { transform: scale(.7); opacity: 0; }
  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.stat-num.animated {
  animation: statPop .6s cubic-bezier(.34,1.56,.64,1) forwards;
}

/* ── ENTRY ANIMATION: staggered on page load ── */
@keyframes statSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stats-strip.visible .stat-item {
  animation: statSlideUp .5s cubic-bezier(.4,0,.2,1) forwards;
  opacity: 0;
}
.stats-strip.visible .stat-item:nth-child(1) { animation-delay: .05s; }
.stats-strip.visible .stat-item:nth-child(2) { animation-delay: .12s; }
.stats-strip.visible .stat-item:nth-child(3) { animation-delay: .19s; }
.stats-strip.visible .stat-item:nth-child(4) { animation-delay: .26s; }
