/* =============================================================================
   jurimetria-hero.css — paleta preto + AZUL-MARINHO pras capas das telas
   de Jurimetria (radar_crise, pipeline, arvore_justica, distribuicao_tribunal).

   Espelha o layout de /projeto_view (hero esquerda + tiles direita), mas
   usa azul-marinho no lugar do dourado pra diferenciar identidade visual.

   Estrutura HTML esperada:
     <div class="juri-home">
       <div class="juri-hero">
         <span class="juri-tag">Jurimetria · <b>NOME</b></span>
         <h1 class="juri-nome">NOME <b>DESTAQUE</b></h1>
         <p class="juri-desc">descricao</p>
         <div class="juri-stats">
           <div class="juri-hs"><div class="v">N</div><div class="l">LABEL</div></div>
           ...
         </div>
       </div>
       <div class="juri-tiles">
         <a class="juri-tile" href="..."><i class="fas fa-X"></i><span class="lbl">Texto</span></a>
         ...
         <a class="juri-tile active">Tela atual</a>
       </div>
     </div>

   2026-06-06.
============================================================================= */

:root {
  --juri-navy:      #1c2a44;
  --juri-navy-dk:   #14203a;
  --juri-navy-lt:   #2c4068;
  --juri-navy-bg:   rgba(91,133,184,.14);
  --juri-navy-border: rgba(91,133,184,.4);
}

/* Home layout */
.juri-home {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 24px;
}

/* HERO PRETO (esquerda) */
.juri-hero {
  flex: 1.55;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1c1c1e;
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  box-shadow: 0 4px 18px rgba(28,28,30,.18);
  color: #fff;
  font-family: 'Albert Sans', system-ui, sans-serif;
}
.juri-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(130% 130% at 100% 0%, rgba(91,133,184,.14), transparent 55%);
}
.juri-hero > * { position: relative; z-index: 1; }

/* Tag eyebrow */
.juri-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--juri-navy-bg);
  border: 1px solid var(--juri-navy-border);
  color: #7ea0c8;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
}
.juri-tag b {
  color: #b5cae3;
  font-family: 'DM Sans', monospace;
  font-weight: 700;
  letter-spacing: .6px;
}

/* Titulo grande */
.juri-nome {
  color: #fff;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.15;
  margin: 18px 0 8px;
  letter-spacing: -.01em;
}
.juri-nome b { font-weight: 700; }

/* Descricao */
.juri-desc {
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  line-height: 1.55;
  max-width: 480px;
  margin-bottom: 4px;
}

