/*
Theme Name: Oben Blog
Theme URI: https://obentech.com.br/blog
Description: Tema blog dark da ObenTech — design fintech moderno, dark-first, amber accent. Baseado no Twenty Twenty-Four.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
Version: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oben-blog
Template: twentytwentyfour
Tags: blog, full-site-editing, block-theme, dark, finance, clean, minimal
Author: ObenTech
Author URI: https://obentech.com.br
*/

/* =========================================================
   OBEN BLOG — Dark Theme (child of Twenty Twenty-Four)
   ========================================================= */

/* -- 1. DESIGN TOKENS ------------------------------------- */
:root {
	/* Amber — cor primária da ObenTech */
	--amber:          #f59e0b;
	--amber-dark:     #d97706;
	--amber-light:    #fbbf24;
	--amber-dim:      rgba(245, 158, 11, 0.12);
	--amber-glow:     0 0 20px rgba(245, 158, 11, 0.25);

	/* Superfícies dark (do mais escuro para o mais claro) */
	--bg:             #080e1a;   /* fundo da página */
	--surface-0:      #0c1220;   /* cards base */
	--surface-1:      #111927;   /* cards hover / sidebar */
	--surface-2:      #172033;   /* elementos elevados */
	--surface-3:      #1e2d45;   /* tooltips / dropdowns */
	--border:         #1e2d45;   /* bordas sutis */
	--border-bright:  #263552;   /* bordas mais visíveis */

	/* Texto */
	--text-primary:   #f1f5f9;
	--text-secondary: #94a3b8;
	--text-muted:     #64748b;
	--text-inverse:   #0c1220;

	/* Semânticas */
	--positive:       #10b981;
	--positive-dim:   rgba(16, 185, 129, 0.12);
	--negative:       #f87171;
	--negative-dim:   rgba(248, 113, 113, 0.12);
	--cyan:           #22d3ee;

	/* Tipografia */
	--font-sans:  'Inter', 'Helvetica Neue', Arial, sans-serif;
	--font-mono:  'JetBrains Mono', 'Fira Code', Consolas, monospace;

	/* Radius */
	--r-sm:  4px;
	--r:     8px;
	--r-md:  10px;
	--r-lg:  12px;
	--r-xl:  16px;
	--r-2xl: 20px;
	--r-3xl: 24px;

	/* Sombras */
	--shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
	--shadow-md:  0 4px 12px rgba(0,0,0,0.45);
	--shadow-lg:  0 8px 24px rgba(0,0,0,0.5);
	--shadow-xl:  0 16px 40px rgba(0,0,0,0.55);
	--shadow-card: 0 2px 8px rgba(0,0,0,0.35);
	--shadow-amber: 0 4px 14px rgba(245, 158, 11, 0.3);

	/* Transições */
	--t:    150ms cubic-bezier(0.4, 0, 0.2, 1);
	--t-md: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- 2. RESET --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	color-scheme: dark;
}

