/*
Theme Name: Saber da Eletrônica
Theme URI: https://saberdaeletronica.com.br
Author: Saber da Eletrônica
Description: Tema próprio, leve e rápido, focado em blog profissional de eletrônica. HTML/CSS puro, sem page builder.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: saber
*/

/* ===== Reset e base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.7;
	color: #1c2530;
	background: #f6f8fa;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0a8f6c; text-decoration: none; }
a:hover { text-decoration: underline; }

:root {
	--accent: #00c896;
	--accent-dark: #0a8f6c;
	--dark: #0d1420;
	--dark-2: #131c2b;
	--ink: #1c2530;
	--muted: #5b6a7c;
	--line: #e3e8ee;
	--card: #ffffff;
	--maxw: 1140px;
	--radius: 14px;
}

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

/* ===== Header ===== */
.site-header {
	background: var(--dark);
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 64px;
}
.site-logo img { height: 110px; width: auto; filter: invert(1) brightness(1.8); }
@media (max-width: 860px) { .site-logo img { height: 72px; } }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
	color: #cbd6e2;
	font-size: 15px;
	font-weight: 500;
	padding: 8px 13px;
	border-radius: 8px;
	white-space: nowrap;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.site-nav li { list-style: none; }
.site-nav ul { display: flex; margin: 0; padding: 0; gap: 4px; flex-wrap: wrap; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 22px; line-height: 1; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; width: 100%; padding-bottom: 14px; }
	.site-nav.open { display: block; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav a { display: block; padding: 11px 10px; }
}

