/**
 * VendexHub Blog — estilos complementares ao theme.json
 * Fundo decorativo (grid + glows radiais), efeitos de card/hover, header sticky
 * com blur, botão gradiente e ajustes finos. Carregado no front-end e no editor.
 */

:root {
	--vh-base: #060912;
	--vh-surface: #0d1117;
	--vh-surface-2: #161b27;
	--vh-border: rgba(255, 255, 255, 0.06);
	--vh-border-strong: rgba(255, 255, 255, 0.1);
	--vh-text: #f1f5f9;
	--vh-muted: #94a3b8;
	--vh-indigo: #6366f1;
	--vh-purple: #7c3aed;
	--vh-grad-brand: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
	--vh-grad-hero: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #67e8f9 100%);
	--vh-radius: 16px;
}

/* ---------------------------------------------------------------------------
 * 1. Fundo decorativo: grid sutil + glows radiais suaves (índigo/roxo)
 * Fixo, atrás de todo o conteúdo, baixa opacidade e sem capturar cliques.
 * ------------------------------------------------------------------------- */
body.wp-site-blocks,
.wp-site-blocks {
	position: relative;
}

body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

/* Grade sutil */
body::before {
	background-image:
		linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
	background-size: 60px 60px;
	-webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 85%);
	mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 85%);
}

/* Glows radiais */
body::after {
	background:
		radial-gradient(ellipse 60% 45% at 15% 8%, rgba(99, 102, 241, 0.13), transparent 60%),
		radial-gradient(ellipse 55% 45% at 88% 12%, rgba(124, 58, 237, 0.13), transparent 60%),
		radial-gradient(ellipse 70% 50% at 50% 100%, rgba(79, 70, 229, 0.1), transparent 65%);
}

/* Garante o conteúdo acima das camadas decorativas */
.wp-site-blocks > * {
	position: relative;
	z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
	body::after {
		animation: vh-glow-drift 22s ease-in-out infinite alternate;
	}
}

@keyframes vh-glow-drift {
	from { transform: translate3d(0, 0, 0); opacity: 0.9; }
	to   { transform: translate3d(0, -1.5%, 0); opacity: 1; }
}

/* ---------------------------------------------------------------------------
 * 2. Header sticky com blur translúcido
 * ------------------------------------------------------------------------- */
.vh-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(6, 9, 18, 0.8);
	-webkit-backdrop-filter: saturate(140%) blur(20px);
	backdrop-filter: saturate(140%) blur(20px);
	border-bottom: 1px solid var(--vh-border);
}

/* Menu: espaçamento e realce do item ativo */
.vh-header .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	transition: color 0.18s ease;
}
.vh-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--vh-text);
}

/* Menu mobile (overlay) herda o fundo dark */
.wp-block-navigation__responsive-container.is-menu-open {
	background: rgba(6, 9, 18, 0.97) !important;
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
}

/* ---------------------------------------------------------------------------
 * 3. Cards de post (grid do índice / arquivo / busca)
 * Cantos arredondados, borda translúcida, glow de superfície e hover elevando.
 * ------------------------------------------------------------------------- */
.vh-card {
	background: linear-gradient(180deg, var(--vh-surface-2), var(--vh-surface));
	border: 1px solid var(--vh-border);
	border-radius: var(--vh-radius);
	overflow: hidden;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
	height: 100%;
}

.vh-card:hover,
.vh-card:focus-within {
	transform: translateY(-4px);
	border-color: rgba(124, 58, 237, 0.45);
	box-shadow:
		0 20px 45px -20px rgba(79, 70, 229, 0.45),
		0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

/* Imagem destacada dentro do card */
.vh-card .wp-block-post-featured-image {
	margin: 0;
	border-radius: 0;
}
.vh-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.vh-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* Faixa de gradiente no topo do card sem imagem — reforça a marca */
.vh-card .wp-block-post-featured-image::after {
	content: "";
	display: block;
}

/* Meta (data, autor, termos) */
.vh-meta,
.vh-meta a {
	color: var(--vh-muted);
	font-size: 0.85rem;
}
.vh-meta a:hover { color: var(--vh-text); }

/* Categorias / tags em formato de "pill" */
.vh-terms a,
.wp-block-post-terms a {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	margin: 0 0.35rem 0.35rem 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--vh-text);
	background: rgba(99, 102, 241, 0.14);
	border: 1px solid rgba(99, 102, 241, 0.3);
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.18s ease, border-color 0.18s ease;
}
.vh-terms a:hover,
.wp-block-post-terms a:hover {
	background: rgba(124, 58, 237, 0.28);
	border-color: rgba(124, 58, 237, 0.55);
}

