/*
Theme Name: Veloz
Theme URI: https://blogopiniao.com
Author: Chasing Ads
Description: Tema minimalista focado em performance para blogs monetizados com anúncios. Sem fontes externas, sem JavaScript no front-end, CSS enxuto.
Version: 1.0.0
Requires at least: 6.4
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: veloz
*/

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
	color: #1a1a1a;
	background: #ffffff;
}

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

a {
	color: #0b5fae;
	text-decoration: underline;
}

a:hover {
	text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.25;
	margin: 1.4em 0 0.6em;
	font-weight: 700;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }

blockquote {
	margin: 1.4em 0;
	padding: 0.2em 1.2em;
	border-left: 4px solid #ddd;
	color: #444;
}

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: #f4f4f4;
}

pre {
	padding: 1em;
	overflow-x: auto;
	border-radius: 4px;
}

figure { margin: 1.4em 0; }

figcaption {
	font-size: 0.85rem;
	color: #666;
	margin-top: 0.4em;
}

hr {
	border: none;
	border-top: 1px solid #e2e2e2;
	margin: 2em 0;
}

/* Alinhamentos de bloco básicos (sem carregar wp-block-library) */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }

/* ---------- Layout ---------- */
.site-wrapper {
	max-width: 780px;
	margin: 0 auto;
	padding: 0 1.2rem;
}

.site-footer .site-wrapper {
	max-width: var( --veloz-footer-width, 780px );
}

/* Área de conteúdo (main) na home/categorias — largura configurável via
   Customizer (Grade de Posts), com controles independentes para cada uma.
   Posts/páginas individuais mantêm 780px fixo de propósito, para não
   prejudicar a leitura do texto corrido. */
body.home .content-wrapper {
	max-width: var( --veloz-grid-width-home, 780px );
}

body.category .content-wrapper {
	max-width: var( --veloz-grid-width-category, 780px );
}

.site-header {
	border-bottom: 1px solid #ececec;
	padding: var( --veloz-header-padding-y, 12px ) 0;
}

.site-header-inner {
	max-width: var( --veloz-header-width, 780px );
	margin: 0 auto;
	padding: 0 1.2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.site-title {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0;
}

.site-title a {
	color: #1a1a1a;
	text-decoration: none;
}

.site-header .custom-logo-link {
	display: inline-flex;
}

.site-header .custom-logo,
.site-header .custom-header-image {
	height: var( --veloz-header-logo-height, 60px );
	width: auto;
}

/* ---------- Menu (sem JavaScript, apenas CSS) ---------- */
.menu-toggle-checkbox {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.header-icons .menu-toggle-label {
	display: none;
}

/* Groups the search icon and hamburger icon as a single flex item, so the
   header's justify-content:space-between spreads title/nav/icons apart but
   never inserts extra space between the two icons themselves. Both icons
   share this exact box (size/padding), so they line up top and bottom. */
.header-icons {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	order: 10; /* always the last flex item, so it stays flush right */
	margin-left: auto;
}

.header-icons label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	cursor: pointer;
	color: #1a1a1a;
	user-select: none;
}

.header-icons label:hover { color: #0b5fae; }

/* On desktop the wrapper generates no box of its own (its children — the
   backdrop label and the nav — become direct flex items of the header row,
   exactly as if .menu-overlay didn't exist). The mobile media query below
   turns it into a full-screen overlay instead. */
.menu-overlay {
	display: contents;
}

.menu-overlay-backdrop {
	display: none;
}

.primary-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1.4rem;
}

.primary-menu a {
	text-decoration: none;
	color: #1a1a1a;
	font-weight: 600;
	font-size: 0.95rem;
}

.primary-menu a:hover { color: #0b5fae; }

/* ---------- Busca no cabeçalho: overlay em tela cheia, sem JavaScript ----------
   position:fixed tira o formulário do fluxo normal, então ele nunca desloca
   o conteúdo abaixo — só aparece por cima quando o checkbox é marcado. */
.search-toggle-checkbox {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.search-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
}

.search-toggle-checkbox:checked ~ .search-overlay {
	display: block;
}

.search-overlay-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.6 );
	cursor: pointer;
}

.search-form {
	position: relative;
	z-index: 1;
	display: flex;
	gap: 0.5rem;
	max-width: 560px;
	margin: 12vh auto 0;
	padding: 0 1.2rem;
}

.search-field {
	flex: 1;
	min-width: 0;
	padding: 0.7em 0.9em;
	border: none;
	border-radius: 6px;
	font: inherit;
	font-size: 1rem;
}

