/* Unified Team Card Component */
/* Used on homepage and team page for consistent styling */

/* Import OpenDyslexic font */
@import url('https://fonts.cdnfonts.com/css/opendyslexic');

/* Base Team Card */
.team-card {
  background: white url('/static/img/team-background.png') center/cover no-repeat;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  z-index: 0;
}

.team-card > * {
  position: relative;
  z-index: 1;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* W logo at top left corner */
.team-card::after {
  content: 'w';
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 3rem;
  font-weight: 300;
  color: #00CED1;
  font-family: 'OpenDyslexic', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  z-index: 1;
  line-height: 1;
  opacity: 0.9;
}

/* Team Card Photo */
.team-card__photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Team Card Name */
.team-card__name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e2a4a;
  margin-bottom: 0.5rem;
}

/* Team Card Role */
.team-card__role {
  font-size: 1rem;
  color: #667eea;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Team Card Bio/Description */
.team-card__bio {
  font-size: 0.95rem;
  color: #4A6FA5;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Team Card Bullet Points */
.team-card__bullets {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: left;
  flex-grow: 1;
}

.team-card__bullets li {
  font-size: 0.75rem;
  color: #4A6FA5;
  line-height: 1.8;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card__bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #00CED1;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
}

/* Social Links Container */
.team-card__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Social Link Styling */
.team-card__social-link {
  color: #667eea;
  font-size: 1rem;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.team-card__social-link:hover {
  color: #764ba2;
  transform: translateY(-2px);
  text-decoration: none !important;
}

.team-card__social-link:focus,
.team-card__social-link:active,
.team-card__social-link:visited {
  text-decoration: none !important;
}

.team-card__social-link i {
  font-size: 1.1rem;
}

/* Grid Layout for Team Section */
.team-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: stretch;
}

/* Responsive Design */
@media (max-width: 992px) {
  .team-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .team-section__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-card {
    padding: 1.5rem;
  }

  .team-card__photo {
    width: 140px;
    height: 140px;
  }

  .team-card__name {
    font-size: 1.2rem;
  }
}

/* iPhone 14 (≤390px) */
@media (max-width: 390px) {
  .team-section__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .team-card {
    padding: 1.25rem;
  }

  .team-card__photo {
    width: 110px;
    height: 110px;
    border-width: 3px;
  }

  .team-card__name {
    font-size: 1.1rem;
  }

  .team-card__role {
    font-size: 0.9rem;
  }

  .team-card__bio {
    font-size: 0.88rem;
  }

  .team-card__social {
    gap: 0.75rem;
  }

  .team-card__social-link {
    font-size: 0.88rem;
  }

  .team-card__bullets li {
    white-space: normal;
  }
}
