/* =========================================================
   IA.BR — Instituto Brasileiro de IA
   Folha de estilos compartilhada por todas as páginas
   ========================================================= */

:root {
  --navy-900: #071a3d;
  --navy-800: #0a2257;
  --navy-700: #0d2c6e;
  --blue-700: #0a3fb8;
  --blue-600: #0b4fd6;
  --blue-500: #1677ff;
  --sky-400: #2ab3f5;
  --cyan-400: #12c8e6;
  --teal-400: #14d9c6;
  --ink: #0b1f4d;
  --text: #3a4766;
  --muted: #6b7794;
  --line: #e3e9f3;
  --line-2: #d4ddec;
  --bg: #ffffff;
  --bg-soft: #f3f7fd;
  --bg-soft-2: #eaf2fd;
  --grad: linear-gradient(90deg, #1677ff 0%, #12c8e6 60%, #14d9c6 100%);
  --grad-v: linear-gradient(180deg, #2ab3f5 0%, #0b4fd6 100%);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 77, .04), 0 6px 20px rgba(11, 31, 77, .06);
  --shadow-lg: 0 18px 50px rgba(11, 31, 77, .12);
  --container: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --header-h: 72px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-blue { color: var(--blue-500); }

/* ---------- Eyebrow / títulos de seção ---------- */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 8px;
}
.eyebrow.dark { color: var(--ink); }
.sec-title { font-size: clamp(22px, 2.2vw, 28px); }
.sec-lead { margin-top: 10px; color: var(--text); max-width: 46ch; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px;
  border-radius: 8px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 8px 20px rgba(10, 63, 184, .22); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-outline { border-color: var(--blue-700); color: var(--blue-700); background: #fff; }
.btn-outline:hover { background: var(--bg-soft-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--blue-600); font-weight: 700; font-size: 13.5px; }
.link-arrow svg.i { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg.i { transform: translateX(3px); }

/* =========================================================
   HEADER — expansível de fora a fora
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  width: 100%;
  height: var(--header-h);
  padding: 0 clamp(16px, 3.2vw, 56px);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav ul { display: flex; gap: clamp(14px, 2.2vw, 36px); }
.main-nav a {
  position: relative; display: block; padding: 24px 0;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: color .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px;
  background: var(--blue-600); border-radius: 2px;
  transform: scaleX(0); transition: transform .25s;
}
.main-nav a:hover { color: var(--blue-600); }
.main-nav a.active { color: var(--blue-600); }
.main-nav a.active::after, .main-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--blue-500); color: var(--blue-600); }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: block; max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 80vh; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 18px; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-header .bar { justify-content: space-between; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .header-actions .btn { display: none; }
}

/* =========================================================
   HERO (banner do Congresso à direita, texto à esquerda)
   ========================================================= */
.hero { position: relative; overflow: hidden; background: #f3f8fe; }
.hero > .container { position: relative; z-index: 3; }
.hero-media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 66%; z-index: 1;
  background: url("../img/hero-banner.jpg") no-repeat 30% center / cover;
}
.hero-media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f3f8fe 0%, #f3f8fe 3%, rgba(243,248,254,.8) 16%, rgba(243,248,254,0) 40%);
}
.hero-media .tagline { left: 18%; top: 22%; }
.hero-media .tagline.br { left: auto; top: auto; right: clamp(16px, 3vw, 56px); bottom: 12%; font-size: 9.5px; }
.hero-media.img-library { background-image: url("../img/biblioteca.jpg"); background-position: 70% 40%; }
.hero-media.img-library::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-banner.jpg") no-repeat 100% center / cover; opacity: .55; mix-blend-mode: screen;
}
.hero-media.img-library .tagline { z-index: 2; }
@media (max-width: 900px) {
  .hero-media { position: relative; width: 100%; height: 220px; display: block; }
  .hero-media::before { background: linear-gradient(180deg, rgba(243,248,254,0) 60%, #f3f8fe 100%); }
}

/* banner suave (busca) */
.hero-soft {
  position: relative; overflow: hidden;
  background: linear-gradient(110deg, #f5f9ff 0%, #eaf3fd 55%, #dff0fb 100%);
}
.hero-soft::after {
  content: ""; position: absolute; right: -4%; top: -30%; width: 46%; height: 160%;
  background: url("../img/hero-banner.jpg") no-repeat 92% center / cover;
  opacity: .28; mask-image: linear-gradient(90deg, transparent, #000 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.hero-soft > .container { position: relative; z-index: 2; }

/* tagline vertical "PESQUISA / CONHECIMENTO ..." */
.tagline {
  position: absolute; z-index: 2;
  font-size: 11.5px; font-weight: 600; letter-spacing: .42em; line-height: 1.75;
  color: var(--navy-700); text-transform: uppercase;
}
.tagline span { display: block; }
.tagline::after { content: ""; display: block; width: 30px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--grad); }
.tagline.light { color: #fff; text-shadow: 0 1px 8px rgba(7,26,61,.35); }
@media (max-width: 1200px) { .hero-media .tagline { display: none; } }

/* Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--ink); font-weight: 500; }
.crumbs a:hover { color: var(--blue-600); }
.crumbs .sep { width: 14px; height: 14px; color: var(--muted); }
.crumbs svg.i { width: 16px; height: 16px; }
.crumbs .current { color: var(--ink); }

/* =========================================================
   Cards e componentes
   ========================================================= */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue-600);
}
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px;
  border-radius: 999px; background: var(--bg-soft-2); color: var(--navy-700);
  font-size: 12.5px; font-weight: 500; border: 1px solid transparent; white-space: nowrap;
}
.chip-outline { background: #fff; border-color: var(--line-2); }
.chip:hover { border-color: var(--blue-500); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 12.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.i { width: 15px; height: 15px; color: var(--blue-600); }
.icon-blue { color: var(--blue-600); }
.icon-xl svg.i, svg.i.xl { width: 34px; height: 34px; stroke-width: 1.5; }
.icon-lg svg.i, svg.i.lg { width: 28px; height: 28px; stroke-width: 1.6; }
.divider-v { width: 1px; align-self: stretch; background: var(--line-2); }

/* thumbs com imagem de fundo */
.thumb { background: var(--navy-800) center / cover no-repeat; border-radius: 8px; }
.ph {
  /* placeholder elegante para fotos a substituir */
  background: linear-gradient(135deg, #0a2257 0%, #0b4fd6 60%, #12c8e6 100%);
  position: relative; overflow: hidden;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.28), transparent 45%),
              repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
}

/* Avatares com iniciais */
.avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, #0a3fb8, #12c8e6); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(11,31,77,.15);
}
.avatar.a2 { background: linear-gradient(135deg, #14d9c6, #0b4fd6); }
.avatar.a3 { background: linear-gradient(135deg, #0d2c6e, #2ab3f5); }
.avatar.a4 { background: linear-gradient(135deg, #1677ff, #0a2257); }
.avatar.more { background: #eef3fb; color: var(--ink); font-size: 14px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -12px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Formulários */
.field { position: relative; display: block; }
.field + .field { margin-top: 12px; }
.field label.lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.input, .select {
  width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; padding: 0 14px; font-size: 14px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input::placeholder { color: #8d97ad; }
.input:focus, .select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(22,119,255,.14); }
.field.has-icon .input, .field.has-icon .select { padding-left: 44px; }
.field.has-icon > svg.i { position: absolute; left: 14px; bottom: 13px; width: 19px; height: 19px; color: var(--navy-700); pointer-events: none; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230b1f4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.check input { width: 17px; height: 17px; accent-color: var(--blue-600); }
.check .count { margin-left: auto; color: var(--muted); }

/* Busca grande */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 8px 8px 8px 18px; box-shadow: var(--shadow);
}
.search-bar svg.i { color: var(--navy-700); width: 22px; height: 22px; }
.search-bar input { flex: 1; border: 0; outline: none; height: 44px; font-size: 15px; background: transparent; min-width: 0; }

/* Paginação */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink); background: #fff;
}
.pagination a.active { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.pagination a:hover:not(.active) { border-color: var(--blue-500); }
.pagination svg.i { width: 16px; height: 16px; }

/* Abas */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 14px 16px; font-size: 14.5px; font-weight: 600; color: var(--text);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--blue-600); }
.tabs button:hover { color: var(--blue-600); }

/* Acordeão */
.acc-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.acc-item summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary svg.i { width: 18px; height: 18px; transition: transform .25s; color: var(--navy-700); }
.acc-item[open] summary svg.i { transform: rotate(180deg); }
.acc-item .acc-body { padding: 0 16px 16px; font-size: 13.5px; }

/* Barras do gráfico */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 0 6px; border-bottom: 1px solid var(--line-2); }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars .b strong { font-size: 12.5px; color: var(--ink); margin-bottom: 4px; }
.bars .b i { display: block; width: 100%; max-width: 44px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #2ab3f5, #1677ff); }
.bars .b.c2 i { background: linear-gradient(180deg, #2a8bff, #0b4fd6); }
.bars .b.c3 i { background: linear-gradient(180deg, #0b4fd6, #0a3fb8); }
.bars .b.hi i { background: linear-gradient(180deg, #2ee6d4, #14c7c0); }
.bars .b.lo i { background: linear-gradient(180deg, #a6d4fb, #7dbcf7); }
.bars-x { display: flex; gap: 12px; padding: 6px 6px 0; }
.bars-x span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy-900); color: #b7c4de; }
.site-footer .bar {
  width: 100%;
  padding: 34px clamp(16px, 3.2vw, 56px) 30px;
  display: grid; grid-template-columns: 220px 1fr auto auto; gap: 40px; align-items: start;
}
.site-footer .brand img { height: 50px; }
.f-cols { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 24px; }
.f-cols h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0; margin-bottom: 6px; }
.f-cols a { display: block; font-size: 12.5px; line-height: 1.75; color: #b7c4de; }
.f-cols a:hover { color: #fff; }
.f-social { display: flex; gap: 18px; align-items: center; padding: 18px 28px; border-left: 1px solid rgba(255,255,255,.12); border-right: 1px solid rgba(255,255,255,.12); }
.f-social a { color: #fff; opacity: .9; }
.f-social a:hover { opacity: 1; color: var(--cyan-400); }
.f-social svg { width: 20px; height: 20px; fill: currentColor; }
.f-claim { color: #fff; font-size: 13px; line-height: 1.45; max-width: 160px; }
.f-claim::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 10px; background: var(--grad); }
.f-legal { display: flex; flex-direction: column; gap: 2px; }
.f-legal a { font-size: 12px; color: #b7c4de; }
.f-legal a:hover { color: #fff; }
.f-copy { border-top: 1px solid rgba(255,255,255,.08); padding: 14px clamp(16px, 3.2vw, 56px); font-size: 12px; color: #8a9abb; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .site-footer .bar { grid-template-columns: 1fr; gap: 28px; }
  .f-social { border: 0; padding: 0; }
}
@media (max-width: 640px) {
  .f-cols { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Utilidades de layout
   ========================================================= */
.section { padding: 34px 0; }
.section-soft { background: var(--bg-soft); }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-4, .g-3, .g-2 { grid-template-columns: 1fr; } }

/* animação de entrada */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