.search-submit {
	padding: 0.7em 1.2em;
	border: none;
	border-radius: 6px;
	background: #0b5fae;
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.search-submit:hover { opacity: 0.9; }

@media (max-width: 640px) {
	.header-icons .menu-toggle-label { display: inline-flex; }

	/* Same full-screen overlay pattern as the search box: position:fixed
	   takes it out of normal flow, so opening the menu never pushes the
	   page content down. */
	.menu-overlay {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 1000;
	}

	.menu-toggle-checkbox:checked ~ .menu-overlay {
		display: block;
	}

	.menu-overlay-backdrop {
		display: block;
		position: absolute;
		inset: 0;
		background: rgba( 0, 0, 0, 0.6 );
		cursor: pointer;
	}

	.primary-menu {
		position: relative;
		z-index: 1;
		margin: 12vh 1.2rem 0;
		padding: 0.5rem 1.2rem;
		background: #fff;
		border-radius: 8px;
		max-height: 70vh;
		overflow-y: auto;
	}

	.primary-menu ul {
		flex-direction: column;
		gap: 0;
	}

	.primary-menu li {
		border-top: 1px solid #ececec;
	}

	.primary-menu li:first-child {
		border-top: none;
	}

	.primary-menu a {
		display: block;
		padding: 0.7em 0;
	}
}

/* ---------- Conteúdo ---------- */
.site-main {
	padding: var( --veloz-space-header-title, 10px ) 0 3rem;
	min-height: 50vh;
}

.entry-header { margin-bottom: 1.2em; }

.entry-title {
	font-size: var( --veloz-title-size, 20px );
	margin: 0 0 var( --veloz-space-title-paragraph, -8px );
}

.entry-thumb {
	margin: 0 0 1.4em;
}

.entry-thumb img {
	border-radius: 6px;
}

.entry-content {
	margin-bottom: 1.5em;
	font-size: var( --veloz-content-size, 15px );
}

/* ---------- Grade de posts (arquivo / categoria / home) ---------- */
.post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

/* Colunas configuráveis via Customizer (Grade de Posts); "archive.php" (tags,
   datas, etc.) sempre usa 1 coluna, já que não tem um controle dedicado. */
body.home .post-grid {
	grid-template-columns: repeat( var( --veloz-grid-cols-home, 1 ), 1fr );
}

body.category .post-grid {
	grid-template-columns: repeat( var( --veloz-grid-cols-category, 1 ), 1fr );
}

@media ( max-width: 640px ) {
	body.home .post-grid,
	body.category .post-grid {
		grid-template-columns: 1fr;
	}
}

.post-card {
	border-bottom: 1px solid #ececec;
	padding-bottom: 2rem;
}

.post-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.post-card-thumb {
	margin-bottom: 0.8em;
	border-radius: 6px;
	overflow: hidden;
}

.post-card-thumb img {
	border-radius: 6px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}

.post-card-title {
	font-size: 1.3rem;
	margin: 0 0 0.3em;
}

.post-card-meta {
	font-size: 0.85rem;
	color: #666;
	margin: 0 0 0.5em;
}

.post-card-excerpt {
	color: #333;
	margin: 0;
}

.archive-title {
	font-size: 1.6rem;
	margin: 0 0 1.4rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid #1a1a1a;
	display: inline-block;
}

/* ---------- Paginação (ícones + números em caixa) ---------- */
.pagination {
	margin: 2.5rem 0 1rem;
}

.pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	height: 2.2rem;
	padding: 0 0.6rem;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	color: #333;
	text-decoration: none;
	font-size: 0.9rem;
}

a.page-numbers:hover {
	border-color: #0b5fae;
	color: #0b5fae;
}

.pagination .page-numbers.current {
	background: #0b5fae;
	border-color: #0b5fae;
	color: #fff;
	font-weight: 700;
}

.pagination .page-numbers.dots {
	border: none;
	color: #999;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
	padding: 0 0.5rem;
}

/* ---------- Data da postagem ---------- */
.entry-footer-meta {
	margin: 2rem 0 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #ececec;
	font-size: 0.9rem;
	color: #666;
}

/* ---------- Author box ---------- */
.author-box {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin: 0 0 2.5rem;
	padding: 1.2rem;
	background: #f8f8f8;
	border-radius: 8px;
}

.author-box img {
	border-radius: 50%;
	flex-shrink: 0;
}

