/* ---------- SMART TEAM GRID & FILTER TABS ---------- */
.team-section {
  background: var(--bg-secondary);
}

.team-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.team-tab {
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
}

/* Same underline the top navbar uses: grows in from the left, inset to sit
   under the label rather than the tab's padding. */
.team-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.team-tab:hover,
.team-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.team-tab:hover::after,
.team-tab.active::after {
  width: calc(100% - 28px);
}

.team-tree {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Giant Group Photo for "All" Tab */
.giant-photo-card {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 200, 83, 0.1);
}

.giant-photo-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #0f1724;
}

.giant-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #152438 0%, #0a0f1a 100%);
  display: flex;
  align-items: flex-end;
  position: relative;
}

.giant-photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.giant-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px 16px;
  background: linear-gradient(0deg, rgba(10, 15, 26, 0.95) 0%, rgba(10, 15, 26, 0.5) 60%, transparent 100%);
  text-align: left;
}

.giant-photo-title {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0;
}

.team-group {
  position: relative;
}

.team-group.hidden {
  display: none !important;
}

.group-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.group-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  margin-left: 16px;
}

.group-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.team-card {
  background: rgba(13, 20, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.team-card:hover {
  background: rgba(18, 28, 44, 0.98);
  border-color: var(--border-hover);
}

.team-card.hidden {
  display: none !important;
}

.card-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #0f1724;
  position: relative;
  overflow: hidden;
}

.card-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bull-green);
  background: linear-gradient(180deg, rgba(21, 35, 54, 0.8) 0%, rgba(10, 15, 26, 0.95) 100%);
  transition: border-color var(--transition-normal);
  overflow: hidden;
}

.card-avatar img,
.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.card-body {
  padding: 14px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.card-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
  line-height: 1.3;
}

.role-badge {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
  background: none;
  border: none;
  padding: 0;
}

.role-badge.faculty { color: var(--gold); }
.role-badge.founder { color: var(--bull-green); }
.role-badge.head { color: var(--bull-green); }
.role-badge.deputy { color: #38bdf8; }
.role-badge.member { color: #94a3b8; }

.card-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.card-socials .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.card-socials .social-link:hover {
  color: var(--bull-green);
  background: rgba(0, 200, 83, 0.15);
}

.card-socials {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-link:hover {
  background: var(--bull-green);
  color: #0a0f1a;
  border-color: var(--bull-green);
}
