/* Wrap the entire staff listing in a flex container */
.staff-member-listing {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* center last row items */
}

/* Each staff member becomes a fixed-height card */
.staff-member {
  flex: 1 1 calc(33.33% - 20px);
  max-width: 350px; /* prevent cards from stretching too wide */
  box-sizing: border-box;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  min-height: 500px; /* Forces cards to equal height */
  overflow: hidden;
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 992px) {
  .staff-member {
    flex: 1 1 calc(50% - 20px);
    max-width: none; /* allow wider on smaller screens */
  }
}

/* Responsive: full width on mobile */
@media (max-width: 600px) {
  .staff-member {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* Uniform image styling */
.staff-member-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Info wrapper aligned vertically */
.staff-member-info-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  flex-grow: 1;
}

/* Consistent name styling */
.staff-member-name {
  margin: 0 0 0.4em 0;
  font-size: 1.1em;
  font-weight: bold;
  word-break: break-word;
}

/* Consistent title styling */
.staff-member-position {
  margin: 0 0 0.6em 0;
  font-style: italic;
  font-size: 1em;
  word-break: break-word;
}

/* Handle long emails */
.staff-member-email {
  display: block;
  margin-top: 0.4em;
  word-break: break-word;
  overflow-wrap: break-word;
}
