/*
 Theme Name:   SabeEssa Theme
 Theme URI:    https://sabeessa.com.br
 Description:  Tema do portal SabeEssa – curiosidades e infotenimento, pronto para monetização (AdSense, Taboola, etc.).
 Author:       SabeEssa
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  sabeessa-theme
*/

/* ==========================================================================
   Variáveis e base – layout inspirado em portal tech (estilo TechCrunch)
   ========================================================================== */

:root {
	--color-bg: #f5f5f7;
	--color-surface: #ffffff;
	--color-border: #e5e5e7;
	--color-text: #1d1d1f;
	--color-text-muted: #6e6e73;
	--color-accent: #00a67e;
	--color-accent-hover: #008f6b;
	--color-category: #00a67e;
	--font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-serif: "DM Serif Display", Georgia, serif;
	--max-width: 1280px;
	--header-height: 56px;
	--radius: 8px;
	--shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	--shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--color-accent);
	text-decoration: none;
}
a:hover {
	color: var(--color-accent-hover);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ==========================================================================
   Site wrap e slots de anúncio (monetização)
   ========================================================================== */

.site-wrap {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.ad-slot {
	min-height: 50px;
	margin: 0 auto;
}
.ad-slot-header {
	max-width: var(--max-width);
	padding: 0.75rem 1rem;
	text-align: center;
}
.ad-slot-footer {
	max-width: var(--max-width);
	padding: 1rem;
	margin-top: 2rem;
	text-align: center;
}
.ad-slot-single {
	padding: 1.5rem 0;
	text-align: center;
}
.ad-zone-label {
	display: none;
}

/* ==========================================================================
   Barra fixa inferior (AdSense – sobe e fecha ao clicar)
   ========================================================================== */

.ad-anchor-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	transform: translateY(100%);
	transition: transform 0.35s ease-out;
	animation: ad-anchor-slide-up 0.5s ease-out 0.8s forwards;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.ad-anchor-bar--hidden {
	transform: translateY(100%);
	animation: none;
	pointer-events: none;
}
@keyframes ad-anchor-slide-up {
	to {
		transform: translateY(0);
	}
}
.ad-anchor-bar-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	min-height: 90px;
	padding: 0.75rem 3rem 0.75rem 1rem;
	background: var(--color-surface);
	border-top: 1px solid var(--color-border);
	position: relative;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.ad-anchor-bar .ad-anchor-inner {
	flex: 1;
	min-height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ad-anchor-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	background: var(--color-border);
	color: var(--color-text-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
}
.ad-anchor-close:hover {
	background: var(--color-accent);
	color: var(--color-surface);
}

/* ==========================================================================
   Header – barra compacta estilo portal tech
   ========================================================================== */

.site-header {
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.header-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	height: var(--header-height);
	display: flex;
	align-items: center;
	gap: 2rem;
}
.header-brand {
	flex-shrink: 0;
}
.site-title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}
.site-title a {
	color: var(--color-text);
}
.site-title a:hover {
	color: var(--color-accent);
}
.site-description {
	display: none;
}
.nav-primary {
	flex: 1 1 auto;
	min-width: 0;
}
.nav-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-menu li {
	margin: 0;
}
.nav-menu a {
	color: var(--color-text);
	font-size: 0.9375rem;
	font-weight: 500;
}
.nav-menu a:hover,
.nav-menu .current-menu-item a {
	color: var(--color-accent);
}
.header-search {
	flex-shrink: 0;
}
.header-search .search-form {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}
.header-search .search-field {
	width: 11rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: var(--color-bg);
	color: var(--color-text);
	font-size: 0.875rem;
}
.header-search .search-field::placeholder {
	color: var(--color-text-muted);
}
.header-search .search-submit {
	padding: 0.5rem 0.75rem;
	background: var(--color-text);
	color: var(--color-surface);
	border: none;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
}
.header-search .search-submit:hover {
	background: var(--color-accent);
}
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ==========================================================================
   Main e layout conteúdo + sidebar
   ========================================================================== */

.site-main {
	flex: 1;
	padding: 1.5rem 1.5rem 2rem;
	background: var(--color-bg);
}
.content-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
	align-items: start;
}
.content-primary {
	min-width: 0;
}

/* Página inicial: sem sidebar, conteúdo em largura total */
.content-wrap-full {
	grid-template-columns: 1fr;
}
.content-wrap-full .content-primary {
	max-width: var(--max-width);
	margin: 0 auto;
	width: 100%;
}

/* Lista de posts em cards – grid 3 colunas estilo portal tech */
.post-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
}
.post-list .ad-in-feed {
	grid-column: 1 / -1;
}

