/*
Theme Name: Casa Elias e Estevão
Theme URI: https://casaeliasestevao.org
Author: Casa Elias e Estevão
Description: Tema do Centro Espírita Casa Elias e Estevão — Amor, Caridade e Estudo Espírita. Página inicial com destaque, projetos, agenda, notícias, galeria e doações, configuráveis em Aparência › Personalizar.
Version: 1.0.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: cee
*/

:root {
	--navy: #0f3b8c;
	--navy-dark: #0b2d6e;
	--blue: #1d56b8;
	--gold: #f2b53b;
	--gold-dark: #d99a1e;
	--ink: #1c2742;
	--muted: #5b6680;
	--bg: #f3f6fb;
	--card: #ffffff;
	--line: #e3e9f3;
	--green: #4caf50;
	--purple: #7b61c9;
	--orange: #ef8a2c;
	--red: #e5484d;
	--radius: 14px;
	--shadow: 0 8px 28px rgba(15, 59, 140, .08);
	--font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
	--script: "Caveat", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
p { margin: 0 0 1em; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: #fff; padding: 8px 12px; }

/* Botões */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 22px; border-radius: 8px; border: 2px solid transparent;
	font: 500 15px/1.2 var(--font); cursor: pointer; transition: .2s ease;
}
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-outline-light { background: rgba(15, 59, 140, .55); border-color: rgba(255,255,255,.85); color: #fff; }
.btn-outline-light:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid rgba(255,255,255,.75); color: #fff; min-width: 140px; }
.btn-ghost:hover { background: #fff; color: var(--navy); }

.more-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; }
.more-link .icon { transition: transform .2s; }
.more-link:hover .icon { transform: translateX(3px); }
.more-link.small { font-size: 13px; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); transition: background .3s, box-shadow .3s; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand .logo-mark { color: var(--navy); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-size: 16px; }
.brand-text strong { font-size: 22px; font-weight: 500; }
.brand-text em { font-style: normal; font-size: 12px; color: var(--muted); }
.site-logo { height: 64px; width: auto; }
.site-footer .site-logo { height: 72px; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav .menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu a { color: var(--ink); font-size: 14px; font-weight: 500; padding: 6px 0; position: relative; }
.primary-nav .menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .2s; }
.primary-nav .menu a:hover::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); }
.primary-nav .current-menu-item > a { color: var(--blue); }
.primary-nav .sub-menu { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--navy); cursor: pointer; padding: 6px; }

