/* equipa.css
 * Equipa section: teamv2 tab layout, member cards.
 */

#equipa.screen-page {
  justify-content: flex-start;
}

#equipa .teamv2-shell,
#departamentos .teamv2-shell {
  --team-gold: #b78110;
  --team-gold-mid: #d09b2a;
  --team-gold-soft: #e9dcc0;
  --team-card: var(--surface);
  --team-ink: var(--ink);
  --team-ink-mid: #4f5d71;
  --team-ink-soft: #76859a;
  --team-border: var(--line);
  width: min(1320px, 100%);
  margin: 0 auto;
}

#equipa .teamv2-header,
#departamentos .teamv2-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
  flex-wrap: wrap;
}

.teamv2-label {
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--team-gold, var(--brand));
  font-family: var(--font-subtitle);
}

.teamv2-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--team-gold-mid, var(--brand));
}

#equipa .teamv2-title,
#departamentos .teamv2-title {
  font-size: clamp(2rem, 4.3vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--team-ink);
}

#equipa .teamv2-subtitle,
#departamentos .teamv2-subtitle {
  margin: 0;
  max-width: 290px;
  text-align: right;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--team-ink-soft);
  font-family: var(--font-subtitle);
}

#equipa .teamv2-tabs,
#departamentos .teamv2-tabs,
#documentos .teamv2-tabs,
#atividades .teamv2-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--line-strong);
  overflow-x: auto;
  scrollbar-width: none;
}

#equipa .teamv2-tabs,
#departamentos .teamv2-tabs {
  width: min(100%, 1120px);
  margin-left: auto;
  margin-right: auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  padding-inline: clamp(6px, 1vw, 12px);
  scroll-padding-inline: clamp(6px, 1vw, 12px);
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

#equipa .teamv2-tabs.is-dragging,
#departamentos .teamv2-tabs.is-dragging {
  cursor: grabbing;
  user-select: none;
}

#equipa .teamv2-tabs::-webkit-scrollbar,
#departamentos .teamv2-tabs::-webkit-scrollbar,
#documentos .teamv2-tabs::-webkit-scrollbar,
#atividades .teamv2-tabs::-webkit-scrollbar {
  display: none;
}

#departamentos .teamv2-tabs {
  margin-bottom: 18px;
}

#equipa .teamv2-tabs {
  margin-bottom: 18px;
}

#documentos .teamv2-tabs {
  margin-bottom: 2px;
}

#equipa .teamv2-tab,
#departamentos .teamv2-tab,
#documentos .teamv2-tab,
#atividades .teamv2-tab {
  position: relative;
  flex-shrink: 0;
  border: 0;
  background: none;
  color: #6f7d91;
  font-family: var(--font-subtitle);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 15px 24px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

#equipa .teamv2-tab::after,
#departamentos .teamv2-tab::after,
#documentos .teamv2-tab::after,
#atividades .teamv2-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5px;
  height: 2.5px;
  background: transparent;
  transition: background-color 0.2s ease;
}

#equipa .teamv2-tab:hover,
#departamentos .teamv2-tab:hover,
#documentos .teamv2-tab:hover,
#atividades .teamv2-tab:hover {
  color: #55647b;
}

#equipa .teamv2-tab.is-active,
#departamentos .teamv2-tab.is-active,
#documentos .teamv2-tab.is-active,
#atividades .teamv2-tab.is-active {
  color: var(--ink);
}

#equipa .teamv2-tab.is-active::after,
#departamentos .teamv2-tab.is-active::after,
#documentos .teamv2-tab.is-active::after,
#atividades .teamv2-tab.is-active::after {
  background: #d09b2a;
}

/* -------------------------------------------------------------------
   Stagger reveal — filtros de #equipa, #departamentos, #documentos
   (tabs entram escalonados quando a secção fica visível)
------------------------------------------------------------------- */

/* Barra de filtros completa */
#equipa.reveal:not(.visible) .teamv2-tabs,
#departamentos.reveal:not(.visible) .teamv2-tabs,
#documentos.reveal:not(.visible) .teamv2-tabs {
  opacity: 0;
  transform: translateY(14px);
}

#equipa.reveal.visible .teamv2-tabs,
#departamentos.reveal.visible .teamv2-tabs,
#documentos.reveal.visible .teamv2-tabs {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity   400ms cubic-bezier(0.22, 1, 0.36, 1) 160ms,
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1) 160ms;
}

/* Botões individuais (escalonados por --tab-i) */
#equipa.reveal:not(.visible) .teamv2-tab,
#departamentos.reveal:not(.visible) .teamv2-tab,
#documentos.reveal:not(.visible) .teamv2-tab {
  opacity: 0;
  transform: translateY(10px);
}

