/* ==========================================================================
   Conteúdo do Portal do Conhecimento — template-parts/content-portaldoconhecimento.php
   ========================================================================== */

.hv2-ps {
	--ps-purple: #692772;
	--ps-purple-2: #80217E;
	--ps-ink: #3D1446;
	--ps-text: #3a3340;
	--ps-muted: #6b5a73;
	--ps-soft: #F7F2FA;
	--ps-accent: #F2B705;
	--ps-line: rgba(105, 39, 114, .12);
	--ps-radius: 18px;
	background: #fff;
	padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* ---------- Topo ---------- */
.hv2-ps-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(2.25rem, 6vw, 4.25rem) 0 clamp(2rem, 5vw, 3.5rem);
	color: #fff;
	text-align: center;
	background:
		linear-gradient(120deg, rgba(46, 15, 53, .95) 0%, rgba(105, 39, 114, .9) 55%, rgba(128, 33, 126, .84) 100%),
		var(--hv2-ps-bg, none) center / cover no-repeat,
		var(--ps-purple);
}

.hv2-ps-hero::after {
	content: "";
	position: absolute;
	right: -6rem;
	bottom: -9rem;
	z-index: -1;
	width: 24rem;
	height: 24rem;
	border-radius: 50%;
	border: 3.5rem solid rgba(242, 183, 5, .1);
}

.hv2-ps-hero-inner { max-width: 54rem; }

.hv2-ps-crumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .4rem;
	margin-bottom: 1.1rem;
	font-size: .8rem;
}

.hv2-ps-crumbs a { color: rgba(255, 255, 255, .78) !important; text-decoration: none; }
.hv2-ps-crumbs a:hover { color: #fff !important; text-decoration: underline; }
.hv2-ps-crumbs .bi { font-size: .65rem; color: rgba(255, 255, 255, .5); }

.hv2-ps-cat {
	display: inline-block;
	padding: .3rem .85rem;
	border-radius: 999px;
	background: var(--ps-accent);
	color: var(--ps-ink) !important;
	font-family: "montBold", sans-serif;
	font-size: .72rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
}

.hv2-ps-title {
	margin: 1rem auto .9rem;
	font-family: "montBold", "Montserrat", sans-serif !important;
	font-size: clamp(1.6rem, 3.6vw, 2.6rem);
	line-height: 1.18;
	color: #fff;
	text-wrap: balance;
}

/* Subtítulo (ACF subtitulo_publicacao): centralizado e em itálico */
.hv2-ps-sub {
	margin: 0 auto;
	max-width: 46rem;
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, .88);
	text-align: center;
	text-wrap: pretty;
}

.hv2-ps-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem 1.25rem;
	margin: 1.4rem 0 0;
	font-size: .85rem;
	color: rgba(255, 255, 255, .78);
}

.hv2-ps-meta .bi { margin-right: .25rem; color: var(--ps-accent); }

/* ---------- Corpo ---------- */
.hv2-ps-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20rem;
	gap: clamp(2rem, 4vw, 3.5rem);
	padding-top: clamp(2rem, 5vw, 3rem);
	align-items: start;
}

.hv2-ps-body { max-width: 46rem; }

.hv2-ps-content { font-size: 1.05rem; line-height: 1.75; color: var(--ps-text); }
.hv2-ps-content p { margin: 0 0 1.15em; }
.hv2-ps-content a { color: var(--ps-purple-2); text-decoration: underline; text-underline-offset: 2px; }
.hv2-ps-content h2,
.hv2-ps-content h3,
.hv2-ps-content h4 { margin: 1.6em 0 .6em; font-family: "montBold", "Montserrat", sans-serif !important; color: var(--ps-ink); line-height: 1.3; }
.hv2-ps-content h2 { font-size: 1.5rem; }
.hv2-ps-content h3 { font-size: 1.25rem; }
.hv2-ps-content ul,
.hv2-ps-content ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.hv2-ps-content li { margin-bottom: .4em; }

.hv2-ps-content img { max-width: 100%; height: auto; border-radius: 14px; }
.hv2-ps-content img.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 45%; }
.hv2-ps-content img.alignright { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 45%; }
.hv2-ps-content img.aligncenter { display: block; margin: 1.5rem auto; }
.hv2-ps-content::after { content: ""; display: table; clear: both; }

