/* ==========================================================================
   Blog Líder School Brasil — usa os tokens e componentes de styles.css.
   Não define cores novas: tudo vem da identidade oficial.
   ========================================================================== */

/* ---- Cabeçalho das páginas de lista ---------------------------------- */
.breadcrumb { margin-bottom: 1.25rem; font-size: var(--fs-sm); color: var(--color-text-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: #a9a8cf; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb a:hover { color: var(--ls-purple); }
.breadcrumb [aria-current="page"] { color: var(--ls-ink); font-weight: 500; }

.blog-hero { background: linear-gradient(180deg, var(--ls-mist), #fff); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--color-border); }
.blog-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; font-weight: 800; max-width: 22ch; }
.blog-hero .lead { margin-top: 1rem; max-width: 62ch; font-size: var(--fs-lead); color: var(--color-text-muted); }

.blog-search { display: flex; gap: .6rem; margin-top: 1.5rem; max-width: 560px; }
.blog-search input {
  flex: 1; min-width: 0; min-height: 52px; padding: .7rem 1.1rem; border: 1.5px solid #cfcde3; border-radius: var(--radius-pill);
  background: #fff; font-size: 1rem;
}
.blog-search input:focus { outline: none; border-color: var(--ls-purple); box-shadow: 0 0 0 4px rgba(132, 34, 225, .18); }
@media (max-width: 480px) { .blog-search { flex-direction: column; } .blog-search .btn { width: 100%; } }

.chips { margin-top: 1.5rem; }
.chips ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: .35rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: #fff; font-size: var(--fs-sm); font-weight: 700; color: var(--ls-dark-navy);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.chips a:hover { border-color: var(--ls-purple); color: var(--ls-purple); }
.chips a[aria-current="page"] { background: var(--ls-dark-navy); border-color: var(--ls-dark-navy); color: #fff; }

.section-label { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ls-purple); margin-bottom: 1.25rem; }

/* ---- Cards ------------------------------------------------------------ */
.blog-list { padding-block: clamp(2rem, 5vw, 3.5rem); }
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
}
.post-card:hover, .post-card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: #d6c3f3; }
.post-card-img { display: block; aspect-ratio: 1200 / 630; background: var(--ls-dark-navy); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1.4rem 1.5rem; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.3rem; line-height: 1.25; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--ls-purple); }
.post-card p:not(.post-meta) { color: var(--color-text-muted); font-size: 1rem; }
.post-meta { margin-top: auto; padding-top: .4rem; font-size: var(--fs-sm); color: var(--color-text-muted); }
.post-cat {
  align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ls-purple);
  min-height: 28px; display: inline-flex; align-items: center;
}
.post-cat:hover { text-decoration: underline; text-underline-offset: 3px; }

.blog-featured { padding-top: clamp(2rem, 5vw, 3rem); }
.featured-card {
  display: grid; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
}
.featured-img { display: block; background: var(--ls-dark-navy); aspect-ratio: 1200 / 630; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: clamp(1.4rem, 4vw, 2.4rem); justify-content: center; }
.featured-body h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; }
.featured-body h3 a:hover { color: var(--ls-purple); }
.featured-body p:not(.post-meta) { color: var(--color-text-muted); }
.featured-body .post-meta { margin-top: 0; padding-top: 0; }
@media (min-width: 900px) { .featured-card { grid-template-columns: 1.1fr 1fr; } .featured-img { aspect-ratio: auto; min-height: 100%; } }

/* ---- Paginação ---------------------------------------------------------- */
.pagination { margin-top: 2.5rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 1rem;
  border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-weight: 700; background: #fff;
}
.pagination a:hover { border-color: var(--ls-purple); color: var(--ls-purple); }
.pagination a[aria-current="page"] { background: var(--ls-dark-navy); border-color: var(--ls-dark-navy); color: #fff; }

/* ---- Faixa final -------------------------------------------------------- */
.blog-cta { padding-block: clamp(2.5rem, 6vw, 4rem); text-align: center; position: relative; overflow: hidden; }
.blog-cta::before { content: ""; position: absolute; top: 0; bottom: 0; left: 6%; width: 8%; transform: skewX(-24deg); background: var(--ls-gradient-phoenix); opacity: .22; pointer-events: none; }
.blog-cta .wrap { position: relative; max-width: 760px; }
.blog-cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: #fff; }
.blog-cta p { margin-top: .8rem; color: var(--ls-on-navy); }
.blog-cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.6rem; }
.blog-hero .blog-cta-actions { justify-content: flex-start; }

