/* ===========================
   GLOBAL
=========================== */

.impact-goals-wrapper {
  --ig-primary: var(--clr-primary);
  --ig-primary-light: var(--clr-primary-light);
  --ig-primary-dark: var(--clr-primary-dark);
  --ig-text: var(--clr-gray-900);
  --ig-muted: var(--clr-gray-700);
  --ig-bg: var(--clr-primary-lighter);
  --ig-glass: rgba(255,255,255,.65);
  --ig-radius: 24px;
  --ig-shadow: 0 25px 60px rgba(18,48,25,.12);

  font-family: var(--ff-body);
  background: var(--ig-bg);
  color: var(--ig-text);
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* ===========================
HERO
=========================== */

.impact-goals-wrapper .hero {
  padding: calc(100px + var(--space-18)) 5% 0;
  text-align: center;
  max-width: 1100px;
  margin: auto;
}


.impact-goals-wrapper .hero h1 {
  font-family: var(--ff-heading);
  font-size: clamp(var(--fs-xl), 4vw, var(--fs-3xl));
  line-height: 1.1;
  font-weight: 900;
  color: var(--ig-primary-dark);
  margin-bottom: 0;
  white-space: nowrap;
}

.impact-goals-wrapper .hero h1 span {
  display: inline-block;
  font-size: var(--fs-lg);
  margin-left: 12px;
  font-weight: 500;
  color: var(--ig-primary);
}

.impact-goals-wrapper .subtitle {
  margin: var(--space-6) auto 0;
  max-width: 700px;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ig-muted);
}


/* ===========================
SUMMARY
=========================== */

.impact-goals-wrapper .summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: var(--space-14) 5% var(--space-14);
  max-width: 1100px;
  margin: 0 auto;
}

.impact-goals-wrapper .summary-card {
  background: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--ig-shadow);
  text-align: center;
  transition: .45s;
}

@media (hover: hover) and (pointer: fine) {
  .impact-goals-wrapper .summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(18,48,25,.15);
  }
}