/* Stats */
.juri-stats {
  display: flex;
  gap: 28px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.juri-hs .v {
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  font-family: 'DM Sans', 'Albert Sans', sans-serif;
}
.juri-hs .l {
  font-size: .7rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 5px;
  font-weight: 700;
}
.juri-hs .v small {
  color: #7ea0c8;
  font-weight: 700;
  font-size: .74em;
}

/* TILES AZUL-MARINHO (direita, grid 2x2 default; vira 2x3 se precisar) */
.juri-tiles {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
  min-width: 280px;
}
.juri-tile {
  background: var(--juri-navy);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px 12px;
  color: #fff;
  text-decoration: none;
  border: 0;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  font-family: inherit;
  position: relative;
}
.juri-tile i {
  font-size: 1.5rem;
  color: #fff;
  transition: transform .18s ease;
}
.juri-tile .lbl {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  letter-spacing: .2px;
}
.juri-tile:hover {
  background: var(--juri-navy-lt);
  transform: translateY(-3px);
  box-shadow: 0 9px 22px rgba(28,42,68,.4);
  color: #fff;
}
.juri-tile:hover i { transform: scale(1.08); }

/* Tile da tela ATUAL (highlight com borda dourada — accent secundario) */
.juri-tile.active {
  background: var(--juri-navy-dk);
  box-shadow: inset 0 0 0 2px #c8a84b;
  cursor: default;
}
.juri-tile.active::after {
  content: "atual";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: .56rem;
  color: #c8a84b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  background: rgba(200,168,75,.12);
  padding: 2px 6px;
  border-radius: 8px;
}
.juri-tile.active:hover {
  background: var(--juri-navy-dk);
  transform: none;
  box-shadow: inset 0 0 0 2px #c8a84b;
}
.juri-tile.active:hover i { transform: none; }

/* Tile disabled (placeholder pra atalho nao-disponivel) */
.juri-tile.disabled {
  background: #50545a;
  cursor: not-allowed;
  opacity: .65;
}
.juri-tile.disabled:hover {
  background: #50545a;
  transform: none;
  box-shadow: none;
}

/* ============ RESPONSIVO ============ */

/* TABLET (<= 860px): hero + tiles empilham vertical */
@media (max-width: 860px) {
  .juri-home {
    flex-direction: column;
    gap: 10px;
  }
  .juri-tiles {
    min-width: 0;
    grid-auto-rows: auto;
  }
  .juri-hero {
    min-height: auto;
    padding: 22px 20px;
  }
  .juri-nome {
    font-size: 1.5rem;
    margin: 14px 0 8px;
  }
  .juri-desc { font-size: .82rem; }
  .juri-stats { margin-top: 18px; gap: 22px; }
}

/* MOBILE GRANDE (<= 600px): tiles compactam */
@media (max-width: 600px) {
  .juri-tiles {
    gap: 8px;
  }
  .juri-tile {
    padding: 14px 8px;
    gap: 8px;
    min-height: 84px;
  }
  .juri-tile i { font-size: 1.25rem; }
  .juri-tile .lbl { font-size: .72rem; }
}

/* =============================================================================
   KPIs com identidade visual dos tiles (azul-marinho)
   Aplicado automaticamente quando a pagina tem .juri-home (via :has).
   Browsers modernos (Chrome 105+, Safari 15.4+, Firefox 121+).
============================================================================= */
body:has(.juri-home) .kpi {
  background: var(--juri-navy);
  color: #fff;
  border: 0;
  border-radius: 6px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
body:has(.juri-home) .kpi:hover {
  background: var(--juri-navy-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(28,42,68,.35);
}
/* Mantem a barra lateral colorida (sinaliza tipo) — fica mais visivel sobre fundo escuro */
body:has(.juri-home) .kpi::before {
  width: 4px;
  filter: brightness(1.15);
}
/* Textos invertem pra branco; subtitulos opacos */
body:has(.juri-home) .kpi .v,
body:has(.juri-home) .kpi .val {
  color: #fff;
}
body:has(.juri-home) .kpi .l,
body:has(.juri-home) .kpi .lbl {
  color: rgba(255,255,255,.7);
}
body:has(.juri-home) .kpi .s,
body:has(.juri-home) .kpi .hint {
  color: rgba(255,255,255,.5);
}
/* Botoes "nota metodologica" dentro dos KPIs */
body:has(.juri-home) .kpi-botao-nota .btn-nota {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
  border-color: rgba(255,255,255,.15);
}
body:has(.juri-home) .kpi-botao-nota .btn-nota:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
/* Header de secao colapsivel: cor mais clara pra contrastar fundo branco da pagina */
body:has(.juri-home) .kpi-secao-header {
  color: #1a1816;
}

/* MOBILE PEQUENO (<= 480px): tipografia reduzida */
@media (max-width: 480px) {
  .juri-hero { padding: 18px 16px; }
  .juri-tag { font-size: .6rem; padding: 4px 11px; letter-spacing: 1.2px; }
  .juri-nome { font-size: 1.25rem; margin: 12px 0 6px; }
  .juri-desc { font-size: .78rem; line-height: 1.5; }
  .juri-stats { gap: 16px; margin-top: 14px; }
  .juri-hs .v { font-size: 1.3rem; }
  .juri-hs .l { font-size: .62rem; }
  .juri-tile { padding: 11px 6px; min-height: 72px; }
  .juri-tile i { font-size: 1.1rem; }
  .juri-tile .lbl { font-size: .68rem; line-height: 1.2; }
}
