/* Blog: lista, artigo e página do autor. Usa a base do site.css. */

/* ---------- autor (pedaços reutilizados) ---------- */
.byline { display: flex; align-items: center; gap: 12px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 2px 8px rgba(13, 31, 23, .12); }
.byline b { display: block; font: 700 15px/1.2 var(--display); color: var(--ink); }
.byline small { display: block; font-size: 13px; color: var(--muted); }
.byline a { color: inherit; }
.byline a:hover b { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- topo do artigo ---------- */
.post-hero { position: relative; overflow: hidden; padding: 40px 0 48px; background: linear-gradient(180deg, var(--pinho-tint), var(--canvas)); border-bottom: 1px solid var(--line-soft); }
.post-hero::after { content: ""; position: absolute; right: -90px; bottom: -150px; width: 340px; height: 380px; background: var(--honey); opacity: .22; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); pointer-events: none; }
.post-hero .container { position: relative; z-index: 1; }
.post-hero-in { max-width: 860px; display: grid; gap: 18px; }
.post-tag { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--pinho-d); }
.post-tag::before { content: ""; width: 8px; height: 9px; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.post-hero h1 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.post-hero .lead { font-size: 19px; max-width: 720px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 6px; }
.post-meta .meta-sep { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.post-meta .meta-sep span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- corpo + coluna lateral ---------- */
.post-body { padding: 48px 0 24px; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
.post-main { min-width: 0; max-width: 740px; }
.post-side { position: sticky; top: 96px; display: grid; gap: 18px; }

.side-card { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.side-toc b, .side-share b { display: block; margin-bottom: 10px; font: 700 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; max-height: 46vh; overflow: auto; }
.side-toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .2s, border-color .2s; }
.side-toc a:hover { color: var(--ink); }
.side-toc a.on { border-left-color: var(--pinho); color: var(--ink); font-weight: 600; }
.side-cta { display: grid; gap: 10px; padding: 24px 22px; border-radius: 22px; background: var(--deep); color: #fff; }
.side-cta img { width: 64px; height: 64px; margin: -4px 0 0 -4px; }
.side-cta b { font: 700 19px/1.25 var(--display); }
.side-cta p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.side-cta .btn { justify-self: start; margin-top: 4px; background: var(--lime); color: var(--on-lime); box-shadow: none; }
.share { display: flex; gap: 8px; }
.share a, .share button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-soft); color: var(--ink); cursor: pointer; transition: background .2s; }
.share a:hover, .share button:hover { background: var(--pinho-tint); }
.share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share img { width: 18px; height: 18px; }
.share .copied { background: var(--pinho-tint); color: var(--pinho-d); }

/* índice no celular */
.toc-mobile { display: none; margin-bottom: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.toc-mobile summary { padding: 16px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::after { content: "+"; color: var(--pinho); }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile ol { margin: 0; padding: 0 18px 16px 36px; display: grid; gap: 8px; }
.toc-mobile a { color: var(--pinho-d); font-size: 15px; }

/* ---------- texto ---------- */
.prose { font-size: 17.5px; line-height: 1.72; color: var(--body); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 48px; font-size: clamp(24px, 2.6vw, 31px); line-height: 1.18; letter-spacing: -.02em; color: var(--ink); scroll-margin-top: 96px; }
.prose h3 { margin-top: 30px; font-size: 20px; line-height: 1.3; color: var(--ink); }
.prose p { margin-bottom: 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--pinho-d); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; margin-bottom: 0; }
.prose li::marker { color: var(--pinho); font-weight: 700; }
.prose .table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.prose thead th { font: 700 12.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose tbody th { color: var(--ink); font-weight: 700; }
.prose figure { margin: 28px 0 0; }
.prose figure img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.prose figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); text-align: center; }

.callout { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 18px 20px; border-radius: 18px; background: var(--pinho-tint); border: 1px solid var(--line-soft); font-size: 16px; line-height: 1.6; }
.callout::before { content: ""; width: 28px; height: 28px; border-radius: 9px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23277065' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2Z'/%3E%3C/svg%3E") center / 16px no-repeat; }
.callout.warn { background: var(--note-bg); border-color: var(--note-line); }
.callout.warn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a06a00' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3C/svg%3E"); }
.callout b:first-child { display: block; margin-bottom: 2px; color: var(--ink); }

.msg-figure { display: grid; gap: 8px; padding: 22px; border-radius: 22px; background: var(--pinho-tint); border: 1px solid var(--line-soft); }
.msg-figure .bub { font-size: 15px; max-width: 80%; }
.msg-figure .pill { margin-top: 6px; }
.msg-label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* chamada no meio do texto */
.post-banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; margin-top: 36px !important; padding: 26px 28px; border-radius: 24px; background: var(--grad); color: #fff; }
.post-banner b { display: block; font: 700 22px/1.2 var(--display); }
.post-banner p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.prose .post-banner a { text-decoration: none; }
.post-banner .btn { background: var(--lime); color: var(--on-lime); box-shadow: none; white-space: nowrap; }
.post-banner .mels { display: flex; margin-bottom: 12px; }
.post-banner .mels img { width: 40px; height: 40px; margin-right: -8px; }

/* perguntas frequentes do artigo */
.post-faq { margin-top: 52px; }
.post-faq h2 { margin-bottom: 18px; font-size: clamp(24px, 2.6vw, 31px); letter-spacing: -.02em; }
.post-faq .faq-list { max-width: none; }

/* caixa do autor no fim */
.author-box { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start; margin-top: 48px; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.author-box .kicker { margin-bottom: 6px; }
.author-box b { display: block; font: 700 21px/1.2 var(--display); color: var(--ink); }
.author-box small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.author-box p { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--body); }
.author-box a.more { display: inline-flex; margin-top: 12px; font-weight: 700; color: var(--pinho-d); }

.sources { margin-top: 32px; padding: 20px 22px; border-radius: 18px; background: var(--soft); font-size: 14px; color: var(--muted); }
.sources b { display: block; margin-bottom: 8px; color: var(--ink); }
.sources ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.sources a { color: var(--pinho-d); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }

/* ---------- cartões de artigo ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { position: relative; display: flex; flex-direction: column; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-vis { position: relative; display: grid; place-items: center; height: 168px; background: var(--pinho-tint); overflow: hidden; }
.card-vis::before { content: ""; position: absolute; width: 190px; height: 214px; background: var(--honey); opacity: .45; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.card-vis img { position: relative; width: 112px; height: 112px; filter: drop-shadow(0 12px 16px rgba(13, 31, 23, .2)); transition: transform .4s var(--ease); }
.post-card:hover .card-vis img { transform: translateY(-4px) rotate(-3deg); }
.card-vis.t-whatsapp { background: #e3f4ea; }
.card-vis.t-clinicas { background: #e6f1f5; }
.card-vis.t-ia { background: #ece9f8; }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.card-body .post-tag { align-self: flex-start; padding: 4px 10px; font-size: 12px; }
.post-card h2, .post-card h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; font-size: 15px; color: var(--body); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.card-foot .byline img { width: 28px; height: 28px; border-width: 1px; }
.card-foot .byline b { font-size: 13px; }

/* destaque na lista */
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured .card-vis { flex: 0 0 44%; height: auto; min-height: 320px; }
.post-card.featured .card-vis img { width: 168px; height: 168px; }
.post-card.featured .card-vis::before { width: 280px; height: 316px; }
.post-card.featured .card-body { padding: 36px 40px; justify-content: center; }
.post-card.featured h2 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.12; letter-spacing: -.02em; }
.post-card.featured p { font-size: 16.5px; }

/* ---------- capa do blog e página do autor ---------- */
.blog-hero { padding: 40px 0 8px; }
.blog-hero h1 { font-size: clamp(36px, 4.6vw, 60px); font-weight: 800; line-height: 1.03; letter-spacing: -.03em; max-width: 820px; margin-top: 14px; }
.blog-hero .lead { margin-top: 16px; max-width: 640px; font-size: 18px; }
.blog-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.blog-topics span { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--body); }

.author-hero { padding: 40px 0 16px; }
.author-card { display: grid; grid-template-columns: 160px 1fr; gap: 36px; align-items: center; padding: 36px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.author-card img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.author-card h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.author-card .role { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--pinho-d); }
.author-card p { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: var(--body); max-width: 640px; }

@media (max-width: 1100px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
}
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-main { max-width: none; }
  .post-side { position: static; grid-template-columns: 1fr 1fr; }
  .side-toc { display: none; }
  .toc-mobile { display: block; }
  .post-card.featured { flex-direction: column; }
  .post-card.featured .card-vis { min-height: 220px; }
  .post-card.featured .card-body { padding: 24px; }
}
@media (max-width: 720px) {
  .posts { grid-template-columns: 1fr; }
  .post-side { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
  .post-banner { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; padding: 26px; gap: 20px; }
  .author-card img { width: 112px; height: 112px; }
  .post-hero::after { width: 200px; height: 225px; right: -80px; }
}

/* ---------- capas ---------- */
.post-cover { margin: 0 0 32px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--line); }
.card-cover { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--pinho-tint); border-bottom: 1px solid var(--line-soft); }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .card-cover img { transform: scale(1.03); }
.post-card.featured { align-items: center; }
.post-card.featured .card-cover { flex: 0 0 56%; align-self: stretch; display: grid; place-items: center; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line-soft); }
.post-card.featured .card-cover img { height: auto; aspect-ratio: 1200 / 630; object-fit: contain; }
@media (max-width: 960px) {
  .post-card.featured .card-cover { aspect-ratio: 1200 / 630; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