/* ---------------------------------------------------------------------------
 * 4. Botão "Ler mais" — gradiente de marca com cantos arredondados
 * (o theme.json já estiliza core/button; aqui reforçamos o read-more e hover)
 * ------------------------------------------------------------------------- */
.wp-block-read-more,
.vh-readmore .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--vh-grad-brand);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 0.7rem 1.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	box-shadow: 0 8px 22px -12px rgba(124, 58, 237, 0.7);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.wp-block-read-more:hover,
.vh-readmore .wp-block-button__link:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 12px 28px -12px rgba(124, 58, 237, 0.85);
}
.wp-block-read-more::after,
.vh-readmore .wp-block-button__link::after {
	content: "→";
	font-weight: 700;
	transition: transform 0.18s ease;
}
.wp-block-read-more:hover::after,
.vh-readmore .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

/* Botão secundário / outline */
.is-style-vh-outline > .wp-block-button__link {
	background: transparent !important;
	border: 1px solid var(--vh-border-strong) !important;
	color: var(--vh-text) !important;
	box-shadow: none;
}
.is-style-vh-outline > .wp-block-button__link:hover {
	border-color: rgba(124, 58, 237, 0.6) !important;
	background: rgba(99, 102, 241, 0.1) !important;
}

/* ---------------------------------------------------------------------------
 * 5. Título hero com gradiente de texto tricolor
 * ------------------------------------------------------------------------- */
.vh-gradient-text,
.has-hero-text-gradient-background {
	background: var(--vh-grad-hero);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* Sublinhado gradiente decorativo (títulos de seção) */
.vh-eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--vh-indigo);
}

/* ---------------------------------------------------------------------------
 * 6. Conteúdo do post individual (single) — legibilidade
 * ------------------------------------------------------------------------- */
.vh-content .wp-block-post-content > * {
	max-width: 720px;
	margin-inline: auto;
}
.vh-content .wp-block-post-content > .alignwide,
.vh-content .wp-block-post-content > .alignfull,
.vh-content .wp-block-post-content > figure {
	max-width: none;
}
.vh-content figure img {
	border-radius: var(--vh-radius);
	border: 1px solid var(--vh-border);
}
.vh-content .wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.8;
}
.vh-content .wp-block-post-content :where(h2, h3, h4) {
	margin-top: 2.5rem;
}

/* Featured image do single com moldura suave */
.vh-hero-image img {
	border-radius: 20px;
	border: 1px solid var(--vh-border);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------------------------------------
 * 7. Footer
 * ------------------------------------------------------------------------- */
.vh-footer {
	background: rgba(13, 17, 23, 0.6);
	border-top: 1px solid var(--vh-border);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.vh-footer h2,
.vh-footer h3 {
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--vh-muted);
	font-weight: 700;
}
.vh-footer a { text-decoration: none; }
.vh-footer .wp-block-navigation {
	flex-direction: column;
	gap: 0.6rem;
	align-items: flex-start;
}
.vh-footer .wp-block-navigation a { color: var(--vh-muted); }
.vh-footer .wp-block-navigation a:hover { color: var(--vh-text); }

/* ---------------------------------------------------------------------------
 * 8. Formulários (busca, comentários)
 * ------------------------------------------------------------------------- */
.wp-block-search__input,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
	background: var(--vh-surface) !important;
	color: var(--vh-text) !important;
	border: 1px solid var(--vh-border-strong) !important;
	border-radius: 12px !important;
	padding: 0.7rem 1rem !important;
}
.wp-block-search__input:focus,
input:focus,
textarea:focus {
	outline: none;
	border-color: rgba(124, 58, 237, 0.6) !important;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}
::placeholder { color: var(--vh-muted); opacity: 1; }

.wp-block-search__button {
	background: var(--vh-grad-brand) !important;
	border: 0 !important;
	border-radius: 12px !important;
	color: #fff !important;
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * 9. Paginação
 * ------------------------------------------------------------------------- */
.wp-block-query-pagination .wp-block-query-pagination-numbers a,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next,
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--vh-border);
	border-radius: 10px;
	color: var(--vh-muted);
	text-decoration: none;
	transition: all 0.18s ease;
}
.wp-block-query-pagination a:hover {
	color: var(--vh-text);
	border-color: rgba(124, 58, 237, 0.5);
	background: rgba(99, 102, 241, 0.1);
}
.wp-block-query-pagination-numbers .current {
	background: var(--vh-grad-brand);
	color: #fff;
	border-color: transparent;
}

/* ---------------------------------------------------------------------------
 * 10. Acessibilidade — foco visível
 * ------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--vh-indigo);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 9999;
	background: var(--vh-surface-2);
	color: var(--vh-text);
	padding: 0.75rem 1.25rem;
	border-radius: 10px;
	border: 1px solid var(--vh-border-strong);
}
