/* --- TEAM SECTION --- */
.team__grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  padding: 1rem 0 2rem 0; /* Add padding for hover shadows */
  /* Scroll snap removed to allow smooth mouse edge scrolling */
}

.team__grid::-webkit-scrollbar {
  display: none;
}

.team-card {
  flex: 0 0 280px; /* Fixed width for horizontal scrolling */
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.team-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(99,102,241,0.15);
}

.team-card__image-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-glass);
  padding: 4px;
  transition: border-color var(--duration-normal);
}

.team-card:hover .team-card__image-wrapper {
  border-color: var(--accent-secondary);
}

.team-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform var(--duration-slow);
}

.team-card:hover .team-card__image {
  transform: scale(1.1);
}

.team-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.team-card__role {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --- TEAM MODAL --- */
.team-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
  padding: 1.5rem;
}

.team-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.team-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--duration-normal) var(--ease-out-expo);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

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

.team-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background var(--duration-fast);
}

.team-modal__close:hover {
  background: rgba(255,255,255,0.2);
}

.team-modal__content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .team-modal__content {
    flex-direction: row;
  }
}

.team-modal__image-wrapper {
  width: 100%;
  height: 300px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .team-modal__image-wrapper {
    width: 300px;
    height: auto;
  }
}

.team-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-modal__details {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-modal__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.team-modal__role {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-modal__location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-glass);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.team-modal__bio {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}
