/*
 * Animações do site Engebloc (camada extra sobre o layout do Elementor).
 *
 * - Só anima opacity, transform, filter e clip-path (leve para o navegador).
 * - Fica desligada para quem ativou "reduzir movimento" no sistema (a classe
 *   .pm-anim nem é adicionada) e, se o JavaScript falhar, .pm-off mostra tudo.
 * - Os números das classes .elementor-element-xxxx são os blocos do Elementor
 *   na página inicial (banner, produtos, portfólio).
 */

:root {
	--pm-red: #c42032;
	--pm-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--pm-ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
	scroll-behavior: smooth;
}

/* ------------------------------------------------------------ Barra de progresso */

.pm-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, #8e1424, var(--pm-red) 60%, #e8475a);
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
}

/* ------------------------------------------------------------ Revelação ao rolar */

/* Até o script distribuir as animações, o conteúdo fica oculto (evita "piscar"). */
.pm-anim:not(.pm-off):not(.pm-ready) :is([data-elementor-type="wp-page"], [data-elementor-type="single-post"], [data-elementor-type="footer"]) .elementor-widget,
.pm-anim:not(.pm-off):not(.pm-ready) .elementor-widget-breadcrumbs,
.pm-anim:not(.pm-off):not(.pm-ready) .site-main :is(article, .page-header) {
	opacity: 0;
}

.pm-anim:not(.pm-off) [data-pm] {
	transition:
		opacity 0.9s var(--pm-ease),
		transform 1.1s var(--pm-ease),
		filter 0.9s var(--pm-ease),
		clip-path 1.3s var(--pm-ease);
	transition-delay: var(--pm-delay, 0s);
}
.pm-anim:not(.pm-off) [data-pm]:not(.pm-in) {
	opacity: 0;
}
.pm-anim:not(.pm-off) [data-pm="up"]:not(.pm-in) {
	transform: translate3d(0, 32px, 0);
}
.pm-anim:not(.pm-off) [data-pm="left"]:not(.pm-in) {
	transform: translate3d(-40px, 0, 0);
}
.pm-anim:not(.pm-off) [data-pm="zoom"]:not(.pm-in) {
	transform: translate3d(0, 24px, 0) scale(0.93);
}
.pm-anim:not(.pm-off) [data-pm="blur"]:not(.pm-in) {
	transform: translate3d(0, 18px, 0);
	filter: blur(10px);
}
.pm-anim:not(.pm-off) [data-pm="wipe"] {
	opacity: 1;
	clip-path: inset(0 100% 0 0);
}
.pm-anim:not(.pm-off) [data-pm="tile"] {
	opacity: 1;
	clip-path: inset(100% 0 0 0);
}
.pm-anim:not(.pm-off) :is([data-pm="wipe"], [data-pm="tile"]).pm-in {
	clip-path: inset(0 0 0 0);
}
.pm-anim:not(.pm-off) [data-pm="tile"] img {
	transition: transform 1.6s var(--pm-ease);
	transition-delay: var(--pm-delay, 0s);
}
.pm-anim:not(.pm-off) [data-pm="tile"]:not(.pm-in) img {
	transform: scale(1.3);
}

/* Destaque sob as palavras em vermelho dos títulos */
.titlered {
	background-image: linear-gradient(rgba(196, 32, 50, 0.24), rgba(196, 32, 50, 0.24));
	background-repeat: no-repeat;
	background-position: 0 92%;
	background-size: 100% 0.3em;
}
.pm-anim:not(.pm-off) .titlered {
	background-size: 0% 0.3em;
	transition: background-size 1.4s var(--pm-ease) 0.6s;
}
.pm-anim:not(.pm-off) .pm-seen .titlered {
	background-size: 100% 0.3em;
}

/* ------------------------------------------------------------ Banner da página inicial */

/* A foto do banner passa para uma camada própria, que pode receber zoom. */
.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-probe) {
	background-image: none !important;
	background-color: #0b0b0b !important;
}
.pm-hero {
	isolation: isolate;
}
.pm-hero-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}
.pm-hero-zoom,
.pm-hero-img {
	position: absolute;
	inset: 0;
}
.pm-hero-zoom {
	opacity: 0;
	transform: scale(1.18);
	transition:
		opacity 1.6s var(--pm-ease-soft),
		transform 3.2s var(--pm-ease);
}
.pm-hero.pm-go .pm-hero-zoom {
	opacity: 1;
	transform: none;
}
.pm-hero-img {
	will-change: transform;
}