body {
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.7;
	background-color: var(--bg);
	color: var(--text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

/* -- 3. TIPOGRAFIA ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-sans);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.025em;
	color: var(--text-primary);
	margin: 0;
}

h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-block: 0 1.25rem; }

a {
	color: var(--amber);
	text-decoration: none;
	transition: color var(--t);
}
a:hover {
	color: var(--amber-light);
	text-decoration: underline;
	text-underline-offset: 3px;
}

strong, b { font-weight: 700; }
em, i     { font-style: italic; }

code {
	font-family: var(--font-mono);
	font-size: 0.875em;
	background: rgba(245, 158, 11, 0.1);
	color: var(--amber-light);
	padding: 0.15em 0.45em;
	border-radius: var(--r-sm);
	border: 1px solid rgba(245, 158, 11, 0.2);
}

pre {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	background: var(--surface-0);
	color: var(--text-primary);
	padding: 1.25rem 1.5rem;
	border-radius: var(--r-lg);
	overflow-x: auto;
	line-height: 1.6;
	border: 1px solid var(--border-bright);
}

pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	border: none;
	font-size: inherit;
}

blockquote {
	margin: 1.75rem 0;
	padding: 1rem 1.5rem;
	border-left: 3px solid var(--amber);
	background: var(--amber-dim);
	border-radius: 0 var(--r) var(--r) 0;
	color: var(--text-secondary);
	font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 2.5rem 0;
}

/* -- 4. LAYOUT -------------------------------------------- */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

.container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--narrow { max-width: 768px; }
.container--wide   { max-width: 1440px; }

/* -- 5. HEADER -------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(8, 14, 26, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
	transition: border-color var(--t-md), box-shadow var(--t-md);
}

.site-header.scrolled {
	border-bottom-color: var(--border-bright);
	box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: 64px;
}

/* Logo / Nome */
.site-branding {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex-shrink: 0;
}
.site-branding .site-logo img { height: 30px; width: auto; }

.site-title {
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: -0.045em;
	color: var(--text-primary);
	text-decoration: none;
}
/* BUG 2.2 FIX: removed ::after that created floating yellow dot when no logo was set */
.site-title:hover { color: var(--amber); text-decoration: none; }

/* Nav */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	align-items: center;
	gap: 0.125rem;
}
.main-navigation li a {
	display: flex;
	align-items: center;
	padding: 0.4rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
	border-radius: var(--r);
	text-decoration: none;
	transition: color var(--t), background var(--t);
}
.main-navigation li a:hover,
.main-navigation li.current-menu-item a {
	color: var(--amber);
	background: var(--amber-dim);
	text-decoration: none;
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.header-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	border-radius: var(--r);
	color: var(--text-secondary);
	background: none; border: none;
	cursor: pointer;
	transition: color var(--t), background var(--t);
}
.header-search-btn:hover {
	color: var(--amber);
	background: var(--amber-dim);
}

.btn-subscribe {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--text-inverse);
	background: var(--amber);
	border-radius: var(--r);
	text-decoration: none;
	border: none;
	white-space: nowrap;
	transition: background var(--t), box-shadow var(--t), transform var(--t);
}
.btn-subscribe:hover {
	background: var(--amber-light);
	color: var(--text-inverse);
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: var(--shadow-amber);
}

/* Mobile toggle */
.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	background: none; border: none;
	padding: 6px;
	border-radius: var(--r-sm);
}
.menu-toggle span {
	display: block;
	width: 22px; height: 2px;
	background: var(--text-primary);
	border-radius: 2px;
	transition: transform var(--t), opacity var(--t);
}

/* -- 6. TICKER STRIP -------------------------------------- */
.ticker-strip {
	background: var(--surface-0);
	border-bottom: 1px solid var(--border);
	font-size: 0.75rem;
	font-family: var(--font-mono);
	padding: 0.375rem 0;
	overflow: hidden;
}
.ticker-strip__inner {
	display: flex;
	gap: 2.5rem;
	animation: ticker-scroll 50s linear infinite;
	white-space: nowrap;
}
.ticker-item { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.ticker-item__symbol { font-weight: 700; color: var(--amber); letter-spacing: 0.04em; }
.ticker-item__value  { color: var(--text-secondary); }
.ticker-item__change.positive { color: var(--positive); }
.ticker-item__change.negative { color: var(--negative); }

@keyframes ticker-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* -- 7. HERO / DESTAQUE ----------------------------------- */
.hero-featured { padding: 3rem 0 2.5rem; }

.hero-featured__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: center;
}

.hero-featured__content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero-featured__image {
	border-radius: var(--r-2xl);
	overflow: hidden;
	aspect-ratio: 16/9;
	box-shadow: var(--shadow-xl);
	border: 1px solid var(--border-bright);
}
.hero-featured__image img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform var(--t-md);
}
.hero-featured__image:hover img { transform: scale(1.02); }

.hero-featured__category {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--amber);
}

.hero-featured__title {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.2;
	color: var(--text-primary);
}
.hero-featured__title a { color: inherit; text-decoration: none; }
.hero-featured__title a:hover { color: var(--amber); }

.hero-featured__excerpt {
	color: var(--text-secondary);
	font-size: 1rem;
	line-height: 1.65;
	margin: 0;
}

.hero-featured__meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
}
.hero-featured__meta a { color: var(--text-secondary); font-weight: 500; }
.hero-featured__meta a:hover { color: var(--amber); }

/* -- 8. CARDS DE POST ------------------------------------- */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.post-card {
	background: var(--surface-0);
	border-radius: var(--r-xl);
	border: 1px solid var(--border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform var(--t-md), box-shadow var(--t-md), border-color var(--t-md);
}
.post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
	border-color: var(--amber);
}

.post-card__thumbnail {
	aspect-ratio: 16/9;
	overflow: hidden;
	background: var(--surface-1);
	position: relative;
}
.post-card__thumbnail img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform var(--t-md);
}
.post-card:hover .post-card__thumbnail img { transform: scale(1.04); }