/* ---- Artigo ------------------------------------------------------------- */
.post-head { padding-block: clamp(1.75rem, 4vw, 3rem) 1.5rem; }
.post-head .wrap { max-width: 860px; }
.post-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.1; font-weight: 800; margin-top: .3rem; }
.post-dek { margin-top: 1rem; font-size: var(--fs-lead); color: var(--color-text-muted); max-width: 62ch; }
.post-byline { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin-top: 1.25rem; font-size: var(--fs-sm); color: var(--color-text-muted); }
.post-cover { max-width: 860px; margin: 0 auto 2rem; border-radius: var(--radius-md); overflow: hidden; background: var(--ls-dark-navy); aspect-ratio: 1200 / 630; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-layout { display: grid; gap: 1.5rem; max-width: 1060px; padding-bottom: 3rem; }
.toc { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--ls-mist); }
.toc summary { cursor: pointer; list-style: none; padding: .85rem 1.1rem; min-height: var(--tap); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: transform var(--dur-base) var(--ease-out); }
.toc details[open] summary::after { transform: rotate(45deg); }
.toc ol { padding: 0 1.1rem 1rem; display: grid; gap: .1rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: block; padding: .45rem 0 .45rem .1rem; font-size: var(--fs-sm); line-height: 1.35; color: var(--color-text-muted);
  border-left: 3px solid transparent; padding-left: .6rem; margin-left: -.6rem;
}
.toc a:hover { color: var(--ls-purple); }
.toc a[aria-current="true"] { color: var(--ls-dark-navy); font-weight: 700; border-left-color: var(--ls-purple); }
@media (min-width: 1024px) {
  .post-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; }
  .toc-wrap { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; max-height: calc(100dvh - var(--header-h) - 3rem); overflow-y: auto; }
}

.post-main { min-width: 0; max-width: 720px; }
.post-body { font-size: 1.125rem; line-height: 1.78; }
.post-body > * + * { margin-top: 1.25rem; }
.post-body h2 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.18; margin-top: 2.6rem; padding-top: .4rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.post-body h3 { font-size: 1.3rem; line-height: 1.25; margin-top: 1.9rem; }
.post-body h2 + *, .post-body h3 + * { margin-top: .8rem; }
.post-body ul, .post-body ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li::marker { color: var(--ls-purple); font-weight: 700; }
.post-body a { color: var(--ls-purple); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--ls-purple-hover); text-decoration-color: var(--ls-red-pink); }
.post-body strong { color: var(--ls-dark-navy); }
.post-body blockquote { border-left: 4px solid var(--ls-purple); padding: .4rem 0 .4rem 1.2rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--ls-dark-navy); }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.table-wrap:focus-visible { outline-offset: 2px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 460px; }
.post-body th, .post-body td { text-align: left; padding: .75rem 1rem; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.post-body thead th { background: var(--ls-dark-navy); color: #fff; font-size: .9rem; }
.post-body tbody th { font-weight: 700; color: var(--ls-dark-navy); white-space: nowrap; }
.post-body tbody tr:last-child th, .post-body tbody tr:last-child td { border-bottom: 0; }
.post-body tbody tr:nth-child(even) { background: var(--ls-mist); }

.post-sources { margin-top: 3rem; padding: 1.5rem; background: var(--ls-mist); border-radius: var(--radius-md); }
.post-sources h2 { font-size: 1.35rem; }
.post-sources ol { margin-top: 1rem; padding-left: 1.3rem; list-style: decimal; display: grid; gap: .6rem; font-size: var(--fs-sm); }
.post-sources a { color: var(--ls-purple); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-sources .note { margin-top: 1.1rem; font-size: .875rem; color: var(--color-text-muted); }

.post-cta { margin-top: 2rem; padding: clamp(1.4rem, 4vw, 2rem); border-radius: var(--radius-md); background: var(--ls-gradient-hero); color: #fff; position: relative; overflow: hidden; }
.post-cta::after { content: ""; position: absolute; right: -5%; top: 0; bottom: 0; width: 10%; transform: skewX(-24deg); background: var(--ls-gradient-phoenix); opacity: .85; pointer-events: none; }
.post-cta p { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; font-weight: 600; max-width: 38ch; }
.post-cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.post-cta .btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.post-cta .btn-ghost:hover { background: #fff; color: var(--ls-dark-navy); }
@media (max-width: 599px) { .post-cta-actions .btn { width: 100%; } }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.share-label { font-weight: 700; margin-right: .3rem; }
.share a, .share button {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  background: #fff; font: 700 var(--fs-sm)/1 var(--font-body); color: var(--ls-dark-navy); cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--ls-purple); color: var(--ls-purple); }
.share-status { font-size: var(--fs-sm); color: var(--ls-success); }
.back { margin-top: 1.5rem; }
.related { background: var(--ls-mist); }

/* ---- Páginas de texto ------------------------------------------------------ */
.prose { max-width: 720px; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.prose ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .5rem; }
.prose li::marker { color: var(--ls-purple); }
.search-status { margin-top: 1rem; color: var(--color-text-muted); }

/* ---- Rodapé do blog reaproveita .footer de styles.css -------------------- */
@media (prefers-reduced-motion: reduce) { .post-card, .chips a { transition: none; } .post-card:hover { transform: none; } }

/* ---- Ajustes de alinhamento do artigo (cabeçalho, capa e texto na mesma grade) ---- */
.breadcrumb li:last-child { max-width: min(46ch, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc a { padding-top: .35rem; padding-bottom: .35rem; }
@media (min-width: 1024px) {
  .post-head .wrap, .post-layout { max-width: 1060px; }
  .post-head h1 { max-width: 24ch; }
  .post-cover { max-width: none; aspect-ratio: 21 / 9; }
}

/* Caixa do autor (aparece só quando o artigo tem author_bio) */
.post-author { margin-top: 2.5rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--ls-purple); background: var(--ls-mist); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.post-author-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ls-navy, #1F2048); }
.post-author-bio { margin-top: .25rem; font-size: var(--fs-sm); color: var(--color-text-muted); line-height: 1.55; }
