/* PT Base – CSS mínimo. Sem frameworks, sem fontes externas (stack de sistema). */

/* ---------- Variáveis ---------- */
:root {
	--c-text: #1a1a1a;
	--c-muted: #5c5c5c;
	--c-bg: #fff;
	--c-surface: #f5f5f4;
	--c-border: #e2e2e0;
	--c-accent: #0b5fff;
	--c-accent-ink: #fff;

	--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
	--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
	--step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
	--step-3: clamp(2rem, 1.6rem + 2vw, 3rem);

	--space: clamp(1rem, 0.8rem + 1vw, 1.5rem);
	--space-l: clamp(2rem, 1.5rem + 2.5vw, 4rem);
	--container: 72rem;
	--measure: 46rem;
	--radius: 0.5rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

body {
	margin: 0;
	font: var(--step-0) / 1.65 var(--font-sans);
	color: var(--c-text);
	background: var(--c-bg);
}

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

iframe {
	max-width: 100%;
}

a {
	color: var(--c-accent);
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p,
ul,
ol,
figure,
blockquote,
table {
	margin: 0 0 1.25em;
}

/* ---------- Utilitários ---------- */
.container {
	width: min(100% - 2 * var(--space), var(--container));
	margin-inline: auto;
}

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

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--c-bg);
	box-shadow: 0 0 0 2px var(--c-accent);
}

.site-main:focus {
	outline: none;
}

/* ---------- Cabeçalho e navegação ---------- */
.site-header {
	border-bottom: 1px solid var(--c-border);
	background: var(--c-bg);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space);
	padding-block: 1rem;
}

.site-title {
	font-size: var(--step-1);
	font-weight: 700;
	color: inherit;
	text-decoration: none;
}

.custom-logo {
	display: block;
	width: auto;
	max-height: 3.5rem;
}

.nav-toggle {
	display: none; /* escondido sem JS (progressive enhancement) */
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.js .nav-toggle {
	display: inline-flex;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
	display: block;
	width: 1.25rem;
	height: 2px;
	background: currentColor;
	content: "";
	position: relative;
}

.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after { position: absolute; top: 6px; }

.site-nav {
	display: block; /* sem JS o menu está sempre visível */
	flex-basis: 100%;
}

.js .site-nav {
	display: none;
}

.js .site-nav.is-open {
	display: block;
}

.site-nav .menu,
.footer-nav .menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: block;
	padding: 0.6rem 0;
	color: inherit;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
	color: var(--c-accent);
}

.site-nav .sub-menu {
	margin: 0;
	padding: 0 0 0 1rem;
	list-style: none;
}

@media (min-width: 48em) {
	.nav-toggle,
	.js .nav-toggle {
		display: none;
	}

	.site-nav,
	.js .site-nav {
		display: block;
		flex-basis: auto;
	}

	.site-nav .menu {
		display: flex;
		gap: 1.5rem;
	}

	.site-nav .menu-item {
		position: relative;
	}

	.site-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 10;
		display: none;
		min-width: 14rem;
		padding: 0.5rem 1rem;
		border: 1px solid var(--c-border);
		border-radius: var(--radius);
		background: var(--c-bg);
	}

	.site-nav .menu-item:hover > .sub-menu,
	.site-nav .menu-item:focus-within > .sub-menu {
		display: block;
	}
}

/* ---------- Conteúdo ---------- */
.site-main {
	padding-block: var(--space-l);
}

.page-header {
	margin-bottom: var(--space-l);
}

.page-description {
	color: var(--c-muted);
}

.entry {
	margin-bottom: var(--space-l);
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--c-accent);
}

.entry-meta {
	margin: 0 0 1rem;
	font-size: var(--step--1);
	color: var(--c-muted);
}

.entry-thumbnail {
	margin-bottom: 1.25rem;
}

.entry-thumbnail img {
	display: block;
	border-radius: var(--radius);
}

.entry-content > * {
	max-width: var(--measure);
	margin-inline: auto;
}

.entry-content > .alignwide {
	max-width: var(--container);
}

.entry-content > .alignfull {
	max-width: none;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content blockquote {
	padding-left: 1rem;
	border-left: 4px solid var(--c-border);
	color: var(--c-muted);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--c-border);
	text-align: left;
}

/* Alinhamentos e legendas do WordPress */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }

.wp-caption,
figcaption,
.wp-element-caption {
	font-size: var(--step--1);
	color: var(--c-muted);
}

.wp-caption { max-width: 100%; }

.post-list .entry {
	padding-bottom: var(--space-l);
	border-bottom: 1px solid var(--c-border);
}

/* ---------- Hero (exemplo para front-page.php) ---------- */
.hero {
	padding-block: var(--space-l);
	background: var(--c-surface);
}

.hero__title {
	font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
}

.hero__text {
	max-width: var(--measure);
	font-size: var(--step-1);
	color: var(--c-muted);
}

/* ---------- Formulários e botões ---------- */
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 28rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	background: var(--c-bg);
	color: inherit;
	font: inherit;
}

.button,
button[type="submit"],
input[type="submit"] {
	padding: 0.65rem 1.1rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--c-accent);
	color: var(--c-accent-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	filter: brightness(0.92);
}

/* ---------- Paginação ---------- */
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.pagination .page-numbers {
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--c-accent);
	border-color: var(--c-accent);
	color: var(--c-accent-ink);
}

/* ---------- Rodapé ---------- */
.site-footer {
	padding-block: var(--space-l);
	border-top: 1px solid var(--c-border);
	background: var(--c-surface);
	font-size: var(--step--1);
	color: var(--c-muted);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-footer__copy {
	margin: 0;
}

.footer-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-nav a {
	color: inherit;
}