/* Logo, contatos e menu descem; subtítulo sai do desfoque; botão sobe. */
.pm-anim:not(.pm-off) .home :is(.elementor-element-248a5c2, .elementor-element-ba77dde, .elementor-element-6c14146, .elementor-element-294c115, .elementor-element-667546c, .elementor-element-ea8a993) {
	transition:
		opacity 1s var(--pm-ease),
		transform 1.1s var(--pm-ease),
		filter 1s var(--pm-ease);
}
.pm-anim:not(.pm-off) .home .elementor-element-248a5c2 { transition-delay: 0.3s; }
.pm-anim:not(.pm-off) .home .elementor-element-ba77dde { transition-delay: 0.42s; }
.pm-anim:not(.pm-off) .home :is(.elementor-element-6c14146, .elementor-element-294c115) { transition-delay: 0.54s; }
.pm-anim:not(.pm-off) .home .elementor-element-667546c { transition-delay: 1.25s; }
.pm-anim:not(.pm-off) .home .elementor-element-ea8a993 { transition-delay: 1.5s; }

.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-go) :is(.elementor-element-248a5c2, .elementor-element-ba77dde, .elementor-element-6c14146, .elementor-element-294c115) {
	opacity: 0;
	transform: translate3d(0, -18px, 0);
}
.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-go) .elementor-element-667546c {
	opacity: 0;
	transform: translate3d(0, 14px, 0);
	filter: blur(8px);
}
.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-go) .elementor-element-ea8a993 {
	opacity: 0;
	transform: translate3d(0, 18px, 0) scale(0.94);
}
.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-split) .elementor-element-89a42ae {
	opacity: 0;
}

/* Subtítulo "abre" o espaçamento entre as letras (só em telas grandes). */
@media (min-width: 1025px) {
	.pm-anim:not(.pm-off) .home .elementor-element-667546c .elementor-heading-title {
		transition: letter-spacing 2s var(--pm-ease) 1.15s;
	}
	.pm-anim:not(.pm-off) .home .elementor-element-6dd2bb7:not(.pm-go) .elementor-element-667546c .elementor-heading-title {
		letter-spacing: 0.5em;
	}
}

/* Título: cada palavra sobe de dentro de uma "máscara". */
.pm-word {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding: 0.12em 0 0.14em;
	margin: -0.12em 0 -0.14em;
}
.pm-word > span {
	display: inline-block;
	transform: translate3d(0, 115%, 0);
	transition: transform 1.2s var(--pm-ease);
	transition-delay: calc(0.6s + var(--i) * 0.075s);
}
.pm-go .pm-word > span {
	transform: none;
}

/* ------------------------------------------------------------ Efeitos de interação */

