/*
Theme Name: DIK Engenharia
Theme URI: https://dikengenharia.com
Author: DIK Engenharia Elétrica
Description: Tema em blocos (Full Site Editing) da DIK Engenharia Elétrica. Todo o conteúdo — textos, imagens, cores, menus, cabeçalho e rodapé — pode ser editado visualmente no editor do WordPress, sem código.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dik-engenharia
*/

html { scroll-behavior: smooth; }
:where(section, [id]) { scroll-margin-top: 90px; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }

/* Seções encostadas umas nas outras (cada seção já tem seu próprio espaçamento) */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }

/* ---------- Cabeçalho ---------- */
.dik-cabecalho {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 0 rgba(11, 37, 69, 0.08), 0 8px 24px rgba(11, 37, 69, 0.04);
}
.admin-bar .dik-cabecalho { top: 32px; }
@media (max-width: 782px) { .admin-bar .dik-cabecalho { top: 46px; } }
.dik-cabecalho .wp-block-navigation-item__content { padding: 0.35rem 0; position: relative; }
.dik-cabecalho .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
	background: var(--wp--preset--color--amarelo); transition: right .25s ease;
}
.dik-cabecalho .wp-block-navigation-item__content:hover::after { right: 0; }
.dik-cabecalho .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem; }
@media (max-width: 600px) { .dik-cabecalho .dik-botao-cabecalho { display: none; } }

/* ---------- Estilos de bloco (selecionáveis em "Estilos" no editor) ---------- */

/* Rótulo acima dos títulos */
.is-style-dik-rotulo {
	display: inline-flex; align-items: center; gap: 0.6rem;
	font-family: var(--wp--preset--font-family--titulos);
	font-size: 0.8rem !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--wp--preset--color--petroleo);
}
.is-style-dik-rotulo::before {
	content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--wp--preset--color--amarelo); flex: none;
}
.has-text-align-center.is-style-dik-rotulo { display: flex; justify-content: center; }

/* Cartão */
.wp-block-group.is-style-dik-cartao, .wp-block-column.is-style-dik-cartao {
	background: var(--wp--preset--color--branco);
	border: 1px solid rgba(11, 37, 69, 0.07);
	border-radius: 18px;
	padding: clamp(1.5rem, 3vw, 2rem);
	box-shadow: 0 10px 30px rgba(11, 37, 69, 0.06);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.wp-block-group.is-style-dik-cartao:hover, .wp-block-column.is-style-dik-cartao:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 45px rgba(11, 37, 69, 0.12);
	border-color: rgba(247, 185, 15, 0.6);
}

/* Cartão escuro (para fundos azuis) */
.wp-block-group.is-style-dik-cartao-escuro, .wp-block-column.is-style-dik-cartao-escuro {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	padding: clamp(1.5rem, 3vw, 2rem);
	backdrop-filter: blur(4px);
}

/* Imagem arredondada */
.wp-block-image.is-style-dik-arredondada img { border-radius: 22px; box-shadow: 0 20px 50px rgba(11, 37, 69, 0.15); }

/* Botão WhatsApp */
.wp-block-button.is-style-dik-whatsapp .wp-block-button__link {
	background: #25D366; color: #fff; display: inline-flex; align-items: center; gap: .55rem;
}
.wp-block-button.is-style-dik-whatsapp .wp-block-button__link::before {
	content: ""; width: 20px; height: 20px; flex: none;
	background: currentColor;
	-webkit-mask: var(--dik-icone-whatsapp) center / contain no-repeat;
	mask: var(--dik-icone-whatsapp) center / contain no-repeat;
}
.wp-block-button.is-style-dik-whatsapp .wp-block-button__link:hover { background: #1ebe5b; color: #fff; }

/* Botão contorno claro (fundos escuros) */
.wp-block-button.is-style-dik-contorno-claro .wp-block-button__link {
	background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}
.wp-block-button.is-style-dik-contorno-claro .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--azul-marinho); }

