.team-section {
  padding: 80px 0px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-subtitle {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-subtitle::before,
.section-subtitle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 50px;
  height: 2px;
  background: var(--accent-color);
}

.section-subtitle::before {
  left: -70px;
}

.section-subtitle::after {
  right: -70px;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0;
  line-height: 1.2;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin-top: 30px;
  margin-bottom: 80px;
}

.team-card {
  background: white;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  height: 450px;
}

.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><path d="M50,350 Q200,100 350,250 Q300,350 200,300 Q100,400 50,350 Z" fill="none" stroke="%2300d4ff" stroke-width="2" opacity="0.3"/></svg>')
    no-repeat;
  background-size: contain;
  background-position: top right;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.team-card:hover::before {
  opacity: 1;
}

.team-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 5px 10px rgba(8, 109, 181, 0.2);
}

.team-image {
  height: 280px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.team-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--accent-color);
  color: black;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.team-card:hover .team-overlay {
  opacity: 1;
  transform: translateY(0);
}

.team-content {
  padding: 30px 25px;
  text-align: center;
}

.team-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.team-role {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  font-weight: 500;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
}

.social-links a:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

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

@media (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }

  .section-subtitle::before,
  .section-subtitle::after {
    width: 30px;
  }

  .section-subtitle::before {
    left: -45px;
  }

  .section-subtitle::after {
    right: -45px;
  }

  .team-card {
    height: 400px;
  }

  .team-image {
    height: 240px;
  }

  .team-grid {
    gap: 20px;
  }
}

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

  .section-subtitle::before,
  .section-subtitle::after {
    display: none;
  }

  .team-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

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

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .team-card {
    height: 380px;
  }

  .team-image {
    height: 220px;
  }

  .team-content {
    padding: 25px 20px;
  }

  .team-name {
    font-size: 1.2rem;
  }

  .social-links a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .team-grid {
    margin-left: 30px !important;
  }
}

.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path d="M20,280 Q150,50 280,200 Q250,280 150,230 Q50,300 20,280 Z" fill="none" stroke="%2300d4ff" stroke-width="1" opacity="0.8"/></svg>')
    no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.team-card:hover::before {
  opacity: 1;
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-subtitle,
.section-title,
.team-grid {
  animation: fadeInSlideUp 1s ease-out forwards;
}

/* SCroll  */

.section-subtitle {
  opacity: 0;
  transform: translateY(50px) scale(0.8);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.1em;
}

.section-subtitle.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: slideInBounce 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section-title {
  opacity: 0;
  transform: translateY(60px) rotateX(45deg);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center bottom;
}

.section-title.animate {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  animation: titleReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}

/* Keyframe animations for team text */
@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    transform: translateY(60px) rotateX(45deg) scale(0.9);
  }
  
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

.team-card {
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}
