/* ========================================
   Enhanced Team Section - Professional 3D Flip Cards
   ======================================== */

.team-cards {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  padding: 2rem 0;
}

.team-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, var(--tertiary-dark) 0%, rgba(0, 238, 255, 0.05) 100%);
  border: 2px solid rgba(0, 238, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 238, 255, 0.2);
  transition: all 0.4s ease;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 238, 255, 0.4);
  border-color: var(--accent-color);
}

.team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.team-card-front {
  display: flex;
  flex-direction: column;
}

.team-card-back {
  display: none;
}

/* Front Card - Image Container */
.team-img-container {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 238, 255, 0.1) 0%, transparent 100%);
}

.team-img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.team-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  /* Move focal point upward to show full face within circle */
  object-position: 50% 20%;
  transition: all 0.5s ease;
  filter: brightness(1) contrast(1.1);
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 30px rgba(0, 238, 255, 0.5), 0 0 60px rgba(0, 238, 255, 0.3);
}

.team-card:hover .team-img {
  transform: scale(1.05) rotate(5deg);
  filter: brightness(1.1) contrast(1.2);
  box-shadow: 0 0 40px rgba(0, 238, 255, 0.8), 0 0 80px rgba(0, 238, 255, 0.5);
}


/* Front Card - Info Section */
.team-info {
  padding: 2.5rem 2rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
}

.team-name {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(0, 238, 255, 0.3);
}

.team-role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.team-role i {
  color: var(--accent-color);
  font-size: 1.3rem;
}

.team-specialty {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.specialty-tag {
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(0, 238, 255, 0.15), rgba(0, 255, 102, 0.15));
  border: 1px solid rgba(0, 238, 255, 0.3);
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.specialty-tag:hover {
  background: linear-gradient(135deg, rgba(0, 238, 255, 0.25), rgba(0, 255, 102, 0.25));
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 238, 255, 0.3);
}

/* Stats Section - Now in Front Card */
.team-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 238, 255, 0.2);
}

.stat-item {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(0, 238, 255, 0.1), transparent);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: linear-gradient(135deg, rgba(0, 238, 255, 0.2), rgba(0, 255, 102, 0.1));
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 238, 255, 0.3);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* Achievements Section - Now in Front Card */
.team-achievements {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.achievement-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(0, 238, 255, 0.15), transparent);
  border-left: 3px solid var(--accent-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.achievement-badge:hover {
  background: linear-gradient(90deg, rgba(0, 238, 255, 0.25), rgba(0, 255, 102, 0.1));
  border-left-width: 5px;
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 238, 255, 0.3);
}

.achievement-badge i {
  font-size: 1.5rem;
  color: var(--accent-color);
  min-width: 30px;
  text-align: center;
}

.achievement-badge span {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Contact Button */
.team-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color-2));
  color: var(--primary-dark);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 238, 255, 0.4);
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  width: 100%;
}

.team-contact-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.team-contact-btn:hover::before {
  width: 300px;
  height: 300px;
}

.team-contact-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 238, 255, 0.6);
}

.team-contact-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.team-contact-btn:hover i {
  transform: translateX(5px);
}

/* Animations */
@keyframes float-card {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.team-card {
  animation: float-card 6s ease-in-out infinite;
}

.team-card:nth-child(2) {
  animation-delay: 1s;
}

/* Responsive Design */
@media (max-width: 992px) {
  .team-cards {
    gap: 2rem;
  }

  .team-card {
    width: 350px;
    height: 520px;
  }

  .team-stats {
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .team-cards {
    flex-direction: column;
    align-items: center;
  }

  .team-card {
    width: 100%;
    max-width: 380px;
    height: auto;
    min-height: 550px;
  }

  .team-stats {
    grid-template-columns: 1fr;
  }

  .team-img-container {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .team-card {
    max-width: 100%;
  }

  .team-info {
    padding: 1.5rem;
  }

  .team-name {
    font-size: 1.5rem;
  }

  .team-card-back {
    padding: 1.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .achievement-badge {
    padding: 0.875rem 1rem;
  }
}
