/* ===== PAGE-SPECIFIC: TEAM PAGE ===== */
/* Hero uses shared .page-hero from resources.css */

/* Team Section */
.team-section {
  padding: 5.5rem 0;
  position: relative;
  background:
    radial-gradient(circle at 10% 15%, rgba(26, 54, 93, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(43, 122, 120, 0.07) 0%, transparent 45%),
    var(--white);
  overflow: hidden;
}

.team-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--navy) 1.3px, transparent 1.3px);
  background-size: 16px 16px;
  opacity: 0.08;
  pointer-events: none;
}

.team-section > .container {
  position: relative;
  z-index: 1;
}
.team-section-alt {
  background: var(--gray-50);
}

.team-section-alt::before {
  display: none;
}

/* Team Grid */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.team-grid > .team-member-card {
  width: calc((100% - 1.5rem * 4) / 5);
}
.team-grid-centered {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.team-grid-centered .team-member-card {
  flex: 0 0 calc((100% - 1.5rem * 4) / 5);
}
.team-grid-admin {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

/* Team Card */
.team-member-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.25s ease;
  border: 1px solid var(--gray-100);
}
.team-member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Team Photo */
.team-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  border: 4px solid var(--gray-100);
  box-shadow: 0 6px 20px rgba(26,54,93,0.12);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.team-member-card:hover .team-photo {
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(43,122,120,0.2);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--gray-100) 0%, var(--gray-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
}
.team-photo-placeholder svg {
  width: 52px;
  height: 52px;
}

/* Team Info */
.team-member-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.team-member-title {
  font-size: 0.78rem;
  color: var(--gold-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.team-member-bio {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}
.team-member-card .bio-toggle {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  cursor: pointer;
  margin-top: 0.4rem;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.2s ease;
}
.team-member-card .bio-toggle:hover {
  color: var(--navy);
}
.team-member-card.bio-expanded .team-member-bio {
  -webkit-line-clamp: unset;
  display: block;
}
.team-member-credential {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-dark);
  background: var(--gold-pale);
  border: 1px solid rgba(43,122,120,0.2);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  margin-top: 0.75rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Join CTA */
.join-cta {
  background:
    linear-gradient(135deg, rgba(15,34,64,0.93) 0%, rgba(26,54,93,0.9) 50%, rgba(35,78,130,0.88) 100%),
    url('https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?w=1400&q=80') center/cover no-repeat;
  padding: 5.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.join-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(43,122,120,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(43,122,120,0.06) 0%, transparent 50%);
}
.join-cta-inner {
  position: relative;
  z-index: 1;
}
.join-cta h2 {
  color: var(--white);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}
.join-cta p {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2.25rem;
}
.join-cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .team-grid > .team-member-card { width: calc((100% - 1.5rem * 2) / 3); }
  .team-grid-admin { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .team-section { padding: 3.5rem 0; }
  .team-grid > .team-member-card { width: calc((100% - 1.5rem) / 2); }
  .team-grid-admin { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .join-cta { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .team-grid > .team-member-card { width: 100%; }
  .team-grid-centered { flex-direction: column; align-items: center; }
  .team-grid-admin { grid-template-columns: 1fr; }
}
