/* ============================================================================
   ATIVE-EQUIPE.CSS — Refino premium (seção #equipe)
   Regras:
   - Sem hardcode de cores (usar tokens)
   - Estilos escopados em #equipe para evitar vazamento
   ============================================================================ */

#equipe .team-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* 3 colunas no desktop: cada card ocupa 4/12 */
#equipe .team-profile {
  grid-column: span 12;
  background: var(--surface-1);
  border: 1px solid rgba(var(--marrom-escuro-rgb), 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: var(--transicao-suave);
  display: grid;
  grid-template-rows: auto 1fr;
}

@media (min-width: 992px) {
  #equipe .team-profile {
    grid-column: span 4;
  }
}

#equipe .team-profile:hover,
#equipe .team-profile:focus-within {
  transform: translateY(-4px);
  border-color: rgba(var(--dourado-rgb), 0.55);
  box-shadow: var(--sombra-dourada);
}

#equipe .team-profile__media {
  position: relative;
  background: var(--surface-2);
}

#equipe .team-profile__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

/* leve “moldura” editorial */
#equipe .team-profile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -40px 80px rgba(var(--marrom-escuro-rgb), 0.18);
}

#equipe .team-profile__body {
  padding: 1.5rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#equipe .team-profile__header {
  margin-bottom: 1rem;
}

#equipe .team-profile__name {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  color: var(--text-primary);
}

#equipe .team-profile__role {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

/* Meta editorial */
#equipe .team-profile__meta {
  margin: 1.15rem 0 1.1rem;
  display: grid;
  gap: 0.75rem;
}

#equipe .team-meta-item {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(var(--marrom-escuro-rgb), 0.035);
  border: 1px solid rgba(var(--marrom-escuro-rgb), 0.06);
}

#equipe .team-meta-item dt {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dourado);
  margin: 0 0 0.25rem;
}

#equipe .team-meta-item dd {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.98rem;
}

/* Tags (discretas, sem “banner” chamativo) */
#equipe .team-profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}

#equipe .team-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(var(--dourado-rgb), 0.1);
  border: 1px solid rgba(var(--dourado-rgb), 0.22);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

/* CTA do card */
#equipe .team-profile__cta .btn {
  width: 100%;
  justify-content: center;
}

#equipe .team-profile__cta {
  margin-top: auto; /* botão sempre no mesmo "rodapé" */
}

/* CTA box final */
#equipe .team-cta-box {
  background: linear-gradient(135deg, rgba(var(--dourado-rgb), 0.08), rgba(var(--dourado-rgb), 0.04));
  border: 1px solid rgba(var(--dourado-rgb), 0.22);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
}

#equipe .team-cta-title {
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

#equipe .team-cta-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile */
@media (max-width: 575.98px) {
  #equipe .team-profile__body {
    padding: 1.25rem 1.1rem 1.1rem;
  }

  #equipe .team-profile__name {
    font-size: 1.25rem;
  }

  #equipe .team-profile__role,
  #equipe .team-meta-item dd {
    font-size: 0.95rem;
  }
}

/* Acessibilidade: reduz movimento */
@media (prefers-reduced-motion: reduce) {
  #equipe .team-profile {
    transition: none;
  }
  #equipe .team-profile:hover,
  #equipe .team-profile:focus-within {
    transform: none;
  }
}

/* 2) Header com altura previsível (evita deslocar "Atuação") */
#equipe .team-profile__header {
  margin-bottom: 1rem;
  min-height: 4.75rem; /* suficiente para 2 linhas de nome + 2 de cargo */
}

#equipe .team-profile__name,
#equipe .team-profile__role {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#equipe .team-profile__name,
#equipe .team-profile__role {
  display: -webkit-box;
  display: box; /* fallback antigo inofensivo */
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

#equipe .team-profile__name {
  line-clamp: 2; /* padrão */
  -webkit-line-clamp: 2; /* WebKit fallback */
}

#equipe .team-profile__role {
  line-clamp: 2; /* padrão */
  -webkit-line-clamp: 2; /* WebKit fallback */
}

/* 3) Foto da Alessandra cortando testa: ajuste fino por perfil */
#equipe .team-profile--alessandra .team-profile__photo {
  object-position: 50% 8%;
}

/* 4) “Médio” (tablet) com 1 por linha: foto menor e layout lateral */
@media (min-width: 768px) and (max-width: 991.98px) {
  #equipe .team-grid {
    grid-template-columns: 1fr; /* 1 por linha */
  }

  #equipe .team-profile {
    grid-template-columns: 240px 1fr;
    grid-template-rows: none;
    align-items: stretch;
  }

  #equipe .team-profile__media {
    height: 100%;
  }

  #equipe .team-profile__photo {
    width: 100%;
    height: 100%;
    aspect-ratio: auto; /* não força banner gigante */
    object-fit: cover;
    object-position: 50% 18%;
  }

  #equipe .team-profile__body {
    padding: 1.35rem 1.5rem 1.25rem;
  }
}

#equipe .team-profile--featured:hover,
#equipe .team-profile--featured:focus-within {
  transform: translateY(-6px);
}

/* ============================================================================
   ADIÇÕES PARA INGLÊS — usando tokens de variables.css
   ============================================================================ */

/* Badge inline "EN" ao lado do texto de idiomas */
#equipe .team-lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--branco-puro);
  background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

/* Tag especial para idioma */
#equipe .team-tag--lang {
  background: linear-gradient(135deg, rgba(var(--verde-lang-rgb), 0.12), rgba(var(--verde-lang-rgb), 0.08));
  border-color: rgba(var(--verde-lang-rgb), 0.35);
  color: var(--verde-lang-escuro);
  font-weight: 600;
}

#equipe .team-tag--lang:hover {
  background: linear-gradient(135deg, rgba(var(--verde-lang-rgb), 0.18), rgba(var(--verde-lang-rgb), 0.12));
  border-color: rgba(var(--verde-lang-rgb), 0.5);
}

/* Destaque sutil para o item de idioma no meta */
#equipe .team-meta-item:has(.team-lang-badge) {
  background: rgba(var(--verde-lang-rgb), 0.04);
  border-color: rgba(var(--verde-lang-rgb), 0.12);
}

#equipe .team-meta-item:has(.team-lang-badge) dt {
  color: var(--verde-lang);
}
