/* === TEAM PAGE — Luxury Glass Design System === */

/* ===================================================
   HERO SECTION
   =================================================== */

.team-hero-section {
  position: relative;
  min-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 2rem 6rem;
}

.team-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 20% 35%, rgba(46,139,87,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 80% 65%, rgba(201,168,76,0.09) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26,58,92,0.42) 0%, transparent 60%),
    linear-gradient(135deg, rgba(4,11,20,0.91) 0%, rgba(10,22,42,0.87) 40%, rgba(13,27,50,0.89) 70%, rgba(5,10,20,0.93) 100%),
    url('https://newriverengineers.com/wp-content/uploads/2023/04/excavators-1680634_640.jpg') center / cover no-repeat;
  z-index: 0;
}

.team-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 25% 75%, rgba(201,168,76,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 70% 15%, rgba(46,139,87,0.05) 0%, transparent 50%);
  animation: heroOrbShift 14s ease-in-out infinite alternate;
}

.team-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.team-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.9);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 50px;
  padding: 0.4rem 1.2rem;
}

.team-hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(
    160deg,
    #ffffff 0%,
    #ffffff 28%,
    rgba(201,168,76,0.95) 52%,
    #E8C97A 66%,
    #ffffff 83%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.team-hero-sub {
  font-size: 1.05rem;
  line-height: 1.72;
  color: rgba(255,255,255,0.68);
  max-width: 650px;
  margin: 0;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.team-hero-stats {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.7s both;
}

.team-stat-pill {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50px;
  color: rgba(255,255,255,0.82);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===================================================
   TEAM GROUP SECTIONS
   =================================================== */

.team-group-section {
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(180deg, var(--luxury-800) 0%, var(--luxury-900) 100%);
  position: relative;
}

.team-group-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
}

.team-group-dark {
  background: linear-gradient(180deg, var(--luxury-900) 0%, var(--luxury-700) 50%, var(--luxury-900) 100%);
  position: relative;
}

.team-group-dark::before {
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.2) 30%, rgba(201,168,76,0.45) 50%, rgba(201,168,76,0.2) 70%, transparent 100%);
}

.team-group-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px);
  background-size: 65px 65px;
  pointer-events: none;
}

.team-group-header {
  text-align: center;
  margin-bottom: 3rem;
}

.team-group-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.85);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}

.team-group-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  margin: 0;
}

.team-group-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #C9A84C, #E8C97A);
  border-radius: 2px;
  margin: 0.7rem auto 0;
}

/* ===================================================
   TEAM GRID
   =================================================== */

.team-grid {
  display: grid;
  gap: 1.75rem;
}

.team-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.team-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
  margin: 0 auto;
}

/* ===================================================
   TEAM CARDS — FLIP
   =================================================== */

.team-card {
  position: relative;
  height: 440px;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.68, -0.4, 0.265, 1.4);
  transform-style: preserve-3d;
}

.team-card.flipped .team-card-inner {
  transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* ---- Front Face ---- */

.team-card-front {
  background: var(--luxury-800);
}

.team-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}

.team-card:hover .team-photo {
  transform: scale(1.04);
}

.team-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1.4rem 1.25rem;
  background: linear-gradient(
    to top,
    rgba(4,11,20,0.97) 0%,
    rgba(4,11,20,0.88) 50%,
    rgba(4,11,20,0.45) 80%,
    transparent 100%
  );
  backdrop-filter: blur(2px);
  z-index: 2;
}

.team-credentials-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #C9A84C, #E8C97A);
  color: var(--luxury-900);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.team-card-overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.team-role {
  font-size: 0.82rem;
  color: rgba(201,168,76,0.85);
  font-weight: 600;
  margin: 0 0 0.65rem;
  letter-spacing: 0.02em;
}

.team-flip-hint {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.42);
  font-style: italic;
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

.team-card:hover .team-flip-hint {
  color: rgba(201,168,76,0.65);
}

/* ---- Back Face ---- */

.team-card-back {
  background: rgba(6,13,24,0.97);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 2px solid rgba(201,168,76,0.45);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem 1.6rem;
  gap: 1rem;
}

.team-back-header {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 0.85rem;
}

.team-back-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.team-role-back {
  font-size: 0.8rem;
  color: rgba(201,168,76,0.82);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.team-bio {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.team-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.expertise-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(201,168,76,0.1);
  color: rgba(201,168,76,0.85);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 4px;
  padding: 0.22rem 0.6rem;
}

/* ===================================================
   CTA SECTION
   =================================================== */

.team-cta-section {
  padding: var(--spacing-3xl) 0;
  background:
    radial-gradient(ellipse 65% 50% at 20% 45%, rgba(46,139,87,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 42% at 82% 55%, rgba(201,168,76,0.07) 0%, transparent 50%),
    linear-gradient(135deg, var(--luxury-900) 0%, var(--luxury-700) 50%, var(--luxury-800) 100%) !important;
  position: relative;
}

.team-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px);
  background-size: 70px 70px;
  pointer-events: none;
}

.team-cta-banner {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(4,11,20,0.5), 0 8px 32px rgba(4,11,20,0.3);
}

.team-cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.team-cta-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.4) 20%, rgba(201,168,76,0.85) 50%, rgba(201,168,76,0.4) 80%, transparent 100%);
  animation: shimmerSlide 3.5s linear infinite;
}

.team-cta-banner h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 1rem;
  position: relative;
  z-index: 1;
}

.team-cta-banner p {
  font-size: 1rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.72;
  margin: 0 0 2rem;
  position: relative;
  z-index: 1;
}

.team-cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ===================================================
   RESPONSIVE
   =================================================== */

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

@media (max-width: 768px) {
  .team-hero-section {
    padding: 7rem 1.5rem 5rem;
    min-height: 50vh;
  }

  .team-hero-title {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
  }

  .team-hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .team-group-section {
    padding: var(--spacing-2xl) 0;
  }

  .team-grid-3,
  .team-grid-2 {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .team-card {
    height: 400px;
  }

  .team-cta-banner {
    padding: 2.5rem 1.5rem;
  }

  .team-cta-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .team-cta-btns .btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .team-hero-section {
    padding: 6rem 1rem 4rem;
  }

  .team-card {
    height: 380px;
  }

  .team-card-back {
    padding: 1.4rem 1.25rem;
  }

  .team-bio {
    font-size: 0.83rem;
  }
}
