/* Dedicated Our Team page — matches articles/books layout */

.team-page {
  background: linear-gradient(180deg, #faf8f5 0%, #f0f4f8 50%, #faf8f5 100%);
}

.team-hero {
  min-height: 42vh;
}

.team-hero-bg {
  background: linear-gradient(135deg, #1f5a38 0%, #2c6e9e 55%, #1e4e72 100%);
}

.team-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.08), transparent 40%);
}

.team-hero-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.team-hero .articles-hero-content h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
}

/* ── 3D spinning carousel ── */
.team-carousel-section {
  padding: 2rem 0 3rem;
  background: linear-gradient(180deg, #faf8f5 0%, #f0f4f8 100%);
  overflow: hidden;
}

.team-carousel-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.team-carousel-stage {
  perspective: 1600px;
  height: clamp(320px, 48vw, 440px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform: rotateX(8deg);
}

.team-carousel-stage::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 720px);
  height: 40px;
  background: radial-gradient(ellipse, rgba(15,23,42,.12) 0%, transparent 70%);
  pointer-events: none;
}

.team-carousel-ring {
  position: relative;
  width: 200px;
  height: 280px;
  transform-style: preserve-3d;
  animation: teamCylinderSpin var(--team-spin-duration, 28s) linear infinite;
  will-change: transform;
}

.team-carousel-ring:hover {
  animation-play-state: paused;
}

@keyframes teamCylinderSpin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.team-carousel-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(140px, 18vw, 190px);
  height: clamp(190px, 24vw, 260px);
  margin-left: calc(clamp(140px, 18vw, 190px) / -2);
  margin-top: calc(clamp(190px, 24vw, 260px) / -2);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255,255,255,.4);
  background: linear-gradient(145deg, #e8f5ee 0%, #e3edf7 55%, #f5f0ea 100%);
}

.team-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: linear-gradient(145deg, #e8f5ee 0%, #e3edf7 55%, #f5f0ea 100%);
}

.team-carousel-hint {
  display: none;
}

.team-carousel-empty {
  text-align: center;
  color: #64748b;
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

/* ── Roster grid below ── */
.team-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  overflow: visible;
}

.team-roster-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.team-roster-head h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: #1e2f3c;
  margin: 0 0 0.5rem;
}

.team-roster-head p {
  color: #64748b;
  margin: 0;
  font-size: 0.92rem;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 100%;
  overflow: visible;
  padding-top: 3rem;
}

.team-card {
  flex: 0 1 200px;
  width: min(220px, calc(50% - 0.75rem));
  max-width: 220px;
  background: linear-gradient(165deg, #ffffff 0%, #f0f7f4 48%, #eef4fb 100%);
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, overflow 0s;
  animation: teamCardIn 0.6s ease backwards;
  position: relative;
  z-index: 1;
}

.team-card:nth-child(1) { animation-delay: 0.05s; }
.team-card:nth-child(2) { animation-delay: 0.1s; }
.team-card:nth-child(3) { animation-delay: 0.15s; }
.team-card:nth-child(4) { animation-delay: 0.2s; }
.team-card:nth-child(5) { animation-delay: 0.25s; }
.team-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes teamCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.18);
  z-index: 20;
  overflow: visible;
}

.team-card-photo {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #e8f5ee 0%, #e3edf7 55%, #f5f0ea 100%);
}

.team-card-photo img {
  display: block;
  background: linear-gradient(145deg, #e8f5ee 0%, #e3edf7 55%, #f5f0ea 100%);
}

.team-card-img-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.28s ease;
}

.team-card-img-full {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 6;
  width: min(300px, 95vw);
  max-height: min(420px, 75vh);
  height: auto;
  object-fit: contain;
  object-position: center;
  padding: 0.4rem;
  background: linear-gradient(145deg, #e8f5ee 0%, #e3edf7 55%, #f5f0ea 100%);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -8%) scale(0.94);
  transition: opacity 0.32s ease, visibility 0.32s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-card:hover .team-card-photo {
  overflow: visible;
  z-index: 2;
}

.team-card:hover .team-card-img-thumb {
  opacity: 0;
}

.team-card:hover .team-card-img-full {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -14%) scale(1);
}

.team-card-body {
  padding: 1rem 1.1rem 1.25rem;
  text-align: center;
}

.team-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1e2f3c;
  margin: 0 0 0.3rem;
}

.team-card-title {
  font-size: 0.85rem;
  color: #2c7a4d;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
}

.team-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #94a3b8;
  padding: 3rem 1rem;
}

@media (max-width: 640px) {
  .team-card {
    width: calc(50% - 0.5rem);
    flex-basis: calc(50% - 0.5rem);
  }

  .team-carousel-stage {
    height: 300px;
  }
  
  
  
  
  
  
  @media (max-width: 640px) {
  .team-grid {
    gap: 0.75rem;
    padding-top: 2rem;
    justify-content: space-between;
  }

  .team-card {
    flex: 0 0 calc(50% - 0.4rem);
    width: calc(50% - 0.4rem);
    max-width: none;
  }
  
  
  
  
  @media (max-width: 640px) {
  .team-grid {
    gap: 0.75rem;
    justify-content: space-between;
  }

  .team-card {
    flex: 0 0 calc(50% - 0.4rem);
    width: calc(50% - 0.4rem);
    max-width: none;
  }

  /* Full-screen centered preview on tap/hover */
  .team-card:hover,
  .team-card:active {
    z-index: 50;
  }

  .team-card:hover .team-card-img-full,
  .team-card:active .team-card-img-full {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 10000;
    width: min(92vw, 420px);
    max-height: 88vh;
    height: auto;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: none;
  }
}
  
  
  
  
  
  
  
}

@media (prefers-reduced-motion: reduce) {
  .team-carousel-ring {
    animation: none;
  }
  .team-card {
    animation: none;
  }
}
