/* === ROW WRAPPER TO ALIGN CHILD SECTIONS === */
.page-main {
  flex: 1;
  padding-top: 160px; /* Push content below fixed header */
  padding-bottom: 40px; /* Prevent footer overlap */
}

.impact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 40px 10%;
  background-color: #f9f9f9;
  max-width: 1200px;
  margin: 0 auto;
}

/* === Each Section (3 per row) === */
.impact-section {
  flex: 1 1 30%;
  margin: 1%; /* optional for spacing */
  background-color: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  min-width: 250px;
  max-width: 360px;
  box-sizing: border-box;
}


/* === Show More / Less toggle logic === */
.target-text.short {
  max-height: 120px;
  overflow: hidden;
}

.target-text.long {
  max-height: none;
}

.toggle-more {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  color: #2d4d3a;
  cursor: pointer;
  font-size: 0.9rem;
}

/* === Targets toggle button === */
.toggle-targets-btn {
  background-color: #2d4d3a;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  font-weight: bold;
  cursor: pointer;
}

.toggle-targets-btn:hover {
  background-color: #214030;
}

/* === Targets initially hidden === */
.target-toggle {
  display: none; /* JS toggles this to flex items */
}

/* === Full-width Testimonials section === */
.testimonials-box {
  background-color: #ffffff;
  margin: 40px auto;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  max-width: 1200px;
  text-align: center;
}

.testimonials-box h2 {
  color: #2d4d3a;
  font-size: 1.4rem;
  margin-bottom: 30px;
}

/* === Story Card Styles === */
.story-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 25px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.story-card h3 {
  font-size: 1.2rem;
  color: #2d4d3a;
  margin-bottom: 5px;
}

.story-card h4 {
  font-size: 1rem;
  color: #666;
  margin-bottom: 10px;
}

.story-card p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 10px;
}

.story-full {
  display: none;
}

.story-card.expanded .story-full {
  display: block;
}

.story-card.expanded .story-preview {
  display: none;
}

/* === Story Navigation Buttons === */
.story-nav {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.story-nav button {
  background-color: #2d4d3a;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.story-nav button:hover {
  background-color: #1f3628;
}

/* === Fade animation === */
.story-card.fade {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Pagination Dots === */
.story-dots {
  margin-top: 15px;
  text-align: center;
}

.story-dot {
  display: inline-block;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.story-dot.active {
  background-color: #2d4d3a;
}

/* === Story toggle link === */
.toggle-story {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #2d4d3a;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.toggle-story:hover {
  text-decoration: underline;
}

/* === Responsive: stack sections on smaller screens === */
@media (max-width: 1024px) {
  .impact-section {
    flex: 1 1 calc(50% - 40px);
  }
}

@media (max-width: 768px) {
  .impact-row {
    padding: 20px;
  }
  .impact-section {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 15px 0;
  }
}
