/**
 * Ajustes de integração com o WordPress / Astra.
 * O visual da página vem de lp.css e consultores.css.
 */

.pa-overlay[hidden] {
	display: none !important;
}

.pa-page {
	width: auto;
	max-width: none;
}

.pa-page img,
.pa-page svg {
	max-width: 100%;
}

/* No celular a foto do topo perde a curva do desktop e fica com base reta.
   Aqui ela recebe uma máscara em onda: o fundo da seção aparece pela curva,
   então não existe cor para acertar e a emenda encaixa sempre.
   Usamos máscara com SVG embutido, e não clip-path apontando para um <svg>
   da página, porque o Safari do iPhone falha com a segunda forma. */
@media (max-width: 980px) {
	.pa-page .hero-clip {
		clip-path: none !important;
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C0%20L1%2C0%20L1%2C0.86%20C0.82%2C0.99%200.62%2C0.90%200.42%2C0.95%20C0.24%2C0.99%200.12%2C0.93%200%2C0.97%20Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C0%20L1%2C0%20L1%2C0.86%20C0.82%2C0.99%200.62%2C0.90%200.42%2C0.95%20C0.24%2C0.99%200.12%2C0.93%200%2C0.97%20Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
		-webkit-mask-size: 100% 100%;
		mask-size: 100% 100%;
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
	}

	.pa-page .hero-seal {
		z-index: 5 !important;
		bottom: 58px !important;
	}
}

@media (max-width: 480px) {
	.pa-page .hero-seal {
		bottom: 50px !important;
	}
}

/* O Astra também define ::selection com a cor da paleta dele, então
   repetimos aqui para o azul de seleção do layout prevalecer. */
.pa-page ::selection,
.pa-overlay ::selection {
	background: #0b57d0;
	color: #fff;
}

.pa-page ::-moz-selection,
.pa-overlay ::-moz-selection {
	background: #0b57d0;
	color: #fff;
}

/* Tira as caixas do tema quando a página é montada por shortcode. */
body.pa-fullwidth .site-content .ast-container,
body.pa-fullwidth .ast-container,
body.pa-fullwidth #primary,
body.pa-fullwidth .site-main,
body.pa-fullwidth .entry-content,
body.pa-fullwidth .ast-article-single,
body.pa-fullwidth .ast-article-post {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.pa-fullwidth .entry-header,
body.pa-fullwidth .ast-single-post-order,
body.pa-fullwidth .post-navigation,
body.pa-fullwidth .ast-blog-featured-section {
	display: none !important;
}

body.pa-fullwidth .entry-content > * {
	margin-block: 0;
}

/* As ondas que separam as seções são SVG de altura fixa. Quando a altura cai
   num pixel fracionado, o fundo da seção de cima vaza como um fio escuro na
   emenda. Puxar 1px resolve sem mexer no desenho. */
.pa-page section > svg[preserveAspectRatio="none"] {
	margin-bottom: -1px;
}

/* O Astra aplica padding, cor e fundo em todo <button>, o que zera o espaço
   interno dos botões de ícone (menu, fechar, setas) e some com o SVG.
   Onde o layout define o valor no próprio elemento, ele continua valendo. */
.pa-page button,
.pa-overlay button {
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1;
	box-shadow: none;
	border-radius: 0;
	text-shadow: none;
}

.pa-page button svg,
.pa-overlay button svg {
	flex: none;
}

/* O botão "voltar ao topo" do Astra briga com o botão flutuante de WhatsApp. */
body.pa-fullwidth #ast-scroll-top,
body.pa-canvas #ast-scroll-top {
	display: none !important;
}

/* Menu do topo: com Guardiões e Área do Cliente entram 9 itens na barra,
   então o cabeçalho ganha largura, os rótulos nunca quebram no meio e o
   menu vira hambúrguer bem antes de apertar. */
.pa-page > header > div {
	max-width: 1280px !important;
}

.pa-page .nav-desk {
	gap: 12px !important;
	font-size: 13px !important;
	flex-wrap: nowrap !important;
}

.pa-page .nav-desk > a {
	white-space: nowrap !important;
}

.pa-page .nav-desk > a[target="_blank"] {
	padding-left: 15px !important;
	padding-right: 15px !important;
}

@media (max-width: 1240px) {
	.pa-page .nav-desk {
		display: none !important;
	}

	.pa-page .nav-burger {
		display: flex !important;
	}
}

/* Barra de admin não pode cobrir o menu fixo. */
body.admin-bar .pa-page > header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .pa-page > header {
		top: 46px;
	}
}

/* Canvas dos templates do tema filho. */
body.pa-canvas {
	margin: 0;
	padding: 0;
}
