/* ============================================================================
   BLOG WEBFORMAS — home, categoria, tag, busca e artigo
   Usa os tokens e componentes de design-system.css / sections.css.
   ============================================================================ */

/* ============================================================ 1. HERO */
.bloghero {
	position: relative; isolation: isolate; overflow: hidden;
	padding: 10.5rem 0 3.25rem;
	background-color: var(--ink-900);
	background-image: linear-gradient(168deg, #1F0A4A 0%, var(--ink-900) 46%, var(--ink-950) 100%);
	color: var(--text-invert);
}
.bloghero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--sp-8); align-items: end; }
.bloghero .crumbs { margin-top: 0; margin-bottom: var(--sp-4); }
.bloghero h1 { font-size: clamp(2.4rem, 3vw, 4rem); line-height: 1; letter-spacing: -.03em; color: #fff; }
.bloghero__sub { margin-top: .5rem; font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 500; color: rgba(255,255,255,.85); }

/* busca */
.blogbusca label { display: block; margin-bottom: .6rem; font-size: .95rem; font-weight: 600; color: #fff; }
.blogbusca__campo {
	display: flex; align-items: center; gap: .6rem;
	padding: .35rem .35rem .35rem 1rem; border-radius: var(--r-md);
	background: #fff; border: 1px solid rgba(255,255,255,.35);
	box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.blogbusca__campo svg { width: 22px; height: 22px; flex: none; color: var(--ink-900); }
.blogbusca__campo input {
	flex: 1; min-width: 0; border: 0; background: none; padding: .55rem 0;
	font: inherit; font-size: .95rem; color: var(--ink-900);
}
.blogbusca__campo input::placeholder { color: var(--slate-400); }
.blogbusca__campo input:focus { outline: none; }
.blogbusca__btn { padding: .7rem 1.25rem; text-transform: none; letter-spacing: 0; font-size: .95rem; box-shadow: none; }

/* ============================================================ 2. FILTRO */
.blogfiltro { background: var(--paper); border-bottom: 1px solid var(--line); }
.blogfiltro__inner { padding-block: var(--sp-5); }
.blogfiltro__rotulo { display: block; margin-bottom: .75rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.blogfiltro__pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill {
	display: inline-flex; align-items: center; gap: .4rem;
	padding: .7rem 1.4rem; border-radius: var(--r-md);
	background: #fff; border: 1px solid var(--line); color: var(--ink-900);
	font-size: .95rem; font-weight: 500; line-height: 1;
	transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.pill:hover { border-color: var(--violet-300); color: var(--violet-600); transform: translateY(-1px); }
.pill.is-active { background: var(--violet-600); border-color: var(--violet-600); color: #fff; font-weight: 600; }
.pill--mais { position: relative; padding: 0; }
.pill--mais summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.4rem; }
.pill--mais summary::-webkit-details-marker { display: none; }
.pill--mais summary svg { width: 16px; height: 16px; color: var(--violet-600); transition: transform var(--t-fast); }
.pill--mais[open] summary svg { transform: rotate(180deg); }
.pill__menu {
	position: absolute; left: 0; top: calc(100% + .5rem); z-index: 20; min-width: 220px;
	display: grid; padding: .5rem; border-radius: var(--r-md);
	background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-lg);
}
.pill__menu a { padding: .6rem .8rem; border-radius: 8px; font-size: .92rem; color: var(--text); }
.pill__menu a:hover, .pill__menu a[aria-current] { background: var(--violet-050); color: var(--violet-600); }

/* ============================================================ 3. MIOLO */
.blog-body { background: var(--paper-2); }
.blogmiolo { padding-block: var(--sp-8) var(--sp-10); }
.blogtitulo { font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.02em; margin-bottom: var(--sp-5); }
.bcat { display: block; font-size: .85rem; font-weight: 600; color: var(--violet-600); }

/* destaque + mais lidos */
.blogtopo { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; margin-bottom: var(--sp-9); }
.destaque { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border-radius: var(--r-xl); }
.destaque__media { display: block; min-height: 100%; }
.destaque__media img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.destaque__body { padding: var(--sp-7) var(--sp-6); display: flex; flex-direction: column; justify-content: center; }
.destaque__body h3 { margin-top: var(--sp-3); font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.12; letter-spacing: -.02em; }
.destaque__body h3 a:hover { color: var(--violet-600); }
.destaque__resumo { margin-top: var(--sp-3); font-size: .95rem; line-height: 1.65; color: var(--text-soft); }
.destaque .btn { margin-top: var(--sp-5); align-self: flex-start; }
.btn--simples { padding: .95rem 1.5rem; text-transform: none; letter-spacing: 0; font-size: 1rem; gap: .7rem; }
.btn--simples .btn__arrow svg { width: 20px; height: 20px; }

.bloglidos { display: grid; gap: var(--sp-4); align-content: start; }
.lido { display: grid; grid-template-columns: 156px minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; padding: var(--sp-3); }
.lido__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: var(--violet-050); }
.lido__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.lido:hover .lido__media img { transform: scale(1.05); }
.lido__body h3 { margin-top: .3rem; font-size: 1.05rem; line-height: 1.3; }
.lido__body h3 a:hover { color: var(--violet-600); }
.lido__seta { width: 22px; height: 22px; margin-right: var(--sp-2); color: var(--violet-600); transition: transform var(--t-fast); }
.lido:hover .lido__seta { transform: translateX(4px); }

/* recentes */
.blogrecentes__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.blogrecentes__head .blogtitulo { margin-bottom: 0; }
.blogordem { padding: .7rem 1.2rem; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); font-size: .92rem; font-weight: 600; color: var(--text); }
.bloggrid { margin-top: var(--sp-5); }
.bcard { overflow: hidden; display: flex; flex-direction: column; padding: var(--sp-3); }
.bcard__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: var(--violet-050); }
.bcard__media img, .bcard__vazio { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.bcard:hover .bcard__media img { transform: scale(1.05); }
.bcard__body { flex: 1; display: flex; flex-direction: column; padding: var(--sp-4) var(--sp-2) var(--sp-2); }
.bcard__body h3 { margin-top: .35rem; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; }
.bcard__body h3 a:hover { color: var(--violet-600); }
.bcard .btn-link { margin-top: auto; padding-top: var(--sp-4); align-self: flex-start; }
.blogvazio { padding: var(--sp-7); border-radius: var(--r-lg); background: #fff; border: 1px dashed var(--line); color: var(--text-soft); text-align: center; }

/* paginação */
.blogpag { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: var(--sp-8); }
.blogpag__num, .blogpag__gap, .blogpag__prox {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
	padding: 0 .75rem; border-radius: 10px; font-size: .95rem; font-weight: 600; color: var(--text);
}
.blogpag__num { transition: background var(--t-fast), color var(--t-fast); }
.blogpag__num:hover { background: var(--violet-050); color: var(--violet-600); }
.blogpag__num.is-active { background: var(--violet-600); color: #fff; }
.blogpag__gap { color: var(--slate-400); }
.blogpag__prox { gap: .5rem; margin-left: .5rem; background: #fff; border: 1px solid var(--line); }
.blogpag__prox svg { width: 18px; height: 18px; }
.blogpag__prox:hover { border-color: var(--violet-300); color: var(--violet-600); }

/* ============================================================ 4. ARTIGO
   Página clara: o cabeçalho fixo ganha fundo escuro já no topo (na home do
   blog ele flutua sobre a hero escura). */
.blog-body--claro .site-header::before { background: var(--ink-900); box-shadow: 0 8px 26px rgba(0, 0, 0, .18); }
.artigo-pagina { padding-top: 10.25rem; }
.artigo-preview { max-width: var(--container); margin: 0 auto var(--sp-5); padding: .75rem 1.25rem; border-radius: var(--r-md); background: #FFF4D6; color: #7A4B00; font-size: .9rem; font-weight: 500; }

/* barra: voltar + compartilhar */
.artigo-topo { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-bottom: var(--sp-5); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-7); }
.artigo-voltar { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 600; color: var(--text-soft); }
.artigo-voltar svg { width: 18px; height: 18px; transition: transform var(--t-fast); }
.artigo-voltar:hover { color: var(--violet-600); }
.artigo-voltar:hover svg { transform: translateX(-3px); }
.artigo-share { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--text-soft); }
.artigo-share > span:first-child { margin-right: .25rem; }
.artigo-share__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--ink-900); transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); cursor: pointer; }
.artigo-share__btn svg { width: 18px; height: 18px; }
.artigo-share__btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--violet-300); }
.artigo-share__btn--wa { color: #1FAF38; }
.artigo-share__btn--in { color: #0A66C2; }
.artigo-share__aviso { font-size: .8rem; font-weight: 500; color: var(--violet-600); min-width: 0; }

/* grade: leitura + lateral fixa */
.artigo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--sp-9); align-items: start; padding-bottom: var(--sp-9); }
.artigo-corpo { min-width: 0; max-width: 46rem; }
.artigo-cab .bcat { margin-bottom: var(--sp-3); }
.artigo-cab h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; color: var(--ink-900); }
.artigo-lead { margin-top: var(--sp-4); font-size: 1.15rem; line-height: 1.6; color: var(--text-soft); }
.artigo-meta { margin-top: var(--sp-4); font-size: .9rem; color: var(--text-soft); }
.artigo-meta strong { color: var(--ink-900); font-weight: 600; }
.artigo-capa { margin: var(--sp-6) 0 var(--sp-7); }
.artigo-capa img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--sh-lg); }
.artigo-capa figcaption { margin-top: .75rem; font-size: .85rem; color: var(--text-soft); text-align: center; }

