/*
 * Cabecalho fixo com efeito de ativacao ao rolar.
 * A classe esta-rolado e posta pelo cabecalho.js.
 */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	isolation: isolate;
}

/* Barra do WordPress (logado): fixa acima de 600px */
body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; }
}

/* Camada de fundo (desfoque) e linha de brilho: ficam em pseudo-elementos */
.wp-site-blocks > header.wp-block-template-part::before,
.wp-site-blocks > header.wp-block-template-part::after {
	content: "";
	position: absolute;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.wp-site-blocks > header.wp-block-template-part::before {
	inset: 0;
	z-index: -1;
	opacity: 0;
	background: rgba(10, 10, 11, 0.78);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.9);
}

.wp-site-blocks > header.wp-block-template-part::after {
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	opacity: 0;
	transform: scaleX(0.2);
	background: linear-gradient(90deg, rgba(122, 30, 246, 0) 0%, #9a54f8 50%, rgba(122, 30, 246, 0) 100%);
	box-shadow: 0 0 12px 1px rgba(122, 30, 246, 0.55);
}

.wp-site-blocks > header.esta-rolado::before { opacity: 1; }
.wp-site-blocks > header.esta-rolado::after { opacity: 1; transform: scaleX(1); }

/* Altura um pouco menor e logo reduzido depois de ativado */
.wp-site-blocks > header .zafarie-header { transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.wp-site-blocks > header.esta-rolado .zafarie-header {
	padding-top: calc(var(--wp--preset--spacing--30) * 0.6) !important;
	padding-bottom: calc(var(--wp--preset--spacing--30) * 0.6) !important;
}
.wp-site-blocks > header .zf-logo img { transform-origin: left center; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.wp-site-blocks > header.esta-rolado .zf-logo img { transform: scale(0.9); }

/* Ancoras (#formulario-contato, FAQ) nao ficam escondidas sob o cabecalho */
html { scroll-padding-top: calc(var(--zf-altura-cabecalho, 80px) + 16px); }

/* ---------- Transicao de zoom pelos links do submenu ---------- */

/* Saida: o link clicado se expande ate cobrir a tela */
.zf-zoom-veu {
	position: fixed;
	inset: 0;
	z-index: 10000;
	pointer-events: none;
	background: radial-gradient(900px 520px at var(--zf-veu-x, 50%) var(--zf-veu-y, 30%), rgba(97, 9, 215, 0.35), rgba(10, 10, 11, 0) 70%), #0a0a0b;
	clip-path: inset(var(--zf-veu-t) var(--zf-veu-r) var(--zf-veu-b) var(--zf-veu-l) round 12px);
	transition: clip-path 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}
.zf-zoom-veu.esta-aberto { clip-path: inset(0 0 0 0 round 0); }
.zf-zoom-veu::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid rgba(154, 84, 248, 0.6);
	border-radius: 12px;
	box-shadow: inset 0 0 24px rgba(122, 30, 246, 0.35);
	opacity: 1;
	transition: opacity 0.3s ease 0.15s;
}
.zf-zoom-veu.esta-aberto::after { opacity: 0; }

/* A pagina atual recua levemente enquanto o veu cresce */
.zf-zoom-saindo .wp-site-blocks > main {
	transform-origin: var(--zf-veu-x, 50%) var(--zf-veu-y, 30%);
	transform: scale(0.97);
	opacity: 0.6;
	transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.42s ease;
}

/* Entrada: a nova pagina abre com zoom a partir do ponto clicado */
@keyframes zf-zoom-entra {
	from { opacity: 0; transform: scale(0.9); }
	to   { opacity: 1; transform: none; }
}
@keyframes zf-zoom-veu-sai {
	from { opacity: 1; }
	to   { opacity: 0; visibility: hidden; }
}
.zf-zoom-entra .wp-site-blocks > main {
	transform-origin: var(--zf-zoom-x, 50%) var(--zf-zoom-y, 30vh);
	animation: zf-zoom-entra 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.zf-zoom-entra body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 10000;
	pointer-events: none;
	background: #0a0a0b;
	animation: zf-zoom-veu-sai 0.45s ease 0.05s both;
}

@media (prefers-reduced-motion: reduce) {
	.zf-zoom-veu { display: none; }
	.zf-zoom-entra .wp-site-blocks > main,
	.zf-zoom-entra body::before { animation: none; }
	.zf-zoom-entra body::before { display: none; }

	.wp-site-blocks > header.wp-block-template-part::before,
	.wp-site-blocks > header.wp-block-template-part::after,
	.wp-site-blocks > header .zafarie-header,
	.wp-site-blocks > header .zf-logo img { transition: none; }
}
