/* just for unable to click  */
.member-social a {
  pointer-events: none;
}

.team-section {
  position: relative;
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: var(--light-bg);
}

.dark-theme .team-section {
  background: var(--dark-bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-card {
  position: relative;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-dark);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: 1px solid rgba(61, 99, 221, 0.1);
}

.dark-theme .team-card {
  box-shadow: var(--shadow-dark);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(61, 99, 221, 0.15);
}

.team-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-card:hover::after {
  opacity: 1;
  animation: scanAnimation 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scanAnimation {
  0% {
    top: -30%;
  }
  50% {
    top: 40%;
  }
  100% {
    top: 110%;
  }
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: radial-gradient(
    circle at center,
    rgba(61, 99, 221, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.team-card:hover .card-glow {
  opacity: 1;
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.02);
  }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 2;
}

.team-card:hover .card-image,
.team-card.active .card-image {
  height: 50%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.team-card:hover .card-image img,
.team-card.active .card-image img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 3;
  transition: all 0.5s ease;
}

.team-card:hover .image-overlay,
.team-card.active .image-overlay {
  background: linear-gradient(
    to bottom,
    transparent 10%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: white;
  z-index: 10;
  transition: all 0.4s ease;
}

.main-info {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  transition: all 0.4s ease;
  z-index: 5;
}

.team-card:hover .main-info,
.team-card.active .main-info {
  position: relative;
  bottom: auto;
  margin-bottom: 20px;
  transform: translateY(-20px);
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0.8;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.member-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-theme .member-name {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.member-role {
  font-size: 1rem;
  opacity: 0.9;
  color: var(--primary-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-theme .member-role {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hover-content {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease 0.1s;
  z-index: 15;
  text-align: center;
}

.team-card:hover .hover-content,
.team-card.active .hover-content {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.member-social {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 1rem;
}

.member-social .social-icon {
  position: relative;
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  overflow: visible;
}

.member-social .social-icon-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s ease;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.member-social .social-icon i {
  font-size: 1.4rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  color: var(--primary-color);
}

.dark-theme .member-social .social-icon i {
  color: white;
}

.member-social .social-icon:hover.linkedin i {
  color: #0077b5;
}

.member-social .social-icon:hover.whatsapp i {
  color: #25d366;
}

.member-social .social-icon:hover.github i {
  color: #ffffff;
}

.member-social .social-icon:hover {
  transform: translateY(-5px);
}

.member-social .social-icon:hover .social-icon-inner {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.member-social .social-icon:hover i {
  transform: scale(1.2);
}

.member-social .social-icon.linkedin:hover .social-icon-inner {
  background: rgba(10, 102, 194, 0.2);
  border-color: #0a66c2;
}

.member-social .social-icon.whatsapp:hover .social-icon-inner {
  background: rgba(37, 211, 102, 0.2);
  border-color: #25d366;
}

.member-social .social-icon.github:hover .social-icon-inner {
  background: rgba(36, 41, 46, 0.2);
  border-color: #24292e;
}

.team-card.hidden {
  display: none;
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.team-card {
  animation: floatCard 6s ease-in-out infinite;
}

.team-card:nth-child(odd) {
  animation-delay: 0.5s;
}

.team-card:nth-child(even) {
  animation-delay: 1s;
}

.team-card:hover {
  animation-play-state: paused;
}

.team-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(1px);
  animation: floatShape 15s infinite linear;
}

.shape-1 {
  width: 150px;
  height: 150px;
  background: var(--primary-color);
  top: 10%;
  left: 5%;
  animation-duration: 20s;
}

.shape-2 {
  width: 100px;
  height: 100px;
  background: var(--accent-color);
  top: 70%;
  right: 10%;
  animation-duration: 15s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  background: var(--success-color);
  bottom: 20%;
  left: 15%;
  animation-duration: 25s;
}

@keyframes floatShape {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) translateX(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(10px) translateX(15px) rotate(3deg);
  }
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(61, 99, 221, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(61, 99, 221, 0.3);
}

@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-card {
    height: 350px;
  }

  .member-social .social-icon {
    width: 45px;
    height: 45px;
  }

  .member-social .social-icon i {
    font-size: 1.3rem;
  }

  .card-content {
    padding: 20px;
  }

  .member-name {
    font-size: 1.3rem;
  }

  .member-role {
    font-size: 0.9rem;
  }

  .team-card::after {
    display: none;
  }

  .team-card {
    animation: none;
  }

  .team-card:hover {
    animation: none;
  }
}

@media (max-width: 480px) {
  .team-section {
    padding: 4rem 0;
  }

  .team-card {
    height: 320px;
  }

  .member-social .social-icon {
    width: 40px;
    height: 40px;
  }

  .member-social .social-icon i {
    font-size: 1.2rem;
  }
}
