/* =========================================================
   ORIGINAL DIAGNÓSTICO — conhecimento.css
   Página Conhecimento (archive). Reaproveita da Home (home.css):
   o slider do topo (.hero) e os cards de artigo (.article-card).
   ========================================================= */

/* =================== DESTAQUES (slider) ===================
   Fundo verde com o texto à esquerda e a ilustração do artigo (círculo do PDF) à direita. */
.conh-hero .hero__slide { min-height: 0; }
.conh-hero__content {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
  width: 100%;
  padding-block: 72px 88px;
}
.conh-hero__texto { min-width: 0; }
.conh-hero__ilustra { width: clamp(240px, 25vw, 360px); height: auto; }
@media (min-width: 901px) {
  /* deixa espaço para as setas e o contador, que ficam na borda direita */
  .conh-hero__content { padding-right: calc(var(--gutter) + 96px); }
}
.conh-hero__title { max-width: 720px; }
.conh-hero__btn { gap: 17px; padding-left: 25px; padding-right: 20px; }
.conh-hero__arrow { width: 42px; height: 8.4px; color: var(--c-gold); transition: transform .25s var(--ease); }
.conh-hero__btn:hover .conh-hero__arrow { transform: translateX(4px); }

/* =================== CATEGORIA (tema escolhido) ===================
   Figma "Categoria": faixa dourada 202px, "CONHECIMENTO" + nome do tema.
   Entra no lugar do slider quando <html> tem .conh-modo-tema (conhecimento.js
   e o script do topo da página, para links com #tema). */
.conh-cat { display: none; height: 202px; padding-top: 48px; background: var(--c-gold); color: var(--c-white); text-align: center; }
.conh-modo-tema .conh-cat { display: block; }
.conh-modo-tema .conh-hero { display: none; }
.conh-modo-tema .conh-filtros { padding-top: 0; } /* faixa da categoria e filtros viram um bloco dourado só */
.conh-cat__eyebrow { line-height: 16px; }
.conh-cat__title {
  margin-top: 3px;
  font-family: var(--ff-title); font-size: clamp(2.5rem, 1.4rem + 3.2vw, 3.75rem); font-weight: 600; line-height: 1.32;
  color: var(--c-white);
}