/* Card de post – estilo TechCrunch (imagem, categoria, título, meta) */
.card {
	background: var(--color-surface);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: 1px solid var(--color-border);
}
.card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: transparent;
}
.card-link {
	display: block;
	color: inherit;
}
.card-link:hover {
	color: inherit;
}
.card-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--color-bg);
}
.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}
.card:hover .card-image img {
	transform: scale(1.03);
}
.card-body {
	padding: 1rem 1.25rem;
}
.card-category {
	display: inline-block;
	margin-bottom: 0.5rem;
	padding: 0.2rem 0.5rem;
	background: transparent;
	color: var(--color-category);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 4px;
}
.card-title {
	margin: 0 0 0.35rem;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
}
.card-title a {
	color: var(--color-text);
}
.card-title a:hover {
	color: var(--color-accent);
}
.card-meta {
	font-size: 0.75rem;
	color: var(--color-text-muted);
}
.card-excerpt {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	line-height: 1.45;
}

/* Paginação */
.pagination,
.posts-pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}
.pagination a,
.pagination span,
.posts-pagination a,
.posts-pagination span {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 6px;
	color: var(--color-text);
	font-size: 0.875rem;
}
.pagination a:hover,
.posts-pagination a:hover {
	background: var(--color-bg);
	border-color: var(--color-accent);
	color: var(--color-accent);
}
.pagination .current,
.posts-pagination .current {
	background: var(--color-text);
	color: var(--color-surface);
	border-color: var(--color-text);
}

/* ==========================================================================
   Sidebar – AdSense lateral inteira (autorelaxed) + 300×250
   ========================================================================== */

#secondary.widget-area.sidebar-ad {
	position: sticky;
	top: calc(var(--header-height) + 1rem);
	width: 300px;
	min-width: 300px;
	max-width: 300px;
	box-sizing: border-box;
}
/* Bloco que ocupa a lateral direita toda (formato autorelaxed) */
.ad-slot-sidebar-full {
	width: 300px;
	min-width: 300px;
	min-height: 280px;
	margin-bottom: 1.5rem;
	box-sizing: border-box;
}
.ad-slot-sidebar-full .sabeessa-ad-wrap {
	width: 300px !important;
	min-width: 300px !important;
}
.ad-slot-sidebar-full .adsbygoogle {
	display: block;
	width: 100%;
	min-height: 250px;
}
.ad-slot-lateral {
	width: 300px;
	min-width: 300px;
	min-height: 250px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 0.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow);
}
.ad-slot-lateral .ad-widget-lateral {
	width: 100%;
	min-height: 250px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	box-shadow: none;
}
.sidebar-extra .widget {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 1.25rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow);
}
#secondary .widget-title {
	margin: 0 0 1rem;
	font-family: var(--font-serif);
	font-size: 1rem;
	font-weight: 400;
	color: var(--color-text);
}

/* ==========================================================================
   Post único (artigo)
   ========================================================================== */

