/* ========================================
   TEAM PAGE — The Connection Church
   ======================================== */

/* ---- Page Hero ---- */
.team-hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 55%, #3a1060 100%);
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-6) clamp(var(--space-12), 8vw, var(--space-24));
  text-align: center;
  overflow: hidden;
}
.team-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.team-hero-content { position: relative; z-index: 1; }
.team-hero .section-eyebrow { color: rgba(255,255,255,0.6); }
.team-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}
.team-hero-accent {
  display: inline-block;
  position: relative;
  color: #fff;
}
.team-hero-accent::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 4px;
  background: var(--color-red);
  border-radius: 2px;
}
.team-hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 52ch;
  margin-inline: auto;
  font-style: italic;
  line-height: 1.65;
}

/* ---- Active nav link ---- */
.nav-link--active { color: var(--color-blue) !important; font-weight: 800 !important; }

/* ---- Team Section ---- */
.team-section {
  background: var(--color-surface);
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ---- Featured (Senior Pastor) ---- */
.team-featured {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.team-member--featured { align-items: center; }
.team-member--featured .team-info { margin-top: var(--space-5); }
.team-member--featured .team-name {
  font-size: var(--text-xl);
}
.team-member--featured .team-title--senior {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* ---- Team Grid (7 members) ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(var(--space-8), 4vw, var(--space-12)) var(--space-8);
  justify-items: center;
}

/* ---- Individual Team Member ---- */
.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 220px;
}

/* ---- Oval Photo Frame ---- */
.team-oval {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-white);
  box-shadow:
    0 0 0 3px var(--color-blue),
    var(--shadow-lg);
  background: var(--color-blue-pale);
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-oval:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 3px var(--color-red),
    0 20px 40px rgba(26,58,143,0.2);
}
.team-oval--lg {
  width: 260px;
  height: 260px;
  border: 5px solid var(--color-white);
  box-shadow:
    0 0 0 4px var(--color-blue),
    0 20px 50px rgba(26,58,143,0.2);
}
.team-oval--lg:hover {
  box-shadow:
    0 0 0 4px var(--color-red),
    0 28px 60px rgba(26,58,143,0.25);
}

/* Photo inside oval — images are pre-cropped to square with face centered */
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Placeholder silhouette when no photo */
.team-oval--placeholder {
  background: linear-gradient(160deg, var(--color-blue-pale) 0%, var(--color-grey) 100%);
}
.team-oval-placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
  pointer-events: none;
}
.team-oval-placeholder-icon svg {
  width: 75%;
  height: 75%;
  color: var(--color-blue);
  opacity: 0.25;
}
/* Hide placeholder icon when real photo loads */
.team-photo + .team-oval-placeholder-icon { display: none; }

/* ---- Member Info ---- */
.team-info {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}
.team-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}
.team-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin: 0;
  line-height: 1.4;
}
.team-title--senior {
  color: var(--color-red);
  font-size: var(--text-sm);
}
.team-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.4;
}

/* ---- Bottom CTA ---- */
.team-cta {
  background: var(--color-bg);
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}
.team-cta-box {
  background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 100%);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16)) var(--space-10);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.team-cta-box h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  color: #fff;
  margin-bottom: var(--space-2);
}
.team-cta-box p {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.78);
  margin-bottom: var(--space-6);
  font-style: italic;
  max-width: none;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-4); }
  .team-oval { width: 150px; height: 150px; }
  .team-oval--lg { width: 200px; height: 200px; }
  .team-member { max-width: 160px; }
}
@media (max-width: 380px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-oval { width: 130px; height: 130px; }
}
