/* Team Section Styles (clean, standalone) */

@media (min-width: 1010px) {
  .team-members { 
    top: 400px !important;
  }
}


@media (min-width: 1010px)  {
    .member-card {
        border: 3px solid #eaddbf;
    }
}
.team-section {
  font-family: 'Arial', sans-serif;
  margin: 40px 0 0 0;
  top: -75px;
  max-width: 100vw;
  box-sizing: border-box;
  position: relative;
  /* Set min-height to the bottom edge of the lowest absolute box (team-flex, box-top, etc.) */
  min-height: 1050px; /* Set to the bottom-most offset + height of absolute content; adjust as needed */
}
.team-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  position: absolute;
  width: 100vw;
  left: 0;
  top: clamp(160px, 8vw, 60px);
}
#team-flex-2 {
  top: clamp(520px, 28vw, 420px);
  margin-top: clamp(520px, 28vw, 420px);
}

.team-members {
  display: flex;
  flex: 2 1 0;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1010px) {
  .team-members .member-card:first-child {
    margin-left: clamp(8px, 1vw, 16px);
  }
  .team-members .member-card:last-child {
    margin-right: clamp(8px, 1vw, 16px);
  }
}

.member-card {
  width: calc((100% - 40px) / 3);
}   

@media (max-width: 1009px) {
  .team-flex {
    flex-direction: column;
    top: 40px;
    position: absolute;
  }
  #team-flex-2 {
    top: 320px;
  }
  .team-members {
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    padding: 0 0.5em 24px 0.5em;
    flex-direction: row;
    align-items: stretch;
    margin: 0;
    width: 100%;
  }
  .member-card {
    width: calc((100% - 20px) / 2);
    max-width: 98vw;
    min-width: 0;
    border-top: 3px solid #eaddbf;
    border-bottom: 3px solid #eaddbf;
    padding: 1em 0.5em 1.2em 0.5em;
  }
  .member-img {
    width: 100px;
    height: 100px;
  }
}
.member-card {
  background: hsl(38, 100%, 90%);
  padding: 1.2rem 1rem 1.5rem 1rem;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  flex: 1 1 0;
  min-width: 0;
  width: calc((100% - 40px) / 3);
  display: flex;
  flex-direction: column;   
  align-items: center;
  margin-bottom: 0;
  margin-top: 0;
}
.member-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.8rem;
  border: 3px solid #eaddbf;
  background: #eaddbf;
}
.member-linkedin {
  width: 36px;
  height: 36px;
  border-radius: 20%;
  margin-top: 0.5rem;
}
.member-card h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.2rem;
  color: #683737;
  font-weight: bold;
  text-align: center;
}
.member-card h4 {
  margin: 0.7rem 0 0.5rem 0;
  font-size: 1rem;
  color: #683737;
  text-align: center;
}

.member-card p {
    color: #683737;
    font-weight: bold;

}
.member-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.7rem ;
  display: flex;
  justify-content: center;
}
.member-card ul li {
  background: #683737;
  color: #ffffff;
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 0.95em;
margin-left: 2px;
}
.member-card p {
  font-size: 0.97em;
  text-align: left;
  margin: 0.7em 0 0 0;
}

@media (max-width: 1009px) {
  .team-members {
    flex-wrap: wrap;
    gap: 20px;
  }
  .member-card {
    border-radius: 8px;
    margin: 0.7em 0 0 0;
    width: calc((100% - 20px) / 2);
  }

  .team-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .team-intro {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  .team-members {
    justify-content: center;
    gap: 1.2rem;
  }
}

@media (max-width: 1009px) {
  .team-section {
    padding: 0 0.5em 24px 0.5em;
  }
  .team-members {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1.2rem;
    width: 100%;
  }
  .member-card {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }
  .team-section {
    padding: 0 0.5em 24px 0.5em;
  }
  .team-flex {
    gap: 1.2rem;
  }
  .team-members {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }
  .member-card {
    max-width: 98vw;
    min-width: 0;
    padding: 1em 0.5em 1.2em 0.5em;
  }
  .member-img {
    width: 100px;
    height: 100px;
  }
  .team-intro {
    padding: 1.2em 0.7em 1.2em 0.7em;
  }
}
