/*
 * PD Consultoria – cabeçalho, rodapé e botões (todas as páginas).
 * Seletores do Astra ficam restritos a este arquivo.
 */

body {
	font-family: var(--pd-font);
	color: var(--pd-dark);
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--pd-blue); color: #fff; }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--pd-blue);
	outline-offset: 2px;
	box-shadow: var(--pd-focus-ring);
}

/* Âncoras não ficam escondidas atrás do cabeçalho fixo */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--pd-header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- */
/* Cabeçalho                                                          */
/* ---------------------------------------------------------------- */

#masthead {
	position: sticky;
	top: 0;
	z-index: 99;
	border-bottom: 1px solid var(--pd-ice);
	box-shadow: 0 2px 12px rgba(51, 51, 52, .06);
}
.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar #masthead { top: 0; } }

#masthead .ast-container {
	max-width: calc(var(--pd-container) + 2 * var(--pd-gutter));
	padding-inline: var(--pd-gutter);
}

#masthead .ast-primary-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
	background-color: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: saturate(1.4) blur(16px);
	backdrop-filter: saturate(1.4) blur(16px);
	border-bottom: 0;
}

/* Barra superior */
.pd-topbar {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	font: 500 .75rem / 1 var(--pd-font);
	color: var(--pd-ice);
	white-space: nowrap;
}
.pd-topbar .pd-ico::before,
.pd-topbar__wa::before { color: var(--pd-light); width: 16px; height: 16px; }
#masthead .ast-builder-html-element p { margin: 0; }
#masthead .pd-topbar a { color: var(--pd-ice); }
#masthead .pd-topbar a:hover { color: #fff; }
#masthead .pd-topbar__wa {
	font: 600 .75rem / 1 var(--pd-font);
	color: var(--pd-light);
	white-space: nowrap;
}
#masthead .pd-topbar__wa:hover { color: #fff; }
@media (max-width: 767px) { .pd-topbar__mail { display: none; } }
@media (max-width: 1023px) { .pd-topbar__hours { display: none; } }

/* Menu principal */
#masthead .main-header-menu > .menu-item > .menu-link {
	font: 600 .9375rem / 1 var(--pd-font);
	text-transform: none;
	letter-spacing: normal;
	color: var(--pd-text-muted);
	padding-inline: 1rem;
	position: relative;
}
#masthead .main-header-menu > .menu-item > .menu-link:hover,
#masthead .main-header-menu > .current-menu-item > .menu-link {
	color: var(--pd-blue);
}
.ast-desktop #masthead .main-header-menu > .current-menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: calc(50% - 1em);
	height: 2px;
	background: var(--pd-blue);
}

/* Botão "Falar no WhatsApp" */
#masthead .ast-custom-button,
.ast-mobile-popup-drawer .ast-custom-button {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .625rem 1.25rem;
	border-radius: var(--pd-radius-sm);
	background: var(--pd-blue);
	color: #fff;
	font: 600 .875rem / 1.2 var(--pd-font);
	text-transform: none;
	letter-spacing: normal;
	box-shadow: 0 4px 14px rgba(5, 76, 225, .3);
	border: 0;
	transition: background-color .15s, box-shadow .15s;
}
#masthead .ast-custom-button::before,
.ast-mobile-popup-drawer .ast-custom-button::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--pd-whatsapp) center / contain no-repeat;
	mask: var(--pd-whatsapp) center / contain no-repeat;
}
#masthead .ast-header-button-1 { margin-left: .75rem; }
#masthead .ast-header-button-1 .ast-custom-button-link:hover .ast-custom-button {
	background: var(--pd-blue-hover);
	box-shadow: none;
}
@media (max-width: 921px) {
	.ast-mobile-popup-drawer .ast-header-button-1 { padding: 1.25rem; }
	.ast-mobile-popup-drawer .ast-custom-button { width: 100%; justify-content: center; }
}

/* Gaveta do menu no celular */
.ast-mobile-popup-drawer .main-header-menu .menu-link {
	font: 600 1rem / 1.2 var(--pd-font);
	text-transform: none;
	letter-spacing: normal;
	color: var(--pd-dark);
	padding-block: 1rem;
}
.ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link { color: var(--pd-blue); }
#masthead .menu-toggle.main-header-menu-toggle { color: var(--pd-dark); }

/* ---------------------------------------------------------------- */
/* Rodapé                                                             */
/* ---------------------------------------------------------------- */

.site-footer {
	color: var(--pd-ice);
	font: var(--pd-body-sm);
}
.site-footer .site-above-footer-wrap { padding-block: 4rem 3rem; }
.site-footer .ast-builder-grid-row-container-inner,
.site-footer .site-below-footer-wrap > .ast-builder-grid-row-container-inner {
	max-width: calc(var(--pd-container) + 2 * var(--pd-gutter));
	margin-inline: auto;
	padding-inline: var(--pd-gutter);
}
.site-footer .site-above-footer-inner-wrap { gap: 3rem; align-items: start; }
.site-footer .site-above-footer-inner-wrap .site-footer-section { justify-content: flex-start; align-items: flex-start; text-align: left; }
.site-footer .widget_nav_menu, .site-footer .widget_nav_menu ul { text-align: left; }
.site-footer a { color: var(--pd-ice); text-decoration: none; }
.site-footer a:hover { color: var(--pd-light); }
.site-footer .ast-builder-html-element p { margin: 0; }
.site-footer .ast-builder-html-element,
.site-footer .ast-builder-html-element p,
.site-footer .ast-builder-html-element li { color: var(--pd-ice); font: var(--pd-body-sm); }

