/* ==========================================================================
   Estilos de bloco do tema (front + editor).
   Usados pelos padrões em /patterns para montar Apresentação e Organograma.
   ========================================================================== */

/* Grupo: Blueprint (escuro com grade) ----------------------------------- */
.wp-block-group.is-style-vbox-blueprint {
	position: relative;
	overflow: hidden;
	color: #e3f1f8;
	background-color: var(--wp--preset--color--navy);
	background-image:
		radial-gradient(ellipse 70% 90% at 85% 0%, rgb(0 113 162 / .6), transparent 65%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none' fill='none' stroke='%237FD3F7' stroke-opacity='.3'%3E%3Cpath d='M-20 300C180 220 300 360 520 280S860 120 1220 200'/%3E%3Cpath d='M-20 330C200 250 320 390 540 310S880 150 1220 230' stroke-opacity='.18'/%3E%3Cpath d='M600-20c60 100 120 140 220 170s180 110 240 270'/%3E%3Cpath d='M680-20c60 110 120 150 220 180s180 110 240 260' stroke-opacity='.15'/%3E%3C/svg%3E"),
		linear-gradient(rgb(127 211 247 / .075) 1px, transparent 1px),
		linear-gradient(90deg, rgb(127 211 247 / .075) 1px, transparent 1px),
		linear-gradient(rgb(127 211 247 / .035) 1px, transparent 1px),
		linear-gradient(90deg, rgb(127 211 247 / .035) 1px, transparent 1px);
	background-size: 100% 100%, 100% 100%, 96px 96px, 96px 96px, 24px 24px, 24px 24px;
	background-position: center, center, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
	background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
}
.is-style-vbox-blueprint :where(h1, h2, h3, h4, h5, h6) { color: #fff; }
.is-style-vbox-blueprint :where(p) { color: #cfe6f2; }
.is-style-vbox-blueprint a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--accent); }
.is-style-vbox-blueprint .wp-block-button.is-style-outline > .wp-block-button__link {
	color: #fff; border-color: rgb(127 211 247 / .6); background: transparent;
}
.is-style-vbox-blueprint .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgb(127 211 247 / .12); border-color: var(--wp--preset--color--accent);
}

/* Grupo: Cartão --------------------------------------------------------- */
.wp-block-group.is-style-vbox-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: 0 1px 2px rgb(10 37 54 / .06), 0 8px 24px -12px rgb(10 37 54 / .18);
	color: var(--wp--preset--color--ink);
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.wp-block-column > .wp-block-group.is-style-vbox-card:hover {
	transform: translateY(-3px);
	border-color: rgb(0 113 162 / .35);
	box-shadow: 0 2px 4px rgb(10 37 54 / .08), 0 18px 40px -16px rgb(0 113 162 / .35);
}
.is-style-vbox-card :where(h2, h3, h4) { color: var(--wp--preset--color--navy); }
.is-style-vbox-card > :first-child { margin-top: 0; }
.is-style-vbox-blueprint .wp-block-group.is-style-vbox-card {
	background: rgb(255 255 255 / .04);
	border-color: rgb(127 211 247 / .3);
	box-shadow: none;
	backdrop-filter: blur(2px);
}
.is-style-vbox-blueprint .is-style-vbox-card :where(h2, h3, h4) { color: #fff; }

/* Grupo: Seção clara ------------------------------------------------------ */
.wp-block-group.is-style-vbox-section {
	background: var(--wp--preset--color--surface);
	border-block: 1px solid var(--wp--preset--color--line);
}

/* Parágrafo: Sobretítulo -------------------------------------------------- */
p.is-style-vbox-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: .75rem !important;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: .5rem;
}
.is-style-vbox-blueprint p.is-style-vbox-eyebrow { color: var(--wp--preset--color--accent); }

