/* Shared photo treatment: rounded photographs without colored mats.
   Loaded after the existing page styles; the page structure and copy stay intact. */
:root { --photo-radius: 28px; }

/* Header and footer logos are intentionally excluded. */
main img.site-rounded-photo {
  border-radius: var(--photo-radius);
  border: 0;
  background: transparent !important;
  box-shadow: none;
}

/* Let complete photographs determine their own height. Fixed contain boxes
   otherwise leave square colored bars around the actual rounded photograph. */
main img.site-rounded-photo.demo-complete-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  padding: 0;
  object-fit: contain !important;
  object-position: center !important;
}

/* Keep rounded corners on the photograph itself, not on a backing panel. */
main .hero-media,
main .about-foundation-media,
main .about-hero-media,
main .portrait-frame,
main .leader-photo,
main .founder-contact-photo,
main .donate-photo-frame,
main .impact-hero-photo,
main .home-next-photo,
main .convening-photo,
main .toolkit-image-link {
  background: transparent;
  border: 0;
  border-radius: var(--photo-radius);
  box-shadow: none;
}
main .founder-contact-photo { overflow: visible; }
main .founder-contact-photo figcaption {
  background: transparent;
  padding: 18px 2px 0;
  color: var(--white);
}
main .founder-contact-photo figcaption span { color: var(--tan); }

/* Focus: keep the three existing columns, with freestanding photographs and
   green text rather than brown boxes. */
.focus-mosaic { align-items: start; }
.focus-mosaic .focus-panel {
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.focus-mosaic .focus-panel .panel-copy { padding: 24px 2px 0; }
.focus-mosaic .focus-panel h3 { color: var(--forest); }
.focus-mosaic .focus-panel p { color: var(--muted); }

/* Retain the Studies cards; give each photo four visible rounded corners. */
.story .story-image-block {
  background: transparent;
  padding: 18px 18px 0;
}
.story .story-image-block .media-placeholder {
  border-radius: var(--photo-radius);
}
.story .story-image-block.logo-fit img.site-rounded-photo {
  padding: 0;
  background: transparent;
}
/* Book covers keep their full proportions without dominating a landscape card. */
.story .story-image-block[href="national-park-foundation.html"] img.site-rounded-photo,
.detail-media img.site-rounded-photo[src="assets/stories/npf-hero.jpg"] {
  width: auto;
  max-width: 100%;
  max-height: 440px;
  margin-inline: auto;
}

/* Preserve the previously aligned pair of testimonials and photographs.
   The image boxes follow the photographs' true aspect ratios, with no mat. */
@media (min-width: 941px) {
  .impact-page .quote-images { justify-items: center; }
  .impact-page .quote-images img.site-rounded-photo {
    height: 250px;
    width: auto;
    max-width: 100%;
    aspect-ratio: auto;
  }
}
@media (max-width: 940px) {
  .impact-page .quote-images { justify-items: stretch; }
  .impact-page .quote-images img.site-rounded-photo { width: 100%; height: auto; }
}
@media (max-width: 620px) {
  :root { --photo-radius: 20px; }
  .focus-mosaic .focus-panel .panel-copy { padding: 20px 0 0; }
  .story .story-image-block { padding: 14px 14px 0; }
}

/* Missing photos are intentionally omitted until partner-approved images arrive.
   Text and the partner logos remain; no empty image columns or boxes. */
.detail-layout--no-media { grid-template-columns: minmax(0, 1fr); }
.detail-layout--no-media .detail-copy { width:100%; max-width: 900px; }
.story-grid-wide .story--no-photo > .story-body { padding-top: 36px; }
@media(max-width:620px){
  .story-grid-wide .story--no-photo > .story-body { padding-top: 30px; }
}

/* Panoramic landscape image supplied for Pickering Creek; never cropped in the expanded story. */
.story-inline-photo{margin:30px 0 32px;padding:0;background:transparent}
.story-inline-photo img.site-rounded-photo.demo-complete-image{display:block;width:100%;height:auto;object-fit:contain!important;aspect-ratio:auto;border-radius:var(--photo-radius)}


/* November 21: general student-learning photographs in non-partner-specific
   header areas. Maintain full 4:3 aspect ratios and rounded, unbacked photos. */
.vff-hero-has-photo > .shell {
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(270px, .75fr);
  align-items:center;
  gap:clamp(26px, 4.5vw, 60px);
}
.vff-hero-has-photo h1 { font-size:clamp(2.7rem,4.8vw,5.05rem); line-height:1.02; }
.vff-hero-has-photo .vff-hero-photo {
  margin:0;
  width:100%;
  max-width:400px;
  justify-self:end;
}
.vff-hero-has-photo .vff-hero-photo img,
main img.vff-generic-header-photo {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4 / 3;
  object-fit:cover;
  border-radius:var(--photo-radius);
  background:transparent;
  box-shadow:none;
}
main .hero-media.vff-generic-header,
main .about-foundation-media.vff-generic-header,
main .impact-hero-photo.vff-generic-header {
  width:100%;max-width:440px;justify-self:end;
  border-radius:var(--photo-radius);
  overflow:visible;
}
main .hero-media.vff-generic-header { transform:none; }
main .about-foundation-media.vff-generic-header { max-width:460px; }
main .impact-hero-photo.vff-generic-header { max-width:440px; }
main .hero-media img.vff-generic-header-photo,
main .about-foundation-media img.vff-generic-header-photo,
main .impact-hero-photo img.vff-generic-header-photo {
  width:100%;height:auto;aspect-ratio:4 / 3;object-fit:cover;
}
@media(max-width:940px){
 .vff-hero-has-photo > .shell {grid-template-columns:1fr;gap:30px;}
 .vff-hero-has-photo .vff-hero-photo {justify-self:start;}
 main .hero-media.vff-generic-header,
 main .about-foundation-media.vff-generic-header,
 main .impact-hero-photo.vff-generic-header { justify-self:start; }
}
@media(max-width:620px){
 .vff-hero-has-photo h1 { font-size:clamp(2.6rem,8vw,3.9rem); }
 .vff-hero-has-photo .vff-hero-photo {max-width:100%;}
}

/* About Us: make the original outdoor student photograph the dominant hero image.
   These scoped overrides only affect the About page and never alter the photo file. */
@media (min-width: 1001px) {
  .about-foundation-hero .about-foundation-grid {
    width: min(1540px, calc(100% - 64px));
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: clamp(40px, 4vw, 72px);
  }
  main .about-foundation-hero .about-foundation-media.vff-generic-header {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
}
@media (max-width: 1000px) {
  main .about-foundation-hero .about-foundation-media.vff-generic-header {
    width: 100%;
    max-width: 820px;
  }
}
main .about-foundation-hero .about-foundation-media img.vff-generic-header-photo {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
