/* =========================================================
   ORIGINAL DIAGNÓSTICO — artigo.css
   Página do artigo (/artigo/<slug>). Reaproveita da Home (home.css)
   os cards de artigo e a seção verde de artigos ("Você também pode gostar").
   Texto do artigo: app/dados/artigos/<slug>.html (h2, h3, p, ul, quadros,
   tabela e figura, estilizados em "Texto" abaixo).
   ========================================================= */

/* =================== TOPO =================== */
.art-banner {
  height: 270px;
  background: var(--c-green) url("../img/artigo/padrao-od-escuro.svg") 331px 48px / auto 150px repeat-x;
}
.art-banner__inner { position: relative; height: 100%; }
.art-back {
  position: absolute; top: 41px; right: var(--gutter);
  display: inline-flex; align-items: center; gap: 15px;
  height: 50px; padding: 0 18px 0 19px;
  border-radius: 4px;
  background: var(--c-white);
  font-family: var(--ff-ui); font-size: 0.875rem; font-weight: 600;
  color: var(--c-gold);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.art-back svg { width: 17.5px; height: 12px; }
.art-back:hover { background: var(--c-gold); color: var(--c-white); }

/* =================== COLUNAS =================== */
.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 730px) 350px;
  justify-content: space-between;
  align-items: start;
  margin-top: -135px;
  position: relative;
}

/* =================== ARTIGO =================== */
.art { min-width: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--c-white); padding-bottom: 42px; }
.art__inner { padding: 0 95px; }

