.impact-stats-container {
  padding: 32px 0;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
}

.impact-stats-header {
  text-align: center;
  margin-bottom: 50px;
}

.impact-stats-heading {
  font-size: 36px;
  font-weight: 700;
  color: #233d62;
}

.impact-stats-sub-heading {
  font-size: 24px;
  font-weight: 500;
  color: #666;
}

.impact-stats-description {
  font-size: 16px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  color: #777;
}

/* Common styles for all carousel elements */
.impact-stats-carousel-wrapper *,
.impact-stats-carousel-wrapper *::before,
.impact-stats-carousel-wrapper *::after {
  box-sizing: border-box;
}

/* Carousel Styles */
.impact-stats-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
}

.impact-stats-cards-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  display: flex;
}

.impact-stats-cards {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 32px;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  transform: translateX(0);
  align-items: stretch;
}

.impact-stats-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 64px 36px 36px;
  gap: 16px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 0 0 auto;
  margin: 0;
  /* The width will be set dynamically via JavaScript */
}

.impact-stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.impact-stats-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: white;
  border-radius: 100%;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.impact-stats-prev {
  left: 0;
  background-color: #ececec !important;
  /* margin-right: 36px; */
}

.impact-stats-next {
  right: 0;
  background-color: #ececec !important;
  /* margin-left: 36px; */
}

.impact-stats-carousel-nav i,
.impact-stats-carousel-nav svg {
  font-size: 16px;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.impact-stats-carousel-nav:hover:not(.disabled) {
  transform: scale(1.1);
}

.impact-stats-carousel-nav:hover:not(.disabled) i,
.impact-stats-carousel-nav:hover:not(.disabled) svg {
  transform: scale(1.1);
}

.impact-stats-carousel-nav:active:not(.disabled) {
  transform: scale(0.95);
}

.impact-stats-carousel-nav.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Focus styles for accessibility */
.impact-stats-carousel-nav:focus {
  /* outline: 2px solid #4a90e2; */
  outline-offset: 2px;
}

.impact-stats-card-icon {
  font-size: 40px;
}

.impact-stats-card-icon i,
.impact-stats-card-icon svg {
  width: 2em;
  height: 2em;
}

.impact-stats-card-amount {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.2;
  color: #2e4b74;
}

.impact-stats-card-heading {
  font-size: 24px;
  font-weight: 600;
  color: #233d62;
}

.impact-stats-card-description {
  font-size: 14px;
  line-height: 1.5;
  color: #687693;
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .impact-stats-cards {
    gap: 15px;
  }

  .impact-stats-card {
    padding: 25px 20px;
  }

  .impact-stats-card-amount {
    font-size: 36px;
  }

  .impact-stats-cards-wrapper {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .impact-stats-container {
    padding: 40px 20px;
  }

  .impact-stats-header {
    margin-bottom: 30px;
  }

  .impact-stats-heading {
    font-size: 30px;
  }

  .impact-stats-sub-heading {
    font-size: 20px;
  }

  .impact-stats-carousel-wrapper {
    padding: 0 30px;
    position: relative;
  }

  .impact-stats-carousel-nav {
    position: absolute;
    margin: 0;
  }

  .impact-stats-prev {
    left: 0;
  }

  .impact-stats-next {
    right: 0;
  }

  .impact-stats-cards-wrapper {
    width: 85%;
  }

  /* Maintain the horizontal layout for animation */
  .impact-stats-cards {
    flex-direction: row;
    justify-content: flex-start;
  }

  .impact-stats-card {
    width: 100%;
    min-width: auto;
    max-width: none;
  }
}

/* Small mobile devices */
@media (max-width: 650px) {
  .impact-stats-card-amount {
    font-size: 28px;
  }

  .impact-stats-card-heading {
    font-size: 18px;
  }

  .impact-stats-card-description {
    font-size: 12px;
  }

  .impact-stats-card {
    padding: 20px 15px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }

  .impact-stats-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .impact-stats-carousel-nav {
    display: none !important;
  }

  .impact-stats-carousel-nav svg {
    width: 16px;
    height: 16px;
  }
}