/* Hero */
.hero {
	position: relative; color: #fff; padding: 72px 0 130px; overflow: hidden;
	background: linear-gradient(90deg, rgba(11,45,110,.9) 0%, rgba(11,45,110,.78) 40%, rgba(11,45,110,.92) 60%, rgba(11,45,110,.92) 100%), var(--hero-bg, linear-gradient(135deg, #2c5fb8, #8fb3e8)) center / cover no-repeat;
	min-height: 500px;
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: min(500px, 46vw - 40px); padding-bottom: 20px; }
.hero h1 { color: #fff; font-size: clamp(30px, 3.8vw, 50px); font-weight: 600; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero .script { display: block; font-family: var(--script); color: var(--gold); font-size: 1.05em; font-weight: 700; margin-top: 4px; }
.hero p { font-size: 17px; max-width: 460px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.hero-people { position: absolute; top: 0; right: 0; bottom: 0; left: max(48%, calc((100% - 1200px) / 2 + 560px)); z-index: 0; }
.hero-people img {
	width: 100%; height: 100%; object-fit: cover; object-position: 85% 30%;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%), linear-gradient(0deg, transparent 0, #000 22%);
	-webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 9%), linear-gradient(0deg, transparent 0, #000 22%); mask-composite: intersect;
}

/* Destaques */
.highlights {
	position: relative; z-index: 2; margin-top: -70px;
	display: grid; grid-template-columns: repeat(5, 1fr);
	background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 10px;
}
.highlight { text-align: center; padding: 0 14px; }
.highlight + .highlight { border-left: 1px solid var(--line); }
.highlight-top { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.highlight h3 { font-size: 16px; font-weight: 500; color: var(--ink); margin: 0; }
.highlight p { font-size: 13px; color: var(--muted); margin: 0; }
.big-number { font-size: 34px; font-weight: 600; color: var(--navy); }

.icon-circle, .icon-square, .project-badge { display: inline-grid; place-items: center; }
.icon-circle { width: 52px; height: 52px; border-radius: 50%; }
.icon-square { width: 46px; height: 46px; border-radius: 10px; flex: none; }
.tone-blue   { --tone: var(--blue);   --tint: #e4ecfa; }
.tone-green  { --tone: var(--green);  --tint: #e6f4e7; }
.tone-purple { --tone: var(--purple); --tint: #ece7f8; }
.tone-orange { --tone: var(--orange); --tint: #fdeedd; }
.tone-red    { --tone: var(--red);    --tint: #fde6e6; }
.tone-gold   { --tone: var(--gold-dark); --tint: #fdf1d8; }
.icon-circle, .icon-square { background: var(--tint); color: var(--tone); }

/* Cards e títulos */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.section-title { font-size: 24px; font-weight: 600; text-align: center; position: relative; padding-bottom: 12px; }
.section-title::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 40px; height: 2px; background: var(--blue); transform: translateX(-50%); }
.section-title.left { text-align: left; }
.section-title.left::after { left: 0; transform: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head .section-title { margin: 0; flex: 1; }
.news .section-head { position: relative; justify-content: center; }
.news .section-head .more-link { position: absolute; right: 0; }

.grid-about, .grid-news { display: grid; gap: 20px; margin-top: 24px; }
.grid-about { grid-template-columns: 5fr 7fr; }
.grid-news { grid-template-columns: 4fr 8fr; }

/* Quem Somos */
.about { position: relative; display: flex; overflow: hidden; padding: 0; background: linear-gradient(135deg, #f4f8ff, #fff); }
.about-copy { position: relative; z-index: 1; padding: 30px; max-width: 54%; }
.about-copy p { font-size: 14px; color: var(--muted); }
.about-img { position: absolute; inset: 0 0 0 50%; background: center / cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }

/* Projetos */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.project { border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-img { position: relative; aspect-ratio: 4 / 3; background: var(--tint) center / cover; }
.project-badge { position: absolute; left: 12px; bottom: -16px; width: 36px; height: 36px; border-radius: 50%; background: var(--tone); color: #fff; border: 3px solid #fff; }
.project-body { padding: 22px 12px 14px; }
.project h3 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.project p { font-size: 12px; color: var(--muted); margin-bottom: 8px; min-height: 3.2em; }
.project .more-link { color: var(--tone); font-size: 13px; }

/* Agenda */
.agenda-list { list-style: none; margin: 20px 0; padding: 0; }
.agenda-list li { display: grid; grid-template-columns: 46px 1fr 1.4fr; gap: 16px; align-items: center; padding: 14px 0; }
.agenda-list li + li { border-top: 1px solid var(--line); }
.agenda-when { font-size: 13px; color: var(--muted); }
.agenda-what { font-size: 12px; color: var(--muted); }
.agenda-what strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }

/* Notícias */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.news-img { display: block; aspect-ratio: 16 / 10; background: #dfe7f5; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.news-body time { font-size: 11px; color: var(--muted); }
.news-body h3 { font-size: 15px; margin: 4px 0 6px; }
.news-body h3 a { color: var(--ink); }
.news-body h3 a:hover { color: var(--blue); }
.news-body p { font-size: 12.5px; color: var(--muted); flex: 1; }

/* Galeria */
.gallery { margin-top: 24px; padding: 18px 16px; }
.gallery .section-head { padding: 0 12px; margin-bottom: 14px; }
.gallery-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-row a { border-radius: 8px; overflow: hidden; aspect-ratio: 3 / 2; }
.gallery-row img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-row a:hover img { transform: scale(1.06); }

/* Doações */
.donate {
	margin-top: 24px; margin-bottom: 24px; display: grid; grid-template-columns: 220px 1.1fr 2fr; align-items: center; gap: 32px;
	background: linear-gradient(110deg, var(--navy-dark), var(--blue)); color: #fff; border-radius: var(--radius); overflow: hidden; padding-right: 32px;
}
.donate-img { align-self: stretch; min-height: 150px; background: #f6d9c8 center / cover; display: grid; place-items: center; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.donate-heart { font-size: 72px; color: var(--red); }
.donate h2 { color: #fff; font-size: 22px; }
.donate-copy p { margin: 0; opacity: .9; font-size: 14px; }
.donate-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 28px 0; }
.donate-option { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.donate-option-head { display: flex; align-items: center; gap: 10px; font-size: 11px; opacity: .95; line-height: 1.35; }
.donate-option-head strong { display: block; font-size: 15px; font-weight: 500; }

/* Rodapé */
.site-footer { background: #fff; border-top: 1px solid var(--line); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr 1.3fr; padding: 34px 0; }
.footer-col { padding: 0 28px; }
.footer-col + .footer-col { border-left: 1px solid var(--line); }
.footer-col h3 { font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.footer-brand p { color: var(--muted); margin: 14px 0; }
.social { display: flex; gap: 8px; }
.social a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; font-size: 12px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu a { display: flex; justify-content: space-between; color: var(--ink); padding: 2px 0; }
.footer-menu a::after { content: "›"; color: var(--muted); }
.footer-menu a:hover { color: var(--blue); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 10px; margin-bottom: 6px; color: var(--ink); }
.contact-list .icon { flex: none; color: var(--navy); margin-top: 2px; }
.contact-list a { color: inherit; }
.map-embed { display: block; width: 100%; height: 110px; border: 0; border-radius: 8px; margin-bottom: 10px; background: #f2f5fa; }
.agenda-what a { color: inherit; }
.agenda-what a:hover { color: var(--blue); }
.agenda-archive { max-width: 760px; margin-inline: auto; }
.map-card {
	position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 80px; margin-bottom: 10px; border-radius: 8px; font-size: 11px; color: var(--navy);
	background: repeating-linear-gradient(35deg, transparent 0 22px, #dde6f2 22px 24px), repeating-linear-gradient(-55deg, transparent 0 30px, #e7edf6 30px 33px), #f2f5fa;
}
.map-pin { color: var(--red); }
.footer-bottom { background: var(--navy); color: #fff; font-size: 12px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.footer-bottom .heart { color: var(--red); }

/* Páginas internas */
.page-hero { background: linear-gradient(110deg, var(--navy-dark), var(--blue)); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin: 0; }
.page-hero time { opacity: .85; font-size: 14px; }
.content-area { padding: 40px 0 56px; }
.archive-grid { grid-template-columns: repeat(3, 1fr); }
.entry { max-width: 820px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; margin: -30px auto 56px; position: relative; }
.entry-thumb { margin: 0 0 24px; border-radius: 10px; overflow: hidden; }
.entry-thumb img { width: 100%; }
.entry-content { font-size: 16px; line-height: 1.75; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content img { border-radius: 8px; }
.post-navigation .nav-links, .pagination .nav-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.pagination .nav-links { justify-content: center; }
.pagination .page-numbers { padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.pagination .current { background: var(--navy); color: #fff; }

/* Destaque empilhado (tablet e celular): texto em cima, foto embaixo */
@media (max-width: 1080px) {
	.hero { display: flex; flex-direction: column; min-height: 0; padding: 56px 0 0; background: linear-gradient(rgba(11,45,110,.84), rgba(11,45,110,.62)), var(--hero-bg, linear-gradient(135deg, #2c5fb8, #8fb3e8)) center / cover no-repeat; }
	.hero-copy { max-width: 640px; }
	.hero h1 { font-size: clamp(30px, 5.4vw, 48px); }
	.hero p { max-width: 560px; }
	.hero-people { order: 2; position: relative; inset: auto; height: clamp(280px, 52vw, 480px); margin-top: 28px; }
	.hero-people img { object-position: center 35%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%); mask-image: linear-gradient(180deg, transparent 0, #000 26%); }
	.hero:not(:has(.hero-people)) { padding-bottom: 110px; }
}

/* Responsivo */
@media (max-width: 1080px) {
	.nav-toggle { display: block; }
	.primary-nav {
		position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 16px;
		background: #fff; padding: 16px 16px 24px; box-shadow: 0 12px 24px rgba(0,0,0,.08); display: none;
	}
	.nav-open .primary-nav { display: flex; }
	.primary-nav .menu { flex-direction: column; gap: 4px; }
	.primary-nav .menu a { display: block; padding: 10px 0; }
	.grid-about, .grid-news { grid-template-columns: 1fr; }
	.highlights { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
	.highlight:nth-child(4) { border-left: 0; }
	.donate { grid-template-columns: 1fr; padding: 0 0 8px; text-align: center; }
	.donate-img { min-height: 160px; -webkit-mask-image: none; mask-image: none; }
	.donate-copy { padding: 0 24px; }
	.donate-options { padding: 8px 16px 20px; }
	.footer-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
	.footer-col:nth-child(3) { border-left: 0; }
}
@media (max-width: 760px) {
	.highlights { grid-template-columns: 1fr 1fr; }
	.highlight { border-left: 0 !important; }
	.highlight:last-child { grid-column: 1 / -1; }
	.project-grid { grid-template-columns: 1fr 1fr; }
	.news-grid, .archive-grid { grid-template-columns: 1fr; }
	.gallery-row { grid-template-columns: repeat(3, 1fr); }
	.donate-options { grid-template-columns: 1fr; }
	.about-copy { max-width: 100%; }
	.about-img { position: relative; inset: auto; min-height: 200px; -webkit-mask-image: none; mask-image: none; }
	.about { flex-direction: column; }
	.news .section-head { flex-direction: column; }
	.news .section-head .more-link { position: static; }
	.agenda-list li { grid-template-columns: 46px 1fr; }
	.agenda-what { grid-column: 2; }
	.footer-grid { grid-template-columns: 1fr; }
	.footer-col { border-left: 0 !important; padding: 0 8px; }
	.entry { padding: 24px; }
	.admin-bar .site-header { top: 46px; }
}

/* Comentários */
.comments-area { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .comment { margin-bottom: 18px; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.comment-form .submit { background: var(--navy); color: #fff; border: 0; border-radius: 8px; padding: 11px 22px; font: 500 15px var(--font); cursor: pointer; }