/* texto */
.prose { font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.25; margin-top: 2em; letter-spacing: -.02em; color: var(--ink-900); }
.prose h3 { font-size: 1.2rem; line-height: 1.35; margin-top: 1.6em; color: var(--ink-900); }
.prose h4 { font-size: 1.05rem; margin-top: 1.4em; }
.prose a { color: var(--violet-600); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--violet-600); }
.prose blockquote { padding: var(--sp-4) var(--sp-5); border-left: 3px solid var(--violet-600); background: var(--violet-050); border-radius: 0 var(--r-md) var(--r-md) 0; font-weight: 500; color: var(--ink-900); }
.prose code { padding: .1em .35em; border-radius: 4px; background: #EEE9FB; font-size: .9em; }
.prose pre { padding: var(--sp-4); border-radius: var(--r-md); background: var(--ink-900); color: #fff; overflow: auto; }

/* FAQ e fecho */
.artigo-faq { margin-top: var(--sp-8); }
.artigo-faq h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); letter-spacing: -.02em; color: var(--ink-900); margin-bottom: var(--sp-5); }
.artigo-faq .accordion__panel p { font-size: 1rem; line-height: 1.75; }
.artigo-faq .accordion__panel p + p { margin-top: .75em; }
.artigo-fecho { margin-top: var(--sp-8); padding: var(--sp-5) var(--sp-6); border-radius: var(--r-lg); background: var(--violet-050); border: 1px solid #E3DBF8; font-size: 1.05rem; line-height: 1.65; color: var(--ink-900); }
.artigo-fecho a { color: var(--violet-600); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.artigo__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--sp-6); }
.artigo__tags a { padding: .4rem .8rem; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-size: .85rem; color: var(--text-soft); }
.artigo__tags a:hover { border-color: var(--violet-300); color: var(--violet-600); }