.post-card__body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	flex: 1;
}

.post-card__category {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--amber);
}

.post-card__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--text-primary);
	margin: 0;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--amber); }

.post-card__excerpt {
	font-size: 0.8125rem;
	color: var(--text-secondary);
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card__meta {
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--text-muted);
}
.post-card__author { display: flex; align-items: center; gap: 0.375rem; }
.post-card__author-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.post-card__author-name { color: var(--text-secondary); font-weight: 500; }

/* Card featured */
.post-card--featured {
	grid-column: span 2;
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.post-card--featured .post-card__thumbnail { aspect-ratio: unset; min-height: 220px; }
.post-card--featured .post-card__body { padding: 1.75rem; gap: 0.875rem; }
.post-card--featured .post-card__title { font-size: 1.25rem; }

/* Badge */
.post-card__badge {
	position: absolute;
	top: 0.75rem; left: 0.75rem;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.2rem 0.625rem;
	font-size: 0.625rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-inverse);
	background: var(--amber);
	border-radius: 100px;
}

/* -- 9. CATEGORY PILLS ------------------------------------ */
.category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.category-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.375rem 0.875rem;
	font-size: 0.8125rem;
	font-weight: 500;
	border-radius: 100px;
	border: 1px solid var(--border-bright);
	color: var(--text-secondary);
	background: var(--surface-0);
	text-decoration: none;
	transition: all var(--t);
	cursor: pointer;
}
.category-pill:hover,
.category-pill.active {
	color: var(--text-inverse);
	background: var(--amber);
	border-color: var(--amber);
	text-decoration: none;
	font-weight: 600;
}

/* -- 10. SIDEBAR ------------------------------------------ */
.layout-with-sidebar {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2.5rem;
	align-items: start;
}
.sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: sticky;
	top: 80px;
}

.sidebar-widget {
	background: var(--surface-0);
	border: 1px solid var(--border);
	border-radius: var(--r-xl);
	padding: 1.25rem;
}
.sidebar-widget__title {
	font-size: 0.6875rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--amber);
	margin: 0 0 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}

/* Widget newsletter */
.widget-newsletter {
	background: var(--surface-1);
	border-color: var(--border-bright);
}
.widget-newsletter .sidebar-widget__title {
	color: var(--amber);
	border-color: var(--border-bright);
}
.widget-newsletter p {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

.newsletter-form { display: flex; flex-direction: column; gap: 0.625rem; }
.newsletter-form input[type="email"] {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font-size: 0.875rem;
	background: var(--surface-2);
	border: 1px solid var(--border-bright);
	border-radius: var(--r);
	color: var(--text-primary);
	font-family: var(--font-sans);
	transition: border-color var(--t);
}
.newsletter-form input[type="email"]::placeholder { color: var(--text-muted); }
.newsletter-form input[type="email"]:focus {
	outline: none;
	border-color: var(--amber);
	box-shadow: 0 0 0 3px var(--amber-dim);
}
.newsletter-form button {
	width: 100%;
	padding: 0.625rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--text-inverse);
	background: var(--amber);
	border: none;
	border-radius: var(--r);
	cursor: pointer;
	font-family: var(--font-sans);
	transition: background var(--t), box-shadow var(--t);
}
.newsletter-form button:hover {
	background: var(--amber-light);
	box-shadow: var(--shadow-amber);
}

/* Popular posts */
.popular-post-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--border);
}
.popular-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-post-item__rank {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--border-bright);
	line-height: 1;
	flex-shrink: 0;
	width: 24px;
	font-variant-numeric: tabular-nums;
}
.popular-post-item__title {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text-secondary);
	line-height: 1.4;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.popular-post-item__title:hover { color: var(--amber); }

/* Tags */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag-chip {
	display: inline-flex;
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--text-secondary);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 100px;
	text-decoration: none;
	transition: all var(--t);
}
.tag-chip:hover {
	background: var(--amber);
	color: var(--text-inverse);
	border-color: var(--amber);
	text-decoration: none;
}

