.team-section {
  padding: 8rem 5% 6rem;
  background: linear-gradient(
    180deg,
    var(--darker-blue) 0%,
    var(--dark-blue) 100%
  );
  margin-top: 80px;
}

.team-container {
  max-width: 1400px;
  margin: 0 auto;
}

.team-header {
  margin-bottom: 4rem;
  text-align: center;
}

.team-header .section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-header .section-subtitle {
  color: var(--text-gray);
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.8;
}

/* Team Categories */
.team-category {
  margin-bottom: 5rem;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-blue);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(74, 144, 226, 0.3);
}

.category-title svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  justify-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Team Cards */
.team-card {
  background: rgba(26, 35, 50, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
}

.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.team-card:hover::before {
  transform: scaleX(1);
}

.team-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-blue);
  box-shadow: 0 10px 40px rgba(74, 144, 226, 0.3);
  background: rgba(26, 35, 50, 0.9);
}

/* Avatar Styling */
.team-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.team-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-blue);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
  transition: all 0.3s ease;
}

.team-card:hover .team-avatar-img {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(74, 144, 226, 0.6);
}

.team-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
  transition: all 0.3s ease;
}

.team-card:hover .team-avatar-fallback {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(74, 144, 226, 0.6);
}

/* Team Member Info */
.team-card h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.team-card .role {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

/* Role Color Variants */
.role.founder {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a2332;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.role.head-dev {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.role.management {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.role.developer {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.role.support {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.team-card:hover .role {
  transform: scale(1.05);
}

/* Responsive Design for Team Page */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  
  .team-card {
    max-width: 260px;
  }
}

@media (max-width: 768px) {
  .team-section {
    padding: 6rem 5% 4rem;
  }

  .team-header .section-title {
    font-size: 2rem;
  }

  .team-header .section-subtitle {
    font-size: 1rem;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .team-card {
    padding: 1.5rem;
    max-width: 240px;
  }

  .team-avatar-wrapper {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .team-section {
    padding: 5rem 3% 3rem;
  }

  .team-header .section-title {
    font-size: 1.8rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-card {
    padding: 1.5rem;
    max-width: 100%;
  }

  .team-avatar-wrapper {
    width: 90px;
    height: 90px;
  }

  .team-card h4 {
    font-size: 1.3rem;
  }

  .category-title {
    font-size: 1.3rem;
  }
}