.site-footer .widget .widget-title,
.site-footer .pd-footer-contact .pd-footer-title {
	font: 700 1rem / 1.3 var(--pd-font);
	color: #fff;
	margin: 0 0 1rem;
	text-transform: none;
	letter-spacing: 0;
}
.site-footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget_nav_menu li { margin: 0 0 .7rem; }
.site-footer .widget_nav_menu a { font: 500 .8125rem / 1.4 var(--pd-font); }

.pd-footer-brand { display: grid; gap: 1rem; max-width: 30rem; }
.pd-footer-brand__logo a {
	display: inline-block;
	background: #fff;
	padding: .5rem .75rem;
	border-radius: var(--pd-radius);
	line-height: 0;
}
.pd-footer-brand__logo img { width: 100px; height: auto; }
.pd-footer-brand__text { color: var(--pd-ice); line-height: 1.65; }
.site-footer .ast-builder-html-element .pd-footer-brand__place { color: var(--pd-light); }
.pd-social { display: flex; gap: .5rem; }
.site-footer .pd-social__link {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: var(--pd-radius);
	background: rgba(255, 255, 255, .1);
	color: #fff;
}
.site-footer .pd-social__link::before { margin: 0; width: 18px; height: 18px; }
.site-footer .pd-social__link:hover { background: var(--pd-blue); color: #fff; }

.pd-footer-contact ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .7rem; }
.pd-footer-contact li { margin: 0; }
.pd-footer-contact .pd-ico::before { color: var(--pd-light); }
.site-footer .ast-builder-html-element .pd-footer-lgpd {
	display: inline-flex;
	align-items: center;
	padding: .4rem .75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	color: #c9d6f5; /* #8aa8e8 sobre este fundo fica em 3,9:1 */
	font: 600 .6875rem / 1.2 var(--pd-font);
}

.site-footer .site-below-footer-wrap { border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer .site-below-footer-wrap .ast-builder-grid-row { min-height: 0; padding-block: 1.5rem; }
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright p { color: #b9b8ba; font: 400 .75rem / 1.6 var(--pd-font); margin: 0; }
.site-footer .ast-footer-copyright a { color: #d4d7dd; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 921px) {
	.site-footer .site-above-footer-inner-wrap { gap: 2.5rem; }
}

/* Botão flutuante do Click to Chat acima do conteúdo, mas abaixo do banner LGPD */
.ht-ctc-chat { z-index: 98 !important; }

/* ---------------------------------------------------------------- */
/* Botões (estilos de bloco registrados em functions.php)             */
/* ---------------------------------------------------------------- */

.wp-block-button[class*="is-style-pd-"] .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 48px;
	padding: .875rem 1.75rem;
	border-radius: var(--pd-radius-sm);
	border: 1px solid transparent;
	font: 600 .9375rem / 1.2 var(--pd-font);
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none;
	transition: background-color .15s, box-shadow .15s, border-color .15s, color .15s, gap .15s;
}
.wp-block-button.is-style-pd-primary .wp-block-button__link {
	background: var(--pd-blue);
	color: #fff;
	box-shadow: var(--pd-shadow-blue);
}
.wp-block-button.is-style-pd-primary .wp-block-button__link:hover { background: var(--pd-blue-hover); box-shadow: none; color: #fff; }
.wp-block-button.is-style-pd-primary .wp-block-button__link:active { background: var(--pd-blue-active); }

.wp-block-button.is-style-pd-outline .wp-block-button__link {
	background: transparent;
	color: var(--pd-dark);
	border-color: rgba(130, 129, 130, .4);
}
.wp-block-button.is-style-pd-outline .wp-block-button__link:hover { background: rgba(227, 231, 237, .5); border-color: var(--pd-dark); }

.wp-block-button.is-style-pd-light .wp-block-button__link {
	background: rgba(255, 255, 255, .1);
	color: #fff;
	border-color: rgba(255, 255, 255, .25);
}
.wp-block-button.is-style-pd-light .wp-block-button__link:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.wp-block-button.is-style-pd-light-solid .wp-block-button__link {
	background: #fff;
	color: var(--pd-blue);
	font-weight: 700;
	box-shadow: var(--pd-shadow-2);
}
.wp-block-button.is-style-pd-light-solid .wp-block-button__link:hover { background: var(--pd-ice); color: var(--pd-blue-hover); }

.wp-block-button.is-style-pd-link .wp-block-button__link {
	min-height: 0;
	padding: .25rem 0;
	background: none;
	color: var(--pd-blue);
	font: 700 .8125rem / 1.2 var(--pd-font);
	gap: .25rem;
}
.wp-block-button.is-style-pd-link .wp-block-button__link:hover { color: var(--pd-blue-hover); gap: .5rem; }

/* Ícones nos botões: pd-i-* antes do texto; pd-arrow/pd-chevron depois */
.wp-block-button[class*=" pd-i-"] .wp-block-button__link::before,
.wp-block-button.pd-arrow .wp-block-button__link::after,
.wp-block-button.pd-chevron .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--pd-icon) center / contain no-repeat;
	mask: var(--pd-icon) center / contain no-repeat;
	transition: transform .15s;
}
.wp-block-button.is-style-pd-light[class*=" pd-i-"] .wp-block-button__link::before { background: var(--pd-light); }
.wp-block-button.pd-arrow .wp-block-button__link::after { -webkit-mask-image: var(--pd-arrow); mask-image: var(--pd-arrow); }
.wp-block-button.pd-arrow .wp-block-button__link:hover::after { transform: translateX(3px); }
.wp-block-button.pd-chevron .wp-block-button__link::after { width: 16px; height: 16px; -webkit-mask-image: var(--pd-chevron); mask-image: var(--pd-chevron); }