/* -- 11. SINGLE POST -------------------------------------- */
.post-header {
	max-width: 768px;
	margin-inline: auto;
	padding: 3rem 0 2rem;
	text-align: center;
}
.post-header__category {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--amber);
	margin-bottom: 1rem;
}
.post-header__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	line-height: 1.2;
	color: var(--text-primary);
	margin-bottom: 1.25rem;
}
.post-header__subtitle {
	font-size: 1.125rem;
	color: var(--text-secondary);
	line-height: 1.6;
	margin-bottom: 1.5rem;
}
.post-header__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
}
.post-header__author {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-secondary);
	font-weight: 500;
}
.post-header__author-avatar {
	width: 28px; height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.post-featured-image {
	max-width: 900px;
	margin-inline: auto;
	border-radius: var(--r-3xl);
	overflow: hidden;
	margin-bottom: 3rem;
	box-shadow: var(--shadow-xl);
	border: 1px solid var(--border-bright);
}
.post-featured-image img {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
}

/* Conteúdo do artigo */
.post-content {
	max-width: 680px;
	margin-inline: auto;
	font-size: 1.0625rem;
	line-height: 1.8;
	color: var(--text-secondary);
}
.post-content p { color: var(--text-secondary); }
.post-content h2, .post-content h3,
.post-content h4, .post-content h5 { color: var(--text-primary); }
.post-content h2 { font-size: 1.625rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { font-size: 1.25rem;  margin-top: 2rem;   margin-bottom: 0.75rem; }
.post-content h4 { font-size: 1.0625rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

.post-content h2:hover::after,
.post-content h3:hover::after {
	content: ' #';
	color: var(--amber);
	font-weight: 400;
	font-size: 0.85em;
}

.post-content ul, .post-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1.25rem;
}
.post-content li { margin-bottom: 0.375rem; }

.post-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	margin: 1.5rem 0;
}
.post-content th,
.post-content td {
	padding: 0.625rem 0.875rem;
	text-align: left;
	border-bottom: 1px solid var(--border-bright);
}
.post-content th {
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	background: var(--surface-1);
}
.post-content tr:hover td { background: var(--surface-0); }

/* Callouts */
.callout {
	padding: 1.25rem 1.5rem;
	border-radius: var(--r-lg);
	margin: 1.75rem 0;
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}
.callout--info    { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25); color: #fde68a; }
.callout--tip     { background: var(--positive-dim);   border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.callout--warning { background: var(--negative-dim);   border: 1px solid rgba(248,113,113,0.25); color: #fca5a5; }
.callout--danger  { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.callout__icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.5; }
.callout__content p:last-child { margin-bottom: 0; }

/* Rodapé do post */
.post-footer {
	max-width: 680px;
	margin-inline: auto;
	padding-top: 2.5rem;
	margin-top: 2.5rem;
	border-top: 1px solid var(--border-bright);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 2rem; }

.post-share {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}
.post-share__label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text-secondary);
}
.share-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.4rem 0.875rem;
	font-size: 0.8125rem;
	font-weight: 500;
	border-radius: var(--r);
	border: 1px solid var(--border-bright);
	color: var(--text-secondary);
	background: var(--surface-1);
	text-decoration: none;
	cursor: pointer;
	font-family: var(--font-sans);
	transition: all var(--t);
}
.share-btn:hover {
	background: var(--amber);
	color: var(--text-inverse);
	border-color: var(--amber);
	text-decoration: none;
}

/* Bio do autor */
.author-bio {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	padding: 1.5rem;
	background: var(--surface-1);
	border: 1px solid var(--border-bright);
	border-left: 3px solid var(--amber);
	border-radius: var(--r-xl);
	margin-bottom: 2.5rem;
}
.author-bio__avatar {
	width: 64px; height: 64px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.author-bio__name  { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.author-bio__role  { font-size: 0.75rem; color: var(--amber); font-weight: 600; margin-bottom: 0.5rem; }
.author-bio__description { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* Posts relacionados */
.related-posts { margin: 3rem 0; }

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}
.section-title { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin: 0; }
.section-link {
	font-size: 0.8125rem; font-weight: 600;
	color: var(--amber); text-decoration: none;
	display: flex; align-items: center; gap: 0.25rem;
}
.section-link:hover { color: var(--amber-light); text-decoration: none; }

/* -- 12. BUSCA -------------------------------------------- */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba(8, 14, 26, 0.92);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: flex-start;
	padding-top: 6rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--t-md);
}
.search-overlay.open { opacity: 1; pointer-events: auto; }

.search-box {
	width: 100%;
	max-width: 600px;
	margin-inline: auto;
	background: var(--surface-1);
	border-radius: var(--r-xl);
	overflow: hidden;
	box-shadow: var(--shadow-xl);
	border: 1px solid var(--border-bright);
	border-top: 3px solid var(--amber);
	transform: translateY(-10px);
	transition: transform var(--t-md);
}
.search-overlay.open .search-box { transform: translateY(0); }

