/**
 * Estilos globais do tema Fora Cáusticos.
 *
 * Só o que o theme.json não cobre: foco visível, link de pular conteúdo,
 * header/rodapé e movimento reduzido. Estilos de blocos ficam em
 * assets/css/blocos/ e são carregados apenas quando o bloco está na página.
 */

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

/* Âncoras não ficam escondidas atrás do topo da tela. */
:target,
[id] {
	scroll-margin-top: 1rem;
}

/* Header, conteúdo e rodapé encostados: cada seção tem o próprio espaço. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------- Foco visível ---------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--amarelo);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--preto);
	border-radius: 2px;
}

/* Seções que recebem foco por script (tabindex=-1) não mostram o anel. */
[tabindex="-1"]:focus {
	outline: none;
	box-shadow: none;
}

/* Sobre fundo amarelo, o anel amarelo não aparece: inverte as cores. */
:where(.has-amarelo-background-color, .is-style-secao-amarela) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--preto);
	box-shadow: 0 0 0 6px var(--wp--preset--color--amarelo);
}

/* ---------- Pular para o conteúdo ---------- */

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--amarelo);
	color: var(--wp--preset--color--preto);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 1.125rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	z-index: 100000;
}

/* ---------- Botões ---------- */

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--botao--altura-minima);
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* ---------- Redes sociais (header, rodapé, caixa de compartilhar) ------- */

.fc-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: inherit;
	opacity: 0.85;
}

.fc-social__link:hover,
.fc-social__link:focus-visible {
	opacity: 1;
}

/* ---------- Header ---------- */

.fc-header {
	position: relative;
	z-index: 20;
}

.fc-header__marca {
	flex-shrink: 0;
}

.fc-header__marca.is-layout-flex {
	align-items: center;
}

.fc-header__marca .wp-block-site-logo img {
	display: block;
	width: 56px;
	height: auto;
}

.fc-header__marca .wp-block-site-title {
	white-space: nowrap;
}

.fc-tem-logo .fc-header__marca .wp-block-site-title {
	display: none;
}

.fc-header__tagline {
	display: none;
	margin: 0;
}

.fc-tem-logo .fc-header__marca .fc-header__tagline {
	display: block;
}

.fc-header__acoes {
	flex-wrap: nowrap;
}

.fc-header__social {
	display: flex;
	flex-shrink: 0;
	gap: 0.25rem;
}

.fc-header__social .fc-social__link {
	color: var(--wp--preset--color--branco);
}

/* No mobile, o botão de emergência do header dá lugar ao botão flutuante;
os ícones sociais somem junto (menu já fica apertado nessa largura). */
@media (max-width: 767.98px) {

	.fc-header .fc-header__emergencia,
	.fc-header .fc-header__social {
		display: none;
	}
}

@media (max-width: 380px) {

	.fc-header__marca .wp-block-site-title {
		font-size: 1.25rem;
	}

	.fc-header__marca .wp-block-site-logo img {
		width: 36px;
	}
}

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

.fc-footer__logo img {
	display: block;
	width: auto !important;
	height: 128px !important;
}

.fc-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.fc-footer__links a {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	display: inline-block;
	padding-block: 0.5rem;
}

.fc-footer__social {
	display: flex;
	gap: 0.5rem;
}

.fc-footer__social .fc-social__link {
	color: var(--wp--preset--color--preto);
}

@media (max-width: 599.98px) {

	/* Faixa final do rodapé (copyright + aviso de IA + "desenvolvido por"): centralizada no mobile. */
	.fc-footer__copyright {
		justify-content: center !important;
		text-align: center;
	}

	.fc-footer__actfly {
		margin-inline: auto;
	}
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