@media (prefers-reduced-motion: no-preference) {
	/* Botões: sobem um pouco e recebem um brilho que atravessa. O brilho é um gradiente
	   no fundo do próprio botão (overflow: hidden mudaria o alinhamento dos botões). */
	.elementor-button {
		background-image: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.42) 50%, transparent 60%);
		background-repeat: no-repeat;
		background-size: 250% 100%;
		background-position: 130% 0;
		transition:
			transform 0.35s var(--pm-ease),
			box-shadow 0.35s var(--pm-ease),
			background-color 0.3s;
	}
	.elementor-button.pm-shine {
		animation: pm-shine 1.2s var(--pm-ease) both;
	}

	/* Seta "Ver todos os produtos" */
	.elementor-element-ea20e60 .elementor-icon i {
		display: inline-block;
		animation: pm-nudge 1.9s var(--pm-ease-soft) infinite;
	}

	/* Anel pulsando no botão de play do vídeo */
	.elementor-custom-embed-play::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 110px;
		height: 110px;
		margin: -55px 0 0 -55px;
		border: 2px solid rgba(255, 255, 255, 0.8);
		border-radius: 50%;
		animation: pm-pulse 2.4s var(--pm-ease-soft) infinite;
		pointer-events: none;
	}

	/* Fotos do portfólio, produtos e cards do blog */
	.gallery-item .gallery-icon,
	.elementor-post__thumbnail {
		overflow: hidden;
	}
	.gallery-item img,
	.elementor-post__thumbnail img,
	.elementor-element-76f3dcf .elementor-widget-image img {
		transition:
			transform 0.9s var(--pm-ease),
			filter 0.9s var(--pm-ease);
	}
	.elementor-post {
		transition: transform 0.5s var(--pm-ease);
	}
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	.elementor-button:hover {
		transform: translate3d(0, -2px, 0);
		box-shadow: 0 12px 26px -10px rgba(196, 32, 50, 0.75);
	}
	.elementor-button:hover {
		background-position: -30% 0;
		transition:
			transform 0.35s var(--pm-ease),
			box-shadow 0.35s var(--pm-ease),
			background-color 0.3s,
			background-position 0.9s var(--pm-ease);
	}
	.gallery-item:hover img {
		transform: scale(1.07);
		filter: brightness(1.08) saturate(1.08);
	}
	.elementor-element-76f3dcf .elementor-widget-image a:hover img {
		transform: translate3d(0, -8px, 0) scale(1.04);
	}
	.elementor-post:hover {
		transform: translate3d(0, -6px, 0);
	}
	/* O Elementor centraliza a miniatura com translate(-50%, -50%); o zoom precisa manter isso. */
	.elementor-has-item-ratio .elementor-post:hover .elementor-post__thumbnail img {
		transform: translate(-50%, -50%) scale(1.07);
	}
	.elementor-posts-container:not(.elementor-has-item-ratio) .elementor-post:hover .elementor-post__thumbnail img {
		transform: scale(1.07);
	}
}

/* ------------------------------------------------------------ Aviso de cookies (versão compacta) */

/* O CookieYes injeta o próprio CSS depois deste arquivo; os seletores abaixo são mais específicos de propósito. */
.cky-consent-container.cky-box-bottom-left {
	width: 360px;
	bottom: 24px;
	left: 24px;
}
.cky-consent-container.cky-box-bottom-left .cky-consent-bar {
	padding: 14px 16px;
	border-radius: 10px;
	box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
}
.cky-consent-container.cky-box-bottom-left .cky-notice .cky-title {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 20px;
}
.cky-consent-container.cky-box-bottom-left .cky-notice-group {
	display: flex;
	align-items: center;
	gap: 14px;
}
.cky-consent-container.cky-box-bottom-left .cky-notice-des,
.cky-consent-container.cky-box-bottom-left .cky-notice-des * {
	font-size: 12.5px;
	line-height: 19px;
}
.cky-consent-container.cky-box-bottom-left .cky-notice-btn-wrapper {
	flex: none;
	margin: 0;
}
.cky-consent-container.cky-box-bottom-left .cky-notice-btn-wrapper .cky-btn {
	flex: none;
	width: auto;
	margin: 0;
	padding: 5px 18px;
	font-size: 13px;
	line-height: 20px;
	border-radius: 6px;
}

@media (max-width: 576px) {
	.cky-consent-container.cky-box-bottom-left {
		right: 10px;
		bottom: 10px;
		left: 10px;
		width: auto;
		max-width: none;
	}
	.cky-consent-container.cky-box-bottom-left .cky-consent-bar {
		padding: 10px 12px 10px 14px;
	}
	.cky-consent-container.cky-box-bottom-left .cky-notice .cky-title {
		display: none;
	}
	.cky-consent-container.cky-box-bottom-left :is(.cky-notice-des, .cky-notice-btn-wrapper) {
		padding: 0;
	}
	.cky-consent-container.cky-box-bottom-left .cky-notice-des {
		max-height: none;
		overflow: visible;
	}
	.cky-consent-container.cky-box-bottom-left .cky-notice-des,
	.cky-consent-container.cky-box-bottom-left .cky-notice-des * {
		font-size: 12px;
		line-height: 17px;
	}
	.cky-consent-container.cky-box-bottom-left .cky-notice-btn-wrapper {
		flex-direction: row;
	}
	.cky-consent-container.cky-box-bottom-left .cky-notice-btn-wrapper .cky-btn {
		margin: 0;
	}
}

@keyframes pm-shine {
	from { background-position: 130% 0; }
	to { background-position: -30% 0; }
}
@keyframes pm-nudge {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(7px); }
}
@keyframes pm-pulse {
	0% { transform: scale(0.75); opacity: 0.9; }
	100% { transform: scale(1.55); opacity: 0; }
}
