/* style.css */

/* reset simples */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* fonte que você importou no HTML */
body {
  font-family: 'Libre Baskerville', serif;
  background: linear-gradient(180deg, #0b0b0b 0%, #015418 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* container dos cartões */
#container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

/* estilo do cartão (seleciona artigos cujo atributo class começa com "cart") */
article[class^="cart"] {
  background: linear-gradient(180deg, #0f0000 0%, #100 100%); /* preto profundo com leve vermelho */
  border: 3px solid hsla(26, 96%, 10%, 0.922); /* borda vermelha forte */
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: default;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
}

/* leve elevação ao passar o mouse (efeito visual) */
article[class^="cart"]:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(2, 174, 2, 0.604);
}

/* conteúdo interno (você tem .cartão_conteudo no HTML) */
article[class^="cart"] > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

/* título do cartão */
article[class^="cart"] h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
  background: linear-gradient(90deg,#43e907,#7a0000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent; /* usa o gradiente como texto */
  font-weight: 700;
}

/* caixa da pergunta */
article[class^="cart"] .cartão_conteudo_pergunta,
article[class^="cart"] .cartao_conteudo_pergunta,
article[class^="cart"] > div > div:first-of-type {
  /* usamos o seletor estrutural como fallback (se as classes tiverem caracteres especiais) */
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(179,0,0,0.06);
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.3;
}

/* estilo da resposta — por padrão escondida */
article[class^="cart"] > div > div:last-of-type {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  color: #ffdede;
  font-weight: 600;
  font-size: 0.98rem;

  /* efeito de esconder/mostrar suave */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height .35s ease, opacity .28s ease, transform .28s ease, padding .28s ease;
}

/* ao passar o mouse sobre o cartão, mostrar a resposta */
article[class^="cart"]:hover > div > div:last-of-type {
  max-height: 240px; /* suficiente para a maioria das respostas */
  opacity: 1;
  transform: translateY(0);
  padding: 10px 12px;
}

/* texto centralizado (reforço) */
article[class^="cart"] p {
  margin: 0;
  text-align: center;
}

/* rodapé do layout (seu footer existente) */
footer {
  margin-top: 28px;
  text-align: center;
  width: 100%;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* responsividade para telas pequenas */
@media (max-width: 480px) {
  article[class^="cart"] {
    padding: 14px;
    min-height: 130px;
  }
  article[class^="cart"] h3 { font-size: 1rem; }
  article[class^="cart"] p { font-size: 0.95rem; }
}