/* Staff plugin container with padding to prevent items from touching the edges */
.staff-plugin-container {
  padding: 0 40px;
  box-sizing: border-box;
  margin-top: 60px;
}

/* Navigation bar styles for desktop (default) */
.team-members-nav {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  max-width: fit-content;
  margin: 0 auto;
}

/* Individual navigation link styles */
.team-members-nav a {
  color: #2fbcbb;
  text-decoration: none;
  display: inline-block;
  padding: 10px 15px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

/* Hover and active link styles */
.team-members-nav a:hover {
  text-decoration: none;
  background-color: #2fbcbb;
  color: #fff;
}

.team-members-nav a.active {
  color: #fff;
  background-color: #2fbcbb;
}

/* MEDIA QUERY: Mobile-specific adjustments */
@media (max-width: 768px) {
  .team-members-nav {
    gap: 10px;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 15px;
    box-shadow: inset 0 -5px 5px -5px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid #2fbcbb;
  }

  /* Custom scrollbar styling for WebKit browsers (e.g., Chrome, Safari) */
  .team-members-nav::-webkit-scrollbar {
    height: 8px;
  }

  .team-members-nav::-webkit-scrollbar-thumb {
    background-color: #2fbcbb;
    border-radius: 10px;
  }

  .team-members-nav::-webkit-scrollbar-track {
    background-color: #f9f9f9;
  }
}

/* Staff plugin member grid */
.staff-plugin-members {
  display: grid;
  grid-template-columns: repeat(
    5,
    1fr
  ); /* 5 equal-width columns for larger screens */
  gap: 20px;
  justify-items: center;
  /* max-width: 1200px; */
  margin: 0 auto;
}

/* Container that holds both the image and text */
.staff-member-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Staff member box (bordered image container) */
.staff-member {
  /* padding: 20px; */
  border-radius: 20px;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Circular images inside the border */
.staff-image {
  width: 400px;
  /* height: 350px; */
  border-radius: 10%;
  object-fit: cover;
}

/* Text (Name and Position) placed outside the border */
.staff-member-text {
  margin-top: 10px;
  text-align: center;
}

/* Staff member heading (below the border) */
.staff-member-text h3 {
  margin: 10px 0;
  font-size: 18px;
  color: #2fbcbb;
  font-weight: bold;
  padding-bottom: 1px;
}

/* Staff member position (below the border) */
.staff-member-text p {
  font-size: 16px;
  color: #555;
  margin-bottom: 0;
}

/* Staggered/muddled effect for larger screens only */
.staff-member-container:nth-child(1n) {
  margin-top: 0;
}

.staff-member-container:nth-child(2n) {
  margin-top: 20px;
}

.staff-member-container:nth-child(3n) {
  margin-top: 40px;
}

.staff-member-container:nth-child(4n) {
  margin-top: 20px;
}

.staff-member-container:nth-child(5n) {
  margin-top: 60px;
}

/* MEDIA QUERY: 4 columns on mobile (less than 768px) */
@media (max-width: 768px) {
  .staff-plugin-members {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px !important;
  }

  /* Remove the staggered/muddled effect on mobile */
  .staff-member-container {
    margin-top: 0 !important;
  }

  /* Adjust image sizes for mobile */
  .staff-image {
    width: 100px;
    height: 150px;
    border-radius: 50%;
  }

  /* Adjust text sizes for better readability */
  .staff-member-text h3 {
    font-size: 14px;
  }

  .staff-member-text p {
    font-size: 12px;
  }
  .staff-member {
    padding: 0px;
  }
}
