/* Team Page Specific Styles with Animations */
.team {
  padding: 8rem 5% 6rem;
  background: var(--light-color);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.team::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(10, 140, 122, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(31, 200, 219, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.team-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title p {
  font-size: 1.2rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.team-member {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  opacity: 0;
  transform: translateY(50px);
}

.team-member.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.team-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 2;
}

.team-member:hover::before {
  transform: scaleX(1);
}

.team-member::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.team-member:hover::after {
  left: 100%;
}

.team-member:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(10, 140, 122, 0.15),
    0 15px 30px rgba(10, 140, 122, 0.1);
}

.member-image {
  position: relative;
  overflow: hidden;
  height: 300px;
  background: var(--light-color);
}

.member-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 140, 122, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.team-member:hover .member-image::before {
  opacity: 1;
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: grayscale(0.2);
}

.team-member:hover .member-image img {
  transform: scale(1.15) rotate(2deg);
  filter: grayscale(0);
}

.member-info {
  padding: 2rem;
  text-align: center;
  position: relative;
  background: white;
}

.member-info h3 {
  font-size: 1.4rem;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.team-member:hover .member-info h3 {
  color: var(--primary-color);
}

.member-info h4 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 500;
  position: relative;
  display: inline-block;
}

.member-info h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.4s ease;
}

.team-member:hover .member-info h4::after {
  width: 100%;
}

.member-info p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.team-member:hover .member-info p {
  color: #555;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s ease;
}

.team-member:hover .social-links {
  transform: translateY(0);
  opacity: 1;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--light-color);
  color: var(--primary-color);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(10, 140, 122, 0.1);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.5s ease;
}

.social-links a:hover::before {
  left: 100%;
}

.social-links a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(10, 140, 122, 0.3);
}

/* Join Us Section */
.join-us {
  padding: 4rem 5%;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  border-radius: 20px;
  margin: 2rem auto;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

.join-us::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.join-us .section-title h2 {
  background: linear-gradient(to right, #ffffff, #e6f7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.join-us .section-title p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
}

/* Floating Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

.team-member {
  animation: float 6s ease-in-out infinite;
}

.team-member:nth-child(2n) {
  animation-delay: 1s;
}

.team-member:nth-child(3n) {
  animation-delay: 2s;
}

.team-member:nth-child(4n) {
  animation-delay: 3s;
}

/* Pulse Animation for Social Links */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 140, 122, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(10, 140, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(10, 140, 122, 0);
  }
}

.social-links a:hover {
  animation: pulse 1.5s infinite;
}

/* Text Glow Effect */
@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(10, 140, 122, 0.3);
  }
  50% {
    text-shadow: 0 0 15px rgba(10, 140, 122, 0.6), 0 0 20px rgba(10, 140, 122, 0.4);
  }
}

.team-member:hover .member-info h3 {
  animation: textGlow 2s ease-in-out;
}

/* Mobile Responsive Styles for Team Page */
@media screen and (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
  
  .team {
    padding: 7rem 5% 4rem;
  }
}

@media screen and (max-width: 768px) {
  .team {
    padding: 6rem 5% 3rem;
  }
  
  .section-title h2 {
    font-size: 2.2rem;
  }
  
  .section-title p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto 3rem;
  }
  
  .team-member {
    margin: 0 auto;
    max-width: 350px;
    animation: none;
  }
  
  .team-member:hover {
    transform: translateY(-5px) scale(1.01);
  }
  
  .member-info {
    padding: 1.5rem;
  }
  
  .member-image {
    height: 250px;
  }
  
  .join-us {
    padding: 3rem 1.5rem;
    margin: 1rem;
  }
  
  .join-us .section-title h2 {
    font-size: 2rem;
  }
  
  .join-us .section-title p {
    font-size: 1.1rem;
  }
  
  .social-links {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 480px) {
  .team {
    padding: 5rem 1rem 2rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .section-title p {
    font-size: 1rem;
  }
  
  .team-grid {
    gap: 1rem;
  }
  
  .team-member {
    max-width: 100%;
  }
  
  .member-info {
    padding: 1.2rem;
  }
  
  .member-info h3 {
    font-size: 1.2rem;
  }
  
  .member-info h4 {
    font-size: 1rem;
  }
  
  .member-info p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .social-links a {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .join-us {
    padding: 2rem 1rem;
    margin: 0.5rem;
  }
  
  .join-us .section-title h2 {
    font-size: 1.6rem;
  }
  
  .join-us .section-title p {
    font-size: 1rem;
  }
}

/* Enhanced Mobile Features */
@media screen and (max-width: 768px) {
  /* Improve touch targets for mobile */
  .social-links a {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Add subtle animation for mobile interactions */
  .team-member:active {
    transform: translateY(-5px) scale(0.98);
    transition: transform 0.2s ease;
  }
  
  /* Optimize images for mobile */
  .member-image img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Loading animation for team members */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stagger animation for team grid */
.team-member:nth-child(odd) {
  animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.team-member:nth-child(even) {
  animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; }
.team-member:nth-child(6) { animation-delay: 0.6s; }
.team-member:nth-child(7) { animation-delay: 0.7s; }
.team-member:nth-child(8) { animation-delay: 0.8s; }
.team-member:nth-child(9) { animation-delay: 0.9s; }
.team-member:nth-child(10) { animation-delay: 1s; }
.team-member:nth-child(11) { animation-delay: 1.1s; }

/* Background floating elements */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.03;
  animation: floatShape 15s ease-in-out infinite;
}

.shape-1 {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.shape-2 {
  width: 80px;
  height: 80px;
  top: 70%;
  right: 10%;
  animation-delay: 3s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 15%;
  animation-delay: 6s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  top: 40%;
  right: 20%;
  animation-delay: 9s;
}

@keyframes floatShape {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-30px) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translateY(15px) rotate(240deg) scale(0.9);
  }
}

/* Hover effect for section title */
.section-title h2 {
  transition: all 0.4s ease;
}

.section-title h2:hover {
  transform: scale(1.05);
  text-shadow: 0 5px 15px rgba(10, 140, 122, 0.3);
}