/* Team Hero */
.team-hero {
  padding: 120px 0 80px;
  text-align: center;
  background-color: #f8f9fa;
}

.team-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.team-hero .subtitle {
  font-size: 1.25rem;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Team Principles */
.team-principles {
  padding: 60px 24px;
  background-color: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  padding: 0 20px;
}

.principle {
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.principle:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.principle-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.principle h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.principle p {
  color: #666;
  line-height: 1.6;
}

/* Team Grid */
.team-grid-section {
  padding: 80px 0;
  margin: 0 10%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1a1a1a;
}

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

.team-member-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

.team-member-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  border: 3px solid #f8f9fa;
}

.team-member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-member-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  text-align: center;
}

.team-member-title {
  color: #666;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1rem;
}

.team-member-about {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
  flex-grow: 1;
}

.team-member-metrics {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.team-metric {
  text-align: center;
  flex: 1;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.team-metric-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.team-metric-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-member-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  justify-content: center;
}

.team-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px; /* Slightly rounded corners for a square button */
  background: #f8f9fa;
  color: #0a66c2;
  transition: all 0.2s ease;
  overflow: hidden; /* Ensure the icon stays within the rounded corners */
}

.team-social-link:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.team-bio-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #1a1a1a;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
}

.team-bio-btn:hover {
  background: #333;
  transform: translateY(-2px);
}

.team-bio-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.team-bio-btn:hover svg {
  transform: translateX(2px);
}

/* Mobile styles */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 2rem auto 0;
  }

  .team-member-card {
    padding: 1.25rem;
  }

  .team-member-image {
    width: 100px;
    height: 100px;
  }

  .team-member-metrics {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin: 0 -0.5rem 1.5rem;
    padding: 0 0.5rem 0.5rem;
    transform: scale(0.8);
    transform-origin: center;
    width: 166.67%; /* Counteract the scale to maintain layout */
    margin-left: -33.33%; /* Adjust for the increased width */
  }

  .team-metric {
    min-width: 100px;
    flex: 0 0 auto;
  }

  .team-member-actions {
    flex-direction: row;
    gap: 0.75rem;
  }

  .team-bio-btn {
    flex: 1;
  }
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.member-image {
  position: relative;
  height: 300px;
  overflow: hidden;
  flex-shrink: 0; /* Prevents the image container from shrinking */
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* Aligns image to the top */
  transition: transform 0.5s ease;
}

.team-member:hover .member-image img {
  transform: scale(1.03);
}

.member-performance {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.member-info {
  padding: 2rem;
}

.member-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.member-title {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.member-metrics {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
  max-width: 100%;
}

.metric {
  text-align: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  min-width: 120px;
  flex: 1;
  max-width: 160px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.875rem;
  color: #666;
}

.member-about {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.member-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
  max-width: 80%;
}

.member-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.member-link:hover {
  color: #1d4ed8;
  text-decoration: none;
  transform: translateY(-1px);
}

/* LinkedIn Button - Matching portfolio card style */
.member-link.linkedin-btn {
  padding: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.member-link.linkedin-btn:hover {
  background: #edf2f7;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.member-link.linkedin-btn .linkedin-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.member-link.linkedin-btn:hover .linkedin-icon {
  transform: scale(1.05);
}

/* Portfolio company links - imported from portfolio.css */
.portfolio-company-link {
  color: #2c3e50;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  background-color: #f8f9fa;
  border: 1px solid #e2e8f0;
  min-width: 100px;
  text-align: center;
}

.portfolio-company-link:hover {
  background-color: #edf2f7;
  color: #2c3e50;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.portfolio-company-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.portfolio-company-link:hover svg {
  transform: translateX(2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .team-hero h1 {
    font-size: 2.5rem;
  }

  .team-hero .subtitle {
    font-size: 1.1rem;
  }

  /* Mobile layout for team member cards */
  .member-metrics {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .member-metrics .metric {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
  }

  .member-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }

  .member-links > * {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
  }

  .member-links .portfolio-company-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }

  .member-links .linkedin-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Make buttons smaller on mobile */
  .portfolio-company-link {
    padding: 0.4rem 0.2rem;
    font-size: 0.8rem;
    min-width: auto;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Adjust LinkedIn button size */
  .member-link.linkedin-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.4rem;
  }

  /* Ensure buttons stay in a single row */
  .member-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .member-links::-webkit-scrollbar {
    display: none;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .member-metrics {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .team-hero {
    padding: 80px 0 60px;
  }

  .team-hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .member-metrics {
    flex-direction: column;
    gap: 1rem;
  }

  .member-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Team Member Modal */
.team-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.team-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.team-modal.show .team-modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #000;
}

.modal-container {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.modal-image {
  flex: 0 0 300px;
  height: 350px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal-info {
  flex: 1;
}

.modal-title {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.modal-metrics {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.modal-metrics .metric {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  min-width: 100px;
}

.modal-bio {
  line-height: 1.6;
  color: #444;
  margin-bottom: 1.5rem;
}

.member-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Style for the Bio button */
.bio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid #1a1a1a;
  border-radius: 30px;
  background: transparent;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.bio-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* LinkedIn button */
.linkedin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.linkedin-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.linkedin-icon {
  width: 20px;
  height: 20px;
}

/* Modal links */
.modal-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Responsive styles */
@media (max-width: 768px) {
  .modal-container {
    flex-direction: column;
  }

  .modal-image {
    flex: 0 0 250px;
    margin: 0 auto;
    width: 100%;
    max-width: 300px;
  }

  .modal-metrics {
    flex-wrap: wrap;
    justify-content: center;
  }
}
