/* Clean floating tooltip above the image */
.team-hover-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.team-hover-wrap:hover {
  transform: translateY(-5px);
}

/* The tooltip container */
.team-tooltip-content {
  position: absolute;
  left: 50%;
  bottom: 110%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  width: 280px;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Tooltip name */
.tooltip-name {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
  color: #fff;
}

/* Tooltip title */
.tooltip-title {
  font-style: italic;
  color: #e0e0e0;
  margin-bottom: 8px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}

/* Tooltip description */
.tooltip-desc {
  font-size: 13px;
  line-height: 1.5;
}

/* Tooltip arrow */
.team-tooltip-content::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: rgba(0,0,0,0.85) transparent transparent transparent;
}

/* Visible on hover or when wrapper has keyboard-focus */
.team-hover-wrap:hover .team-tooltip-content,
.team-hover-wrap.keyboard-focus .team-tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Team member info below image */
.team-member-info {
  text-align: center;
  margin-top: 15px;
}

.team-member-name {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.team-member-title {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Ensure images are block level */
.team-hover-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  transition: border-radius 0.3s ease;
}

/* Team members grid */
.team-members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
}

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

@media (max-width: 768px) {
  .team-members-grid {
    grid-template-columns: 1fr;
  }
}

/* List view */
.team-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.team-member-item {
  text-align: center;
  max-width: 280px;
}