/*
 * FooTheme — main.css
 * Frontend styles base
 */

/* ─── Reset / Base ───────────────────────────────────────────────────────── */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	min-height: 100vh;
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ─── Site Layout ─────────────────────────────────────────────────────────── */

/*
 * Sticky header: o position:sticky é declarado via atributo do bloco
 * (header.html). Aqui garantimos que nenhum wrapper do FSE quebre o contexto.
 */

/* Wrapper gerado pelo wp:template-part não pode ter overflow !== visible */
.wp-block-template-part {
	overflow: visible !important;
}

/* Mesma garantia para o wrapper raiz do FSE */
.wp-site-blocks,
.entry-content,
.wp-block-post-content {
	overflow: visible !important;
}

.foo-site-header {
	/* position:sticky aplicado inline pelo bloco — reforçamos aqui */
	position: sticky !important;
	top: 0 !important;
	z-index: 100;
	background: var(--wp--preset--color--foo-white);
	border-bottom: 1px solid var(--wp--preset--color--foo-border);
	box-shadow: var(--wp--preset--shadow--foo-sm);
}

.foo-site-header.is-scrolled {
	box-shadow: var(--wp--preset--shadow--foo-md);
}

.foo-site-main {
	flex: 1;
}

.foo-site-footer {
	margin-top: auto;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */

p {
	margin-block: 0 1em;
}

a {
	color: var(--wp--preset--color--foo-accent);
	text-decoration-skip-ink: auto;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--wp--preset--color--foo-primary);
}

/* ─── Block Styles: Button ────────────────────────────────────────────────── */

.wp-block-button.is-style-foo-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--foo-accent);
	border: 2px solid var(--wp--preset--color--foo-accent);
}

.wp-block-button.is-style-foo-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--foo-dark);
	border: none;
	text-decoration: underline;
}

/* ─── Block Styles: Group ─────────────────────────────────────────────────── */

.wp-block-group.is-style-foo-card {
	background: var(--wp--preset--color--foo-white);
	border: 1px solid var(--wp--preset--color--foo-border);
	border-radius: 8px;
	box-shadow: var(--wp--preset--shadow--foo-sm);
	overflow: hidden;
}

.wp-block-group.is-style-foo-section {
	padding-block: var(--wp--preset--spacing--16);
}

/* ─── Block Styles: Image ─────────────────────────────────────────────────── */

.wp-block-image.is-style-foo-rounded img {
	border-radius: 50%;
}

.wp-block-image.is-style-foo-shadow img {
	box-shadow: var(--wp--preset--shadow--foo-lg);
}

/* ─── Block Styles: Separator ─────────────────────────────────────────────── */

.wp-block-separator.is-style-foo-thick {
	border-width: 4px;
	border-color: var(--wp--preset--color--foo-accent);
}

.wp-block-separator.is-style-foo-dashed {
	border-style: dashed;
	border-color: var(--wp--preset--color--foo-muted);
}

/* ─── 404 ─────────────────────────────────────────────────────────────────── */

.foo-404 {
	text-align: center;
}

/* ─── Utilities ───────────────────────────────────────────────────────────── */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
