/* LINK RC — equal-sized Community role cards with complete, uncropped images. */
body.community-public-page .community-role-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 28px !important;
  width: 100% !important;
}

body.community-public-page .community-role-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  width: 100% !important;
  min-height: 500px !important;
  height: 500px !important;
  overflow: hidden !important;
}

body.community-public-page .community-role-photo {
  width: 100% !important;
  height: 500px !important;
  min-height: 500px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #eef2f3 !important;
}

body.community-public-page .community-role-photo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

body.community-public-page .community-role-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 500px !important;
  padding: clamp(32px, 5vw, 72px) !important;
}

body.community-public-page .community-role-card:nth-child(even) .community-role-photo {
  order: 2;
}

body.community-public-page .community-role-card:nth-child(even) .community-role-copy {
  order: 1;
}

@media (max-width: 800px) {
  body.community-public-page .community-role-card {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.community-public-page .community-role-photo,
  body.community-public-page .community-role-copy {
    order: initial !important;
  }

  body.community-public-page .community-role-photo {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
  }

  body.community-public-page .community-role-copy {
    min-height: 260px !important;
    padding: 28px 24px !important;
  }
}