.entry-single .entry-header {
	margin-bottom: 1.5rem;
}
.entry-single .entry-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-sans);
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--color-text);
}
.entry-meta {
	font-size: 0.875rem;
	color: var(--color-text-muted);
}
.entry-meta .sep {
	margin: 0 0.5rem;
}
.entry-thumbnail {
	margin-top: 1rem;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
}
.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--color-text);
}
.entry-content p {
	margin: 0 0 1rem;
}
.entry-content h2,
.entry-content h3 {
	font-family: var(--font-sans);
	margin: 1.5rem 0 0.75rem;
	font-weight: 700;
}
.entry-content img {
	border-radius: var(--radius);
	margin: 1rem 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* ==========================================================================
   Homepage – hero em destaque + seção "Últimas" estilo portal tech
   ========================================================================== */

.site-front .ad-slot-header {
	margin-bottom: 0;
}
.hero-curiosidade {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1.5rem 1.5rem 0;
}
.hero-card {
	background: var(--color-surface);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	border: 1px solid var(--color-border);
}
.hero-link {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 0;
	color: inherit;
}
.hero-link:hover {
	color: inherit;
}
.hero-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--color-bg);
}
.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.hero-link:hover .hero-image img {
	transform: scale(1.02);
}
.hero-body {
	padding: 1.75rem 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.hero-badge {
	display: inline-block;
	align-self: flex-start;
	margin-bottom: 0.75rem;
	padding: 0.25rem 0.6rem;
	background: var(--color-category);
	color: var(--color-surface);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 4px;
}
.hero-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-sans);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -0.02em;
	color: var(--color-text);
}
.hero-excerpt {
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
	color: var(--color-text-muted);
	line-height: 1.5;
}
.hero-meta {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	margin-top: 0.75rem;
}
.section-curiosidades {
	margin-top: 2.25rem;
}
.section-title {
	margin: 0 0 1.25rem;
	font-family: var(--font-sans);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--color-text);
	border-bottom: 2px solid var(--color-text);
	display: inline-block;
	padding-bottom: 0.25rem;
}
.section-more {
	margin: 2rem 0 0;
	text-align: center;
}
.section-more a {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	background: var(--color-text);
	color: var(--color-surface);
	border-radius: var(--radius);
	font-size: 0.9375rem;
	font-weight: 600;
}
.section-more a:hover {
	background: var(--color-accent);
}

/* ==========================================================================
   Footer – colunas (tema claro)
   ========================================================================== */

.site-footer {
	background: var(--color-surface);
	border-top: 1px solid var(--color-border);
	padding: 2rem 1.5rem 1.25rem;
	margin-top: auto;
	box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06);
}
.footer-inner {
	max-width: var(--max-width);
	margin: 0 auto;
}
.footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin-bottom: 2rem;
}
.footer-title {
	margin: 0 0 0.75rem;
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--color-text);
}
.footer-tagline,
.footer-list {
	margin: 0;
	font-size: 0.875rem;
	color: var(--color-text-muted);
	line-height: 1.6;
}
.footer-list {
	list-style: none;
	padding: 0;
}
.footer-list a {
	color: var(--color-text-muted);
}
.footer-list a:hover {
	color: var(--color-accent);
}
.footer-copy {
	margin: 0;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border);
	text-align: center;
	font-size: 0.8125rem;
	color: var(--color-text-muted);
}
.footer-copy a {
	color: var(--color-text-muted);
}
.footer-copy a:hover {
	color: var(--color-accent);
}

/* ==========================================================================
   Conteúdo vazio e utilitários
   ========================================================================== */

.no-results {
	padding: 2rem;
	text-align: center;
	color: var(--color-text-muted);
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1024px) {
	.post-list {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 900px) {
	.content-wrap {
		grid-template-columns: 1fr;
	}
	.post-list {
		grid-template-columns: 1fr;
	}
	#secondary.widget-area {
		position: static;
		width: 100%;
		min-width: 0;
		max-width: none;
	}
	.ad-slot-sidebar-full {
		width: 100%;
		min-width: 0;
	}
	.ad-slot-sidebar-full .sabeessa-ad-wrap {
		width: 100% !important;
		min-width: 0 !important;
	}
	.sabeessa-ad-wrap {
		width: 100% !important;
		min-width: 0 !important;
	}
	.ad-slot-lateral {
		min-width: 0;
		max-width: 100%;
	}
	.hero-link {
		grid-template-columns: 1fr;
	}
	.hero-body {
		padding: 1.25rem 1.5rem;
	}
	.footer-columns {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

@media (max-width: 600px) {
	.site-main {
		padding: 1rem 0.75rem 1.5rem;
	}
	.header-inner {
		padding: 0.75rem 1rem;
	}
	.header-search .search-field {
		width: 8rem;
	}
	.card-body {
		padding: 1rem;
	}
	.card-title {
		font-size: 1rem;
	}
	.hero-title {
		font-size: 1.25rem;
	}
}
