/* ===================================================
   TEAM.CSS — Web Committee Page
   2 members per group, CD5 – CD10 — same gold/pink/maroon theme
   =================================================== */

/* ─── Team Hero ───────────────────────────────────── */
.team-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 4.5rem) 2rem 4rem;
  background: var(--gradient-hero);
  isolation: isolate;
}

[data-theme="dark"] .team-hero {
  background: var(--bg-primary);
}

.team-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.team-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin: 1.5rem 0 1.25rem;
}

.team-hero-title span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-hero-tagline {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Team Grid ───────────────────────────────────── */
.team-section {
  position: relative;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* Premium hover polish on top of the existing .teacher-card styles */
.team-card {
  position: relative;
}

/* Shimmer sweep across the card on hover — the "premium" signature move */
.team-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  background: linear-gradient(115deg,
      transparent 20%,
      rgba(255, 255, 255, 0.35) 48%,
      rgba(255, 255, 255, 0.05) 54%,
      transparent 80%);
  background-size: 250% 250%;
  background-position: 130% 0%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-card:hover::after {
  opacity: 1;
  animation: shimmerSweep 1.1s ease forwards;
}

@keyframes shimmerSweep {
  from { background-position: 130% 0%; }
  to   { background-position: -30% 100%; }
}

[data-theme="dark"] .team-card::after {
  background: linear-gradient(115deg,
      transparent 20%,
      rgba(255, 255, 255, 0.12) 48%,
      rgba(255, 255, 255, 0.02) 54%,
      transparent 80%);
  background-size: 250% 250%;
}

/* Subtle idle pulse on the photo ring so the grid never feels static */
.team-card .teacher-photo-wrap {
  animation: ringPulse 5s ease-in-out infinite;
}

.team-card:nth-child(2n) .teacher-photo-wrap { animation-delay: 1.2s; }
.team-card:nth-child(3n) .teacher-photo-wrap { animation-delay: 2.4s; }

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(201, 168, 76, 0.22); }
  50%      { box-shadow: 0 14px 36px rgba(201, 168, 76, 0.34); }
}

.team-card.teacher-pink .teacher-photo-wrap {
  animation-name: ringPulsePink;
}
@keyframes ringPulsePink {
  0%, 100% { box-shadow: 0 10px 28px rgba(214, 51, 132, 0.22); }
  50%      { box-shadow: 0 14px 36px rgba(214, 51, 132, 0.34); }
}

.team-card.teacher-maroon .teacher-photo-wrap {
  animation-name: ringPulseMaroon;
}
@keyframes ringPulseMaroon {
  0%, 100% { box-shadow: 0 10px 28px rgba(123, 29, 46, 0.25); }
  50%      { box-shadow: 0 14px 36px rgba(123, 29, 46, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .team-card .teacher-photo-wrap { animation: none; }
  .team-card:hover::after { animation: none; opacity: 0; }
}

/* Social row — revealed on hover, tucked under the role text */
.team-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.team-card:hover .team-socials,
.team-card:focus-within .team-socials {
  opacity: 1;
  transform: translateY(0);
}

.team-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.team-social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  background: var(--gradient-gold);
  border-color: transparent;
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-hero { padding: calc(var(--nav-height) + 2.5rem) 1.25rem 3rem; }
}

/* ─── Closing CTA ─────────────────────────────────── */
.team-cta-section {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.team-cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  opacity: 0.95;
  z-index: -1;
}

.team-cta-content .section-title {
  color: #fff;
}

.team-cta-sub {
  color: rgba(255, 255, 255, 0.82);
  max-width: 480px;
  margin: 0.75rem auto 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
}
