/* Hero block wrapper — phase 3 */
.statistics_hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(232, 166, 76, 0.2);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.statistics_hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 0;
  background-image: url("https://cs.nxs.mn/header.png");
  background-size: cover;
  background-position: center;
  animation: statistics-hero-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}

.statistics_hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(232, 166, 76, 0.12) 100%),
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(240, 216, 74, 0.15), transparent 55%);
  pointer-events: none;
}

.statistics_hero_header,
.statistics_cards {
  position: relative;
  z-index: 2;
}

@keyframes statistics-hero-kenburns {
  0% {
    transform: scale(1.04) translate(0, 0);
  }
  100% {
    transform: scale(1.14) translate(-2%, -1.5%);
  }
}

.statistics_hero_header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}

.statistics_hero_title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 0%, #f0d84a 45%, #e8a64c 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: statistics-title-shine 6s ease-in-out infinite;
}

@keyframes statistics-title-shine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.statistics_hero_desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 0.25rem;
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.statistics_cards {
  margin: -1rem -0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.statistics_cards > [class*="col-"] {
  padding: 0.35rem;
  margin-bottom: 0;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
}

.statistics_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  container-type: inline-size;
  container-name: stat-card;
  background: rgba(20, 21, 24, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85em;
  padding: 0.75em 12px;
  color: var(--text-custom);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 80px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.statistics_container a {
  text-decoration: none;
  color: inherit;
}

.statistics_container:hover {
  border-color: rgba(240, 216, 74, 0.45);
  transform: translateY(-4px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(240, 216, 74, 0.12);
}

/* Icon on left - bigger */
.statistics_icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.statistics_icon svg {
  width: 36px;
  height: 36px;
  fill: #e6b84d;
  opacity: 1;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(230, 184, 77, 0.5));
}

/* Title + number flex column on right */
.statistics_content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.statistics_name {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-4);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.statistics_number {
  font-family: var(--font-family-1);
  font-size: clamp(0.82rem, 8.5cqi, 1.35rem);
  font-weight: 700;
  color: #fff;
  transition: all 0.3s ease;
  line-height: 1.1;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

.statistics_metrics {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.12rem 0.35rem;
  width: 100%;
  min-width: 0;
}

.statistics_trend {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

@container stat-card (max-width: 210px) {
  .statistics_icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .statistics_icon svg {
    width: 30px;
    height: 30px;
  }

  .statistics_number {
    font-size: clamp(0.78rem, 9cqi, 1.15rem);
  }
}

@container stat-card (max-width: 175px) {
  .statistics_container {
    gap: 8px;
    padding: 0.7em 10px;
  }

  .statistics_number {
    font-size: clamp(0.72rem, 10cqi, 1rem);
  }

  .statistics_trend {
    font-size: 0.65rem;
  }
}

.statistics_trend[hidden] {
  display: none;
}

.statistics_trend--up {
  color: #4ade80;
}

.statistics_trend--down {
  color: #f87171;
}

.statistics_trend--flat {
  color: rgba(255, 255, 255, 0.45);
}

.statistic__premium .statistics_name {
  color: var(--money);
  text-shadow: 0 0 4px var(--money);
  /* -50% brightness */
}

.statistic__premium .statistics_number {
  color: var(--money);
  text-shadow: 0 0 8px var(--money), 0 0 15px var(--money);
  /* -50% brightness */
}

.statistic__premium .statistics_icon svg {
  fill: var(--money);
  filter: drop-shadow(0 0 3px var(--money));
  /* -50% brightness */
}

.statistic__premium {
  outline: 2px solid var(--money);
  transition: all 0.3s ease;
  border: 1px solid rgb(255 171 41 / 35%) !important;
  /* -50% brightness */
  box-shadow: 0 0 20px rgb(255 171 40 / 10%), inset 0 0 15px rgba(255, 87, 105, 0.05) !important;
  /* -50% brightness */
  position: relative;
  z-index: 2;
}

.statistic__premium:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-image: linear-gradient(to top left, var(--money-bg), transparent);
  opacity: 0.05;
  /* -50% brightness */
  pointer-events: none;
  transition: all 0.3s ease;
}

.pulse_prem {
  animation: pulse-prem 2s infinite;
}

@keyframes pulse-prem {
  0% {
    box-shadow: 0 0 0 0px var(--money), 0 0 20px rgba(255, 87, 105, 0.15);
    /* -50% brightness */
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 87, 105, 0.1), 0 0 30px rgba(255, 87, 105, 0.25);
    /* -50% brightness */
  }

  100% {
    box-shadow: 0 0 0 15px rgba(255, 87, 105, 0), 0 0 20px rgba(255, 87, 105, 0.15);
    /* -50% brightness */
  }
}

.prem_icon {
  position: absolute;
  right: 1rem;
  top: 0.75rem;
  transition: all 0.3s ease;
  z-index: 3;
}

.prem_icon svg {
  width: 20px;
  height: auto;
  fill: var(--money);
  opacity: 0;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 3px var(--money));
  /* -50% brightness */
}

.statistic__premium:hover .prem_icon {
  right: 1rem;
}

.statistic__premium:hover .prem_icon svg {
  opacity: 1;
  animation: iconPulse 1s ease-in-out infinite;
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px var(--money));
    /* -50% brightness */
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px var(--money));
    /* -50% brightness */
  }
}

