/* Stats section */
.stats {
  display: grid;
  gap: 32px;
  text-align: center;
  grid-column: 1 / -1;
}

/* Stats content */
.stats-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.stats-content h1 {
  margin: 0;
}

/* Stats grid */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  gap: 16px;
}

.stats-item {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.stats-item h1 {
  color: var(--text-text-default-color);
  margin: 0;
}

.stats-item p {
  color: var(--text-text-secondary-2-color);
  margin: 0;
}

.stats-content .primary-btn {
  width: 100%;
  max-width: var(--btn-width);
}

/* Image block */
.stats-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--block-radius-m);
  min-height: 343px;
  width: 100vw;
  margin-left: calc(-1 * (100vw - 100%) / 2);
  background-image: url('../../images/stats/couples_supported_cropped.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding-bottom: 16px;
}

.stats-image img {
  width: 100%;
  min-height: 343px;
  display: block;
}

.stats-image-overlay {
  max-width: 327px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.stats-image-overlay h1 {
  font-size: 32px;
  line-height: 32px;
  color: var(--text-text-default-color);    
  margin: 0;
}

.stats-image-overlay p {
  color: var(--text-text-default-color);
  margin: 0;
}

/* Animation */

.stats-item {
  transform: translateY(20px);
  will-change: transform;
  transition: none;
}

.stats-grid.visible .stats-item {
  transform: translateY(0);
  transition:
    transform 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) 0.25s;
}

.stats-grid.visible .stats-item:nth-child(1),
.stats-grid.visible .stats-item:nth-child(3) {
  transition-delay: 0.25s; 
}

.stats-grid.visible .stats-item:nth-child(2),
.stats-grid.visible .stats-item:nth-child(4) {
  transition-delay: 0.65s; 
}

/* Tablet */
@media (min-width: 768px) {
  .stats {
    gap: 48px;
  }

  .stats-content {
    gap: 32px;
  }

  .stats-content .primary-btn {
    max-width: var(--btn-width);
  }

  .stats-item {
    padding: 24px;
  }

  .stats-image {
    background-image: url('../../images/stats/couples_supported_medium.png');
    background-size: cover;
    padding-bottom: 24px;
  }

  .stats-image-overlay {
    gap: 8px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .stats-image-overlay {
    max-width: 455px;
    gap: 16px;
  }

  .stats-image {
    background-image: url('../../images/stats/couples_supported_large.png');
    padding-bottom: 32px;
  }

  .stats-content .primary-btn {
    max-width: var(--btn-l-width);
    height: var(--btn-l-height);
    border-radius: var(--btn-l-radius);
  }
}

/* Desktop+ */
@media (min-width: 1440px) {
  .stats-item {
    min-width: 359px;
    padding: 40px 8px 40px 8px;
  }

  .stats-image {
    background-image: url('../../images/stats/couples_supported_extra_large.png');
    min-height: 450px;
  }
}
