/* ============================================
   TEAM SECTION V2 - Premium Design
   ============================================ */

/* Section Background */
.tj-team-area-v2 {
  background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

/* Responsive Grid */
.team-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media (max-width: 1199px) {
  .team-grid-v2 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .team-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 575px) {
  .team-grid-v2 {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
    gap: 20px;
  }
}

/* ---- Team Card ---- */
.team-card-v2 {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.team-card-v2:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* ---- Image Container ---- */
.team-card-v2__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3.3; /* Reduced height */
  background: #e9ecef;
}

.team-card-v2__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.team-card-v2:hover .team-card-v2__image img {
  transform: scale(1.08);
}

/* ---- Overlay ---- */
.team-card-v2__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.65) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.team-card-v2:hover .team-card-v2__overlay {
  opacity: 1;
}

/* ---- Social Icons ---- */
.team-card-v2__social {
  display: flex;
  gap: 10px;
  transform: translateY(14px);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.team-card-v2:hover .team-card-v2__social {
  transform: translateY(0);
}

.team-card-v2__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.team-card-v2__social a:hover {
  background: var(--tj-theme-primary, #2563eb);
  transform: translateY(-3px);
  border-color: transparent;
}

/* ---- Info Area ---- */
.team-card-v2__info {
  padding: 22px 20px 24px;
  text-align: center;
}

.team-card-v2__name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a2e;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.team-card-v2__role {
  font-size: 14px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  display: block;
}

/* ---- Stagger Entrance (initial hidden state for GSAP) ---- */
.team-card-v2 {
  opacity: 0;
  transform: translateY(60px);
}

/* Fallback if JS disabled or GSAP fails */
.no-js .team-card-v2,
.gsap-loaded .team-card-v2 {
  opacity: 1;
  transform: none;
}

/* ---- Bottom Accent Line on Hover ---- */
.team-card-v2__info::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--tj-theme-primary, #2563eb);
  margin: 16px auto 0;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.team-card-v2:hover .team-card-v2__info::after {
  width: 40px;
}

/* Heading spacing */
.mb-60 {
  margin-bottom: 60px !important;
}

/* ==========================================================================
   USER-DEFINED STYLES FOR .team-card 
   (Ensures compatibility with manual edits in about.php)
   ========================================================================== */

.team-section {
  padding: 100px 0;
  background: #f8f9fb;
}

.section-heading {
  text-align: center;
  margin-bottom: 60px;
}

.section-heading h2 {
  font-size: 42px;
  font-weight: 700;
  color: #0b1c39;
}

/* Grid Layout */
.team-grid {
  /* Using standard grid but can be overridden by media queries */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Card */
.team-card {
  position: relative;
  height: 450px;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background-color: #000; /* Fallback background */
}

/* Image */
.team-image {
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 0;
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block; /* Removes bottom space */
}

/* Gradient Overlay */
.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 28, 57, 0.85) 0%,
    rgba(11, 28, 57, 0.4) 40%,
    rgba(11, 28, 57, 0) 70%
  );
  z-index: 1;
  pointer-events: none; /* Allow clicks through overlay if needed */
}

/* Content */
.team-content {
  position: absolute;
  bottom: 25px;
  left: 25px;
  z-index: 2;
  color: #fff;
}

.team-content h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.team-content span {
  font-size: 14px;
  opacity: 0.85;
  color: #e0e0e0;
}

/* Social Icons */
.team-social {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.team-social a {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  color: #0b1c39;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.team-social a:hover {
  background: #0b1c39;
  color: #fff;
}

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

.team-card:hover .team-social {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 768px) {
  .team-card {
    height: 380px;
  }

  .section-heading h2 {
    font-size: 32px;
  }
}