/* lateral */
.artigo-lateral { min-width: 0; position: sticky; top: 6.5rem; } /* se for mais alta que a tela, o JS baixa o top para grudar pelo rodapé */
.artigo-lateral__fixo { display: grid; gap: var(--sp-5); }
.lateral-bloco { padding: var(--sp-5); }
.lateral-bloco__titulo { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 700; color: var(--ink-900); margin-bottom: var(--sp-4); }
.lateral-bloco__titulo svg { width: 20px; height: 20px; color: var(--violet-600); flex: none; }
.toc__lista { list-style: none; padding: 0; margin: 0; position: relative; }
.toc__lista::before { content: ""; position: absolute; left: 5px; top: .7rem; bottom: .7rem; width: 2px; background: var(--line); }
.toc__lista li { position: relative; padding-left: 1.4rem; }
.toc__lista li + li { margin-top: .55rem; }
.toc__lista li::before { content: ""; position: absolute; left: 0; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: border-color var(--t-fast), background var(--t-fast); }
.toc__lista a { display: block; font-size: .9rem; line-height: 1.45; color: var(--text-soft); transition: color var(--t-fast); }
.toc__lista a:hover { color: var(--violet-600); }
.toc__lista li.is-active::before { border-color: var(--violet-600); background: var(--violet-600); }
.toc__lista li.is-active a { color: var(--ink-900); font-weight: 600; }
.toc__topo { display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); width: 100%; font-size: .85rem; font-weight: 600; color: var(--violet-600); }
.toc__topo svg { width: 15px; height: 15px; }
.lateral-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.lateral-tags a { padding: .35rem .75rem; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--line); font-size: .82rem; font-weight: 500; color: var(--text); }
.lateral-tags a:hover { border-color: var(--violet-300); color: var(--violet-600); background: #fff; }
.lateral-cta { padding: var(--sp-5); border-radius: var(--r-xl); background: linear-gradient(160deg, var(--violet-600), #4C1D95); color: #fff; box-shadow: 0 18px 40px rgba(109, 40, 217, .28); }
.lateral-cta h2 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.02em; color: #fff; }
.lateral-cta p { margin-top: var(--sp-3); font-size: .95rem; line-height: 1.6; color: rgba(255,255,255,.86); }
.lateral-cta .btn { margin-top: var(--sp-5); width: 100%; justify-content: center; padding-right: 12px; font-size: .74rem; letter-spacing: .03em; }
.lateral-cta .btn__label { white-space: nowrap; }

.leiatambem { padding-bottom: var(--sp-10); }

/* ============================================================ RESPONSIVO */
@media (max-width: 1024px) {
	.bloghero__inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
	.blogtopo { grid-template-columns: minmax(0, 1fr); }
	.bloggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.artigo-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
	.artigo-corpo { max-width: none; }
	.artigo-lateral { position: static; top: auto !important; }
	.artigo-lateral__fixo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.artigo-lateral__fixo .lateral-cta { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.bloghero { padding-top: 8rem; }
	.destaque { grid-template-columns: minmax(0, 1fr); }
	.destaque__media img { min-height: 0; aspect-ratio: 16 / 10; }
	.bloggrid { grid-template-columns: minmax(0, 1fr); }
	.lido { grid-template-columns: 110px minmax(0, 1fr) auto; }
	.blogbusca__btn .btn__label { padding-inline: .25rem; }
	.blogpag__num:not(.is-active):not(:first-child):not(:last-child) { display: none; }
	.artigo-pagina { padding-top: 10rem; }
	.artigo-lateral__fixo { grid-template-columns: minmax(0, 1fr); }
	.prose { font-size: 1rem; }
	.artigo-fecho { padding: var(--sp-4) var(--sp-5); }
}
