.team-section {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.team-section.team-bg {
  background-image: url('/img/aboutus/back.g.1.webp'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* لایه نیمه‌شفاف */
.team-section.team-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.5);
  z-index: 1;
}

.team-section .team-title,
.team-section .team-grid {
  position: relative;
  z-index: 2;
}

.team-section .team-title {
  font-size: 2.5rem;
  color: #d4af37;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.team-section .team-title::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background-color: #d4af37;
  border-radius: 2px;
}

.team-section .team-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  flex-wrap: wrap;
}

.team-section .team-card {
  width: 320px;
  height: 460px;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #1c1c1c;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.team-section .team-card.show {
  opacity: 1;
  transform: translateY(0);
}

.team-section .image-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.team-section .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.team-section .image-container:hover img {
  filter: brightness(0.85);
}

.team-section .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.team-section .image-container:hover .overlay {
  opacity: 1;
}

.team-section .overlay .info {
  color: #fff;
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.team-section .overlay .info h4 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: #d4af37;
}

.team-section .overlay .info p {
  font-size: 1rem;
}

/* انیمیشن */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet view */
@media screen and (max-width: 1024px) {
  .team-section {
    padding: 3rem 1.5rem;
  }
  .team-section .team-title {
    font-size: 2.2rem;
  }
  .team-section .team-grid {
    gap: 1.5rem;
  }
}

/* Mobile view */
@media screen and (max-width: 768px) {
  .team-section {
    padding: 2rem 1rem;
  }
  .team-section .team-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .team-section .team-title::after {
    width: 150px;
    height: 3px;
  }
  .team-section .team-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .team-section .team-card {
    width: 100%;
    max-width: 340px;
    height: auto;
  }
  .team-section .image-container img {
    height: auto;
  }
  .team-section .overlay .info h4 {
    font-size: 1.1rem;
  }
  .team-section .overlay .info p {
    font-size: 0.9rem;
  }
}

/* Very small phones */
@media screen and (max-width: 480px) {
  .team-section {
    padding: 1.5rem 0.5rem;
  }
  .team-section .team-title {
    font-size: 1.6rem;
  }
  .team-section .team-card {
    max-width: 100%;
  }
}
