/* ==========================================================================
   Leadership Team & Profiles
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 117, 252, 0.4);
  box-shadow: 0 20px 35px -5px rgba(13, 79, 136, 0.15);
}

.team-photo-wrap {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  position: relative;
  background: #09172c;
  overflow: hidden;
}

.team-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.team-card:hover .team-photo {
  transform: scale(1.05);
}

.team-card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.team-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.35;
  margin-bottom: 1rem;
}

.team-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.85rem;
  margin-top: auto;
}

.view-bio-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.team-linkedin {
  color: #0a66c2;
  font-size: 1.25rem;
  transition: transform var(--transition-fast);
}

.team-linkedin:hover {
  transform: scale(1.15);
}

/* Team Profile Modal */
.team-modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 10, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}

.team-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.team-modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  margin: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  display: grid;
  grid-template-columns: 290px 1fr;
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-modal-overlay.open .team-modal-box {
  transform: translateY(0) scale(1);
}

.team-modal-aside {
  background: #092c52;
  padding: 2.75rem 2rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-modal-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-accent);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.team-modal-content {
  padding: 2.5rem;
  position: relative;
  overflow-y: auto;
  max-height: 85vh;
}

.team-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

.team-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.team-bio-p {
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-modal-box {
    grid-template-columns: 1fr;
  }
  .team-modal-aside {
    border-radius: 20px 20px 0 0;
    padding: 2rem;
  }
}

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