.impact-goals-wrapper .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.impact-goals-wrapper .icon img {
  /* Was an inline width:56px;height:56px on each <img>, forcing all
     three (natural ratios 256x168, 256x202, 256x189 - none square)
     into a square box and stretching them out of proportion. */
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.impact-goals-wrapper .summary-card h2 {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  color: var(--ig-primary);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.impact-goals-wrapper .summary-card h4 {
  margin-bottom: 10px;
  font-size: var(--fs-sm);
  color: var(--ig-text);
}

.impact-goals-wrapper .summary-card p {
  color: var(--ig-muted);
  line-height: 1.5;
  font-size: var(--fs-sm);
}


/* ===========================
CTA
=========================== */

.impact-goals-wrapper .cta {
  margin: var(--space-10) auto var(--space-14);
  width: min(800px, 92%);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--clr-primary-dark);
  box-shadow: 0 8px 32px rgba(10, 28, 16, 0.05);
}

.impact-goals-wrapper .cta h2 {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  margin-bottom: 12px;
  color: var(--clr-primary-dark);
}

.impact-goals-wrapper .cta p {
  max-width: 650px;
  margin: auto;
  line-height: 1.5;
  font-size: var(--fs-sm);
  opacity: .9;
  color: var(--clr-gray-700);
}

.impact-goals-wrapper .cta button {
  margin-top: 24px;
  padding: 12px 24px;
  /* Measured 40px tall - under the 44px touch-target minimum. */
  min-height: 44px;
  font-size: var(--fs-sm);
  border: none;
  cursor: pointer;
  border-radius: 60px;
  background: var(--clr-primary);
  color: white;
  font-weight: 700;
  transition: .3s;
}

@media (hover: hover) and (pointer: fine) {
  .impact-goals-wrapper .cta button:hover {
    transform: translateY(-4px);
  }
}


/* ===========================
REVEAL ANIMATION
=========================== */

/* Unscoped, exactly as originally written - .summary-card also carries
   its own :hover rule (@media (hover: hover) and (pointer: fine) above)
   at this same specificity tier, and relies on file order to win over
   this rule's own transform when hovered. (An earlier version scoped
   this under html.js to solve the no-JS problem below, which raised its
   specificity enough to silently beat .summary-card:hover regardless of
   order - the same mistake made and reverted for .about-card in
   styles.css - caught live, reverted here too.) The no-JS fallback
   further down handles visibility without touching this rule at all. */
.impact-goals-wrapper .summary-card,
.impact-goals-wrapper .hero,
.impact-goals-wrapper .cta {
  opacity: 0;
  transform: translateY(60px);
  transition: 1s;
}

.impact-goals-wrapper .show {
  opacity: 1;
  transform: none;
}

/* No-JS / JS-failed fallback - opacity-only, same reasoning as the
   matching .reveal fallback in styles.css: nothing here needs to
   out-rank .summary-card:hover's transform, because this never touches
   transform, and :not(.js) keeps this rule irrelevant the moment JS (and
   therefore .show) is actually working. */
html:not(.js) .impact-goals-wrapper .summary-card,
html:not(.js) .impact-goals-wrapper .hero,
html:not(.js) .impact-goals-wrapper .cta {
  opacity: 1 !important;
}


/* ===========================
RESPONSIVE
=========================== */

@media(max-width:1000px) {
  .impact-goals-wrapper .summary {
    grid-template-columns: 1fr;
  }
  .impact-goals-wrapper .hero h1 {
    font-size: var(--fs-2xl);
    white-space: normal;
  }
  .impact-goals-wrapper .hero h1 span {
    font-size: var(--fs-lg);
  }
  .impact-goals-wrapper .cta {
    padding: var(--space-14) var(--space-10);
  }
  .impact-goals-wrapper .cta h2 {
    font-size: var(--fs-lg);
  }
}

/* ===========================
   SVG CHART COMPONENT
=========================== */
.new-svg-chart-wrapper {
    display: flex;
    justify-content: center;
    padding: 0 5% var(--space-2);
    width: 100%;
    position: relative;
    z-index: 10;
}
.new-svg-chart-container {
    width: 900px;
    max-width: 100%;
    font-family: var(--ff-body);
}
.new-svg-chart-container h1 {
    font-family: var(--ff-heading);
    font-size: var(--fs-2xl);
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    color: var(--clr-primary-dark);
}
.new-svg-chart-container svg {
    width: 100%;
    height: auto;
    overflow: visible;
}
.new-svg-chart-container .line {
    fill: none;
    stroke: var(--clr-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 2.5s ease forwards;
}
.new-svg-chart-container .vertical {
    stroke: var(--clr-primary);
    stroke-width: 4;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawVertical .8s forwards;
}
.new-svg-chart-container .vertical:nth-child(2) { animation-delay: .8s; }
.new-svg-chart-container .vertical:nth-child(3) { animation-delay: 1s; }
.new-svg-chart-container .vertical:nth-child(4) { animation-delay: 1.2s; }
.new-svg-chart-container .vertical:nth-child(5) { animation-delay: 1.4s; }

.new-svg-chart-container .point {
    fill: var(--clr-primary);
    transform-origin: center;
    transform: scale(0);
    animation: pop .5s forwards;
}
.new-svg-chart-container .point:nth-of-type(1) { animation-delay: .5s; }
.new-svg-chart-container .point:nth-of-type(2) { animation-delay: .8s; }
.new-svg-chart-container .point:nth-of-type(3) { animation-delay: 1.1s; }
.new-svg-chart-container .point:nth-of-type(4) { animation-delay: 1.4s; }
.new-svg-chart-container .point:nth-of-type(5) { animation-delay: 1.7s; }

.new-svg-chart-container .bar {
    fill: var(--clr-primary);
    transform: scaleX(0);
    transform-origin: left;
    animation: growBar 1s forwards;
}
.new-svg-chart-container .bar.students { animation-delay: 2s; }
.new-svg-chart-container .bar.teachers { animation-delay: 2.3s; }

.new-svg-chart-container .timeline {
    stroke: var(--clr-primary);
    stroke-width: 8;
    fill: none;
    stroke-linecap: round;
}
.new-svg-chart-container .arrow {
    fill: var(--clr-primary);
}
.new-svg-chart-container text {
    opacity: 0;
    animation: fadeUp .8s forwards;
    font-family: var(--ff-body);
}
.new-svg-chart-container text:nth-of-type(1) { animation-delay: 1.8s; }

.new-svg-chart-container .group {
    cursor: pointer;
    transition: .4s;
}
@media (hover: hover) and (pointer: fine) {
    .new-svg-chart-container .group:hover {
        transform: translateY(-12px);
    }
    .new-svg-chart-container .group:hover .point {
        fill: var(--clr-primary-dark);
    }
}
.new-svg-chart-container .counter {
    font-family: var(--ff-heading);
    font-variant-numeric: tabular-nums;
    font-weight: bold;
    font-size: 24px;
    fill: var(--clr-gray-900);
}
.new-svg-chart-container .small {
    font-size: var(--fs-sm);
    font-weight: 800;
}
.new-svg-chart-container .label {
    font-size: var(--fs-sm);
    font-weight: 700;
    fill: white;
}
.new-svg-chart-container .year {
    font-size: var(--fs-lg);
    font-style: italic;
    font-weight: 700;
    fill: var(--clr-primary);
}

@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes drawVertical { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes growBar { to { transform: scaleX(1); } }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   MOBILE MILESTONE LIST
   (phone-width stand-in for the SVG chart above - see the comment in
   impact-goals.php next to .chart-mobile-list for why this exists)
=========================== */
.chart-mobile-list {
    display: none;
}

@media (max-width: 599px) {
    .new-svg-chart-wrapper {
        display: none;
    }
    .chart-mobile-list {
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
        padding: 0 5% var(--space-10);
        max-width: 500px;
        margin: 0 auto;
    }
}

.chart-mobile-item {
    background: white;
    border-radius: var(--ig-radius);
    box-shadow: var(--ig-shadow);
    padding: var(--space-6) var(--space-6);
    border-left: 4px solid var(--ig-primary);
}

.chart-mobile-date {
    font-family: var(--ff-heading);
    font-weight: 800;
    font-style: italic;
    color: var(--ig-primary);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-4);
    text-align: center;
}

/* Three equal columns, each centred: with space-between and left-aligned
   columns the numbers sat at uneven positions and the row read as pushed
   to one side. */
.chart-mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

/* Label above its number, the labels level along the top. */
.chart-mobile-stat {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.chart-mobile-stat .counter {
    font-family: var(--ff-heading);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: var(--fs-xl);
    color: var(--ig-text);
}

.chart-mobile-stat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ig-muted);
}

/* 320-380px phones: three centred columns left "CENTERS" and "STUDENTS"
   touching. Less card padding and a slightly smaller label give each
   column the room. */
@media (max-width: 380px) {
    .chart-mobile-item {
        padding: var(--space-5, 20px) var(--space-4, 16px);
    }

    .chart-mobile-stats {
        gap: var(--space-2, 8px);
    }

    .chart-mobile-stat-label {
        letter-spacing: 0;
    }
}
