/* UPDATED TEAM SECTION STYLES – PERFECT IMAGE FITTING */
.team-main {
  margin-top: 100px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
}

.career-hero {
  text-align: center;
  padding: 60px 20px 60px;
  position: relative;
  overflow: hidden;
}

.career-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300"><path d="M0,100 C300,300 700,0 1000,100 L1000,300 L0,300 Z" fill="%2327aae1" opacity="0.08"/></svg>') center/cover no-repeat;
  z-index: 0;
}

.career-hero h1 {
  font-size: 64px;
  font-weight: 800;
  background: linear-gradient(90deg, #262262 0%, #27aae1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 20px;
  position: relative;
  z-index: 1;
}

.career-hero .hero-subtitle {
  font-size: 20px;
  color: #555;
  max-width: 950px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.team-section {
  padding: 60px 20px;
  text-align: center;
}

.section-title {
  font-size: 48px;
  font-weight: 800;
  background: #262262;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 20px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 60px;
  line-height: 1.7;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin: 0 auto;
  max-width: 2000px;
}

.leadership-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
}

.team-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(0,0,0,0.08);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.team-card:hover {
  transform: translateY(-20px);
  box-shadow: 0 35px 80px rgba(0,0,0,0.18);
}

.team-image {
  position: relative;
  height: 480px; /* Increased fixed height for better consistency */
  overflow: hidden;
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* Ensures image covers the area */
  object-position: center top; /* Prioritizes face/upper body – adjust if needed per image */
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.team-card:hover .team-image img {
  transform: scale(1.08);
}

.team-image .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(26,26,77,0.8), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.team-card:hover .overlay {
  opacity: 1;
}

.team-info {
  padding: 34px 30px;
  text-align: center;
  background: white;
}

.team-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: #262262;
  margin-bottom: 8px;
}

.role {
  font-size: 16px;
  color: #27aae1;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #666;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.social-links a:hover {
  background: #27aae1;
  color: white;
  transform: translateY(-3px);
}

.core-team {
  background: #f9fcff;
}

/* Facebook */
.social-links a[href*="facebook"] {
  color: #1877f2;
}

/* LinkedIn */
.social-links a[href*="linkedin"] {
  color: #0a66c2;
}

/* Instagram (gradient text) */
.social-links a[href*="instagram"] {
  color: #e1306c;
}

/* Hover effects */
.social-links a[href*="facebook"]:hover {
  background: #1877f2;
  color: #fff;
}

.social-links a[href*="linkedin"]:hover {
  background: #0a66c2;
  color: #fff;
}

.social-links a[href*="instagram"]:hover {
  background: linear-gradient(
    45deg,
    #f58529,
    #dd2a7b,
    #8134af,
    #515bd4
  );
  color: #fff;
}

/* Slight lift on hover */
.social-links a:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* Responsive Adjustments */
@media (max-width: 1024px) {
  .team-image {
    height: 420px;
  }
}

@media (max-width: 768px) {
  .team-image {
    height: 450px;
  }
  .team-card:hover {
    transform: none;
  }
  .team-card:hover .team-image img {
    transform: none;
  }
  .team-card:hover .overlay {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .team-image {
    height: 400px;
  }
}