/* Bethammi CFC — portrait/photo fit correction. Public designs, colors and image sources remain unchanged.
   Use the entire uploaded photo in editorial/portrait contexts instead of cropping it.
   Hero background artwork and gallery cover thumbnails are intentionally unaffected. */

/* Homepage: the pastor photograph and welcome letter share one responsive grid row. */
.welcome-grid > .pastor-photo {
  display:flex;
  flex-direction:column;
  background:var(--soft);
}
.welcome-grid > .pastor-photo > img {
  display:block;
  width:100%;
  object-fit:contain;
  object-position:center center;
}
.welcome-grid > .pastor-photo > .photo-caption {
  position:static;
  inset:auto;
  flex:none;
  width:100%;
}

/* Who We Are: founder/story, leadership and opening-banner photos show their full frames. */
.v17-profile-photo > img,
.v17-leadership-photo > img,
.v17-hero-visual > img {
  object-fit:contain;
  object-position:center center;
}

/* Team portraits and the image beside ministry/partner copy are not head-only crops. */
.team-grid .team-tile > img,
.feature-split .feature-photo > img {
  object-fit:contain;
  object-position:center center;
  background:var(--soft);
}

@media (min-width:761px) {
  .welcome-grid {align-items:stretch;}
  .welcome-grid > .pastor-photo {
    height:auto;
    min-height:350px;
    align-self:stretch;
  }
  .welcome-grid > .pastor-photo > img {
    flex:1 1 0%;
    height:0;
    min-height:0;
  }
  .welcome-grid > .welcome-text,
  .welcome-grid > .quick-links {align-self:center;}

  .v17-split {align-items:stretch;}
  .v17-profile-card {display:flex;flex-direction:column;align-self:stretch;}
  .v17-profile-photo {
    display:flex;
    flex:1 1 0%;
    height:auto;
    min-height:340px;
    align-items:stretch;
    justify-content:center;
  }
  .v17-profile-photo > img {width:100%;height:100%;max-height:500px;min-height:0;object-fit:contain;}
  .v17-profile-card > .v17-profile-caption,
  .v17-profile-card > .v17-link {flex:none;}

  .v17-leadership-grid {align-items:stretch;}
  .v17-leadership-photo {
    display:flex;
    height:auto;
    min-height:350px;
    align-self:stretch;
  }
  .v17-leadership-photo > img {width:100%;height:100%;max-height:600px;min-height:0;object-fit:contain;}
}

@media (max-width:760px) {
  /* In stacked/mobile layouts, use the photo's intrinsic proportions. */
  .welcome-grid > .pastor-photo {height:auto;min-height:0;}
  .welcome-grid > .pastor-photo > img {
    width:100%;height:auto;max-height:75vh;flex:none;object-fit:contain;
  }
  .v17-profile-photo,.v17-leadership-photo {height:auto;min-height:0;}
  .v17-profile-photo > img,.v17-leadership-photo > img {
    display:block;width:100%;height:auto;max-height:75vh;object-fit:contain;
  }
  .v17-hero-visual > img {object-fit:contain;}
  .feature-split .feature-photo {min-height:0;}
  .feature-split .feature-photo > img {height:auto;min-height:0;max-height:70vh;display:block;}
}

/* Reduced-width Team tiles keep consistent cards while revealing the whole portrait. */
.team-grid .team-tile > img {
  width:100%;
  height:270px;
  display:block;
  object-fit:contain;
}
@media (max-width:760px) {
  .team-grid .team-tile > img {height:min(75vw,380px);}
}
