/* ============================================
   TEAM PAGE — page-specific styles
   ============================================ */

/* ===================================================
   STAFF / TEAM
   =================================================== */
.staff {
  padding: var(--section-py) 0;
  position: relative;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.staff-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  transition: all .4s var(--ease);
}
.staff-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.staff-card .avatar-area {
  height: 260px;                       /* portrait-friendly ratio vs ~260px card width */
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.staff-card .avatar-area img {
  position: absolute;                  /* out of flex flow — fills container reliably */
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;         /* anchor to top: head visible, body cropped */
}
.staff-card .avatar-area::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 30px;
  background: var(--white);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.staff-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 4px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  z-index: 1;
  overflow: hidden;
}
.staff-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.staff-card .info {
  padding: 1.25rem 1.5rem 1.75rem;
  text-align: center;
}
.staff-card .info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: .2rem;
}
.staff-card .info .role {
  font-size: .85rem;
  color: var(--blue-600);
  font-weight: 600;
  margin-bottom: .5rem;
}
.staff-card .info p {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.6;
}
.staff-card .socials {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
}
.staff-card .socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all .3s var(--ease);
}
.staff-card .socials a:hover {
  background: var(--blue-600);
  color: var(--white);
}

/* ===================================================
   LOADING SKELETON — while Firestore data loads
   =================================================== */
.staff-card-skeleton {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-md);
  min-height: 280px;
}
.staff-card-skeleton::before {
  content: '';
  display: block;
  height: 200px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: staff-shimmer 1.5s infinite;
}
.staff-card-skeleton::after {
  content: '';
  display: block;
  height: 80px;
  margin: 1rem;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: staff-shimmer 1.5s infinite;
}
@keyframes staff-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ===================================================
   RESPONSIVE — team page
   =================================================== */
@media (max-width: 1024px) {
  .staff-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
  .staff-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
}

@media (max-width: 480px) {
  .staff-grid { grid-template-columns: 1fr; }
}