/* =================== FILTROS (faixa dourada) =================== */
.conh-filtros { padding: 60px 0 59px; background: var(--c-gold); }
.conh-filtros__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.conh-select, .conh-busca {
  position: relative;
  height: 45px;
  border-radius: 4px;
  background: var(--c-white);
}
.conh-select select, .conh-busca input {
  width: 100%; height: 100%;
  border: 0; border-radius: 4px;
  background: transparent;
  font-family: var(--ff-body);
  font-size: 0.75rem;
  color: #767676;
}
.conh-select select {
  padding: 0 48px 0 25px;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.conh-select__icon {
  position: absolute; top: 50%; right: 14px;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  color: var(--c-green);
  pointer-events: none;
}
.conh-busca input { padding: 0 52px 0 26px; color: var(--c-text); }
.conh-busca input::placeholder { color: #767676; opacity: 1; }
.conh-busca input::-webkit-search-cancel-button { cursor: pointer; }
.conh-busca button {
  position: absolute; top: 0; right: 0;
  display: grid; place-items: center;
  width: 50px; height: 100%;
  color: var(--c-green);
}
.conh-busca button svg { width: 18px; height: 18px; }
.conh-select select:focus-visible, .conh-busca input:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; }

/* =================== TEMAS =================== */
.conh-lista { padding: 55px 0 56px; background: #fbf9f3; }
.conh-lista__eyebrow { line-height: 16px; text-align: center; }

.conh-temas { position: relative; margin-top: 53px; }
.conh-temas__list {
  display: flex; gap: 36px;
  margin: 0; padding: 0; list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.conh-temas__list::-webkit-scrollbar { display: none; }
.conh-temas__list li { flex: 0 0 193px; scroll-snap-align: start; }
.conh-tema {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 52px;
  border: 1px solid #e7e7e7;
  border-radius: 4px;
  background: var(--c-white);
  text-align: center;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.conh-tema__nome {
  font-size: 0.625rem; font-weight: 700; line-height: 13px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-green);
}
.conh-tema__qtd { font-size: 0.625rem; font-weight: 500; line-height: 13px; color: #9e9a9a; }
.conh-tema:hover { border-color: var(--c-green); }
.conh-tema.is-active { border-color: var(--c-green); background: var(--c-green); }
.conh-tema.is-active .conh-tema__nome { color: var(--c-gold); }
.conh-tema.is-active .conh-tema__qtd { color: var(--c-white); }

.conh-temas__arrow {
  position: absolute; top: 50%;
  display: grid; place-items: center;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.conh-temas__arrow .icon { width: 17px; height: 12px; }
.conh-temas__arrow--prev { left: -71px; width: 42px; height: 42px; }
.conh-temas__arrow--next { right: -70px; width: 40px; height: 40px; }
/* ativo: dourado; sem para onde ir: contorno cinza (como a seta da esquerda no Figma) */
.conh-temas__arrow { border: 1px solid var(--c-gold); background: var(--c-gold); color: var(--c-white); }
.conh-temas__arrow:disabled { border-color: #c4c4c4; background: transparent; color: #c4c4c4; cursor: default; }
.conh-temas__arrow:not(:disabled):hover { border-color: var(--c-green); background: var(--c-green); }

/* =================== ARTIGOS =================== */
/* "N artigos disponíveis" (Figma Categoria: 57px até os cards) */
.conh-total { margin-top: 50px; line-height: 16px; text-align: center; }
.conh-total[hidden] { display: none; }
.conh-grid { display: flex; flex-direction: column; gap: 22px; margin-top: 57px; }
.conh-grid[hidden] { display: none; }
.conh-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 350px));
  justify-content: center;
  align-items: start;
  gap: 30px;
}
/* bloco incompleto (o último, quando o total não é múltiplo de 6): só as colunas usadas, centralizadas */
.conh-block--2 { grid-template-columns: repeat(2, minmax(0, 350px)); }
.conh-block--1 { grid-template-columns: minmax(0, 350px); }
.conh-col { display: flex; flex-direction: column; gap: 16px; }
.conh-card { color: var(--c-white); } /* na Home herda o branco da seção verde */
.conh-card:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; }

.conh-vazio { margin-top: 74px; text-align: center; }
.conh-vazio p { font-size: 0.875rem; font-weight: 600; color: var(--c-green); }
.conh-vazio .btn { margin-top: 1rem; }

.conh-lista__more { margin-top: 73px; text-align: center; }
.conh-lista__more[hidden] { display: none; }
.conh-lista__btn {
  min-width: 217px; min-height: 50px;
  padding: 0 24px;
  border-radius: 4px;
  font-family: var(--ff-ui); font-size: 1rem; font-weight: 700;
}

/* =================== RESPONSIVO =================== */
@media (max-width: 1279px) {
  /* setas dos temas entram no container */
  .conh-temas { padding-inline: 58px; }
  .conh-temas__arrow--prev { left: 0; }
  .conh-temas__arrow--next { right: 0; }
}
@media (max-width: 1100px) {
  .conh-block { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .conh-block--2 { grid-template-columns: repeat(2, minmax(0, 350px)); }
  .conh-block--1 { grid-template-columns: minmax(0, 350px); }
}
@media (max-width: 900px) {
  .conh-filtros { padding: 32px 0; }
  .conh-cat { height: auto; padding: 44px 0 40px; }
  .conh-modo-tema .conh-filtros { padding-top: 0; }
  .conh-total { margin-top: 36px; }
  .conh-grid { gap: 16px; margin-top: 32px; }
  .conh-block, .conh-block--2, .conh-block--1 { grid-template-columns: minmax(0, 520px); gap: 16px; }
  .conh-hero__content { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 28px; padding-bottom: 6.5rem; }
  .conh-hero__ilustra { order: -1; justify-self: center; width: 190px; }
  .conh-lista__more { margin-top: 48px; }
}
@media (max-width: 640px) {
  .conh-filtros__inner { grid-template-columns: 1fr; gap: 12px; }
  .conh-lista { padding-top: 44px; }
  .conh-temas { margin-top: 28px; margin-inline: calc(var(--gutter) * -1); padding-inline: 0; }
  .conh-temas__arrow { display: none; }
  .conh-temas .conh-temas__list { gap: 12px; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); } /* .conh-temas na frente vence o ul[class] do base.css */
  .conh-temas__list li { flex-basis: 168px; }
  .conh-lista__btn { width: 100%; }
}
