/*
Theme Name: CAE Blog
Theme URI: https://blog.cae.ong.br
Author: Casa de Amor e Esperança
Description: Tema do blog da Casa de Amor e Esperança, com a identidade visual de cae.ong.br.
Version: 1.1.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: cae-blog
*/

:root {
	--navy: #15274b;
	--navy-soft: #2a3b5e;
	--gold: #d9a23d;
	--gold-dark: #b8862a;
	--ember: #f26b43;
	--ivory: #fbf8f3;
	--warm: #f5f0e8;
	--line: #e5dccb;
	--muted: #59657a;
	--white: #fff;
	--serif: "Cormorant Garamond", Georgia, serif;
	--sans: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--wrap: 1120px;
	--read: 700px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ivory);
	color: var(--navy);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.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: 100; top: 8px; left: 8px;
	background: var(--white); padding: 10px 16px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(251, 248, 243, .94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.main-nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-cta {
	border: 1px solid var(--gold) !important; padding: 8px 14px !important;
	transition: background .2s;
}
.nav-cta:hover { background: var(--gold); color: var(--white); }
.search-toggle, .menu-toggle {
	background: none; border: 0; color: var(--navy); cursor: pointer;
	width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
}
.menu-toggle { display: none; }
.header-search { border-top: 1px solid var(--line); padding: 16px 0; }
.header-search[hidden] { display: none; }

.search-form { display: flex; gap: 8px; max-width: 560px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--navy);
	padding: 11px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 2px;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--gold); }

.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: 600 14px var(--sans); padding: 12px 20px; border-radius: 2px;
	border: 1px solid var(--gold); background: var(--gold); color: var(--white);
	text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.button:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.button-outline { background: transparent; color: var(--navy); }
.button-outline:hover { background: var(--warm); color: var(--navy); border-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.featured-cta { margin-top: 22px; }
.page-404 { padding-bottom: 90px; }
.page-404 .back { margin-top: 22px; }
.page-article { padding-bottom: 60px; }

/* ---------- Home intro ---------- */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold-dark); margin: 0; }
.intro { position: relative; overflow: hidden; padding: 36px 0 40px; }
.intro h1, .archive-head h1 {
	font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1;
	font-size: clamp(42px, 5.6vw, 68px); margin: 0 0 14px; max-width: 760px;
}
.intro p.lead { font-size: 19px; color: var(--muted); max-width: 860px; margin: 0; }
.intro-mark {
	position: absolute; right: -20px; top: 10px; width: 260px; opacity: .12; pointer-events: none;
}
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.topics a, .post-tags a {
	font-size: 13px; text-decoration: none; padding: 5px 12px;
	border: 1px solid var(--line); background: var(--white); border-radius: 999px; transition: border-color .2s, color .2s;
}
.topics a:hover, .post-tags a:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ---------- Cards ---------- */
.section { padding: 0 0 80px; }
.section-title { font-family: var(--serif); font-size: 32px; font-weight: 600; margin: 0 0 22px; }
.meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.meta time { color: var(--gold-dark); font-weight: 600; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

.featured {
	position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 0;
	background: var(--navy); color: var(--white); text-decoration: none; margin-bottom: 44px;
	overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.featured:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(21, 39, 75, .55); }
.featured-body { padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; }
.featured .eyebrow { color: var(--gold); }
.featured h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4vw, 50px); line-height: 1.02; margin: 12px 0 16px; }
.featured p { color: #d2d8e4; margin: 0 0 22px; font-size: 16px; }
.featured .meta { color: #aeb9cb; }
.featured .meta time { color: var(--gold); }
.featured .meta .dot { background: #4a5a7b; }
.featured-art {
	position: relative; background:
		radial-gradient(circle at 60% 45%, rgba(217, 162, 61, .28), transparent 60%),
		linear-gradient(160deg, #1c3263, var(--navy));
	display: flex; align-items: center; justify-content: center; min-height: 280px;
}
.featured-art img { width: 58%; max-width: 260px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25)); }
.read-more { font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.featured .read-more { color: var(--gold); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
	position: relative; display: flex; flex-direction: column; padding: 28px 28px 24px;
	background: var(--white); border: 1px solid var(--line); text-decoration: none;
	transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card::before {
	content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--gold); transition: width .3s;
}
.card:hover { transform: translateY(-3px); border-color: #d8c9ab; box-shadow: 0 14px 30px -22px rgba(21, 39, 75, .5); }
.card:hover::before { width: 100%; }
.card h3 { font-family: var(--serif); font-size: 26px; line-height: 1.08; font-weight: 600; margin: 12px 0 10px; }
.card p { font-size: 15px; color: var(--muted); margin: 0 0 20px; flex: 1; }
.card .read-more { color: var(--navy); border-top: 1px solid var(--line); padding-top: 14px; }
.card:hover .read-more { color: var(--gold-dark); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
	border: 1px solid var(--line); background: var(--white); text-decoration: none; font-size: 14px; font-weight: 500;
}
.pagination .page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination a.page-numbers:hover { border-color: var(--gold); }

/* ---------- Archive ---------- */
.archive-head { padding-top: 64px; padding-bottom: 40px; }
.archive-head h1 { font-size: clamp(40px, 5.5vw, 64px); }
.archive-head p { color: var(--muted); margin: 0; }
.archive-head .search-form { margin-top: 24px; }
.empty { background: var(--white); border: 1px solid var(--line); padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Single ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--gold); z-index: 50; }
.admin-bar .progress { top: 32px; }
.article-head { max-width: var(--read); margin: 0 auto; padding: 64px 24px 30px; text-align: center; }
.article-head .eyebrow a { text-decoration: none; }
.article-head h1 {
	font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.02;
	font-size: clamp(40px, 5.6vw, 64px); margin: 14px 0 20px;
}
.article-head .meta { justify-content: center; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 34px auto 0; color: var(--gold); }
.divider::before, .divider::after { content: ""; height: 1px; width: 70px; background: var(--line); }
.divider img { width: 28px; }

.entry { max-width: var(--read); margin: 0 auto; padding: 10px 24px 20px; font-size: 18.5px; line-height: 1.8; }
.entry > * { margin-top: 0; margin-bottom: 1.25em; }
.entry > :first-child { margin-top: 0 !important; }
.entry > p:first-of-type em:only-child { display: block; text-align: center; color: var(--muted); font-size: 16px; }
.entry h1, .entry h2, .entry h3, .entry h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin-top: 1.8em; margin-bottom: .55em; }
.entry h1 { font-size: 40px; }
.entry h2 { font-size: 36px; }
.entry h3 { font-size: 29px; }
.entry h4 { font-size: 23px; }
.entry strong { color: var(--navy); font-weight: 600; }
.entry a { color: var(--gold-dark); text-underline-offset: 3px; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .45em; }
.entry li::marker { color: var(--gold); }
.entry blockquote, .entry .wp-block-quote {
	margin: 1.8em 0; padding: 6px 0 6px 26px; border-left: 3px solid var(--gold);
	font-family: var(--serif); font-size: 26px; line-height: 1.35; font-style: italic;
}
.entry blockquote p { margin: 0 0 .4em; }
.entry blockquote cite { font-family: var(--sans); font-size: 14px; font-style: normal; color: var(--muted); }
.entry hr, .entry .wp-block-separator { border: 0; height: 1px; background: var(--line); margin: 2.4em auto; max-width: 180px; }
.entry table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry th, .entry td { border: 1px solid var(--line); padding: 10px; }

.article-foot { max-width: var(--read); margin: 0 auto; padding: 10px 24px 0; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 26px 0; border-top: 1px solid var(--line); }
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 0 36px; font-size: 14px; color: var(--muted); }
.share a, .share button {
	display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--sans); color: var(--navy);
	background: var(--white); border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; text-decoration: none;
}
.share a:hover, .share button:hover { border-color: var(--gold); }

