/* ===== General Layout ===== */

.team-intro {
  text-align: center;
  padding: 2rem;
  background-color: var(--faint-background);
}

.team-intro h1{
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.team-intro p{
  font-size: 1.3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(650px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background-color: var(--faint-background);
  justify-content: center;
}

/* ===== Agent Card ===== */

.team-card {
  display: flex;
  flex-direction: row; /* Image on the left */
  background-color: var(--background);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.team-member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.becky-seda-photo {
  object-position: 70% center;
}
.sabrina-deem {
  object-position: 60% center;
}
.shannon-stiger-photo {
  object-position: 60% center;
}
.aimee-wright-photo {
  object-position: 70% center;
}

.team-card img {
  width: 250px;
  height: 100%;
  object-fit: cover;
}

/* ===== Agent Info Container ===== */

.team-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ===== Top Section: Name + Role ===== */

.team-info-top {
  background-color: #333;
  color: white;
  padding: 1rem;
}

.team-info-top a {
  color: white;
  text-decoration: none;
}

.team-info-top h2,
.team-info-top h3 {
  margin: 0;
}

.team-info-top h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.team-info-top h3 {
  font-size: 1.5rem;
  color: white;
}

/* ===== Bottom Section: Details ===== */

.team-info-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  background-color: var(--background);
}

.team-info-bottom {
  color: #333;
  padding: 1rem;
}

.team-info-bottom p {
  margin: 0.25rem 0;
}

.team-info-bottom a {
  color: #333;
  text-decoration: none;
}

.learn-more {
  margin-bottom: 1rem;
  margin-right: 1rem;
  text-align: right;
}

.learn-more a {
  color: #444;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s ease;
}

.learn-more a:hover {
  color: black;
  font-size: 1.03rem;
}

@media (max-width: 600px) {
  .team-intro h1 {
    font-size: 2rem;
  }

  .team-intro p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .team-list {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }

  .team-card {
    flex-direction: column;
    max-width: 100%;
  }

  .team-member-image {
    width: 100%;
    height: 20rem;
    object-fit: cover;
    display: block;
    margin: 0 auto;
  }

  .team-card img {
    width: 100%;
    height: auto;
  }

  .team-info-top,
  .team-info-bottom {
    padding: 0.75rem 1rem;
  }

  .team-info-top h2 {
    font-size: 1.1rem;
  }

  .team-info-top h3 {
    font-size: 0.95rem;
  }

  .team-info-bottom p {
    font-size: 0.95rem;
  }
}
