/**
 * rgconstrucaocivil — estilos de apoio.
 * Edite cores e espaçamentos preferencialmente em theme.json.
 */

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	/* Espaço mínimo para o botão fixo não sobrepor o último conteúdo */
	padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

/* Rodapé em largura total da viewport (alinhado ao padrão Leite / root padding aware) */
footer.stahl-footer.alignfull,
.stahl-footer.alignfull {
	width: 100vw;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	box-sizing: border-box;
}

.wp-site-blocks {
	overflow-x: clip;
}

/* Evita que o <main> cresça com flex-grow e deixe faixa branca antes do rodapé */
main.wp-block-group {
	flex-grow: 0;
	flex-shrink: 0;
}

/* Cabeçalho */
.stahl-header {
	backdrop-filter: blur(10px);
	background-color: rgba(255, 255, 255, 0.92);
	z-index: 50;
}

.stahl-header--scrolled {
	box-shadow: var(--wp--preset--shadow--md);
}

.stahl-field-row-split {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 600px) {
	.stahl-field-row-split {
		grid-template-columns: 1fr 1fr;
	}
}


.stahl-header .wp-block-site-title a {
	text-decoration: none;
}

@media (max-width: 781px) {
	.hide-on-mobile {
		display: none;
	}
}

/* Texto em gradiente dentro do título hero (editável no bloco Título) */
.stahl-gradient-text {
	background: linear-gradient(
		90deg,
		var(--wp--preset--color--brand-contrast),
		var(--wp--preset--color--brand-dark)
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Indicador “role” no hero */
.stahl-scroll-hint {
	animation: stahl-bounce 2s ease-in-out infinite;
	cursor: pointer;
	text-align: center;
}

@keyframes stahl-bounce {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(6px);
	}
}

/* Cartões de serviço — altura uniforme na grelha */
#solucoes .wp-block-group.is-layout-grid > .stahl-service-item {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 100%;
}

.stahl-service-card {
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	border: 1px solid rgba(10, 10, 10, 0.06);
	padding: var(--wp--preset--spacing--50);
}

.stahl-service-card:hover {
	box-shadow: var(--wp--preset--shadow--md);
	transform: translateY(-4px);
}

.stahl-service-card h3 {
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: clamp(1rem, 2vw, 1.15rem);
}

.stahl-service-card > .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--40);
}

.stahl-service-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--brand-dark);
	background: rgba(10, 10, 10, 0.04);
	border: 1px solid rgba(10, 10, 10, 0.08);
	flex-shrink: 0;
}

.stahl-service-icon svg {
	display: block;
	width: 1.35rem;
	height: 1.35rem;
}

.stahl-service-card:hover .stahl-service-icon {
	color: var(--wp--preset--color--brand-dark);
	background: rgba(10, 10, 10, 0.06);
}

/* Portfólio */
.stahl-portfolio-item {
	position: relative;
	overflow: hidden;
	min-height: 20rem;
}

.stahl-portfolio-item .wp-block-image {
	height: 100%;
	min-height: 20rem;
	margin: 0;
}

.stahl-portfolio-item > figure.wp-block-image {
	height: 100%;
	min-height: 20rem;
}

.stahl-portfolio-item .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.stahl-portfolio-item:hover .wp-block-image img {
	transform: scale(1.04);
}

.stahl-portfolio-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: var(--wp--preset--spacing--50);
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.95) 55%
	);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.stahl-portfolio-item:hover .stahl-portfolio-meta {
	opacity: 1;
}

/* Sobre — moldura offset */
.stahl-about-frame {
	position: relative;
}

.stahl-about-frame::before {
	content: "";
	position: absolute;
	inset: 0;
	transform: translate(12px, 12px);
	background: var(--wp--preset--color--brand-muted);
	z-index: 0;
}

.stahl-about-frame .wp-block-image {
	position: relative;
	z-index: 1;
}

.stahl-about-frame .wp-block-image img {
	filter: grayscale(1);
}

.stahl-about-frame:hover .wp-block-image img {
	filter: grayscale(0);
}

/* Contato */
.stahl-contact-panel {
	border: 1px solid rgba(10, 10, 10, 0.1);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stahl-contact-info-row {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.stahl-contact-info-row:last-child {
	margin-bottom: 0;
}

.stahl-contact-info-icon {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafafa;
	border: 1px solid rgba(10, 10, 10, 0.1);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stahl-contact-info-icon svg {
	width: 1.1rem;
	height: 1.1rem;
	color: var(--wp--preset--color--brand-dark);
}

.stahl-contact-info-row h5 {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
}

.stahl-contact-slot {
	border: 1px dashed rgba(82, 82, 82, 0.35);
	min-height: 8rem;
}

/* WhatsApp flutuante (círculo + ícone SVG, estilo referência Untitled-1) */
.stahl-wa-float {
	position: fixed;
	right: var(--wp--preset--spacing--50);
	bottom: var(--wp--preset--spacing--50);
	z-index: 60;
	pointer-events: none;
}

.stahl-wa-float .wp-block-html {
	margin: 0;
	pointer-events: auto;
}

.stahl-wa-float-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 9999px;
	background: #25d366;
	color: #fff;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
	animation: stahl-wa-pulse 2s ease-in-out infinite;
	pointer-events: auto;
}

.stahl-wa-float-link:hover {
	background: #1ebe57;
	color: #fff;
	transform: scale(1.05);
}

.stahl-wa-float-link svg {
	width: 1.75rem;
	height: 1.75rem;
	display: block;
	fill: currentColor;
}

@keyframes stahl-wa-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
	}
	70% {
		box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

/* Botão outline do cabeçalho */
.stahl-header .is-style-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--brand-dark);
	background: transparent;
	color: var(--wp--preset--color--brand-dark);
}

.stahl-header .is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--brand-dark);
	color: var(--wp--preset--color--white);
}

/* Linha decorativa sob títulos de seção */
hr.stahl-rule,
.stahl-rule {
	border: 0;
	height: 4px;
	width: 6rem;
	background: var(--wp--preset--color--brand-dark);
}
