/* =========================================================
   Equipa (bloco "Equipa")
   Órgãos sociais em cartões de liderança; equipa executiva em grelha com fotografia
   ========================================================= */
.tm-section .section-head { margin-bottom: clamp(36px, 4vw, 54px); }
.tm-group + .tm-group { margin-top: clamp(48px, 6vw, 76px); }

/* Cabeçalho do grupo: ícone + nome + contagem + linha */
.tm-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.tm-group-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
html[data-theme="dark"] .tm-group-ico { color: color-mix(in srgb, var(--accent) 45%, #9fe0b9); }
.tm-group-head h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--heading); white-space: nowrap; }
.tm-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent-2); color: #fff; font-family: var(--font-head); font-size: 12px; font-weight: 800; }
.tm-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* ---------- Órgãos sociais: cartões horizontais ---------- */
.tm-lead-grid { display: grid; gap: 20px; }
.tm-lead-grid.cols-1 { grid-template-columns: minmax(0, 420px); }
.tm-lead-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-lead-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-lead { position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 22px 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); overflow: hidden;
    transition: transform .35s var(--ease, ease), box-shadow .35s, border-color .35s; }
.tm-lead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.tm-lead:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.tm-avatar { width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; position: relative;
    background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--accent-2)) 100%); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent), inset 0 0 0 3px rgba(255, 255, 255, .25); }
.tm-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tm-avatar span { font-family: var(--font-head); font-size: 25px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.tm-lead-body { min-width: 0; }
.tm-lead-body h4 { margin: 0 0 6px; font-size: 16px; line-height: 1.3; color: var(--heading); }
.tm-lead .tm-role { margin: 0; }

/* ---------- Equipa executiva: grelha com fotografia ---------- */
.tm-grid { display: grid; gap: 24px; justify-content: center; }
.tm-grid.cols-1 { grid-template-columns: minmax(0, 280px); }
.tm-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 280px)); }
.tm-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tm-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tm-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: transform .35s var(--ease, ease), box-shadow .35s, border-color .35s; }
.tm-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.tm-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-alt); }
.tm-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform .7s var(--ease, ease); }
.tm-card:hover .tm-photo img { transform: scale(1.05); }
.tm-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, rgba(5, 14, 9, .45), transparent); opacity: 0; transition: opacity .35s; pointer-events: none; }
.tm-card:hover .tm-photo::after { opacity: 1; }
.tm-initials { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-head); font-size: 54px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); }
.tm-body { position: relative; flex: 1; padding: 18px 16px 20px; text-align: center; }
.tm-body::before { content: ""; position: absolute; top: 0; left: 50%; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-2); transform: translateX(-50%); }
.tm-body h4 { margin: 0 0 8px; font-size: 15px; line-height: 1.3; color: var(--heading); letter-spacing: .01em; }

/* Cargo em etiqueta */
.tm-role { display: inline-block; margin: 0; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.45; }
html[data-theme="dark"] .tm-role { color: color-mix(in srgb, var(--accent) 45%, #9fe0b9); }
.tm-bio { margin: 12px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

/* Redes sociais */
.tm-social { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 1; display: flex; justify-content: center; gap: 8px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.tm-card:hover .tm-social, .tm-card:focus-within .tm-social { opacity: 1; transform: none; }
.tm-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent) !important; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); transition: background .2s, color .2s; }
.tm-social a:hover { background: var(--accent-2); color: #fff !important; }
.tm-social-inline { position: static; opacity: 1; transform: none; justify-content: flex-start; margin-top: 10px; }
.tm-social-inline a { width: 30px; height: 30px; box-shadow: none; background: var(--bg-alt); }

@media (max-width: 1100px) {
    .tm-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tm-lead-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .tm-grid.cols-4, .tm-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .tm-grid.cols-2, .tm-grid.cols-3, .tm-grid.cols-4, .tm-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .tm-lead-grid.cols-2, .tm-lead-grid.cols-3 { grid-template-columns: 1fr; gap: 14px; }
    .tm-body { padding: 14px 10px 16px; }
    .tm-body h4 { font-size: 13.5px; }
    .tm-role { font-size: 11px; padding: 3px 9px; }
    .tm-initials { font-size: 40px; }
    .tm-social { opacity: 1; transform: none; }
    .tm-group-head h3 { font-size: 13px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
    .tm-card, .tm-lead, .tm-card:hover, .tm-lead:hover { transform: none; }
}