.visit {
	display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
	background: var(--warm); border: 1px solid var(--line); padding: 30px 32px; margin: 10px 0 60px;
}
.visit img { width: 64px; }
.visit h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 0 0 4px; line-height: 1.1; }
.visit p { margin: 0; font-size: 15px; color: var(--muted); }

.post-nav { border-top: 1px solid var(--line); background: var(--warm); }
.post-nav .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.post-nav a { display: block; padding: 34px 0; text-decoration: none; }
.post-nav a:hover .t { color: var(--gold-dark); }
.post-nav .next { text-align: right; padding-left: 24px; border-left: 1px solid var(--line); }
.post-nav .prev { padding-right: 24px; }
.post-nav .l { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.post-nav .t { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; margin-top: 6px; transition: color .2s; }

.related { padding: 64px 0 80px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d0de; padding: 60px 0 30px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer .brand-name { color: var(--white); }
.site-footer .brand img { width: 50px; }
.site-footer h3 { color: var(--white); font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 12px; }
.site-footer p { margin: 14px 0 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.copyright { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 44px; padding-top: 20px; font-size: 12px; color: #aeb9cb; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.post-grid { grid-template-columns: repeat(2, 1fr); }
	.featured { grid-template-columns: 1fr; }
	.featured-art { min-height: 180px; order: -1; }
	.featured-art img { width: 120px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
	.admin-bar .site-header, .admin-bar .progress { top: 46px; }
}
@media (max-width: 720px) {
	body { font-size: 16px; }
	.header-inner { min-height: 64px; }
	.brand img { width: 38px; }
	.brand-name { font-size: 17px; white-space: nowrap; }
	.brand-sub { font-size: 10px; }
	.archive-head { padding-top: 44px; }
	.menu-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--ivory); border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
	}
	.main-nav.is-open { display: flex; }
	.main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.main-nav .nav-cta { margin-top: 12px; text-align: center; }
	.intro { padding: 26px 0 32px; }
	.intro-mark { width: 200px; right: -50px; top: 10px; }
	.intro p.lead { font-size: 17px; }
	.post-grid { grid-template-columns: 1fr; }
	.featured-body { padding: 30px 26px; }
	.card { padding: 24px 22px 20px; }
	.article-head { padding-top: 44px; }
	.entry { font-size: 17.5px; }
	.entry h1 { font-size: 32px; }
	.entry h2 { font-size: 30px; }
	.entry blockquote { font-size: 22px; }
	.visit { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 28px 22px; }
	.post-nav .wrap { grid-template-columns: 1fr; }
	.post-nav .next { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
	.post-nav .prev { padding-right: 0; }
	.footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