.hv2-ps-content blockquote {
	margin: 1.75em 0;
	padding: 1.1rem 1.4rem;
	border-left: 4px solid var(--ps-accent);
	border-radius: 0 14px 14px 0;
	background: var(--ps-soft);
	font-style: italic;
	color: var(--ps-ink);
}

.hv2-ps-content iframe { max-width: 100%; border-radius: 14px; }
.hv2-ps-content iframe[src*="youtube"],
.hv2-ps-content iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }

.hv2-ps-status {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin: 1rem 0;
	padding: .5rem 1rem;
	border-radius: 999px;
	background: var(--ps-soft);
	color: var(--ps-purple);
	font-size: .9rem;
}

.hv2-ps-download {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.4rem;
	border-radius: 999px;
	background: var(--ps-purple);
	color: #fff !important;
	font-family: "montBold", sans-serif;
	font-size: .9rem;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .2s ease;
}

.hv2-ps-download:hover { background: var(--ps-ink); }

/* ---------- Lateral ---------- */
.hv2-ps-side { position: sticky; top: 1.5rem; display: grid; gap: 1rem; }

.hv2-ps-box {
	padding: 1.25rem;
	border-radius: var(--ps-radius);
	border: 1px solid var(--ps-line);
	background: #fff;
}

.hv2-ps-box-title {
	margin: 0 0 .85rem;
	font-family: "montBold", sans-serif;
	font-size: .78rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ps-purple-2);
}

.hv2-ps-share { display: flex; flex-wrap: wrap; gap: .5rem; }

.hv2-ps-share a,
.hv2-ps-share button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 12px;
	border: 0;
	background: rgba(105, 39, 114, .08);
	color: var(--ps-purple) !important;
	font-size: 1.1rem;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.hv2-ps-share a:hover,
.hv2-ps-share button:hover { background: var(--ps-purple); color: #fff !important; }
.hv2-ps-share button.is-ok { background: #1f8a4c; color: #fff !important; }

.hv2-ps-rel { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }

.hv2-ps-rel a {
	display: flex;
	gap: .8rem;
	align-items: flex-start;
	padding: .6rem;
	margin: 0 -.6rem;
	border-radius: 12px;
	text-decoration: none;
	transition: background-color .2s ease;
}

.hv2-ps-rel a:hover { background: var(--ps-soft); }

.hv2-ps-rel-img { flex: 0 0 4.25rem; width: 4.25rem; height: 4.25rem; border-radius: 10px; overflow: hidden; background: var(--ps-soft); }
.hv2-ps-rel-img img { width: 100%; height: 100%; object-fit: cover; }

.hv2-ps-rel-txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.hv2-ps-rel-date { font-size: .72rem; color: var(--ps-muted); }

.hv2-ps-rel-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: "montSemiBold", sans-serif;
	font-size: .88rem;
	line-height: 1.35;
	color: var(--ps-ink);
}

.hv2-ps-rel a:hover .hv2-ps-rel-title { color: var(--ps-purple); }

.hv2-ps-more {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin-top: .75rem;
	font-family: "montBold", sans-serif;
	font-size: .82rem;
	color: var(--ps-purple) !important;
	text-decoration: none;
}

.hv2-ps-more:hover { text-decoration: underline; }

/* Modal de conteúdo restrito (mesmo do layout anterior) */
.modal--login .wrapper-modal { width: 680px; }
.modal--login .wrapper-modal .content-modal { height: auto; overflow-x: hidden; overflow-y: auto; }
.modal--login .wrapper-modal .content-modal .btn-entrar { font-family: "montSemiBold" !important; font-size: 16px; }

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
	.hv2-ps-grid { grid-template-columns: 1fr; }
	.hv2-ps-body { max-width: none; }
	.hv2-ps-side { position: static; }
}

@media (max-width: 575.98px) {
	.hv2-ps-content img.alignleft,
	.hv2-ps-content img.alignright { float: none; display: block; max-width: 100%; margin: 0 auto 1.25rem; }
}

@media (max-width: 768px) {
	.modal--login .wrapper-modal { width: 100%; }
}
