/* ==========================================
   TEAM PAGE STYLES - COMPLETE
   ========================================== */

/* Background Pattern */
.team-bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 80%, rgba(0, 163, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 163, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.team-bg-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Hero Section */
.team-hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
}

.team-hero-title {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.team-hero-subtitle {
  font-size: clamp(16px, 3vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-decoration {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.math-symbol {
  font-size: 28px;
  color: var(--primary-color);
  opacity: 0.5;
  animation: float-symbol 3s ease-in-out infinite;
}

.math-symbol:nth-child(2) {
  animation-delay: 0.5s;
}
.math-symbol:nth-child(3) {
  animation-delay: 1s;
}
.math-symbol:nth-child(4) {
  animation-delay: 1.5s;
}
.math-symbol:nth-child(5) {
  animation-delay: 2s;
}

@keyframes float-symbol {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Section Labels */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 163, 255, 0.1);
  border: 1px solid rgba(0, 163, 255, 0.3);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.label-icon {
  font-size: 16px;
}

/* Featured Section */
.featured-section {
  padding: 40px 24px 80px;
}

.featured-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  transition: var(--transition);
}

.featured-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 20px 60px rgba(0, 163, 255, 0.15);
}

.featured-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 163, 255, 0.1) 0%, transparent 50%);
  animation: glow-rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes glow-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.featured-content {
  position: relative;
  display: flex;
  gap: 40px;
  align-items: center;
  z-index: 1;
}

.featured-image {
  position: relative;
  flex-shrink: 0;
}

.featured-image img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.3);
}

.featured-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1f2e;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.featured-info {
  flex: 1;
}

