body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff;
}

.section {
  background-color: #fff;
  padding: 60px 0;
  text-align: center;
}

.section h2 {
  font-size: 36px;
  font-weight: 900;
  color: #004d40;
  margin-bottom: 40px;
}

/* Container holding all rows */
.sdg-container {
  width: 100%;
  max-width: 700px;  /* adjust as needed */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Each row holds 5 items */
.sdg-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between; /* equal space between 5 items */
  gap: 10px;
}

/* Individual SDG icon container */
.sdg-img-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Both static and gif images */
.sdg-img-wrap img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, opacity 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
}

/* GIF initially hidden */
.sdg-img-wrap .sdg-gif {
  opacity: 0;
  pointer-events: none;
}

/* Hover effect: show gif, hide static */
.sdg-img-wrap:hover .sdg-static {
  opacity: 0;
}

.sdg-img-wrap:hover .sdg-gif {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive: smaller screens show 3 per row */
@media (max-width: 480px) {
  .sdg-container {
    max-width: 100%;
    padding: 0 10px;
  }
  .sdg-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  .sdg-img-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
  }
  .sdg-img-wrap img {
    width: 100px;
    height: 100px;
  }
}