/* Botão contorno escuro (fundos claros) */
.wp-block-button.is-style-dik-contorno .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--azul-marinho); box-shadow: inset 0 0 0 2px var(--wp--preset--color--azul-marinho);
}
.wp-block-button.is-style-dik-contorno .wp-block-button__link:hover { background: var(--wp--preset--color--azul-marinho); color: #fff; }

:root {
	--dik-icone-whatsapp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.47 14.38c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.94 1.17-.17.2-.35.22-.64.07-.3-.15-1.26-.46-2.4-1.48-.89-.79-1.49-1.77-1.66-2.07-.17-.3-.02-.46.13-.61.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.08-.15-.67-1.61-.92-2.2-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.3-1.04 1.02-1.04 2.48s1.07 2.88 1.21 3.08c.15.2 2.1 3.2 5.08 4.49.71.31 1.26.49 1.69.63.71.23 1.36.2 1.87.12.57-.09 1.76-.72 2.01-1.41.25-.7.25-1.29.17-1.41-.07-.13-.27-.2-.57-.35M12.05 21.5h-.01a9.4 9.4 0 0 1-4.8-1.31l-.34-.2-3.56.93.95-3.47-.22-.36a9.4 9.4 0 0 1-1.44-5.01c0-5.2 4.23-9.43 9.44-9.43a9.4 9.4 0 0 1 9.43 9.44c0 5.2-4.24 9.43-9.44 9.43m8.03-17.46A11.28 11.28 0 0 0 12.05.72C5.8.72.7 5.8.7 12.07c0 2 .52 3.95 1.52 5.67L.6 23.64l6.03-1.58a11.3 11.3 0 0 0 5.42 1.38h.01c6.25 0 11.34-5.09 11.35-11.35 0-3.03-1.18-5.88-3.33-8.03'/%3E%3C/svg%3E");
}

/* ---------- Botão flutuante de WhatsApp ---------- */
.dik-whatsapp-flutuante {
	position: fixed; right: 20px; bottom: 20px; z-index: 999; margin: 0 !important;
}
.dik-whatsapp-flutuante .wp-block-button__link {
	width: 60px; height: 60px; padding: 0 !important; border-radius: 50% !important;
	font-size: 0 !important; justify-content: center;
	box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
	animation: dik-pulso 2.4s infinite;
}
.dik-whatsapp-flutuante .wp-block-button__link::before { width: 30px !important; height: 30px !important; }
@keyframes dik-pulso {
	0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
	70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.editor-styles-wrapper .dik-whatsapp-flutuante { position: static; }

/* ---------- Seções ---------- */
.dik-hero { position: relative; overflow: hidden; }
.dik-hero::before {
	content: ""; position: absolute; right: -8%; top: -30%; width: 55%; aspect-ratio: 1;
	background: radial-gradient(circle, rgba(247,185,15,.22) 0%, rgba(247,185,15,0) 65%);
	pointer-events: none;
}
.dik-hero > * { position: relative; }
.dik-hero .dik-selos { font-size: .9rem; color: var(--wp--preset--color--cinza); }

.dik-numero { font-family: var(--wp--preset--font-family--titulos); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }

.dik-passo-numero {
	font-family: var(--wp--preset--font-family--titulos); font-weight: 800;
	width: 52px; height: 52px; border-radius: 50%; display: flex !important; align-items: center; justify-content: center;
	background: var(--wp--preset--color--amarelo); color: var(--wp--preset--color--azul-marinho);
	margin-bottom: 0 !important;
}

.is-style-dik-check { list-style: none; padding-left: 0; }
.is-style-dik-check li { position: relative; padding-left: 2rem; margin-bottom: .6rem; }
.is-style-dik-check li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
	background: var(--wp--preset--color--amarelo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2545' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.dik-post img { border-radius: 16px; transition: transform .3s ease; }
.dik-post:hover img { transform: scale(1.02); }

.dik-depoimento .dik-estrelas { color: var(--wp--preset--color--amarelo); letter-spacing: .15em; }

.dik-faixa-cta { position: relative; overflow: hidden; }
.dik-faixa-cta::after {
	content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px;
	border: 40px solid rgba(247,185,15,.18); border-radius: 50%; pointer-events: none;
}

.dik-rodape a { color: rgba(255,255,255,.8); text-decoration: none; }
.dik-rodape a:hover { color: var(--wp--preset--color--amarelo); }

/* Ajustes mobile */
@media (max-width: 781px) {
	.dik-hero .wp-block-buttons { justify-content: flex-start; }
	.dik-ordem-mobile { flex-direction: column-reverse; }
}

/* Perguntas frequentes */
.dik-faq .wp-block-details {
	background: var(--wp--preset--color--gelo);
	border: 1px solid rgba(11, 37, 69, 0.07);
	border-radius: 14px; padding: 1.1rem 1.4rem; margin: 0;
	transition: background .2s ease;
}
.dik-faq .wp-block-details[open] { background: #fff; box-shadow: 0 10px 30px rgba(11,37,69,.08); }
.dik-faq .wp-block-details summary {
	font-family: var(--wp--preset--font-family--titulos); font-weight: 700; color: var(--wp--preset--color--azul-marinho);
	cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.dik-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.dik-faq .wp-block-details summary::after {
	content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--petroleo); transition: transform .2s ease; flex: none;
}
.dik-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.dik-faq .wp-block-details > p { margin-top: .75rem; }

/* Listas simples do rodapé */
.dik-lista-simples { list-style: none; }

/* Links dentro de textos */
#contato .wp-block-column a { color: inherit; text-decoration: none; }
#contato .wp-block-column a:hover { color: var(--wp--preset--color--petroleo); }

/* Ícones não encolhem ao lado de textos */
.is-layout-flex > .wp-block-image { flex-shrink: 0; }
.is-layout-flex > .wp-block-group.is-vertical { flex: 1 1 260px; min-width: 0; }
.dik-faixa-cta > * { position: relative; z-index: 1; }
