/* CSR page (csr.php): impact-story layout. Builds on service-page.css / listings.css / about.css. */

/* Photo hero */
#hero.svc-hero.csr-hero { min-height: 78vh; display: flex; align-items: center; padding: 170px 0 150px; background: #07133f; }
.csr-hero__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
#hero.csr-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,7,39,.94) 0%, rgba(7,19,63,.82) 45%, rgba(7,19,63,.35) 100%), linear-gradient(0deg, rgba(3,7,39,.6), transparent 40%); }
#hero.csr-hero h1 { max-width: 760px; }

/* Stats band overlapping the hero */
.csr-stats-wrap { position: relative; z-index: 2; margin-top: -76px; }
.csr-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border-radius: 20px; background: #fff; box-shadow: 0 24px 50px rgba(7,19,63,.16); overflow: hidden; }
.csr-stats li { display: flex; flex-direction: column; gap: 4px; padding: 28px 32px; }
.csr-stats li + li { border-left: 1px solid #edf0f6; }
.csr-stats strong { color: #ff6600; font-family: "Raleway", sans-serif; font-size: clamp(32px, 3.4vw, 46px); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-feature-settings: "lnum" 1; }
.csr-stats span { color: #07133f; font-family: "Raleway", sans-serif; font-size: 18px; font-weight: 700; }
.csr-stats small { color: #4a5670; font-size: 14px; }

/* Story */
.csr-story { padding-top: 96px; }
.csr-story__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.csr-story__photo { position: relative; margin: 0; }
.csr-story__photo img { display: block; width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 50px rgba(7,19,63,.16); }
.csr-story__photo::before { content: ""; position: absolute; left: -18px; bottom: -18px; z-index: -1; width: 55%; height: 55%; border-radius: 22px; background: #fff1e6; }
.csr-step { position: relative; padding: 4px 0 4px 26px; margin-top: 22px; border-left: 3px solid #e3e8f2; }
.csr-step--answer { border-left-color: #ff6600; }
.csr-step__tag { display: block; margin-bottom: 6px; color: #9aa3b8; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.csr-step--answer .csr-step__tag { color: #c2410c; }
.csr-step p { margin: 0; }
.csr-step--answer p { color: #07133f; font-size: 17px; }

/* Network map */
.csr-network__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.csr-cities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.csr-cities li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid rgba(7,19,63,.08); border-radius: 12px; background: #fff; color: #07133f; font-size: 15px; font-weight: 700; cursor: default; transition: border-color .2s, background .2s, color .2s, transform .2s; }
.csr-cities li span { color: #ff6600; font-size: 12px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.csr-cities li.is-hot { border-color: rgba(255,102,0,.45); background: #fff4ec; color: #c2410c; transform: translateX(3px); }

.csr-map { margin: 0; padding: 20px; border-radius: 24px; background: radial-gradient(circle at 70% 20%, rgba(255,102,0,.22), transparent 50%), radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 20px 20px, #07133f; box-shadow: 0 24px 50px rgba(7,19,63,.2); }
.csr-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.csr-map__links line { stroke: rgba(255,138,61,.45); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.csr-map__dot { fill: #ff6600; stroke: #07133f; stroke-width: 2; transition: r .2s; }
.csr-map__pulse { fill: none; stroke: #ff8a3d; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.csr-map__city text { fill: rgba(255,255,255,.82); font-family: "Open Sans", sans-serif; font-size: 13px; font-weight: 600; transition: fill .2s; }
.csr-map__city { cursor: default; }
.csr-map__city.is-hot .csr-map__dot { r: 8; }
.csr-map__city.is-hot text { fill: #fff; font-weight: 700; }
.csr-map figcaption { margin-top: 8px; color: rgba(255,255,255,.45); font-size: 12px; text-align: right; }

/* Map animation: links draw in, dots pop in turn, then pulse */
.ab-js:not(.ab-static) .csr-map__links line { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.65,0,.35,1) .3s; }
.ab-js:not(.ab-static) .csr-map.is-in .csr-map__links line { stroke-dashoffset: 0; }
.ab-js:not(.ab-static) .csr-map__city { opacity: 0; transition: opacity .5s ease; transition-delay: calc(var(--i) * 90ms + 200ms); }
.ab-js:not(.ab-static) .csr-map.is-in .csr-map__city { opacity: 1; }
.ab-js:not(.ab-static) .csr-map.is-in .csr-map__pulse { animation: csr-pulse 3s ease-out infinite; animation-delay: calc(var(--i) * 250ms + 1.5s); }
@keyframes csr-pulse { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

/* Gallery mosaic */
.csr-gallery__head { margin-bottom: 28px; }
.csr-mosaic { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; height: 560px; }
.csr-mosaic figure { position: relative; margin: 0; overflow: hidden; border-radius: 18px; }
.csr-mosaic__big { grid-row: 1 / 3; }
.csr-mosaic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.csr-mosaic figure:hover img { transform: scale(1.05); }
.csr-mosaic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px; background: linear-gradient(0deg, rgba(3,7,39,.85), transparent); color: #fff; font-size: 13px; font-weight: 600; }

@media (max-width: 991px) {
  #hero.svc-hero.csr-hero { min-height: 0; padding: 130px 0 120px; }
  .csr-story__grid, .csr-network__grid { grid-template-columns: 1fr; gap: 40px; }
  .csr-story { padding-top: 72px; }
  .csr-mosaic { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .csr-mosaic__big { grid-column: 1 / 3; grid-row: auto; }
  .csr-mosaic figure { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .csr-stats { grid-template-columns: 1fr; }
  .csr-stats li + li { border-left: 0; border-top: 1px solid #edf0f6; }
  .csr-stats li { padding: 20px 22px; }
  .csr-mosaic { grid-template-columns: 1fr; }
  .csr-mosaic__big { grid-column: auto; }
  .csr-map { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .csr-map__pulse { animation: none !important; } }

/* Compact pass: smaller images and tighter spacing */
#hero.svc-hero.csr-hero { min-height: 60vh; padding: 150px 0 120px; }
.csr-stats-wrap { margin-top: -60px; }
.csr-stats li { padding: 22px 28px; }
.csr-section-pad, .csr-story, .csr-network, .csr-gallery { padding-top: 64px; padding-bottom: 64px; }
.csr-story__grid { grid-template-columns: .8fr 1.2fr; gap: 48px; }
.csr-story__photo img { aspect-ratio: 4 / 3; max-height: 340px; }
.csr-story__photo::before { left: -12px; bottom: -12px; }
.csr-network__grid { grid-template-columns: 1fr .85fr; gap: 48px; }
.csr-map { max-width: 440px; justify-self: center; padding: 16px; }
.csr-mosaic { height: 400px; gap: 12px; }
@media (max-width: 991px) {
  #hero.svc-hero.csr-hero { padding: 120px 0 100px; }
  .csr-story__grid, .csr-network__grid { grid-template-columns: 1fr; gap: 32px; }
  .csr-story__photo img { max-height: 300px; }
  .csr-mosaic { height: auto; }
}
@media (max-width: 640px) {
  .csr-story, .csr-network, .csr-gallery { padding-top: 48px; padding-bottom: 48px; }
}

/* School network: cities by region (replaces the map) */
.csr-network__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.csr-network__head h2 { margin-bottom: 0; }
.csr-network__head p { max-width: 360px; margin: 0; }
.csr-regions { display: grid; grid-template-columns: 1fr 1.25fr 1.15fr 1fr 1fr; gap: 14px; align-items: stretch; }
.csr-region { display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(7,19,63,.08); border-top: 3px solid #ff6600; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(7,19,63,.05); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1), box-shadow .25s; }
.csr-region.is-in:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(7,19,63,.1); }
.csr-region header { margin-bottom: 14px; }
.csr-region__count { display: block; color: #ff6600; font-family: "Raleway", sans-serif; font-size: 34px; font-weight: 800; line-height: 1; font-feature-settings: "lnum" 1; }
.csr-region h3 { margin: 8px 0 0; color: #07133f; font-family: "Raleway", sans-serif; font-size: 16px; font-weight: 700; line-height: 1.3; }
.csr-region ul { margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid #edf0f6; }
.csr-region li { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: #2b3550; font-size: 15px; font-weight: 600; }
.csr-region li i { color: #ff8a3d; font-size: 16px; }
@media (max-width: 1199px) { .csr-regions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
  .csr-network__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .csr-regions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) { .csr-regions { grid-template-columns: 1fr; } }