#equipa.reveal.visible .teamv2-tab,
#departamentos.reveal.visible .teamv2-tab,
#documentos.reveal.visible .teamv2-tab {
  opacity: 1;
  transform: translateY(0);
  transition:
    color     0.2s ease,
    opacity   420ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--tab-i, 0) * 55ms + 200ms),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--tab-i, 0) * 55ms + 200ms);
}

#equipa .teamv2-neutral {
  padding: 74px 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

#equipa .teamv2-neutral[hidden] {
  display: none;
}

#equipa .teamv2-neutral-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--team-gold-soft), #fcf5e6);
  color: var(--team-gold);
  border: 1px solid #dfd3ba;
}

#equipa .teamv2-neutral-icon svg {
  width: 26px;
  height: 26px;
}

#equipa .teamv2-neutral-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--team-ink);
  letter-spacing: -0.01em;
}

#equipa .teamv2-neutral-sub {
  margin: 0;
  max-width: 330px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.68;
  color: var(--team-ink-soft);
  font-family: var(--font-subtitle);
}

#equipa .teamv2-neutral-hint {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--team-gold);
  font-family: var(--font-subtitle);
  animation: teamHintBob 850ms ease-in-out infinite alternate;
}

#equipa .teamv2-neutral-hint svg {
  width: 16px;
  height: 16px;
}

@keyframes teamHintBob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px);
  }
}

#equipa .teamv2-panel {
  display: none;
  padding-top: 42px;
}

#equipa .teamv2-panel.is-active {
  display: block;
  animation: teamPanelIn 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes teamPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#equipa .teamv2-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

#equipa .teamv2-dept {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#equipa .teamv2-dept-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--team-ink-soft);
  font-family: var(--font-subtitle);
}

#equipa .teamv2-dept-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--team-ink);
}

#equipa .teamv2-panel-note {
  max-width: 380px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(221, 187, 117, 0.4);
  background: linear-gradient(140deg, rgba(255, 248, 228, 0.9), rgba(255, 255, 255, 0.95));
  color: var(--team-ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.55;
  font-family: var(--font-subtitle);
}

#equipa .teamv2-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 22px;
}

#equipa .teamv2-cards.is-playful-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#equipa .teamv2-member {
  min-height: 284px;
  padding: 28px 22px 18px;
  border: 1px solid rgba(20, 28, 41, 0.06);
  border-radius: 14px;
  background: linear-gradient(180deg, #f3f3f3 0%, #efefef 100%);
  box-shadow: 0 2px 6px rgba(20, 28, 41, 0.06), 0 10px 18px rgba(20, 28, 41, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

#equipa .teamv2-member:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 28, 41, 0.1);
  box-shadow: 0 4px 10px rgba(20, 28, 41, 0.08), 0 16px 28px rgba(20, 28, 41, 0.08);
}

#equipa .teamv2-panel.is-playful .teamv2-member {
  transform: none;
}

#equipa .teamv2-panel.is-playful .teamv2-member:hover {
  transform: translateY(-4px);
}

#equipa .teamv2-photo-wrap {
  width: min(100%, 190px);
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #f7f7f7 0%, #f1f1f1 64%, #ececec 100%);
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

#equipa .teamv2-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

#equipa .teamv2-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

#equipa .teamv2-panel.is-playful .teamv2-photo-wrap {
  width: min(100%, 190px);
}

#equipa .teamv2-panel.is-playful .teamv2-photo-wrap,
#equipa .teamv2-panel.is-playful .teamv2-placeholder {
  border-radius: 50%;
}

#equipa .teamv2-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  border: 1px solid rgba(16, 24, 39, 0.08);
}

#equipa .teamv2-member-info {
  width: 100%;
  padding: 22px 0 0;
  text-align: center;
}

#equipa .teamv2-member-name {
  margin: 0 0 6px;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #171717;
}

#equipa .teamv2-member-role {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.45;
  color: #556070;
}

#equipa .teamv2-panel.is-playful .teamv2-member-role {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.96rem;
}

.team-group + .team-group {
  margin-top: 24px;
}

.team-group h3 {
  margin-bottom: 14px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.person-card,
.president-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(31, 44, 62, 0.08);
}

.person-card {
  display: grid;
  gap: 8px;
}

.person-card span {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand-dark), var(--brand));
  color: #2b1f00;
  font-weight: 700;
  font-size: 0.92rem;
}

.avatar-lg {
  width: 62px;
  height: 62px;
  font-size: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #4f5e74;
  font-weight: 700;
  font-family: var(--font-subtitle);
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #2b1f00;
}

