.teammember-grid {
  display: flex;
  gap: 23px;
}

.teammember-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.founding-member-row {
  justify-content: flex-start;
}

.founding-member-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.teammember-image {
  width: 175px;
  height: 175px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 50%;
}

.teammember-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teammember-info {
  text-align: center;
}

.teammember-name {
  font-size: var(--mediumFontMin);
  color: var(--black);
  font-family: var(--headerFont);
  margin-bottom: 10px;
}

.teammember-overlay-trigger {
  padding: 4px;
  cursor: pointer;
  color: var(--black);
  font-family: var(--bodyFont);
  text-transform: uppercase;
}

.teammember-overlay-trigger:hover {
  color: var(--blue);
}

/* Team Member Popup Styles */
.teammember-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.teammember-popup-content {
  background: white;
  padding: 40px;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  display: flex; /* Add Flexbox for centering */
  flex-direction: column; /* Stack elements vertically */
  align-items: center; /* Center horizontally */
}

.teammember-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 40px;
  font-weight: 100;
  cursor: pointer;
}

.teammember-popup-image img {
  width: 175px; /* Fixed width */
  height: 175px; /* Fixed height */
  object-fit: cover; /* Maintain aspect ratio */
  border-radius: 50%;
}

.teammember-popup-name {
  font-size: 24px;
  margin-top: 10px;
}

.teammember-popup-linkedin img {
  width: 26px;
  height: 26px;
  margin-top: 6px; /* Add some space above */
  opacity: 0.8;
  scale: 1;
  transition: all 0.2s ease;
}

.teammember-popup-linkedin:hover img {
  scale: 1.05;
  opacity: 1;
}

.teammember-popup-bio {
  margin-top: 15px;
  max-height: 320px; /* Set a maximum height for scrolling */
  overflow-y: auto; /* Enable vertical scrolling */
  color: var(--dk-grey);
}

@media only screen and (min-width: 981px) {
  .teammember-popup-content {
    width: 40%;
  }

  .founding-member-item {
    width: 25%;
  }
}

@media only screen and (max-width: 980px) {
  .teammember-grid {
    flex-direction: column;
  }

  .teammember-popup-content {
    width: 85%;
  }

  .founding-member-item {
    width: 100%;
  }
}