/**
 * Nexus WP - Estilos Base, Variáveis, Reset e Grid.
 *
 * @package Nexus_WP
 */

/* 1. Reset Moderno */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

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

body {
	font-family: var(--nexus-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	background-color: var(--nexus-bg-body, #f8fafc);
	color: var(--nexus-text-main, #0f172a);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color 0.25s ease, color 0.25s ease;
}

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

a {
	color: var(--nexus-primary, #2563eb);
	text-decoration: none;
	transition: color 0.15s ease-in-out;
}

a:hover {
	color: var(--nexus-primary-hover, #1d4ed8);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--nexus-font-heading, inherit);
	color: var(--nexus-text-main, #0f172a);
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 0.75rem;
}

p {
	margin-bottom: 1.25rem;
}

ul, ol {
	margin-bottom: 1.25rem;
	padding-left: 1.5rem;
}

/* 2. Variáveis Padrão e Sombras */
:root {
	--nexus-primary: #2563eb;
	--nexus-primary-rgb: 37, 99, 235;
	--nexus-primary-hover: #1d4ed8;
	--nexus-accent: #f59e0b;
	--nexus-accent-rgb: 245, 158, 11;
	--nexus-bg-body: #f8fafc;
	--nexus-bg-card: #ffffff;
	--nexus-text-main: #0f172a;
	--nexus-text-muted: #475569;
	--nexus-border: #e2e8f0;
	--nexus-container-max: 1200px;
	--nexus-sidebar-width: 320px;
	--nexus-radius: 8px;
	--nexus-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--nexus-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--nexus-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Modo Escuro */
[data-theme="dark"] {
	--nexus-bg-body: #0b1120;
	--nexus-bg-card: #1e293b;
	--nexus-text-main: #f1f5f9;
	--nexus-text-muted: #cbd5e1;
	--nexus-border: #334155;
	--nexus-primary: #3b82f6;
	--nexus-primary-hover: #60a5fa;
	--nexus-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
	--nexus-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
	--nexus-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* 3. Utilitários de Acessibilidade */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	background-color: var(--nexus-primary);
	border-radius: var(--nexus-radius);
	color: #ffffff;
	clip: auto !important;
	clip-path: none;
	display: block;
	font-size: 14px;
	font-weight: 600;
	height: auto;
	left: 10px;
	line-height: normal;
	padding: 12px 20px;
	position: fixed !important;
	top: 10px;
	width: auto;
	z-index: 100000;
}

/* 4. Ícones SVG Auxiliares */
.nexus-icon {
	width: 18px;
	height: 18px;
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

/* 5. Contêineres e Estrutura de Layout */
.nexus-site-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.nexus-site-content {
	flex-grow: 1;
	padding: 32px 0 60px 0;
}

.nexus-container {
	width: 100%;
	max-width: var(--nexus-container-max, 1200px);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* Grade de Conteúdo Principal e Sidebar */
.nexus-content-wrapper {
	display: block;
}

.nexus-content-wrapper.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--nexus-sidebar-width, 320px);
	gap: 40px;
	align-items: start;
}

.nexus-content-wrapper.has-sidebar.sidebar-left {
	grid-template-columns: var(--nexus-sidebar-width, 320px) minmax(0, 1fr);
}

.nexus-content-wrapper.has-sidebar.sidebar-left > .nexus-sidebar-area {
	order: -1;
}

.nexus-content-wrapper.is-fullwidth {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 1024px) {
	.nexus-content-wrapper.has-sidebar,
	.nexus-content-wrapper.has-sidebar.sidebar-left {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.nexus-content-wrapper.has-sidebar.sidebar-left > .nexus-sidebar-area {
		order: 1;
	}
}

/* 6. Botões Padronizados */
.nexus-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 24px;
	border-radius: var(--nexus-radius);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	white-space: nowrap;
	line-height: 1.2;
}

.nexus-btn-primary {
	background-color: var(--nexus-primary);
	color: #ffffff !important;
	box-shadow: 0 2px 4px rgba(var(--nexus-primary-rgb), 0.25);
}

.nexus-btn-primary:hover {
	background-color: var(--nexus-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(var(--nexus-primary-rgb), 0.35);
}

.nexus-btn-secondary {
	background-color: transparent;
	color: var(--nexus-text-main);
	border-color: var(--nexus-border);
}

.nexus-btn-secondary:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

/* 7. Inputs Padronizados */
.nexus-input,
.nexus-textarea {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	border: 1.5px solid var(--nexus-border);
	border-radius: var(--nexus-radius);
	background-color: var(--nexus-bg-card);
	color: var(--nexus-text-main);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nexus-input:focus,
.nexus-textarea:focus {
	border-color: var(--nexus-primary);
	box-shadow: 0 0 0 3px rgba(var(--nexus-primary-rgb), 0.15);
}

/* 8. Paginação */
.nexus-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.nexus-pagination-list {
	display: flex;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.nexus-pagination-item a,
.nexus-pagination-item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: var(--nexus-radius);
	border: 1px solid var(--nexus-border);
	background-color: var(--nexus-bg-card);
	color: var(--nexus-text-main);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s ease;
}

.nexus-pagination-item a:hover {
	border-color: var(--nexus-primary);
	color: var(--nexus-primary);
	background-color: rgba(var(--nexus-primary-rgb), 0.05);
}

.nexus-pagination-item.is-current span,
.nexus-pagination-item span.current {
	background-color: var(--nexus-primary);
	border-color: var(--nexus-primary);
	color: #ffffff;
}

/* 9. Botão Voltar ao Topo */
.nexus-back-to-top {
	position: fixed;
	bottom: 28px;
	right: 28px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background-color: var(--nexus-primary);
	color: #ffffff;
	border: none;
	cursor: pointer;
	box-shadow: var(--nexus-shadow-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
	z-index: 999;
}

.nexus-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nexus-back-to-top:hover {
	background-color: var(--nexus-primary-hover);
	transform: translateY(-2px);
}