.statistic__premium:hover .statistics_icon svg {
  fill: var(--money);
  filter: drop-shadow(0 0 4px var(--money));
}

/* Additional neon effects for all containers */
.statistics_container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff000000, rgba(255, 255, 255, 0.05), transparent);
  /* -50% brightness */
  transition: left 0.5s;
}

.statistics_container:hover::before {
  left: 100%;
}

/* Glow animation for text */
@keyframes textGlow {

  0%,
  100% {
    text-shadow: 0 0 5px currentColor;
    /* -50% brightness */
  }

  50% {
    text-shadow: 0 0 10px currentColor, 0 0 15px currentColor;
    /* -50% brightness */
  }
}

.statistic__premium .statistics_number {
  animation: textGlow 3s ease-in-out infinite;
}

/* Gradient stroke effect for premium */
.statistic__premium {
  position: relative;
}

/* --- Homepage motion (phase 1 + 3) --- */
.nxs-home-reveal {
  opacity: 1;
  transform: none;
}

html.nxs-home-motion .nxs-home-reveal:not(.is-revealed) {
  opacity: 0;
  transform: translateY(22px);
}

html.nxs-home-motion .nxs-home-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.statistics_number.is-counting {
  color: #f0d84a;
  text-shadow: 0 0 12px rgba(240, 216, 74, 0.5);
}

/* Responsive: same card layout (icon + label + number), flexible column widths */
@media (max-width: 767.98px) {
  .statistics_hero {
    padding: 1.35rem 0.9rem;
  }

  .statistics_cards {
    margin: 0;
  }

  .statistics_cards > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .statistics_container {
    min-height: 72px;
    padding: 0.85em 10px;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .statistics_cards {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem -0.35rem;
  }

  .statistics_cards > [class*="col-"] {
    flex: 1 1 11.5rem;
    max-width: 100%;
    width: auto;
  }
}

@media (min-width: 1200px) {
  .statistics_cards > [class*="col-"] {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
}

@media (max-width: 575.98px) {
  .statistics_icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .statistics_icon svg {
    width: 28px;
    height: 28px;
  }

  .statistics_number {
    font-size: clamp(1rem, 4.5vw, 1.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .statistics_hero::before,
  .statistics_hero_title {
    animation: none !important;
  }

  html.nxs-home-motion .nxs-home-reveal:not(.is-revealed) {
    opacity: 1;
    transform: none;
  }

  .statistics_container:hover {
    transform: none;
  }

  .pulse_prem,
  .statistic__premium .statistics_number,
  .statistic__premium:hover .prem_icon svg {
    animation: none;
  }
}