
.team-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 2.5rem;
  padding: 0rem 1rem;
}

.team-badge {
  display: inline-block;
  background-color: #e0f2fe;
  color: #0c4a6e;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.team-description {
  color: #4b5563;
  line-height: 1.6;
}

.team-background{
  background: var(--bg-dark);
  margin-top: -1px;
}
/* === MOBILE SLIDER STYLES (< 1024px) === */
/* These styles define how each card looks when it's a slide. */

.team-grid {
  /* Changed: Remove padding so it goes edge-to-edge */
  padding: 0; 
}

.team-member-card {
  position: relative;
  width: 100%; 
  max-width: 100%; 
  margin-right: 0px; 
  overflow: hidden;
  height: 450px;
}
/* === SHARED CARD STYLES (Overlay, Button, Image, Text) === */

.team-member-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%) saturate(100%) contrast(100%);
}

.team-member-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
  color: #f9fafb;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.details-button {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: #111827;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  z-index: 20;
}

.minus-icon { display: none; }

.team-member-card.is-active .team-member-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.team-member-card.is-active .plus-icon { display: none; }
.team-member-card.is-active .minus-icon { display: block; }

.team-member-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.team-member-role { color: #d1d5db; margin-bottom: 10px !important;}
.team-member-bio { font-size: 18px; color: #e5e7eb; }


/* Hide the button on mobile by default */
.view-all-container {
  display: none;
}

.view-all-button {
  padding: 12px 30px !important;
  font-size: 14px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  background-color: transparent !important;
  color: #333 !important;
  transition: all 0.3s ease !important;
  margin-top: 10px !important;
}

.view-all-button:hover {
  background-color: #333 !important;
  color: #fff !important;
}

/* === DESKTOP GRID STYLES (1024px AND UP) === */
/* This media query activates only on large screens. */

@media (min-width: 1024px) {
  .team-grid {
    /* 1. Turn the container into a grid */
    display: grid;
    
    /* 2. CHANGE: Use 12 columns (LCM of 3 and 4) */
    /* This allows us to mix 3-item rows and 4-item rows */
    grid-template-columns: repeat(12, 1fr);
    
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem; 
  }
    
  .team-member-card {
    /* 3. DEFAULT: Span 3 columns */
    /* 12 columns / 3 span = 4 items per row (For the "rest" of the rows) */
    grid-column: span 3;
    
    width: auto;
    margin-right: 0;
    height: 450px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  /* 4. EXCEPTION: Make the first 3 items span 4 columns */
  /* 12 columns / 4 span = 3 items per row (For the first row) */
  /* .team-member-card:nth-child(-n+3) {
    grid-column: span 4;
  } */

  /* Desktop hover effects */
  .team-member-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  }

  .team-member-overlay {
    transform: translateY(0);
  }

  .team-member-card:hover .team-member-overlay {
    opacity: 1;
  }
  
  .details-button {
    display: none;
  }

  .view-all-container {
    display: block;
    text-align: center;
  }

  /* 5. UPDATE: Hide items starting from the 4th one */
  .team-member-card:nth-child(n + 5) {
    display: none;
  }

  /* 6. UPDATE: Show logic when expanded */
  .team-section.is-expanded .team-member-card:nth-child(n + 5) {
    display: block; 
    animation: fadeIn 0.5s ease-in-out; 
  }
  
  .mobile-nav-arrow {
    display: none;
  }
}
/* Optional Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Navigation Arrow for Mobile */
.mobile-nav-arrow {
  position: absolute;
  bottom: 1rem;      
  right: 1rem;      
  font-size: 2.5rem;  
  color: rgba(255, 255, 255, 0.9); 
  z-index: 25;       
  text-shadow: 0 2px 5px rgba(0,0,0,0.5); 
  pointer-events: none; 
  line-height: 1;     
}

