/* ===== Stats / By The Numbers Section ===== */

.stats-section {
  padding: 5rem 2rem;
  background: var(--bg-img) repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 20% 50%,
      rgba(8, 232, 222, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(54, 149, 255, 0.06) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.stats-section .section-banner {
  border-radius: 1rem;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(8, 232, 222, 0.2);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  overflow: hidden;
  cursor: default;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(8, 232, 222, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--main-color);
  box-shadow: 0 8px 40px rgba(8, 232, 222, 0.15),
    0 2px 12px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 8px var(--main-color));
  transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.15) rotate(-5deg);
}

.stat-number {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--main-color);
  font-family: "Doto", monospace;
  line-height: 1;
  display: block;
  letter-spacing: -1px;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Light mode overrides */
body:not(.dark-mode) .stat-card {
  background: rgba(109, 40, 217, 0.03);
  border-color: rgba(109, 40, 217, 0.15);
}

body:not(.dark-mode) .stat-card:hover {
  border-color: var(--main-color);
  box-shadow: 0 8px 40px rgba(109, 40, 217, 0.12), 0 2px 12px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .stat-label {
  color: rgba(0, 0, 0, 0.55);
}

body:not(.dark-mode) .stat-number,
body:not(.dark-mode) .stat-suffix,
body:not(.dark-mode) .stat-icon {
  color: var(--main-color);
  filter: none;
}

/* ===== Counter animation ===== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-number.animating {
  animation: countUp 0.4s ease forwards;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2.4rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }
}
