/*
Theme Name: Clareza
Theme URI: https://en.fleshcard.com/
Author: Analice de Lima Santos
Description: Tema leve e neutro para portais de conteúdo informativo. Cards arredondados, destaque na home, lista de tendências, áreas para anúncios e rodapé com dados da empresa e avisos legais. Cores e textos editáveis em Aparência > Personalizar.
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clareza
*/

:root {
	--accent: #0e9f6e;
	--accent-dark: #0b7f58;
	--accent-soft: #e3f6ee;
	--text: #111827;
	--muted: #5b6474;
	--line: #e7e9ee;
	--bg: #f6f7f9;
	--card: #ffffff;
	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 6px 20px rgba(17, 24, 39, .06);
	--wrap: 1120px;
	--read: 740px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 999; top: 8px; left: 8px;
	background: #fff; padding: 8px 12px; border-radius: 8px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap--read { max-width: var(--read); }

/* ---------- Header ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
	position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 64px; gap: 16px;
}
.site-brand { display: flex; align-items: center; }
.site-brand img { max-height: 40px; width: auto; }
.site-title { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.site-title:hover { text-decoration: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav a {
	display: block; padding: 8px 12px; border-radius: 999px;
	color: var(--text); font-size: .95rem; font-weight: 600;
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.main-nav .search-form { display: none; }

.menu-toggle {
	display: none; width: 42px; height: 42px; border-radius: 12px;
	border: 1px solid var(--line); background: #fff; cursor: pointer;
	align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
	display: block; width: 18px; height: 2px; background: var(--text); position: relative; content: "";
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
	.menu-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 18px;
		box-shadow: 0 12px 24px rgba(0,0,0,.06);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 2px; }
	.main-nav a { border-radius: 10px; padding: 12px; }
	.main-nav .search-form { display: flex; margin-top: 10px; }
}

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line);
	border-radius: 12px; font: inherit; font-size: 1rem; background: #fff;
}
.search-submit {
	border: 0; border-radius: 12px; padding: 0 18px; font: inherit; font-weight: 700;
	background: var(--accent); color: #fff; cursor: pointer;
}

/* ---------- Generic pieces ---------- */
.site-main { padding: 20px 0 48px; }
.chip {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-dark);
	font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.chip:hover { text-decoration: none; filter: brightness(.97); }
.meta { color: var(--muted); font-size: .88rem; }
.meta .dot { margin: 0 6px; }

.btn {
	display: block; width: 100%; text-align: center;
	padding: 14px 20px; border-radius: 999px;
	background: var(--accent); color: #fff; font-weight: 800; font-size: 1rem;
	border: 2px solid var(--accent); transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; color: #fff; }
.btn:active { transform: scale(.99); }
.btn--ghost { background: #fff; color: var(--accent-dark); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }

.card {
	background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
	overflow: hidden; display: flex; flex-direction: column;
}
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--accent-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 1.15rem; margin: 0; }
.card__title a { color: var(--text); }
.card__excerpt { color: var(--muted); font-size: .95rem; margin: 0; }
.card__excerpt p { margin: 0; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__more { font-weight: 800; font-size: .92rem; white-space: nowrap; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 16px; }
.section-head h2 { font-size: 1.4rem; margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Home ---------- */
.home-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.hero .card__body { padding: 22px 22px 24px; gap: 12px; }
.hero .card__title { font-size: 1.7rem; }
.hero__actions { display: grid; gap: 10px; margin-top: 6px; }

.trending { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.trending__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.trending__head h2 { font-size: 1.15rem; margin: 0; }
.trending ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending li { counter-increment: t; border-top: 1px solid var(--line); }
.trending li:first-child { border-top: 0; }
.trending li a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; color: var(--text); }
.trending li a:hover { text-decoration: none; }
.trending li a:hover strong { color: var(--accent-dark); }
.trending li a::before {
	content: counter(t); width: 30px; height: 30px; border-radius: 9px;
	background: var(--accent-soft); color: var(--accent-dark);
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem;
}
.trending strong { display: block; font-size: .96rem; line-height: 1.35; }
.trending small { color: var(--muted); font-size: .8rem; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cat-chips a {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
	background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .92rem;
}
.cat-chips a:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.cat-chips span { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 0 8px; font-size: .78rem; font-weight: 800; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

@media (max-width: 960px) {
	.home-top { grid-template-columns: 1fr; }
	.grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	body { font-size: 16.5px; }
	.grid { grid-template-columns: 1fr; gap: 18px; }
	.hero .card__title { font-size: 1.4rem; }
	.section-head { flex-direction: column; gap: 2px; }
}

/* ---------- Archive header ---------- */
.archive-head { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 8px; }
.archive-head h1 { font-size: 1.6rem; margin: 6px 0 4px; }
.archive-head p { margin: 0; color: var(--muted); }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 700;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Single ---------- */
.article { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.article__head { padding: 26px 26px 6px; }
.article__title { font-size: 2rem; margin: 12px 0 10px; }
.article__media { margin: 18px 0 0; }
.article__media img { width: 100%; }
.article__media figcaption { font-size: .82rem; color: var(--muted); padding: 6px 26px 0; }
.entry-content { padding: 8px 26px 26px; }
.entry-content > * { margin: 0 0 1.15em; }
.entry-content h2 { font-size: 1.45rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote {
	margin-left: 0; padding: 14px 18px; border-left: 4px solid var(--accent);
	background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px; text-align: left; }
.entry-content th { background: var(--bg); }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; padding: 14px 26px; }
.entry-content a:not(.wp-block-button__link) { text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: var(--radius-sm); }

.ad-slot { margin: 20px 0; text-align: center; min-height: 1px; }
.ad-slot .widget { margin: 0; }

.notice-box {
	margin: 0 26px 26px; padding: 16px 18px; border-radius: var(--radius-sm);
	background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: .88rem; line-height: 1.55;
}
.notice-box strong { color: var(--text); display: block; margin-bottom: 4px; }
.post-tags { padding: 0 26px 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags a { font-size: .82rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.comments-area { margin-top: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

@media (max-width: 620px) {
	.article__head { padding: 20px 18px 4px; }
	.article__title { font-size: 1.55rem; }
	.entry-content { padding: 6px 18px 20px; }
	.notice-box { margin: 0 18px 20px; }
	.post-tags { padding: 0 18px 18px; }
	.article__media figcaption { padding: 6px 18px 0; }
}

/* ---------- Page / 404 ---------- */
.page-plain { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state h1 { font-size: 1.8rem; }
.empty-state .search-form { max-width: 460px; margin: 18px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 24px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h3 { font-size: .95rem; color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-dark); }
.footer-company strong { color: var(--text); }
.footer-company p { margin: 8px 0 0; }
.footer-legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; font-size: .84rem; line-height: 1.6; }
.footer-legal strong { color: var(--text); }
.footer-legal p { margin: 4px 0 0; }
.footer-copy { margin-top: 20px; font-size: .82rem; text-align: center; }

@media (max-width: 760px) {
	.footer-grid { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- WP core classes ---------- */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }
.sticky .chip { background: var(--accent); color: #fff; }

/* ---------- v1.1: layout do post ---------- */
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; max-width: 1080px; margin: 0 auto; }
.single-layout--full { grid-template-columns: minmax(0, 1fr); max-width: var(--read); }
.single-layout .article__head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin: 0 26px; padding-left: 0; padding-right: 0; }
.single-layout .entry-content { padding-top: 22px; }
.single-side { position: sticky; top: 84px; }
.single-side .trending li a { padding: 10px 0; }
.related { max-width: 1080px; margin: 0 auto; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--4 .card__excerpt { display: none; }
.grid--4 .card__title { font-size: 1rem; }

/* Caixa de chamada */
.cta-box {
	border: 1px solid var(--line); border-left: 4px solid var(--accent);
	background: linear-gradient(0deg, var(--card), var(--accent-soft));
	border-radius: var(--radius-sm); padding: 18px; display: grid; gap: 12px;
}
.cta-box p { margin: 0; font-weight: 600; }
.cta-box .chip { justify-self: start; }
.entry-content .cta-box .btn { text-decoration: none; color: #fff; }

/* Perguntas frequentes (bloco Detalhes) */
.entry-content details {
	border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; margin-bottom: 10px; background: var(--card);
}
.entry-content details summary {
	cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; list-style: none; position: relative;
}
.entry-content details summary::-webkit-details-marker { display: none; }
.entry-content details summary::after {
	content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
	width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
	display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.entry-content details[open] summary::after { content: "–"; }
.entry-content details > *:not(summary) { padding: 0 16px 14px; margin: 0; }

/* Anúncios do plugin dentro do texto: respiro e rótulo discreto */
.entry-content winupads, .entry-content .ad-slot { display: block; margin: 26px auto; text-align: center; }

@media (max-width: 960px) {
	.single-layout { grid-template-columns: minmax(0, 1fr); max-width: var(--read); }
	.single-side { position: static; }
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	.single-layout .article__head { margin: 0 18px; }
	.grid--4 { grid-template-columns: 1fr; }
	.grid--4 .card__excerpt { display: block; }
}

/* ---------- v1.2: quiz de entrada ---------- */
html.cq-open { overflow: hidden; }
html.cq-open .site-header, html.cq-open .site-main, html.cq-open .site-footer { filter: blur(6px); }
.cq {
	position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(15, 23, 42, .35);
}
.cq__box {
	position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 22px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .25); padding: 22px 20px 16px;
	animation: cq-in .25s ease-out;
}
@keyframes cq-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.cq__close {
	position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
	border: 0; background: var(--bg); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.cq__brand { display: flex; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.cq__brand img { max-height: 30px; width: auto; }
.cq__bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 18px; }
.cq__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s; }
.cq__q { font-size: 1.12rem; font-weight: 800; line-height: 1.35; margin: 0 0 14px; }
.cq__opt {
	display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 14px 16px;
	border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--text);
	font: inherit; font-weight: 600; font-size: .98rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.cq__opt:hover, .cq__opt:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.cq__done { font-size: 1.25rem; font-weight: 800; text-align: center; margin: 4px 0 6px; }
.cq__note { text-align: center; color: var(--muted); margin: 0 0 16px; }
.cq__go { cursor: pointer; font: inherit; font-weight: 800; }
.cq__legal { margin: 14px 0 0; font-size: .72rem; line-height: 1.45; color: var(--muted); text-align: center; }

/* v1.2.1: camadas do preloader nunca bloqueiam toques depois de sumir */
.sl-pl-loaded .sl-pl-back, .sl-pl-back-fade[style*="opacity: 0"], html.cq-open [class*="sl-pl-"] { pointer-events: none !important; }

/* v1.2.5: espaço extra entre anúncios e botões (evita clique acidental) */
.entry-content winupads + .cta-box, .entry-content .cta-box + winupads { margin-top: 40px; }

/* v1.3: quiz como tela de aceite do recompensado */
.cq__skip { display: block; margin: 12px auto 0; background: none; border: 0; padding: 6px; font: inherit; font-size: .85rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.cq-reward { margin: 0 0 22px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent); }
.cq-reward__title { margin: 0 0 8px !important; font-weight: 800; color: var(--accent-dark); }
.cq-reward ol { margin: 0; padding-left: 1.2em; }
.cq-reward li { margin-bottom: .35em; }

/* v1.4: quiz no mesmo padrão visual da referência */
.cq { --cq-navy: #1a237e; }
.cq__box { max-width: 400px; border-radius: 12px; padding: 18px 16px 14px; text-align: center; }
.cq__brand img { max-height: 40px; }
.cq__q { text-align: left; }
.cq__opt {
	text-align: center; border: 0; border-radius: 10px; padding: 15px 12px;
	background: var(--cq-navy); color: #fff; font-weight: 500;
}
.cq__opt:hover, .cq__opt:focus-visible { background: #283593; color: #fff; border: 0; }
.cq--final .cq__bar { display: none; }
.cq__done { font-size: 1.2rem; font-weight: 700; line-height: 1.65; color: #000; margin: 6px 0 4px; }
.cq__note { color: #444; font-size: 1rem; margin: 0 0 18px; }
.cq__go {
	display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
	border: 0; border-radius: 10px; padding: 20px 10px; background: var(--cq-navy); color: #fff;
	font: inherit; font-size: 1rem; cursor: pointer; transition: background .15s;
}
.cq__go:hover { background: #283593; }
.cq__go i { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.22); color: #ffca28; align-items: center; justify-content: center; }
.cq__go svg { width: 12px; height: 12px; margin-left: 2px; }
.cq__legal { font-size: .7rem; color: #868686; margin-top: 14px; }

.cq__go:focus:not(:focus-visible) { outline: none; }

a.cq__go, a.cq__go:hover { color: #fff; text-decoration: none; }