.search-box__input-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--border);
}
.search-box__icon { color: var(--text-muted); flex-shrink: 0; }
.search-box__input {
	flex: 1;
	font-size: 1rem;
	color: var(--text-primary);
	background: none;
	border: none;
	outline: none;
	font-family: var(--font-sans);
}
.search-box__input::placeholder { color: var(--text-muted); }
.search-box__close {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-muted);
	background: var(--surface-2);
	border: none;
	padding: 0.25rem 0.5rem;
	border-radius: var(--r-sm);
	cursor: pointer;
}

/* -- 13. PAGINAÇÃO ---------------------------------------- */
.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin: 3rem 0;
}
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
	border: 1px solid var(--border-bright);
	border-radius: var(--r);
	text-decoration: none;
	background: var(--surface-0);
	transition: all var(--t);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	color: var(--text-inverse);
	background: var(--amber);
	border-color: var(--amber);
	font-weight: 700;
	text-decoration: none;
}
.pagination .page-numbers.dots {
	border: none;
	background: none;
	width: auto;
	padding: 0 0.25rem;
}

/* -- 14. FOOTER ------------------------------------------- */
.site-footer {
	background: var(--surface-0);
	color: var(--text-secondary);
	margin-top: 4rem;
	border-top: 1px solid var(--border-bright);
}
.footer-top {
	padding: 3.5rem 0 2.5rem;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 3rem;
	border-bottom: 1px solid var(--border);
}
.footer-brand .site-title { color: var(--text-primary); display: block; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.65; }

.footer-social { display: flex; gap: 0.625rem; }
.footer-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	border-radius: var(--r);
	background: var(--surface-1);
	border: 1px solid var(--border);
	color: var(--text-secondary);
	text-decoration: none;
	transition: all var(--t);
	font-size: 0.875rem;
}
.footer-social a:hover {
	background: var(--amber);
	border-color: var(--amber);
	color: var(--text-inverse);
}

.footer-col__title {
	font-size: 0.6875rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--amber);
	margin-bottom: 1rem;
}
.footer-col ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.footer-col ul li a {
	font-size: 0.875rem;
	color: var(--text-muted);
	text-decoration: none;
	transition: color var(--t);
}
.footer-col ul li a:hover {
	color: var(--amber-light);
	text-decoration: none;
}

.footer-bottom {
	padding: 1.25rem 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber-light); }
.footer-disclaimer { width: 100%; font-size: 0.6875rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1.25rem; }

/* BUG 2.3 FIX: prevent text overflow in footer newsletter column */
.footer-col--newsletter { min-width: 0; overflow: hidden; }
.footer-col--newsletter .sidebar-widget { min-width: 0; word-break: break-word; overflow-wrap: break-word; }
.footer-col--newsletter h6,
.footer-col--newsletter p { overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
/* Also prevent overflow on all footer wp:columns children */
.footer-top .wp-block-columns { min-width: 0; }
.footer-top .wp-block-columns > .wp-block-column { min-width: 0; }

/* -- 15. PROGRESSO DE LEITURA ----------------------------- */
.reading-progress {
	position: fixed;
	top: 0; left: 0;
	width: 0%;
	height: 3px;
	background: linear-gradient(90deg, var(--amber-dark) 0%, var(--amber-light) 100%);
	z-index: 9999;
	transition: width 100ms linear;
}

/* -- 16. BOTÕES WORDPRESS --------------------------------- */
.wp-block-button .wp-block-button__link,
.wp-element-button {
	background: var(--amber) !important;
	color: var(--text-inverse) !important;
	font-weight: 700 !important;
	border-radius: var(--r) !important;
	border: none !important;
	transition: background var(--t), box-shadow var(--t), transform var(--t) !important;
	font-family: var(--font-sans) !important;
}
.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--amber-light) !important;
	color: var(--text-inverse) !important;
	box-shadow: var(--shadow-amber) !important;
	transform: translateY(-1px) !important;
	text-decoration: none !important;
}

/* Outline */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--amber) !important;
	border: 1.5px solid var(--amber) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--amber) !important;
	color: var(--text-inverse) !important;
}

/* -- 17. ARCHIVE HERO ------------------------------------- */
.archive-hero { border-bottom: 2px solid var(--amber); }

