/* Team Profile Card Standardization */

/* Fixed image dimensions with object-fit to maintain aspect ratio */
.member .member-img {
  height: 350px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  position: relative;
}

.member .member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Placeholder styling for members without photos */
.member .member-img img[src*="team_placeholder.jpg"] {
  display: none;
}

.member .member-img:has(img[src*="team_placeholder.jpg"])::before {
  content: '';
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f8f8 0%, #efefef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member .member-img:has(img[src*="team_placeholder.jpg"])::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23d0d0d0"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.3;
}

/* Standardize member info section height */
.member .member-info {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* Ensure names are aligned */
.member .member-info h5 {
  margin-bottom: 15px;
  min-height: 30px;
  display: flex;
  align-items: center;
  position: relative;
  padding-bottom: 10px;
}

/* Separator between name and position (same style as site headings) */
.member .member-info h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -25px;
  width: 50px;
  height: 1px;
  background-color: #d8ae76;
}

/* Ensure positions are aligned */
.member .member-info h6 {
  margin-bottom: 10px;
  min-height: 40px;
  display: flex;
  align-items: center;
  text-align: center;
}

/* LinkedIn button container with fixed height to maintain alignment */
.member .member-info > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Standardize all member cards to same width */
  .member {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }

  .member .member-img {
    height: 300px;
    width: 100%;
  }

  .member .member-img img {
    object-fit: contain;
    background-color: #f8f8f8;
    width: 100%;
  }

  .member .member-info {
    min-height: 100px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .member {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .member .member-img {
    height: 280px;
    width: 100%;
  }

  .member .member-img img {
    object-fit: contain;
    width: 100%;
  }
}
