#head {
  text-align: center;
  margin: 7rem auto 4rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 1rem;
}

#head h1 {
  font-size: clamp(1.4rem, 4vw + 0.3rem, 2.5rem);
  margin: 0;
  padding: 0;
  line-height: 1.3;
  color: inherit;
  font-weight: 600;
}

@media (max-width: 1024px) {
  #head {
    margin-top: 5rem;
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  #head {
    margin-top: 4rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  #head h1 {
    line-height: 1.4;
  }
}


.team-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 5rem 2rem;
}

.team-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(90deg, #0077b5, #00b57c, #b5007c, #b57c00) border-box;
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.info-box {
  padding: 1rem;
  background: white;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.member-info {
  transition: all 0.4s ease;
  flex-grow: 1;
}

.member-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

@media (max-width: 480px) {
  #member2 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
}

.position {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
}

.linkedin-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #0077b5;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.linkedin-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.linkedin-btn i {
  font-size: 1.1rem;
}

.mobile-linkedin {
  display: none;
  color: #0077b5;
  font-size: 1rem;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
}

@media (min-width: 769px) {
  .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .team-card:hover .member-info {
    transform: translateX(100%);
    opacity: 0;
  }

  .team-card:hover .linkedin-handle {
    transform: translateX(0);
  }

  .linkedin-btn:hover {
    background: white;
    color: #0077b5;
  }

  .linkedin-btn:hover i {
    color: #0077b5;
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .team-card {
    width: 100%;
    max-width: 260px;
  }

  .card-image {
    height: 180px;
  }

  .mobile-linkedin {
    display: inline-block;
  }

  .team-card.active .member-info {
    transform: translateX(100%);
    opacity: 0;
  }

  .team-card.active .linkedin-handle {
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    justify-items: center;
    max-width: 280px;
    margin: 0 auto;
  }

  .team-card {
    width: 100%;
    max-width: 240px;
  }

  .card-image {
    height: 160px;
  }

  .mobile-linkedin {
    display: inline-block;
    font-size: 1.3rem;
    margin-left: auto;
    margin-right: -10px;
    order: 1;
    margin-bottom: -3px;
  }

  .position {
    margin-right: 8px;
  }
}

@media (max-width: 480px) {

  #linkedin-icon-1,
  #linkedin-icon-2 {
    margin-left: auto;
    margin-right: -14px;
    font-size: 1.3rem;
  }

  #linkedin-icon-1~.position-text,
  #linkedin-icon-2~.position-text {
    margin-right: 15px;
  }
}