.author-box-name {
	font-weight: 700;
	margin: 0 0 0.3em;
}

.author-box-bio {
	margin: 0;
	color: #444;
	font-size: 0.95rem;
}

/* ---------- Botão CTA (bloco veloz/cta-button) ---------- */
.veloz-cta {
	margin: 1.6em 0;
	text-align: center;
}

.veloz-cta-button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.9em 1.6em;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	text-align: center;
}

.veloz-cta-button:hover {
	opacity: 0.9;
	text-decoration: none;
}

.veloz-cta-note {
	margin: 0.5em 0 0;
	font-style: italic;
	font-size: 0.85rem;
	color: #888;
}

/* ---------- Artigos relacionados ---------- */
.related-posts {
	margin: 0 0 2rem;
}

.related-posts-title {
	font-size: 1.15rem;
	margin: 0 0 1rem;
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.related-post {
	display: flex;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 1rem;
}

.related-post-link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

.related-post-title {
	font-size: 1rem;
	margin: 0 0 0.4em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-post-excerpt {
	flex: 1;
	font-size: 0.88rem;
	color: #555;
	margin: 0 0 0.6em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-post-date {
	margin: 0;
	align-self: flex-end;
	font-size: 0.75rem;
	color: #999;
}

/* ---------- Rodapé (3 linhas: caixa legal, colunas, copyright) ---------- */
.site-footer {
	border-top: 1px solid #ececec;
	font-size: 0.85rem;
	color: var( --veloz-footer-text, #666 );
	text-align: var( --veloz-footer-align, left );
}

.footer-row {
	padding: 1.6rem 0;
}

.footer-row + .footer-row {
	border-top: 1px solid #ececec;
}

.footer-legal-box {
	padding: 1.2rem 1.4rem;
	border: 1px solid #ececec;
	border-radius: 8px;
}

.footer-legal-item + .footer-legal-item {
	margin-top: 1.1rem;
}

.footer-legal-item h3 {
	margin: 0 0 0.5em;
	font-size: var( --veloz-disclaimer-title-size, 14px );
	color: var( --veloz-footer-text, #333 );
}

.footer-legal-item p {
	margin: 0;
	font-size: var( --veloz-disclaimer-text-size, 13px );
	color: var( --veloz-footer-text, #777 );
	line-height: 1.6;
}

.footer-columns-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2rem;
}

.footer-col h3 {
	display: inline-block;
	margin: 0 0 0.9em;
	padding-bottom: 0.3em;
	border-bottom: 2px solid currentColor;
	font-size: 0.95rem;
	color: var( --veloz-footer-text, #1a1a1a );
}

.footer-logo {
	margin: 0 0 1rem;
}

.footer-logo img {
	max-height: 60px;
	width: auto;
}

.footer-logo-text {
	font-weight: 700;
	font-size: 1.1rem;
	color: var( --veloz-footer-text, #1a1a1a );
}

.footer-about-text {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.6;
}

.footer-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	padding: 0.25em 0;
}

.footer-menu a {
	color: var( --veloz-footer-text, #444 );
	text-decoration: none;
}

.footer-menu a:hover { text-decoration: underline; }

.footer-col-categories ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-col-categories li {
	padding: 0.25em 0;
}

.footer-col-categories li a {
	color: var( --veloz-footer-text, #444 );
	text-decoration: none;
}

.footer-col-categories li a::before {
	content: '\203A';
	margin-right: 0.4em;
	color: var( --veloz-footer-text, #999 );
}

.footer-col-categories li a:hover { text-decoration: underline; }

/* Widget area (classic/legacy widgets from plugins) shown under the brand column */
.footer-widgets {
	margin-top: 1rem;
}

.footer-widgets .widget {
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.footer-widgets .widget-title {
	margin: 0 0 0.5em;
	font-size: 0.95rem;
}

.footer-widgets .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-row-bottom {
	background-color: var( --veloz-footer-bottom-bg, transparent );
	color: var( --veloz-footer-bottom-text, inherit );
	text-align: center;
}

.footer-row-bottom p {
	margin: 0;
}

.footer-company-info {
	margin-top: 0.6rem !important;
	font-size: 0.78rem;
	line-height: 1.6;
}

@media ( max-width: 640px ) {
	.footer-columns-grid {
		grid-template-columns: 1fr;
		gap: 1.6rem;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Bloco FAQ (veloz/faq) ---------- */
.veloz-faq {
	padding: 30px;
	border-radius: 8px;
	margin: 20px 0;
}

.veloz-faq-progress {
	width: 100%;
	height: 4px;
	background-color: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 25px;
}

.veloz-faq-progress-fill {
	height: 100%;
	border-radius: 2px;
}

.veloz-faq-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 30px;
	text-align: center;
}

.veloz-faq-list {
	max-width: 800px;
	margin: 0 auto;
}

.veloz-faq-item {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 12px;
	overflow: hidden;
}

.veloz-faq-question {
	width: 100%;
	padding: 20px;
	background-color: #f9fafb;
	border: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	font: inherit;
	text-align: left;
}

.veloz-faq-question:hover { background-color: #f1f5f9; }

.veloz-faq-question[aria-expanded="true"] {
	background-color: #eff6ff;
	border-bottom: 1px solid #e5e7eb;
}

.veloz-faq-question-text {
	font-size: 1rem;
	font-weight: 600;
	color: #374151;
}

.veloz-faq-icon {
	color: #6b7280;
	display: flex;
	flex-shrink: 0;
}

.veloz-faq-question[aria-expanded="true"] .veloz-faq-icon { color: #3b82f6; }

.veloz-faq-icon-minus { display: none; }

.veloz-faq-question[aria-expanded="true"] .veloz-faq-icon-plus { display: none; }
.veloz-faq-question[aria-expanded="true"] .veloz-faq-icon-minus { display: block; }

.veloz-faq-answer {
	background-color: #fff;
	padding: 20px;
}

.veloz-faq-answer-content {
	color: #6b7280;
	line-height: 1.6;
	font-size: 0.95rem;
}

.veloz-faq-answer-content p:last-child {
	margin-bottom: 0;
}

@media ( max-width: 768px ) {
	.veloz-faq { padding: 20px; }
	.veloz-faq-title { font-size: 1.4rem; margin-bottom: 20px; }
	.veloz-faq-question,
	.veloz-faq-answer { padding: 15px; }
	.veloz-faq-question-text { font-size: 0.95rem; }
}

/* ---------- Bloco Card de Produto (veloz/product-card) ---------- */
.veloz-product-card {
	max-width: 1000px;
	margin: 2rem auto;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.veloz-pc-progress {
	width: 100%;
	height: 4px;
	background: #d1d5db;
	margin-bottom: 2rem;
	border-radius: 3px;
	overflow: hidden;
}

.veloz-pc-progress-fill {
	height: 100%;
	border-radius: 3px;
}

.veloz-pc-body {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.veloz-pc-image {
	width: 320px;
	height: 192px;
	flex-shrink: 0;
	overflow: hidden;
}

.veloz-pc-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.veloz-pc-content {
	flex: 1;
	min-width: 280px;
}

.veloz-pc-category {
	font-size: 0.75rem;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: block;
	margin-bottom: 8px;
}

.veloz-pc-title {
	font-size: 1.6rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 16px;
	line-height: 1.2;
}

.veloz-pc-tags {
	margin: 16px 0;
}

.veloz-pc-tags span {
	display: inline-block;
	border: 1px solid;
	padding: 4px 12px;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 500;
	margin-right: 8px;
}

.veloz-pc-description {
	color: #4b5563;
	line-height: 1.6;
	margin: 16px 0;
}

.veloz-pc-button-wrap {
	text-align: right;
	padding-top: 16px;
}

.veloz-pc-button-container {
	display: inline-block;
	text-align: center;
}

.veloz-pc-button {
	display: inline-block;
	background: var( --veloz-pc-btn-color, #16a34a );
	color: #fff;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 8px;
	text-decoration: none;
}

.veloz-pc-button:hover {
	background: var( --veloz-pc-btn-hover, #15803d );
}

.veloz-pc-button-container small {
	display: block;
	margin-top: 8px;
	font-size: 0.75rem;
	color: #6b7280;
}

@media ( max-width: 768px ) {
	.veloz-product-card { padding: 1rem; margin: 1rem auto; }
	.veloz-pc-body { flex-direction: column; gap: 1.5rem; }
	.veloz-pc-image { width: 100%; max-width: 320px; height: 192px; margin: 0 auto; }
	.veloz-pc-content { text-align: center; }
	.veloz-pc-tags { display: flex; justify-content: center; flex-wrap: wrap; }
	.veloz-pc-button-wrap { text-align: center; }
	.veloz-pc-button-container { display: block; }
	.veloz-pc-button { width: 100%; padding: 16px 32px; }
}
