/* ================= TEAM GRID ================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

/* ================= TEAM CARD ================= */

.team-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  text-decoration: none;
  color: #111;
  position: relative;
  overflow: hidden;

  transition:
    transform .35s cubic-bezier(.22,1,.36,1),
    box-shadow .35s ease;
}

.team-card:hover {
  transform: translateY(-14px);
  box-shadow: 0 26px 48px rgba(0,0,0,.14);
}

/* 🔥 FIX: IMAGE HEIGHT INCREASED */
.team-card img {
  width: 100%;
  height: 300px;              /* ⬅ increased height */
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
}

/* Text */
.team-card h4 {
  margin: 8px 0 2px;
}

.team-card .role {
  font-size: .85rem;
  opacity: .7;
}

/* Bio expand on hover */
.team-card p {
  max-height: 44px;
  overflow: hidden;
  transition: max-height .45s ease;
}

.team-card:hover p {
  max-height: 140px;
}

/* LinkedIn icon */
.team-card i {
  margin-top: 12px;
  font-size: 14px;
  color: #0b57ff;
}

/* ================= MODAL OVERLAY ================= */

/*
  🔥 IMPORTANT FIX:
  Clicking OUTSIDE closes modal
*/

.team-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 3000;
}

/* Show modal */
.team-modal:target {
  display: flex;
}

/* Make entire dark area clickable */
.team-modal::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* Modal box */
.modal-box {
  position: relative;
  background: #fff;
  padding: 36px;
  border-radius: 22px;
  max-width: 520px;
  width: calc(100% - 40px);
  text-align: center;
  z-index: 2;

  animation: pop .35s cubic-bezier(.22,1,.36,1);
}

/* Animation */
@keyframes pop {
  from {
    transform: scale(.92) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Modal image */
.modal-box img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 14px;
}

/* Close button */
.close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  text-decoration: none;
  color: #111;
  opacity: .6;
}

.close:hover {
  opacity: 1;
}