.featured-role {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.featured-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.featured-description {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.featured-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.skill-tag {
  background: rgba(0, 163, 255, 0.1);
  border: 1px solid rgba(0, 163, 255, 0.2);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.featured-social {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Team Section */
.team-section {
  padding: 80px 24px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: -40px;
  margin-bottom: 48px;
}

/* Leaders Grid */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.leader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
}

.leader-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.leader-image {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.leader-image img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
  transition: var(--transition);
}

.leader-card:hover .leader-image img {
  border-color: var(--primary-color);
}

.role-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.role-badge.president {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1f2e;
}

.role-badge.vice-president {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #1a1f2e;
}

.role-badge.secretary {
  background: linear-gradient(135deg, #00a3ff, #0066cc);
  color: white;
}

.role-badge.treasurer {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.leader-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.leader-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================
   DEPARTMENT LEADERS SECTION
   ========================================== */

.dept-leaders-section {
  padding: 4rem 24px;
  background: linear-gradient(135deg, rgba(0, 163, 255, 0.03) 0%, rgba(22, 33, 62, 0.05) 100%);
}

.dept-leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Department Leader Card */
.dept-leader-card {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dept-leader-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00a3ff, #0066cc);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.dept-leader-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 163, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 163, 255, 0.2);
}

.dept-leader-card:hover::before {
  transform: scaleX(1);
}

/* Department Leader Image */
.dept-leader-image {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1rem;
}

.dept-leader-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 163, 255, 0.3);
  transition: all 0.3s ease;
}

.dept-leader-card:hover .dept-leader-image img {
  border-color: #00a3ff;
  transform: scale(1.05);
}

.dept-leader-image .placeholder-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Department Badge */
.dept-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: white;
  border: 3px solid #1a1a2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dept-badge.tech {
  background: linear-gradient(135deg, #00a3ff, #0066cc);
}

.dept-badge.media {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.dept-badge.events {
  background: linear-gradient(135deg, #10b981, #059669);
}

.dept-badge.research {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dept-badge.resources {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.dept-badge.ri {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.dept-badge.hr {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

/* Department Leader Info */
.dept-leader-info {
  width: 100%;
}

.dept-leader-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0.5rem 0 0.25rem;
}

.dept-leader-title {
  font-size: 0.85rem;
  color: #00a3ff;
  font-weight: 500;
  margin: 0 0 0.25rem;
}

.dept-leader-role {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.75rem;
}

/* Compact Social Links for Department Leaders */
.leader-social.compact {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.leader-social.compact .social-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-social.compact .social-btn svg {
  width: 14px;
  height: 14px;
}

/* Empty Department Leader Card */
.dept-leader-card.empty-card {
  opacity: 0.6;
  cursor: default;
}

.dept-leader-card.empty-card:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dept-leader-card.empty-card::before {
  background: rgba(255, 255, 255, 0.1);
}

.dept-leader-card.empty-card .dept-leader-image .placeholder-image {
  border-color: rgba(255, 255, 255, 0.05);
}

/* Departments Section */
.departments-section {
  padding: 40px 24px 80px;
}

.department-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  transition: var(--transition);
}

.department-block:hover {
  border-color: rgba(0, 163, 255, 0.3);
}

.department-block.highlighted {
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.1);
}

.department-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.department-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.department-icon.resources {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}
.department-icon.tech {
  background: rgba(0, 163, 255, 0.15);
  color: #00a3ff;
}
.department-icon.media {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}
.department-icon.events {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.department-icon.research {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.department-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.department-desc {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Sub-departments */
.sub-departments {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding-left: 20px;
  margin-top: 20px;
}

.connector-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color), transparent);
}

.sub-department {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.sub-department:hover {
  border-color: rgba(0, 163, 255, 0.3);
}

.sub-dep-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sub-dep-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sub-dep-badge.ri {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.sub-dep-badge.hr {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

.sub-dep-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.sub-dep-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Team Members */
.team-members,
.team-members-grid {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.members-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.members-avatars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.member-avatar:hover {
  transform: scale(1.1);
  border-color: var(--primary-color);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar.add-member {
  background: rgba(0, 163, 255, 0.1);
  border: 2px dashed var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 18px;
  cursor: pointer;
}

.members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.member-card-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.member-card-small:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
}

.member-card-small img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.member-card-small .member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.member-card-small .member-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.member-card-small.add-new {
  border-style: dashed;
  border-color: var(--primary-color);
  background: rgba(0, 163, 255, 0.05);
  cursor: pointer;
  text-decoration: none;
}

.member-card-small.add-new:hover {
  background: rgba(0, 163, 255, 0.1);
}

.add-icon {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.add-text {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 500;
}

/* Join CTA Section */
.join-cta-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 163, 255, 0.05));
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.cta-description {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Loading & Error States */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 163, 255, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-placeholder p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Empty card styling */
.leader-card.empty-card {
  opacity: 0.6;
  border-style: dashed;
}

.leader-card.empty-card:hover {
  opacity: 0.8;
  transform: translateY(-4px);
}

.leader-image .placeholder-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border-color);
}

/* Leader social links */
.leader-social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.leader-social .social-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.leader-social .social-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Error message */
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #ef4444;
  grid-column: 1 / -1;
}

.error-message p {
  margin: 0;
}

/* Animation for new members appearing */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.leader-card,
.dept-leader-card,
.member-card-small,
.member-avatar {
  animation: fadeInUp 0.4s ease-out forwards;
}

.leader-card:nth-child(1),
.dept-leader-card:nth-child(1) {
  animation-delay: 0.1s;
}
.leader-card:nth-child(2),
.dept-leader-card:nth-child(2) {
  animation-delay: 0.2s;
}
.leader-card:nth-child(3),
.dept-leader-card:nth-child(3) {
  animation-delay: 0.3s;
}
.leader-card:nth-child(4),
.dept-leader-card:nth-child(4) {
  animation-delay: 0.4s;
}
.dept-leader-card:nth-child(5) {
  animation-delay: 0.5s;
}
.dept-leader-card:nth-child(6) {
  animation-delay: 0.6s;
}
.dept-leader-card:nth-child(7) {
  animation-delay: 0.7s;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .team-hero {
    padding: 120px 16px 60px;
  }

  .featured-section {
    padding: 20px 16px 60px;
  }

  .featured-card {
    padding: 24px;
  }

  .featured-content {
    flex-direction: column;
    text-align: center;
  }

  .featured-image img {
    width: 140px;
    height: 140px;
  }

  .featured-name {
    font-size: 24px;
  }

  .featured-skills {
    justify-content: center;
  }

  .featured-social {
    justify-content: center;
  }

  .team-section,
  .departments-section {
    padding: 40px 16px;
  }

  .dept-leaders-section {
    padding: 3rem 16px;
  }

  .section-subtitle {
    margin-top: -30px;
    margin-bottom: 32px;
  }

  .leaders-grid {
    grid-template-columns: 1fr;
  }

  .dept-leaders-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
  .sub-departments {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
  .connector-line {
    display: none;
  }
}