/* Título: Numerado (01, 02... contorno, como no mockup) -------------------- */
.wp-block-heading.is-style-vbox-numbered {
	display: flex;
	flex-direction: column;
	gap: .75rem;
}
.wp-block-heading.is-style-vbox-numbered::before {
	counter-increment: vbox-num;
	content: counter(vbox-num, decimal-leading-zero);
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--wp--preset--color--primary);
}
.is-style-vbox-blueprint .wp-block-heading.is-style-vbox-numbered::before { -webkit-text-stroke-color: var(--wp--preset--color--accent); }
.wp-block-columns:has(.is-style-vbox-numbered),
.wp-block-group:has(> .wp-block-columns .is-style-vbox-numbered) { counter-reset: vbox-num; }

/* Lista: Documentos (cada item com link vira um bloco de download) --------- */
ul.is-style-vbox-docs {
	list-style: none;
	padding: 0;
	margin-left: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: .75rem;
}
ul.is-style-vbox-docs > li {
	position: relative;
	display: flex;
	align-items: center;
	gap: .85rem;
	margin: 0;
	padding: .9rem 1rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: .9375rem;
	line-height: 1.3;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
ul.is-style-vbox-docs > li::before {
	content: "";
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background-color: rgb(0 113 162 / .09);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071A2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M12 11v6M9 14l3 3 3-3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px;
}
ul.is-style-vbox-docs > li:hover {
	border-color: rgb(0 113 162 / .45);
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgb(10 37 54 / .08), 0 14px 30px -16px rgb(0 113 162 / .4);
}
ul.is-style-vbox-docs a {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}
ul.is-style-vbox-docs a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
ul.is-style-vbox-docs a:hover { color: var(--wp--preset--color--primary); }
.is-style-vbox-blueprint ul.is-style-vbox-docs > li {
	background: rgb(255 255 255 / .05);
	border-color: rgb(127 211 247 / .3);
}
.is-style-vbox-blueprint ul.is-style-vbox-docs a { color: #fff; }

/* Lista: Marcadores ------------------------------------------------------- */
ul.is-style-vbox-checks { list-style: none; padding-left: 0; margin-left: 0; }
ul.is-style-vbox-checks > li { position: relative; padding-left: 1.9rem; }
ul.is-style-vbox-checks > li + li { margin-top: .6rem; }
ul.is-style-vbox-checks > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .3em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: rgb(0 113 162 / .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071A2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Imagem: Moldura ------------------------------------------------------ */
.wp-block-image.is-style-vbox-framed img {
	border-radius: 14px;
	border: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 1px 2px rgb(10 37 54 / .06), 0 18px 40px -20px rgb(10 37 54 / .35);
}
.is-style-vbox-blueprint .wp-block-image.is-style-vbox-framed img { border-color: rgb(127 211 247 / .35); }

/* Details (acordeão nativo) -------------------------------------------- */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 0 1.1rem;
	background: #fff;
}
.wp-block-details summary {
	padding: .9rem 0;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}
.wp-block-details[open] { padding-bottom: 1rem; }
.wp-block-details[open] summary { border-bottom: 1px solid var(--wp--preset--color--line); margin-bottom: 1rem; }
.wp-block-details summary::marker { color: var(--wp--preset--color--primary); }

/* Botões ----------------------------------------------------------------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

/* Links no texto --------------------------------------------------------- */
:where(.entry-content, .prose, .editor-styles-wrapper) :where(p, li, figcaption, td) a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: rgb(0 113 162 / .35);
	text-underline-offset: .22em;
	border-radius: 3px;
	transition: color .2s, text-decoration-color .2s, background-color .2s;
}
:where(.entry-content, .prose, .editor-styles-wrapper) :where(p, li, figcaption, td) a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--primary-dark);
	text-decoration-color: currentColor;
	background-color: rgb(0 113 162 / .07);
}
.is-style-vbox-blueprint :where(p, li) a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--accent);
	text-decoration-color: rgb(127 211 247 / .45);
}

