/* ---------- Team Page ---------- */
.page-hero {
  position: relative;
  margin-top: 100px;
  height: 520px;
  overflow: hidden;
  max-width: 2000px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
}

.page-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.page-hero-content h1 {
  font-size: 44px;
  font-weight: 500;
  margin: 0 0 12px;
}

.page-hero-content p {
  font-size: 16px;
  max-width: 760px;
  opacity: 0.92;
  line-height: 1.7;
  margin: 0;
}

.team-section {
  background: #f6f8f7;
  padding: 110px 20px;
}

.team-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.team-head {
  text-align: center;
  margin-bottom: 50px;
}

.team-head span {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: #2b6d42;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 12px;
}

.team-head h2 {
  font-size: 34px;
  font-weight: 500;
  color: #1f3d2b;
  margin: 0 0 10px;
}

.team-head p {
  font-size: 15px;
  color: #666;
  margin: 0 auto;
  max-width: 760px;
  line-height: 1.7;
}

.team-grid {
  display: flex;      /* Schimbăm în flex pentru a permite centrarea ultimului rând */
  flex-wrap: wrap;    /* Permitem trecerea pe rândul următor */
  gap: 22px;
  justify-content: center; /* MAGIA: Centrează elementele de pe ultimul rând! */
}

.team-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Calculăm lățimea pentru 3 coloane minus gap-ul de 22px */
  width: calc(33.333% - 15px); 
  min-width: 300px; /* Previne comprimarea excesivă pe ecrane mici */
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.team-img.foto-ridicata {
  object-position: center 50% !important; 
  transform: scale(1.05); 
  transform-origin: center top;
}

.team-photo {
  width: 100%;
  height: 400px; 
  
  overflow: hidden; /* Taie tot ce depășește rama fixă */
  position: relative;
  background-color: #f7f9f8; /* Un fundal pal de siguranță */
  border-bottom: 2px solid #e1eae6;
}

.team-img {
  width: 100%;
  height: 100%;
  
  object-fit: cover; 
  object-position: center top; 
  
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06)); 
}

.team-photo i {
  font-size: 46px;
  color: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.team-img.foto-ancora-sus {
    object-fit: cover;
    object-position: center 5%; /* Fixăm foarte aproape de marginea de sus */
    transform: scale(1.3); /* Facem un zoom de 30% pentru a elimina fundalul de sus */
    transform-origin: center top;
}

.team-body {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Forțează corpul să se întindă și să ocupe tot spațiul liber */
}

.team-name {
  margin: 0 0 6px;
  font-size: 18px;
  color: #1f3d2b;
  font-weight: 700;
}

.team-role {
  margin: 0 0 12px;
  font-size: 14px;
  color: #2b6d42;
  font-weight: 600;
}

.team-desc {
    margin: 0 0 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    min-height: 80px; /* Ajută la uniformizarea vizuală a textului */
}

.team-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto; /* Împinge secțiunea la marginea de jos a containerului team-body */
    padding-top: 20px;
}

.pill {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(43, 109, 66, 0.10);
  color: #1f3d2b;
}

.team-cta {
  background: #fff;
  padding: 70px 20px;
}

.team-cta-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
  padding: 34px 30px;
}

.team-cta-inner h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: #1f3d2b;
}

.team-cta-inner p {
  margin: 0;
  color: #666;
  line-height: 1.7;
}

.team-cta-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.team-cta-actions a {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.25s;
}

.team-cta-actions .primary {
  background: #2b6d42;
  color: #fff;
}

.team-cta-actions .primary:hover { background: #1f3d2b; transform: translateY(-1px); }

.team-cta-actions .secondary {
  border: 2px solid #2b6d42;
  color: #2b6d42;
  background: transparent;
}

.team-cta-actions .secondary:hover {
  background: #2b6d42;
  color: #fff;
}

@media (max-width: 1000px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-cta-inner { grid-template-columns: 1fr; }
  .team-cta-actions { justify-content: flex-start; }
}
@media (max-width: 1100px) {
  .team-card {
    width: calc(50% - 11px);
  }
}

/* Ajustare pentru mobil (1 coloană) */
@media (max-width: 700px) {
  .team-card {
    width: 100%;
  }
}