.af-impact-section {
  padding: var(--spacing-section) 0;
  background-color: var(--surface-color-muted-dark);
  position: relative;
}

.af-impact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
  /* Align items to start so the sticky positioning calculates the container height correctly */
  align-items: flex-start;
}

/* --- Left Side: Text Content --- */
.af-impact-content {
  order: 2;
  /* Mobile: Text below image */
  display: flex;
  flex-direction: column;
}

.af-section-title {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.af-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

.af-impact-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.af-impact-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.af-impact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.5;
  cursor: default;
  transition: transform var(--transition-normal);
  /* Smooth transition for the hover shift */
}

/* Shifts the whole list item slightly to the right on hover */
.af-impact-list li:hover {
  transform: translateX(8px);
}

/* --- ICON ANIMATIONS --- */
@keyframes icon-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.af-impact-check {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  /* Adds the continuous subtle pulsing effect */
  animation: icon-pulse 2.5s infinite ease-in-out;
  transition: transform var(--transition-fast);
}

/* When the user hovers over the text, the icon stops pulsing and pops! */
.af-impact-list li:hover .af-impact-check {
  animation: none;
  transform: scale(1.25) rotate(10deg);
}

/* ----------------------- */

/* --- Right Side: Image Wrapper --- */
.af-impact-image-wrapper {
  order: 1;
  /* Mobile: Image on top */
  position: relative;
  width: 100%;
  max-width: 550px;
  /* Controls and reduces the image size */
  margin: 0 auto;
}

.af-impact-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.af-impact-badge {
  position: absolute;
  bottom: -30px;
  left: -30px;
  /* Overlaps the bottom-left corner beautifully */
  background-color: var(--surface-color);
  color: var(--primary-color);
  padding: var(--spacing-lg);
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 5px solid var(--accent-color);
  z-index: 2;
  transition: transform var(--transition-normal);
}

.af-impact-image-wrapper:hover .af-impact-badge {
  transform: scale(1.05) rotate(-5deg);
}

.af-impact-badge h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.af-impact-badge span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* --- Desktop Layout & Sticky Effect --- */
@media (min-width: 992px) {
  .af-impact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    /* Adds healthy breathing room between text and image */
  }

  .af-impact-content {
    order: 1;
    /* Desktop: Text on Left */
    /* Make the text sticky */
    position: sticky;
    top: 120px;
    /* Distance from top of viewport when scrolling */
    height: fit-content;
  }

  .af-impact-image-wrapper {
    order: 2;
    /* Desktop: Image on Right */
    margin: 0 0 0 auto;
    /* Pushes the image nicely into the right column */
  }
}