.art__crumbs { padding: 42px 95px 0; border-bottom: 1px solid #cacaca; }
.art__crumbs ol { display: flex; margin: 0; padding: 0 0 15px; list-style: none; font-size: 0.875rem; line-height: 18px; color: #828282; white-space: nowrap; }
.art__crumbs li { flex: none; }
.art__crumbs li + li::before { content: "/"; margin: 0 9px 0 10px; }
.art__crumbs li:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.art__crumbs a { color: inherit; }
.art__crumbs a:hover { color: var(--c-green); text-decoration: underline; }

.art__header { padding: 18px 95px 39px; border-bottom: 1px solid #cacaca; }
.art__tema { margin-bottom: 10px; font-size: 0.75rem; font-weight: 700; line-height: 16px; letter-spacing: .2em; text-transform: uppercase; color: #7d6110; }
.art__title {
  font-family: var(--ff-title); font-size: 1.75rem; font-weight: 600; line-height: 33px;
  color: var(--c-green);
}

.art__lead { margin-top: 23px; font-size: 0.9375rem; font-weight: 500; line-height: 24px; color: #5f5f5f; }
.art__byline { margin-top: 22px; font-size: 0.75rem; font-weight: 500; line-height: 18px; color: #787878; }
.art__byline strong { font-weight: 700; color: var(--c-green); }
.art__time { margin-top: 26px; text-align: right; font-size: 0.75rem; font-weight: 500; line-height: 15px; color: #3f3b3b; }
.art__time strong { font-weight: 700; color: var(--c-gold); }

/* capa: ilustração redonda do PDF sobre verde-claro */
.art__ilustra { display: flex; justify-content: center; margin: 40px 0 0; padding: 30px 24px; border-radius: var(--radius); background: #e9f2ec; }
.art__ilustra img { width: min(100%, 290px); height: auto; }

.art__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 15px; padding: 17px 0 13px;
  border-block: 1px solid #cacaca;
}
.art__updated { font-size: 0.75rem; font-weight: 600; color: #828282; }
.art__share-mini {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.625rem; color: #828282;
}
.art__share-mini svg { width: 16px; height: 16px; color: var(--c-gold); transition: transform .2s var(--ease); }
.art__share-mini:hover svg { transform: scale(1.15); }

/* ----- Ouvir artigo ----- */
.art-audio { margin-top: 45px; }
.art-audio__label { font-size: 0.75rem; font-weight: 500; line-height: 16px; color: #828282; }
.art-audio__row { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.art-audio__play { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-left: 2px; color: var(--c-green); }
.art-audio__play svg { width: 14.5px; height: 16px; }
.art-audio__icon-pause { display: none; }
.art-audio.is-playing .art-audio__icon-play { display: none; }
.art-audio.is-playing .art-audio__icon-pause { display: block; }
.art-audio__wave { position: relative; flex: 1 1 auto; height: 33px; overflow: hidden; }
.art-audio__bars { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; color: #9e9e9e; }
.art-audio__bars i { display: block; width: 1px; background: currentColor; }
.art-audio__bars--on { color: var(--c-gold); clip-path: inset(0 calc(100% - var(--progresso, 0%)) 0 0); }
.art-audio__time { flex: none; min-width: 26px; font-size: 0.75rem; font-weight: 500; color: #828282; }
.art-audio__speed {
  flex: none; height: 20px; padding: 0 3px;
  border-radius: 3px; background: var(--c-gold);
  font-size: 0.625rem; font-weight: 700; color: var(--c-white);
}
.art-audio__vol { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; color: var(--c-gold); }
.art-audio__vol svg { width: 16px; height: 13px; }
.art-audio__vol input {
  width: 73px; height: 4px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-gold) var(--vol, 60%), #d9d9d9 var(--vol, 60%));
  cursor: pointer;
}
.art-audio__vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c-gold); }
.art-audio__vol input::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--c-gold); }
.art-audio__aviso { margin-top: 8px; font-size: 0.75rem; color: #828282; }

/* ----- Texto ----- */
.art__body { margin-top: 40px; font-size: 0.875rem; font-weight: 500; line-height: 26px; color: #5f5f5f; text-align: justify; hyphens: auto; }
.art__body::after { content: ""; display: table; clear: both; } /* figura flutuante não vaza para fora do texto */
.art__body > * + * { margin-top: 20px; }
.art__body > h2 {
  clear: both;
  margin-top: 44px;
  font-family: var(--ff-title); font-size: 1.25rem; font-weight: 600; line-height: 28px;
  text-align: left; color: var(--c-green);
}
.art__body > h3 { margin-top: 30px; font-size: 1rem; font-weight: 700; line-height: 24px; text-align: left; color: var(--c-green); }
.art__body > h2 + *, .art__body > h3 + * { margin-top: 10px; }
.art__body > :first-child { margin-top: 0; }
.art__body strong { font-weight: 700; color: #3f3b3b; }
.art__body em { font-style: italic; font-weight: 600; color: var(--c-green); }
.art__body a { color: var(--c-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.art__body a:hover { color: var(--c-gold); }

/* listas com marcador dourado */
.art__body ul { margin-bottom: 0; padding: 0; list-style: none; text-align: left; }
.art__body li { position: relative; padding-left: 22px; }
.art__body li + li { margin-top: 8px; }
.art__body li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-gold); }

/* quadros do PDF: destaque (bege) e alerta (rosa) */
.art-destaque, .art-alerta { padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; text-align: left; line-height: 24px; }
.art-destaque > * + *, .art-alerta > * + * { margin-top: 8px; }
.art-destaque { border-left: 4px solid var(--c-gold); background: #f3ead0; color: #4a4434; }
.art-destaque strong { color: var(--c-green); }
.art-alerta { border-left: 4px solid #a32727; background: #fbeeee; color: #5a2323; }
.art-alerta strong { color: #8f1d1d; }

/* tabelas: rolam de lado no celular em vez de apertar o texto */
.art-tabela { overflow-x: auto; border: 1px solid #dfe8e2; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.art-tabela table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.8125rem; line-height: 19px; text-align: left; hyphens: manual; }
.art-tabela th { padding: 10px 14px; background: var(--c-green); font-weight: 700; color: var(--c-white); vertical-align: bottom; }
.art-tabela td { padding: 10px 14px; border-top: 1px solid #e3e9e5; color: #4d4d4d; vertical-align: top; }
.art-tabela tbody tr:nth-child(even) td { background: #f5f8f6; }
.art-tabela td:first-child { font-weight: 600; color: var(--c-green); }

/* foto que está no meio do PDF (redonda, ao lado do texto) */
.art-figura { float: right; width: 210px; margin: 4px 0 12px 24px; }
.art__body > h2 + .art-figura + *, .art__body > h3 + .art-figura + * { margin-top: 10px; }
.art-figura + p, .art-figura + p + p { text-align: left; } /* ao lado da figura a coluna é estreita: justificado abriria buracos */
.art-figura img { width: 100%; height: auto; }

/* ----- Quadro final (cta), autora e aviso ----- */
.art-cta { margin-top: 48px; padding: 28px 30px 30px; border-radius: var(--radius); background: #e9f2ec; }
.art-cta__title { font-family: var(--ff-title); font-size: 1.25rem; font-weight: 600; line-height: 28px; color: var(--c-green); }
.art-cta .art-cta__lista { margin: 16px 0 0; padding: 0; list-style: none; font-size: 0.875rem; font-weight: 500; line-height: 22px; color: #3f4a44; }
.art-cta__lista li { position: relative; padding-left: 26px; }
.art-cta__lista li + li { margin-top: 10px; }
.art-cta__lista li::before {
  content: ""; position: absolute; left: 3px; top: 5px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--c-gold); border-bottom: 2px solid var(--c-gold);
  transform: rotate(-45deg);
}
.art-cta__lista strong { font-weight: 700; color: var(--c-green); }
.art-cta__fecho { margin-top: 18px; font-size: 0.875rem; font-weight: 600; line-height: 22px; color: var(--c-green); }
.art-cta__acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.art-cta__btn { min-height: 46px; border-radius: var(--radius-sm); font-family: var(--ff-ui); font-size: 0.9375rem; font-weight: 700; }
.art-cta__btn .icon { width: 18px; height: 18px; }

.art-autor { margin-top: 40px; padding-top: 22px; border-top: 1px solid #cacaca; }
.art-autor__nome { font-family: var(--ff-title); font-size: 1.0625rem; font-weight: 700; line-height: 24px; color: var(--c-green); }
.art-autor__cargo { margin-top: 2px; font-size: 0.8125rem; font-weight: 600; line-height: 20px; color: #6b6b6b; }
.art-autor__grupo { margin-top: 2px; font-size: 0.75rem; font-weight: 500; line-height: 18px; color: #8a8a8a; }
.art-aviso { margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: #f5f5f5; font-size: 0.75rem; font-style: italic; line-height: 18px; color: #6b6b6b; }

.art__end { margin-top: 28px; padding-top: 0; border-top: 1px solid #cacaca; text-align: center; }
.art__end .art__share-mini { margin-top: 20px; }

/* ----- Barra de compartilhamento (fixa à esquerda) ----- */
.art-share { display: flex; }
.art-share__btn { display: grid; place-items: center; width: 49px; height: 53px; color: var(--c-white); transition: filter .2s var(--ease); }
.art-share__btn svg { width: 22px; height: 22px; }
.art-share__btn:hover { filter: brightness(1.12); }
.art-share__btn--whatsapp { background: #28a745; }
.art-share__btn--facebook { background: #3a5899; }
.art-share__btn--x { background: #000; }
.art-share__btn--x svg { width: 16px; height: 16px; }
.art-share__btn--linkedin { background: #122f6d; }
.art-share__btn--link { background: var(--c-gold); }
@media (min-width: 1240px) {
  .art-share {
    position: fixed; z-index: 30; left: 0; top: 325px;
    flex-direction: column;
    transition: opacity .3s var(--ease), visibility .3s;
  }
  .art-share.is-hidden { opacity: 0; visibility: hidden; }
}

/* =================== LATERAL =================== */
.art-side { border-radius: var(--radius) var(--radius) 0 0; background: var(--c-white); padding: 41px 30px 94px 33px; }
.art-search { position: relative; height: 52px; }
.art-search input {
  width: 100%; height: 100%;
  padding: 0 84px 0 25px;
  border: 1px solid #8e8b8b; border-radius: 26px;
  font-size: 0.75rem; color: var(--c-text);
}
.art-search input::placeholder { color: #acacac; opacity: 1; }
.art-search button {
  position: absolute; top: 1px; right: 1px; bottom: 1px;
  display: grid; place-items: center;
  width: 72px; border-radius: 25px;
  background: var(--c-green); color: var(--c-white);
  transition: background-color .25s var(--ease);
}
.art-search button svg { width: 17px; height: 17px; }
.art-search button:hover { background: var(--c-gold); }

.art-tags { margin-top: 28px; padding: 22px 20px 26px; border-radius: var(--radius); background: var(--c-gold); text-align: center; }
.art-tags__title { font-size: 1rem; font-weight: 700; line-height: 20px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-white); }
.art-tags .art-tags__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.art-tag {
  display: grid; place-items: center;
  min-width: 95px; height: 31px; padding: 0 12px;
  border: 1px solid var(--c-white); border-radius: 16px;
  font-size: 0.75rem; font-weight: 500; color: var(--c-white);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.art-tag:hover, .art-tag.is-active { background: var(--c-white); color: var(--c-green); }
.art-tag.is-active { font-weight: 600; }


.art-latest {
  margin: 40px 18px 0 14px;
  border-radius: var(--radius);
  background: var(--c-white);
  box-shadow: 0 40px 60px rgba(0, 0, 0, .08);
  overflow: hidden;
}
.art-latest__title {
  display: grid; place-items: center; height: 48px;
  background: var(--c-gold);
  font-size: 1rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--c-white);
}
.art-latest .art-latest__list { margin: 0; padding: 21px 32px 40px 33px; list-style: none; }
.art-latest__list li + li { margin-top: 34px; }
.art-post { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 10px; }
.art-post img { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 190 / 187; object-fit: contain; padding: 14px; border-radius: var(--radius); background: #e9f2ec; transition: transform .3s var(--ease); }
.art-post:hover img { transform: scale(1.02); }
.art-post__name { margin-top: 22px; padding-left: 4px; font-size: 0.75rem; font-weight: 700; line-height: 20px; color: var(--c-green); transition: color .25s var(--ease); }
.art-post__arrow { width: 19px; height: 13px; margin-bottom: 4px; color: #b7b7b7; transition: color .25s var(--ease), transform .25s var(--ease); }
.art-post:hover .art-post__name { color: var(--c-gold); }
.art-post:hover .art-post__arrow { color: var(--c-green); transform: translateX(3px); }

/* aviso (link copiado etc.) */
.art-toast {
  position: fixed; z-index: 60; left: 50%; bottom: 28px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--c-green); color: var(--c-white);
  font-size: 0.8125rem; font-weight: 600;
  transform: translateX(-50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

/* =================== VOCÊ TAMBÉM PODE GOSTAR =================== */
.knowledge--related { margin-top: -10px; padding-top: 118px; padding-bottom: 51px; }
.knowledge--related .knowledge__title { margin-top: 4px; font-size: clamp(2.2rem, 1.6rem + 1.9vw, 3.125rem); font-weight: 500; letter-spacing: 0; }
.knowledge--related .knowledge__grid { margin-top: 78px; }

/* =================== RESPONSIVO =================== */
@media (max-width: 1239px) {
  .art-share { margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; width: max-content; }
  .art-share__btn { width: 46px; height: 46px; }
}
@media (max-width: 1100px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .art-side { padding-bottom: 40px; border-radius: var(--radius); }
  .art-latest { margin: 28px 0 0; }
  .art-latest .art-latest__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .art-latest__list li + li { margin-top: 0; }
}
@media (max-width: 900px) {
  .art-banner { height: 200px; background-size: auto 110px; background-position: 97px 40px; }
  .art-back { top: 24px; height: 44px; }
  .art-layout { margin-top: -96px; }
  .art__crumbs { padding: 28px 24px 0; }
  .art__header { padding: 16px 24px 28px; }
  .art__title { font-size: 1.5rem; line-height: 30px; }
  .art__inner { padding: 0 24px; }
  .art-cta { padding: 24px 20px; }
  .art-side { padding: 28px 24px 32px; }
  .knowledge--related { padding-top: 88px; }
  .knowledge--related .knowledge__grid { margin-top: 48px; }
}
@media (max-width: 640px) {
  .art-share { width: 100%; }
  .art__body { text-align: left; } /* justificado em coluna estreita abre buracos entre as palavras */
  .art-share__btn { flex: 1 1 0; width: auto; }
  .art__crumbs ol { font-size: 0.75rem; }
  .art__crumbs li:nth-child(3) { display: none; }
  .art__time { margin-top: 28px; }
  .art-audio__wave { min-width: 0; }
  .art-figura { float: none; width: 180px; margin: 20px auto 0; }
  /* tabela no celular: cada linha vira um quadro; a 1ª célula é o título e as outras levam o nome da coluna (data-rotulo, posto pelo PHP) */
  .art-tabela { overflow: visible; border: 0; border-radius: 0; }
  .art-tabela table, .art-tabela tbody, .art-tabela tr, .art-tabela td { display: block; min-width: 0; }
  .art-tabela thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .art-tabela tr { overflow: hidden; border: 1px solid #dfe8e2; border-radius: var(--radius); }
  .art-tabela tr + tr { margin-top: 10px; }
  .art-tabela td, .art-tabela tbody tr:nth-child(even) td { padding: 3px 14px; border-top: 0; background: none; }
  .art-tabela tbody tr td:first-child { margin-bottom: 6px; padding: 10px 14px; background: #e9f2ec; }
  .art-tabela tbody tr td:last-child { padding-bottom: 12px; }
  .art-tabela td[data-rotulo]:not(:first-child)::before { content: attr(data-rotulo) ": "; font-weight: 700; color: var(--c-green); }
  /* últimos posts em linha: miniatura + título */
  .art-latest .art-latest__list { gap: 16px; padding: 20px; }
  .art-post { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
  .art-post img { grid-column: auto; padding: 6px; }
  .art-post__name { margin-top: 0; padding-left: 0; }
  .art-post__arrow { margin-bottom: 0; }
  .art-cta__btn { flex: 1 1 100%; }
  .art-latest .art-latest__list { grid-template-columns: 1fr; }
}