/* Externo: ícone de "abre outro site" / Arquivo: selo com a extensão */
a.is-external:not(.wp-element-button):not(:has(img))::after {
	content: "";
	display: inline-block;
	width: .8em;
	height: .8em;
	margin-left: .25em;
	vertical-align: -.05em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(p, li, figcaption, td) a.is-file[data-ext]:not(.wp-element-button):not(:has(img))::after {
	content: attr(data-ext);
	display: inline-block;
	margin-left: .35em;
	padding: .1em .4em;
	border-radius: 4px;
	background: var(--wp--preset--color--navy);
	color: #fff;
	font: 700 .625rem/1.3 var(--wp--preset--font-family--heading);
	letter-spacing: .05em;
	vertical-align: .15em;
	text-decoration: none;
}

/* Lista: Links em destaque (cartões com título, descrição e seta) ---------- */
ul.is-style-vbox-links {
	list-style: none;
	padding: 0;
	margin-left: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: .75rem;
}
ul.is-style-vbox-links > li {
	position: relative;
	margin: 0;
	padding: 1rem 3.25rem 1rem 1.15rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 12px;
	font-size: .875rem;
	line-height: 1.45;
	color: var(--wp--preset--color--muted);
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
ul.is-style-vbox-links > li::after {
	content: "";
	position: absolute;
	right: 1rem;
	top: 50%;
	width: 1.9rem;
	height: 1.9rem;
	margin-top: -.95rem;
	border-radius: 50%;
	background: rgb(0 113 162 / .09) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071A2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 55% no-repeat;
	transition: transform .2s, background-color .2s;
}
ul.is-style-vbox-links > li:hover {
	border-color: rgb(0 113 162 / .45);
	border-left-color: var(--wp--preset--color--primary);
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgb(10 37 54 / .08), 0 14px 30px -16px rgb(0 113 162 / .4);
}
ul.is-style-vbox-links > li:hover::after { transform: translateX(3px); background-color: rgb(0 113 162 / .16); }
ul.is-style-vbox-links a {
	display: block;
	margin-bottom: .15rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: .9375rem;
	font-weight: 700;
	color: var(--wp--preset--color--navy) !important;
	text-decoration: none !important;
	background: none !important;
}
ul.is-style-vbox-links a::before { content: ""; position: absolute; inset: 0; border-radius: 12px; } /* cartão todo clicável */
ul.is-style-vbox-links a:hover { color: var(--wp--preset--color--primary) !important; }
ul.is-style-vbox-links a.is-external::after,
ul.is-style-vbox-links a.is-file::after { vertical-align: 0; }
.is-style-vbox-blueprint ul.is-style-vbox-links > li { background: rgb(255 255 255 / .05); border-color: rgb(127 211 247 / .3); border-left-color: var(--wp--preset--color--accent); color: #bcd9e8; }
.is-style-vbox-blueprint ul.is-style-vbox-links a { color: #fff !important; }

/* Documentos: cartão todo clicável; selo/ícone de destino não se aplicam (o bloco já tem ícone) */
ul.is-style-vbox-docs > li > a[href]:not(.wp-element-button)::after { content: ""; display: block; position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; border-radius: 12px; background: none; -webkit-mask: none; mask: none; }

/* Legenda de imagem */
.wp-block-image figcaption { font-size: .8125rem; color: var(--wp--preset--color--muted); text-align: center; margin-top: .6rem; }

/* Conteúdo legado: parágrafo só com links vizinhos (listas de PAT, relatórios) → botões */
.entry-content p:has(> a + a) {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}
.entry-content p:has(> a + a) > a {
	display: inline-flex;
	align-items: center;
	gap: .15rem;
	padding: .65rem 1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	background: #fff;
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--heading);
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s, box-shadow .2s, transform .2s, color .2s;
}
.entry-content p:has(> a + a) > a:hover {
	color: var(--wp--preset--color--primary);
	border-color: rgb(0 113 162 / .45);
	background: #fff;
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgb(10 37 54 / .08), 0 14px 30px -16px rgb(0 113 162 / .4);
}
