/* Jaisurya Staffing - Our Team page visual enhancements */
.team-intro-banner {
  gap: clamp(28px, 4vw, 52px);
}

.team-intro-banner > div:last-child {
  position: relative;
}

.team-intro-banner > div:last-child::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid rgba(46, 125, 84, 0.22);
  border-radius: 20px;
  z-index: 0;
  pointer-events: none;
}

.team-intro-banner > div:last-child img {
  position: relative;
  z-index: 1;
  display: block;
  border: 6px solid #fff;
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(20, 45, 31, 0.14);
}

.team-grid {
  align-items: stretch;
  gap: 28px;
  padding: 12px 0 20px;
}

.team-grid .team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  min-width: 0;
  padding: 30px 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(35, 91, 59, 0.13);
  border-top: 4px solid var(--primary, #2e7d54);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
  box-shadow: 0 10px 28px rgba(20, 45, 31, 0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.team-grid .team-card:hover {
  transform: translateY(-7px);
  border-color: rgba(46, 125, 84, 0.28);
  box-shadow: 0 18px 38px rgba(20, 45, 31, 0.13);
}

.team-grid .team-role-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 6px 12px;
  line-height: 1.35;
  white-space: normal;
}

.team-grid .team-card h3 {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.35;
}

.team-grid .team-card .team-photo {
  display: block;
  width: min(100%, 250px);
  height: 300px;
  max-width: 250px;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center 18%;
  padding: 0;
  margin: 0 auto 20px;
  border: 6px solid #fff;
  border-radius: 16px;
  background: #f0f4f1;
  box-shadow: 0 8px 24px rgba(20, 45, 31, 0.13);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-grid .team-card:hover .team-photo {
  transform: scale(1.025);
  box-shadow: 0 12px 28px rgba(20, 45, 31, 0.17);
}

.team-grid .team-card .team-lead-name {
  margin: 0 0 10px;
  color: var(--primary-dark, #205b3b);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

.team-grid .team-card p:last-child {
  max-width: 34ch;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.7;
}

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

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 8px 0;
  }

  .team-grid .team-card {
    padding: 26px 20px;
  }

  .team-grid .team-card h3 {
    min-height: 0;
  }

  .team-grid .team-card .team-photo {
    width: min(100%, 240px);
    height: 290px;
  }

  .team-intro-banner > div:last-child::before {
    inset: 10px -8px -8px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-grid .team-card,
  .team-grid .team-card .team-photo {
    transition: none;
  }

  .team-grid .team-card:hover,
  .team-grid .team-card:hover .team-photo {
    transform: none;
  }
}
