/* ===========================================================================
   Tema FEED — rede social profissional (a timeline como interface central)
   Skin social completo: estiliza o vocabulário compartilhado das páginas e
   adiciona os componentes próprios do feed. LaTec — CAV/UDESC.
   =========================================================================== */
:root {
  --bg: #f4f2ee;
  --bg-2: #ebe9e3;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --border: #e2e1db;
  --border-strong: #d0cfc8;
  --text: #1d2226;
  --muted: #5e6b74;
  --primary: #147a5a;
  --primary-d: #0f5e45;
  --accent: #0a66c2;
  --cyan: #0a66c2;
  --violet: #7c3aed;
  --grad: linear-gradient(120deg, #147a5a, #0a66c2);
  --grad-soft: linear-gradient(120deg, #e7f3ee, #e8f0fb);
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px -10px rgba(0, 0, 0, .25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; }
.aurora-bg { display: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
.container-l { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); }
.eyebrow { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 700; }

/* ---------- Top bar (rede social) ---------- */
.fd-top { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.fd-top .container-l { display: flex; align-items: center; gap: 14px; height: 58px; }
.fd-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.fd-brand .mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.fd-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.fd-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); font-size: .68rem; padding: 6px 12px; border-radius: 8px; min-width: 60px; line-height: 1; }
.fd-nav a i { font-size: 1.15rem; }
.fd-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.fd-nav a.active { color: var(--primary); }
.fd-nav .fd-painel { color: #fff; background: var(--primary); }
.fd-nav .fd-painel:hover { background: var(--primary-d); color: #fff; }
.fd-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border-strong); width: 40px; height: 40px; border-radius: 8px; font-size: 1.2rem; }

/* ---------- Botões ---------- */
.btn-a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: .93rem; border: 1px solid transparent; cursor: pointer; transition: .15s; }
.btn-primary-a { background: var(--primary); color: #fff; }
.btn-primary-a:hover { background: var(--primary-d); color: #fff; text-decoration: none; }
.btn-ghost-a { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-ghost-a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* ---------- Layout social (home/timeline próprias) ---------- */
.fd-layout { display: grid; grid-template-columns: 280px 1fr 300px; gap: 20px; align-items: start; padding: 22px 0; }
.fd-feed { display: flex; flex-direction: column; gap: 16px; }
.fd-sticky { position: sticky; top: 78px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.side-card .cap { height: 56px; background: var(--grad); }
.side-card .body { padding: 16px; margin-top: -34px; }
.side-card h4 { font-size: 1.05rem; margin: 10px 0 2px; }
.side-card .sub { color: var(--muted); font-size: .85rem; }
.side-card .sep { border-top: 1px solid var(--border); margin: 14px 0; }
.side-list { display: flex; flex-direction: column; gap: 12px; }
.side-row { display: flex; gap: 10px; align-items: center; }
.side-stats { display: flex; justify-content: space-between; text-align: center; }
.side-stats .n { font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.side-stats .l { font-size: .72rem; color: var(--muted); }
.side-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 14px 16px 6px; }

/* Composer (decorativo) */
.composer { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.composer .ph { flex: 1; border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 16px; color: var(--muted); font-size: .9rem; }

/* Post (card social) */
.post { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px 8px; }
.post-head .nome { font-weight: 700; font-size: .96rem; }
.post-head .meta { color: var(--muted); font-size: .8rem; }
.post-kind { margin-left: auto; font-size: .72rem; color: var(--primary); background: #e7f3ee; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.post-body { padding: 4px 16px 14px; }
.post-body .t { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.post-body p { margin: 6px 0 0; color: #2b3338; font-size: .94rem; }
.post-foto { width: 100%; max-height: 380px; object-fit: cover; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.post-actions { display: flex; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--border); }
.post-actions span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 600; cursor: default; }
.post-actions span:hover { background: var(--surface-2); }

/* ---------- Seções (páginas compartilhadas) ---------- */
.sec { padding: 30px 0; }
.sec .container-l { max-width: 900px; }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 8px 0 6px; }
.sec-head p { color: var(--muted); margin: 0; }
.hero { background: #fff; border-bottom: 1px solid var(--border); padding: 40px 0; }
.hero .container-l { max-width: 900px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 12px 0; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 620px; margin-bottom: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.foco-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: .85rem; }
.chip i { color: var(--primary); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.stat .num { font-weight: 800; font-size: 2rem; line-height: 1; color: var(--primary); }
.stat .lbl { color: var(--muted); font-size: .82rem; margin-top: 6px; }

/* Cards */
.card-a { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: .15s; height: 100%; }
.card-a:hover { box-shadow: var(--shadow-lg); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Pessoas */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex: none; }
.avatar-iniciais { display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff; background: var(--grad); }
.avatar-lg { width: 100px; height: 100px; font-size: 1.9rem; }
.pessoa-card { display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; }
.pessoa-card .avatar, .pessoa-card .avatar-iniciais { width: 76px; height: 76px; }
.pessoa-card .nome { font-weight: 700; font-size: 1.05rem; }
.pessoa-card .cargo { color: var(--primary); font-size: .84rem; font-weight: 600; }
.pessoa-meta { color: var(--muted); font-size: .88rem; }
.pessoa-links { display: flex; gap: 14px; margin-top: auto; padding-top: 10px; justify-content: center; }
.pessoa-links a { color: var(--muted); font-size: 1.1rem; }
.pessoa-links a:hover { color: var(--primary); }

/* Pesquisas */
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.selo-tese { background: #f1ecfb; color: #7c3aed; border-color: #e4d8f7; }
.selo-dissertacao { background: #e8f0fb; color: #0a66c2; border-color: #d4e3f6; }
.status-andamento { background: #e8f0fb; color: #0a66c2; border-color: #d4e3f6; }
.status-qualificada { background: #fdf3e3; color: #b7791f; border-color: #f2e1bd; }
.status-defendida { background: #e7f3ee; color: var(--primary); border-color: #cbe7da; }
.pesquisa-card .titulo { font-weight: 700; font-size: 1.1rem; margin: 10px 0 6px; }
.pesquisa-card .resumo { color: #2b3338; font-size: .92rem; }
.palavras { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.palavra { font-size: .74rem; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filtros a { padding: 7px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-size: .86rem; }
.filtros a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filtros a.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* Eventos */
.evento-card { overflow: hidden; padding: 0; }
.evento-foto { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--border); }
.evento-foto.ph { background: var(--grad-soft); display: grid; place-items: center; font-size: 2.6rem; color: var(--primary); }
.evento-body { padding: 20px; }
.banca-list { list-style: none; padding: 0; margin: 10px 0 0; }
.banca-list li { color: #2b3338; font-size: .9rem; padding: 3px 0 3px 20px; position: relative; }
.banca-list li::before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--primary); font-size: .8rem; }

/* Timeline (página compartilhada) */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border-strong); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -27px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.tl-date { font-size: .8rem; color: var(--primary); font-weight: 700; }
.tl-card { margin-top: 8px; }
.tl-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); margin-bottom: 6px; }
.tl-title { font-weight: 700; font-size: 1.05rem; }
.tl-foto { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-top: 12px; border: 1px solid var(--border); }

/* Projetos */
.projeto-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.projeto-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-bottom: 1px solid var(--border); }
.projeto-img.ph { background: var(--grad-soft); display: grid; place-items: center; font-size: 2.4rem; color: var(--primary); }
.projeto-body { padding: 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.projeto-body .titulo { font-weight: 700; font-size: 1.1rem; }
.techs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tech { font-size: .73rem; color: #0a66c2; background: #e8f0fb; border: 1px solid #d4e3f6; padding: 3px 9px; border-radius: 999px; }
.projeto-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }

/* Sobre / institucional */
.prosa p { color: #2b3338; font-size: 1.05rem; margin-bottom: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; }
.info-item i { color: var(--primary); font-size: 1.3rem; margin-top: 2px; }
.info-item .k { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.info-item .v { font-weight: 600; }

/* Footer */
.fd-footer { border-top: 1px solid var(--border); background: #fff; margin-top: 24px; }
.fd-footer .container-l { padding: 26px 18px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; color: var(--muted); font-size: .86rem; }
.fd-footer a { color: var(--muted); }

/* Seletor de tema */
.tema-dock { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: #fff; border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: var(--shadow-lg); }
.tema-dock .lbl { font-size: .72rem; color: var(--muted); padding: 0 6px; text-transform: uppercase; letter-spacing: .1em; }
.tema-dock a { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.tema-dock a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.tema-dock a.on { background: var(--primary); color: #fff; font-weight: 600; }

/* Util */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.empty i { font-size: 2.4rem; color: var(--border-strong); display: block; margin-bottom: 12px; }
.reveal { opacity: 1; transform: none; }

/* Responsivo */
@media (max-width: 1000px) {
  .fd-layout { grid-template-columns: 1fr; }
  .fd-left, .fd-right { display: none; }
  .fd-sticky { position: static; }
}
@media (max-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .fd-nav { display: none; position: absolute; top: 58px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 8px; border-bottom: 1px solid var(--border); }
  .fd-nav.open { display: flex; }
  .fd-nav a { flex-direction: row; justify-content: flex-start; gap: 10px; min-width: 0; font-size: .92rem; }
  .fd-nav a i { font-size: 1rem; }
  .fd-toggle { display: inline-block; }
  .tema-dock .lbl { display: none; }
}
@media (max-width: 520px) { .grid-3, .grid-4, .grid-2, .stats { grid-template-columns: 1fr; } }
