/**
 * Balanço Social — blindagem da página interna (single) no Salient.
 *
 * Causa do "padding lateral estranho" no mobile: um Texto Responsivo do Nectar
 * com tamanho só de desktop (ex.: "Fundamentos" em 6rem = 96px) cria uma palavra
 * mais larga que a tela. Como #ajax-content-wrap é item de flex (min-width:auto),
 * o layout inteiro cresce (375 → 529px) e as rows full-width do Salient são
 * calculadas sobre essa largura falsa → deslocadas e cortadas à direita.
 *
 * Seletores só com classes estáveis (sem #fws_*), escopados ao CPT.
 */

/* 1. O conteúdo nunca alarga o layout além da viewport */
body.single-amhbs_balanco #ajax-content-wrap,
body.single-amhbs_balanco .container-wrap {
	min-width: 0;
	max-width: 100%;
}

/* 1b. Espaços em branco que o Salient aplica a quem NÃO é Página:
       - .container-wrap { padding-top: 40px } (style.css do tema)
       - body:not(.page):not(.single…) .nectar-global-section.before-footer { padding-top: 40px }
         (salient-dynamic-styles.css) → faixa branca antes do rodapé.
       Zerados para o balanço se comportar igual a uma Página (/quem-somos/ = 0). */
body.single-amhbs_balanco .container-wrap {
	padding-top: 0 !important;
}

body.single-amhbs_balanco .nectar-global-section.before-footer {
	padding-top: 0 !important;
}

/* 1c. Último bloco do conteúdo: o Salient dá margin-bottom 1.5em à última row
       que não é full-width (regra .container-wrap .row > .wpb_row:not(.full-width-section)
       :not(.full-width-content):last-child) — caso de uma Global Section no fim.
       Resultado era uma faixa branca de ~25px antes do rodapé. */
body.single-amhbs_balanco .container.main-content > .row > :last-child {
	margin-bottom: 0 !important;
}

/* 1d. Global Section aninhada no fim do conteúdo: o Salient imprime um <style>
       logo depois da <section>, então ela deixa de ser :last-child e cai na regra
       body[data-col-gap="50px"] .wpb_row:not(.full-width-section):not(.full-width-content):not(:last-child)
       { margin-bottom: 50px } → faixa branca de 50px antes do rodapé.
       :last-of-type cobre a <section>; :has() cobre a row seguida só do <style>. */
body.single-amhbs_balanco .container.main-content > .row > :last-child .wpb_wrapper > .wpb_row:last-child,
body.single-amhbs_balanco .container.main-content > .row > :last-child .wpb_wrapper > section.nectar_section:last-of-type {
	margin-bottom: 0 !important;
}

body.single-amhbs_balanco .container.main-content > .row > :last-child .wpb_wrapper > .wpb_row:nth-last-child(2):has(+ style:last-child) {
	margin-bottom: 0 !important;
}

/* 2. Texto Responsivo sem tamanho de celular definido: limita a 13vw */
@media (max-width: 690px) {
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_4rem:not([class*="font_size_phone_"])  { font-size: min(4rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_5rem:not([class*="font_size_phone_"])  { font-size: min(5rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_6rem:not([class*="font_size_phone_"])  { font-size: min(6rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_7rem:not([class*="font_size_phone_"])  { font-size: min(7rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_8rem:not([class*="font_size_phone_"])  { font-size: min(8rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_9rem:not([class*="font_size_phone_"])  { font-size: min(9rem, 13vw) !important;  line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_10rem:not([class*="font_size_phone_"]) { font-size: min(10rem, 13vw) !important; line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_11rem:not([class*="font_size_phone_"]) { font-size: min(11rem, 13vw) !important; line-height: 1.05 !important; }
	body.single-amhbs_balanco .nectar-responsive-text.font_size_desktop_12rem:not([class*="font_size_phone_"]) { font-size: min(12rem, 13vw) !important; line-height: 1.05 !important; }

	/* 3. Última rede: palavra ainda maior que a coluna quebra em vez de vazar */
	body.single-amhbs_balanco .nectar-responsive-text {
		overflow-wrap: break-word;
	}
}
