/* Ícone newsletter no rodapé: dimensões fixas, nunca encolhe no flex nowrap.
 * O SVG Support substitui <img> por <svg> inline via JS — o <figure> é o elemento estável.
 * O <svg> substituído herda as classes do <img> mas precisa de dimensões fixas também.
 */
figure.footer-newsletter-icon {
	flex-shrink: 0 !important;
	width: 64px !important;
	min-width: 64px !important;
	height: 35px;
}

figure.footer-newsletter-icon img,
figure.footer-newsletter-icon svg {
	width: 64px !important;
	height: 35px !important;
	min-width: 64px;
	display: block;
	flex-shrink: 0;
}

/* .menu-row: centralizar no mobile (desktop mantém space-between via editor) */
@media (max-width: 480px) {
	.menu-row {
		justify-content: center !important;
	}
}

/* Logo: reduzir para 200px no mobile (proporção 210×24 → 200×22.86) */
@media (max-width: 480px) {
	.wp-block-site-logo img.custom-logo,
	.wp-block-site-logo svg.custom-logo {
		width: 200px !important;
		max-width: 200px !important;
		height: 22.86px !important;
	}
}

/* Header compacto no mobile quando em modo scrolled.
 * .is-scrolled é colocado num wrapper ACIMA do header pelo plugin block-header-behavior,
 * daí o padrão: .is-scrolled header.wp-block-template-part > ... */
@media (max-width: 480px) {
	/* Transição no padding da linha (logo + nav) */
	header.wp-block-template-part > .wp-block-group > .wp-block-group {
		transition: padding-top 0.3s ease, padding-bottom 0.3s ease;
	}

	/* Padding compacto ao scrollar */
	.is-scrolled header.wp-block-template-part > .wp-block-group > .wp-block-group {
		padding-top: 15px !important;
		padding-bottom: 15px !important;
	}

	/* Logo compacta ao scrollar
	 * Vem DEPOIS da regra dos 200px para ganhar na cascata (mesma especificidade) */
	.is-scrolled header.wp-block-template-part .wp-block-site-logo img.custom-logo,
	.is-scrolled header.wp-block-template-part .wp-block-site-logo svg.custom-logo {
		width: 130px !important;
		max-width: 130px !important;
		height: 14.86px !important;
	}
}

@media (max-width: 480px) and (prefers-reduced-motion: reduce) {
	header.wp-block-template-part > .wp-block-group > .wp-block-group {
		transition: none;
	}
}

/* Logo: reservar espaço exato antes da substituição inline pelo SVG Support.
 * Evita o flash de logo pequena no carregamento.
 * 210px × 24px = dimensões reais do SVG (viewBox 0 0 210 24).
 */
.wp-block-site-logo img.custom-logo {
	width: 210px;
	height: 24px;
	max-width: 210px;
	display: block;
}

/* Quando o SVG Support substitui o <img> por <svg> inline,
 * garantir que o SVG mantenha as mesmas dimensões sem reflow.
 */
.wp-block-site-logo svg {
	width: 210px;
	height: 24px;
	max-width: 210px;
	display: block;
	flex-shrink: 0;
}