/* ===== Hero (home) ===== */
.hero {
	background: linear-gradient(150deg, var(--dark) 55%, #10263a 100%);
	color: #fff;
	padding: 64px 0 72px;
	position: relative;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute; inset: 0;
	background:
		radial-gradient(600px 300px at 85% 20%, rgba(0,200,150,.14), transparent 60%),
		radial-gradient(400px 240px at 10% 90%, rgba(0,140,255,.10), transparent 60%);
	pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.hero-text { min-width: 0; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-btns .btn.ghost { margin-left: 0; }
.hero-photo { margin: 0; position: relative; justify-self: center; }
.hero-photo img {
	width: 100%; max-width: 340px; aspect-ratio: 1; object-fit: cover;
	border-radius: 18px;
	border: 3px solid rgba(0,200,150,.35);
	box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.hero-photo figcaption {
	position: absolute; left: 16px; bottom: 16px; right: 16px;
	background: rgba(13,20,32,.82); backdrop-filter: blur(4px);
	color: #fff; padding: 10px 14px; border-radius: 10px;
	font-size: 15px; font-weight: 700; line-height: 1.3;
}
.hero-photo figcaption span { display: block; font-weight: 400; font-size: 13px; color: var(--accent); margin-top: 2px; }
@media (max-width: 820px) {
	.hero-grid { grid-template-columns: 1fr; gap: 32px; }
	.hero-photo { order: -1; }
	.hero-photo img { max-width: 240px; }
}
.hero-kicker {
	display: inline-block;
	color: var(--accent);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.15; margin: 0 0 18px; max-width: 720px; }
.hero p.sub { font-size: 19px; color: #b9c6d4; max-width: 620px; margin: 0 0 30px; }
.btn {
	display: inline-block;
	background: var(--accent);
	color: #062b21;
	font-weight: 700;
	padding: 14px 26px;
	border-radius: 10px;
	font-size: 16px;
}
.btn:hover { background: #00e0a8; text-decoration: none; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); margin-left: 10px; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* ===== Seções ===== */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 26px; margin: 0; }
.section-head a.more { font-weight: 600; font-size: 15px; }

/* ===== Grid de posts ===== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(13,20,32,.10); }
.post-card .thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: #eef2f6; display: block; overflow: hidden; }
.post-card a:first-child { aspect-ratio: 16/9; display: block; overflow: hidden; background: #eef2f6; }
.post-card .thumb { max-height: 100%; }
.post-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cat-pill {
	align-self: flex-start;
	background: rgba(0,200,150,.12);
	color: var(--accent-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 99px;
}
.post-card h3 { font-size: 19px; line-height: 1.35; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--accent-dark); text-decoration: none; }
.post-card p.excerpt { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.post-meta { color: #8896a6; font-size: 13.5px; display: flex; gap: 14px; align-items: center; }

/* Destaque (primeiro post) */
.post-featured {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 0;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 30px;
}
.post-featured > a:first-child { display: block; overflow: hidden; background: #eef2f6; }
.post-featured .thumb { width: 100%; height: 100%; object-fit: cover; min-height: 300px; max-height: 520px; }
@media (max-width: 860px) { .post-featured > a:first-child { aspect-ratio: 16/9; } .post-featured .thumb { min-height: 0; } }
.post-featured .body { padding: 34px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.post-featured h3 { font-size: 27px; line-height: 1.3; margin: 0; }
.post-featured h3 a { color: var(--ink); }
@media (max-width: 860px) { .post-featured { grid-template-columns: 1fr; } }

/* ===== Faixa de parceria ===== */
.partners {
	background: var(--dark-2);
	color: #cbd6e2;
	padding: 44px 0;
}
.partners .wrap { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.partners h2 { color: #fff; font-size: 22px; margin: 0 0 8px; }
.partners p { margin: 0; max-width: 640px; }
.partners .tag { color: var(--accent); font-weight: 700; }

/* ===== Faixa YouTube ===== */
.yt-band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.yt-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-top: 34px; padding-bottom: 34px; flex-wrap: wrap; }
.yt-band h2 { font-size: 22px; margin: 0 0 6px; }
.yt-band p { margin: 0; color: var(--muted); }
.btn.yt { background: #ff0033; color: #fff; }
.btn.yt:hover { background: #e00030; }

/* ===== Artigo (single) ===== */
.article-head { background: var(--dark); color: #fff; padding: 46px 0 40px; }
.article-head .crumbs { font-size: 13.5px; color: #8896a6; margin-bottom: 14px; }
.article-head .crumbs a { color: #b9c6d4; }
.article-head h1 { font-size: clamp(27px, 3.8vw, 40px); line-height: 1.2; margin: 0 0 16px; max-width: 860px; }
.article-head .post-meta { color: #b9c6d4; font-size: 14.5px; }

.article-cover { max-width: 860px; margin: -26px auto 0; padding: 0 22px; position: relative; z-index: 2; }
.article-cover img { border-radius: var(--radius); box-shadow: 0 16px 40px rgba(13,20,32,.18); width: 100%; }

.article-body {
	max-width: 760px;
	margin: 36px auto 0;
	padding: 0 22px 40px;
	font-size: 17.5px;
}
.article-body h2 { font-size: 26px; margin: 1.7em 0 .6em; line-height: 1.3; }
.article-body h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.article-body p { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { padding-left: 26px; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .45em; }
.article-body img { border-radius: 10px; margin: 1.2em auto; }
.article-body strong { color: #101a26; }
.article-body blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .4em 0 .4em 18px; color: var(--muted); }
.article-body table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 15.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article-body th { background: #eef2f6; }

/* Botão de download (wp-block-button) */
.wp-block-buttons { margin: 1.6em 0; }
.wp-block-button__link {
	display: inline-block;
	background: var(--accent-dark);
	color: #fff !important;
	font-weight: 700;
	font-size: 17px;
	padding: 16px 28px;
	border-radius: 12px;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(10,143,108,.30);
}
.wp-block-button__link:hover { background: #086b52; text-decoration: none; }

/* Caixa do autor */
.author-box {
	max-width: 760px;
	margin: 10px auto 0;
	padding: 0 22px;
}
.author-box .inner {
	display: flex; gap: 18px; align-items: center;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 24px;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; }
.author-box .name { font-weight: 700; }
.author-box .bio { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* Relacionados */
.related { max-width: var(--maxw); margin: 0 auto; padding: 44px 22px 60px; }
.related h2 { font-size: 23px; margin: 0 0 22px; }

/* ===== Página de blog / arquivo ===== */
.page-title-band { background: var(--dark); color: #fff; padding: 40px 0; }
.page-title-band h1 { margin: 0 0 6px; font-size: clamp(26px, 3.6vw, 36px); }
.page-title-band p { margin: 0; color: #b9c6d4; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination .page-numbers {
	padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px;
}
.pagination .page-numbers.current { background: var(--dark); color: #fff; border-color: var(--dark); }

/* ===== Anúncios ===== */
.saber-ad { margin: 30px 0; text-align: center; }
.saber-ad::before {
	content: "Publicidade";
	display: block;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #a5b1bf;
	margin-bottom: 6px;
}

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #9daebe; padding: 52px 0 30px; margin-top: 60px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer img.flogo { height: 80px; width: auto; filter: invert(1) brightness(1.8); margin-bottom: 14px; }
.site-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px; }
.site-footer a { color: #cbd6e2; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .legal {
	border-top: 1px solid rgba(255,255,255,.08);
	margin-top: 36px; padding-top: 22px;
	display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	font-size: 13.5px; color: #778899;
}

/* ===== Quem Somos (história) ===== */
.story { max-width: 900px; margin: 0 auto; padding: 20px 22px 10px; }
.story-block {
	display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: center;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 34px 38px; margin-bottom: 26px;
}
.story-block.reverse { grid-template-columns: 1fr 1.4fr; }
.story-block.reverse .txt { order: 2; }
.story-block.reverse figure { order: 1; }
.story-block h2 { margin: 0 0 12px; font-size: 24px; }
.story-block h2 .num { color: var(--accent-dark); font-size: 15px; display: block; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.story-block p { margin: 0 0 1em; color: #33404e; }
.story-block p:last-child { margin-bottom: 0; }
.story-block figure { margin: 0; }
.story-block figure img { border-radius: 10px; width: 100%; }
.story-block figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.story-block.full { display: block; }
@media (max-width: 780px) {
	.story-block, .story-block.reverse { grid-template-columns: 1fr; padding: 26px 24px; }
	.story-block.reverse .txt { order: 1; } .story-block.reverse figure { order: 2; }
}

/* ===== Contato ===== */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto; padding: 10px 22px 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 30px 26px; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.contact-card .ico { font-size: 40px; line-height: 1; }
.contact-card h3 { margin: 4px 0 2px; font-size: 19px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 15px; }
.contact-card .btn { margin-top: 12px; font-size: 15px; padding: 12px 20px; }
.btn.whats { background: #25d366; color: #06301c; }
.btn.whats:hover { background: #1fc25a; }
.contact-note { max-width: 1000px; margin: 26px auto 0; padding: 0 22px; }
.contact-note .inner {
	background: var(--dark-2); color: #cbd6e2; border-radius: var(--radius);
	padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.contact-note strong { color: #fff; }

/* ===== 404 / util ===== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
