/* ==============================================
   MEET THE TEAM — styles.css
   Page-specific styles. Shared styles (nav,
   footer, fonts, variables) come from ../css/styles.css
============================================== */

/* Push content below fixed header */
body {
  padding-top: var(--header-height, 76px);
}

/* ---- Hero banner ---- */
.team-hero {
  position: relative;
  width: 100%;
  min-height: 56vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
}

.team-hero__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 80px 60px 80px 110px;
  width: 44%;
  flex-shrink: 0;
}

.team-hero__text h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 65px;
  font-weight: 700;
  line-height: 1.05;
  color: #000;
  margin: 0;
}

.team-hero__text p {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  max-width: 460px;
  margin: 0;
}

.team-hero__image {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.team-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

/* Fade mask: left side is solid white, fades to transparent on the right */
.team-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff 38%,
    rgba(255,255,255,0.7) 55%,
    rgba(255,255,255,0) 72%
  );
}

/* ---- Team grid section ---- */
.team-grid-section {
  background: #fff;
  padding: 120px 0;
}

.team-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 25px;
}

/* ---- Individual card ---- */
.team-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

/* Photo area — square, coloured bg from data-bg, image fills it */
.team-card__photo {
  position: relative;
  width: 100%;
  padding-bottom: 100%;   /* square */
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  /* background-color set inline via style attribute */
  transition: background-color 0.35s ease;
}

.team-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.team-card:hover .team-card__photo img {
  transform: scale(1.04);
}

/* Info panel beneath the photo */
.team-card__info {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-radius: 0 0 20px 20px;
  transition: background-color 0.35s ease;
}

.team-card__info h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin: 0;
}

.team-card__info p {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #444;
  margin: 0;
}

/*
  HOVER COLOUR MAGIC:
  When hovering a card, the .team-card__info panel transitions to a
  lightened version of its own card's bg colour. This is driven
  entirely by JS which reads data-bg and writes a CSS variable.
*/
.team-card:hover .team-card__info {
  background-color: var(--card-hover-bg, #f5f5f5);
}

/* ---- Join CTA section ---- */
.team-cta {
  background: #F0FAFB;
  padding: 100px 0;
}

.team-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.team-cta__text h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  margin: 0 0 16px;
}

.team-cta__text p {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
  margin: 0;
  max-width: 520px;
}

.team-cta__action {
  flex-shrink: 0;
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 40px;
  }
  .team-hero__text {
    padding: 80px 60px;
  }
  .team-hero__text h1 {
    font-size: 52px;
  }
}

@media (max-width: 1024px) {
  .team-hero__text {
    width: 52%;
    padding: 70px 50px 70px 60px;
  }
  .team-hero__text h1 {
    font-size: 48px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 60px;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .team-hero {
    flex-direction: column;
    min-height: auto;
  }
  .team-hero__text {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 50px 20px 40px;
    background: #fff;
  }
  .team-hero__text h1 {
    font-size: 38px;
  }
  .team-hero__image {
    position: relative;
    height: 55vw;
    min-height: 220px;
  }
  .team-hero__fade {
    background: linear-gradient(
      to bottom,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 100%
    );
  }
  .team-grid-section {
    padding: 80px 0;
  }
  .team-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
    gap: 20px;
  }
  .team-card__photo {
    padding-bottom: 90%;
  }
  .team-cta__inner {
    padding: 0 20px;
  }
  .team-cta__text h2 {
    font-size: 30px;
  }
}