/* Homepage engagement stories: a quiet, manually controlled photo carousel. */
#research-impact.impact-showcase {
  --impact-accent: #00a1d3;
  --impact-ink: #123e67;
  --impact-heading: #0c2b48;
  --impact-muted: #536b78;
  --impact-line: #e2ecf0;
  --impact-card: #ffffff;
  --impact-card-shadow: 0 16px 45px -10px rgba(18, 62, 103, 0.08), 0 0 1px rgba(0, 0, 0, 0.06);
  padding-block: 92px;
  background: #f4f8fa;
  color: var(--impact-ink);
}
.impact-showcase .impact-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
.impact-showcase .impact-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--impact-muted); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.impact-showcase .impact-eyebrow::before { content: ''; width: 27px; height: 2px; background: var(--impact-accent); }
.impact-showcase h2 { margin: 0; color: var(--impact-heading); font-size: clamp(36px, 4.2vw, 60px); line-height: 1.12; font-weight: 400; letter-spacing: -1.8px; }
.impact-showcase h2 em { color: var(--impact-accent); font-family: Georgia, serif; }
.impact-showcase .impact-all-link { display: inline-flex; align-items: center; gap: 12px; padding-block: 10px; border-bottom: 1.5px solid var(--impact-line); color: var(--impact-heading); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: all .2s ease; }
.impact-showcase .impact-all-link:hover { border-color: var(--impact-accent); color: var(--impact-accent); }
.impact-carousel { position: relative; }
.impact-slide { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--impact-card); border: 1px solid var(--impact-line); border-radius: 20px; overflow: hidden; margin-bottom: 20px; box-shadow: var(--impact-card-shadow); transition: box-shadow .3s ease, border-color .3s ease; }
.impact-slide[hidden], .impact-showcase [hidden] { display: none !important; }
.impact-carousel.is-ready .impact-slide { margin-bottom: 0; animation: impact-story-enter .4s ease both; }
.impact-slide-photo { position: relative; margin: 0; min-height: 440px; background: #e1edf1; overflow: hidden; touch-action: pan-y; }
.impact-slide-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(0.16, 1, 0.3, 1); }
.impact-slide:hover .impact-slide-photo img { transform: scale(1.03); }
.impact-photo-collage { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(118px, .85fr); gap: 4px; padding: 4px; }
.impact-photo-collage--five { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) 96px; }
.impact-photo-collage--three { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.impact-photo-collage > img { position: relative; inset: auto; min-width: 0; min-height: 0; }
.impact-photo-collage > .impact-photo-main { grid-row: 1 / -1; }
.impact-photo-collage--five > .impact-photo-main { grid-column: 1 / -1; grid-row: 1; }
.impact-slide:hover .impact-photo-collage > img { transform: none; }
.impact-slide:hover .impact-photo-collage > .impact-photo-main { transform: scale(1.018); }
.impact-slide-photo figcaption { position: absolute; bottom: 16px; left: 18px; padding: 5px 12px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); color: #394f59; border-radius: 6px; font-size: 11px; font-weight: 500; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.impact-slide-photo figcaption i { margin-right: 6px; }
.impact-slide-copy { position: relative; display: flex; flex-direction: column; align-items: start; justify-content: center; padding: 48px; min-width: 0; background: var(--impact-card); }
.impact-slide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: 100%; margin-bottom: 20px; color: var(--impact-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.impact-slide-category { display: inline-flex; align-items: center; gap: 7px; background: rgba(0, 161, 211, 0.1); color: #0087b3; padding: 4px 12px; border-radius: 20px; font-weight: 600; font-size: 11px; }
.impact-slide-category::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--impact-accent); }
.impact-slide-date { font-weight: 500; color: var(--impact-muted); }
.impact-showcase h3 { max-width: 20ch; margin: 0 0 16px; color: var(--impact-heading); font-size: clamp(26px, 2.5vw, 36px); line-height: 1.24; letter-spacing: -0.8px; font-weight: 600; }
.impact-slide-description { max-width: 44ch; margin: 0 0 20px; color: var(--impact-muted); font-size: 14.5px; line-height: 1.8; }
.impact-slide-location { display: flex; align-items: center; gap: 8px; margin: 0 0 28px; color: var(--impact-muted); font-size: 12px; font-weight: 500; }
.impact-slide-location i { color: var(--impact-accent); font-size: 14px; }
.impact-story-link { display: inline-flex; align-items: center; gap: 14px; color: var(--impact-heading); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.impact-story-link i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--impact-accent); color: #ffffff; font-size: 14px; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; box-shadow: 0 4px 12px rgba(0, 161, 211, 0.28); }
.impact-story-link:hover { color: #0087b3; }
.impact-story-link:hover i { background: #0087b3; transform: translate(3px, -3px); box-shadow: 0 6px 16px rgba(0, 161, 211, 0.4); }
.impact-carousel-footer { display: flex; align-items: center; gap: 40px; margin-top: 30px; }
.impact-story-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; flex: 1; }
.impact-story-selector { display: flex; align-items: baseline; gap: 12px; padding: 16px 4px 10px; min-height: 48px; border: 0; border-top: 3px solid var(--impact-line); background: transparent; color: var(--impact-muted); text-align: left; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .25s, color .25s, transform .25s; }
.impact-story-selector > span:first-child { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--impact-muted); }
.impact-story-selector[aria-pressed="true"] { border-top-color: var(--impact-accent); color: var(--impact-heading); font-weight: 600; }
.impact-story-selector[aria-pressed="true"] > span:first-child { color: var(--impact-accent); }
.impact-story-selector:hover { border-top-color: var(--impact-accent); color: var(--impact-heading); }
.impact-carousel-navigation { display: flex; align-items: center; gap: 12px; }
.impact-counter { margin-right: 14px; color: var(--impact-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.impact-counter strong { color: var(--impact-heading); font-weight: 700; }
.impact-carousel-navigation button { display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--impact-line); border-radius: 50%; background: var(--impact-card); color: var(--impact-heading); cursor: pointer; transition: all .2s ease; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); }
.impact-carousel-navigation button:hover { background: var(--impact-accent); border-color: var(--impact-accent); color: #ffffff; transform: scale(1.06); box-shadow: 0 4px 12px rgba(0, 161, 211, 0.3); }
body.dark-mode #research-impact.impact-showcase { --impact-ink: #e5eff5; --impact-heading: #ffffff; --impact-muted: #9bb1bc; --impact-line: #27475d; --impact-card: #152d3f; --impact-card-shadow: 0 16px 45px -10px rgba(0, 0, 0, 0.4); background: #102637 !important; }
body.dark-mode .impact-slide-category { background: rgba(0, 161, 211, 0.2); color: #48cae4; }
body.dark-mode .impact-slide-category::before { background: #48cae4; }
body.dark-mode .impact-slide-photo figcaption { background: rgba(21, 45, 63, 0.9); color: #d2e4ec; }
@keyframes impact-story-enter { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 991px) {
  .impact-slide { grid-template-columns: 1.1fr 1fr; }
  .impact-slide-copy { padding: 32px 28px; }
  .impact-slide-photo { min-height: 420px; }
  .impact-carousel-footer { gap: 24px; }
  .impact-story-selectors { gap: 14px; }
  .impact-story-selector { font-size: 12px; gap: 8px; }
}
@media (max-width: 767px) {
  #research-impact.impact-showcase { padding-block: 60px; }
  #research-impact > .container { padding-inline: 20px; }
  .impact-showcase .impact-heading { align-items: start; flex-direction: column; gap: 14px; margin-bottom: 24px; }
  .impact-showcase h2 { letter-spacing: -1px; }
  .impact-showcase .impact-all-link { font-size: 13px; }
  .impact-slide { grid-template-columns: 1fr; border-radius: 18px; }
  .impact-slide-photo { min-height: 0; aspect-ratio: 16/10; }
  .impact-photo-collage { grid-template-columns: minmax(0, 2fr) minmax(78px, .8fr); gap: 3px; padding: 3px; }
  .impact-photo-collage--five { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) 56px; aspect-ratio: 4/3; }
  .impact-slide-copy { padding: 28px 22px; min-height: 0; }
  .impact-slide-meta { margin-bottom: 14px; }
  .impact-showcase h3 { font-size: 24px; margin-bottom: 12px; }
  .impact-slide-description { font-size: 13.5px; line-height: 1.7; margin-bottom: 16px; }
  .impact-slide-location { margin-bottom: 20px; }
  .impact-carousel-footer { flex-wrap: wrap; gap: 18px; margin-top: 20px; }
  .impact-story-selectors { flex-basis: 100%; gap: 10px; }
  .impact-story-selector { align-items: start; flex-direction: column; gap: 4px; line-height: 1.4; padding: 12px 2px 8px; font-size: 11.5px; }
  .impact-carousel-navigation { width: 100%; justify-content: space-between; }
  .impact-counter { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .impact-carousel.is-ready .impact-slide { animation: none; }
  .impact-showcase *, .impact-showcase *::before { transition: none !important; }
}