/* -- 18. OVERRIDES GLOBAIS DE BLOCOS WP ------------------- */
/* Garante que os blocos core não injetem fundos brancos */
.wp-block-group:not([class*="has-"]:not(.wp-block-group)):not([style*="background"]) {
	background: transparent;
}

/* Força o fundo e cor do body nas páginas */
.wp-site-blocks,
.wp-block-template-part {
	background: var(--bg);
	color: var(--text-primary);
}

/* Inputs e formulários */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea,
select {
	background: var(--surface-1) !important;
	border: 1px solid var(--border-bright) !important;
	color: var(--text-primary) !important;
	border-radius: var(--r) !important;
	font-family: var(--font-sans) !important;
}
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; }
input:focus, textarea:focus, select:focus {
	outline: none !important;
	border-color: var(--amber) !important;
	box-shadow: 0 0 0 3px var(--amber-dim) !important;
}

/* Comentários */
.wp-block-post-comments-form textarea,
.wp-block-post-comments-form input {
	background: var(--surface-1) !important;
	border-color: var(--border-bright) !important;
	color: var(--text-primary) !important;
}

/* Separadores */
.wp-block-separator { border-color: var(--border-bright) !important; }

/* Quote block */
.wp-block-quote {
	border-left-color: var(--amber) !important;
	background: var(--amber-dim) !important;
	color: var(--text-secondary) !important;
}
.wp-block-quote cite { color: var(--text-muted) !important; }

/* Pull quote */
.wp-block-pullquote {
	background: var(--surface-1) !important;
	border-color: var(--amber) !important;
	color: var(--text-secondary) !important;
}

/* Code block */
.wp-block-code {
	background: var(--surface-0) !important;
	border: 1px solid var(--border-bright) !important;
	color: var(--text-primary) !important;
}

/* Tabela */
.wp-block-table table { background: var(--surface-0) !important; color: var(--text-primary) !important; }
.wp-block-table thead { background: var(--surface-1) !important; }
.wp-block-table td, .wp-block-table th { border-color: var(--border-bright) !important; }

/* Categories block */
.wp-block-categories a { color: var(--text-secondary) !important; }
.wp-block-categories a:hover { color: var(--amber) !important; }

/* Tag cloud */
.wp-block-tag-cloud a {
	background: var(--surface-2) !important;
	color: var(--text-secondary) !important;
	border: 1px solid var(--border) !important;
	border-radius: 100px !important;
	padding: 0.25rem 0.625rem !important;
	font-size: 0.75rem !important;
	text-decoration: none !important;
	transition: all var(--t) !important;
}
.wp-block-tag-cloud a:hover {
	background: var(--amber) !important;
	color: var(--text-inverse) !important;
	border-color: var(--amber) !important;
}

/* Social links */
.wp-block-social-links .wp-social-link {
	background: var(--surface-2) !important;
	color: var(--text-secondary) !important;
	transition: background var(--t) !important;
}
.wp-block-social-links .wp-social-link:hover {
	background: var(--amber) !important;
	color: var(--text-inverse) !important;
}

/* Navigation */
.wp-block-navigation a { color: var(--text-secondary) !important; }
.wp-block-navigation a:hover { color: var(--amber) !important; }
.wp-block-navigation .current-menu-item a { color: var(--amber) !important; }

/* -- 19. SEARCH RESULTS ----------------------------------- */
.search-result-item { border-color: var(--border) !important; }

/* -- 20. 404 -------------------------------------------- */
.error404 .wp-block-group { color: var(--text-primary); }

/* -- 21. RESPONSIVO --------------------------------------- */
@media (max-width: 1024px) {
	.layout-with-sidebar { grid-template-columns: 1fr; }
	.sidebar { position: static; }
	.footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
	.posts-grid { grid-template-columns: 1fr; }
	.post-card--featured { grid-column: span 1; grid-template-columns: 1fr; }
	.hero-featured__inner { grid-template-columns: 1fr; }
	.main-navigation { display: none; }
	.menu-toggle { display: flex; }
	.footer-top { grid-template-columns: 1fr; gap: 2rem; }
	.footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
	.header-actions .btn-subscribe { display: none; }
}

/* -- 22. PRINT -------------------------------------------- */
@media print {
	body { background: white !important; color: black !important; }
	.site-header, .ticker-strip, .sidebar,
	.site-footer, .reading-progress { display: none !important; }
	.layout-with-sidebar { grid-template-columns: 1fr; }
}
