/**
 * Post individual.
 *
 * Regras restritas ao template singular para evitar interferência nas
 * listagens, páginas institucionais e componentes de plugins.
 */


.wrapper {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	width: min(calc(100% - 40px), var(--content-width));
	margin: 0 auto 48px;
	align-items: start;
	gap: 36px;
}

.post-main-column {
	min-width: 0;
}

.post-content {
	min-width: 0;
	padding: clamp(20px, 3vw, 34px);
	background: var(--color-surface);
}

.post-content > :first-child {
	margin-top: 0;
}

.post-content > :last-child {
	margin-bottom: 0;
}

.post-content p,
.post-content li {
	font-size: 17px;
	line-height: 1.7;
}

.post-content p,
.post-content blockquote,
.post-content .wp-block-group,
.post-content .wp-block-columns,
.post-content .wp-block-table,
.post-content .wp-block-image,
.post-content ul,
.post-content ol {
	margin-top: 0;
	margin-bottom: 1.35rem;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
	color: var(--color-primary);
	font-weight: 700;
}

.post-content h2 {
	margin: 2.2rem 0 1rem;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--color-candidates);
	font-size: clamp(25px, 3vw, 30px);
	line-height: 1.25;
}

.post-content h3 {
	margin: 1.9rem 0 0.8rem;
	font-size: 23px;
	line-height: 1.3;
}

.post-content h4 {
	margin: 1.6rem 0 0.7rem;
	font-size: 20px;
	line-height: 1.35;
}

.post-content ul,
.post-content ol {
	padding: 18px 20px 18px 42px;
	background: var(--color-surface-muted);
}

.post-content li + li {
	margin-top: 8px;
}

.post-content a {
	color: var(--color-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.post-content img {
	max-width: 100%;
	height: auto;
}

.post-content .wp-block-button__link {
	padding: 11px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--color-link);
	color: var(--color-surface);
	font-size: 16px;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.post-content .wp-block-button__link:hover,
.post-content .wp-block-button__link:focus-visible {
	background: var(--color-primary);
	color: var(--color-surface);
	text-decoration: none;
}

.post-tags {
	margin-top: 32px;
	padding-top: 18px;
	border-top: 1px solid var(--color-border-light);
	font-size: 14px;
}

.post-sidebar {
	min-width: 0;
}

.post-sidebar .sidebar-widget,
.post-sidebar .widget {
	margin-bottom: 24px;
	color: var(--color-primary);
	font-size: 14px;
}

.post-sidebar .widget-title {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--color-candidates);
	color: var(--color-primary);
	font-size: 20px;
	font-weight: 600;
}

.post-sidebar img {
	width: 100%;
	height: auto;
}

.post-sidebar .wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.post-sidebar .wp-block-tag-cloud a {
	padding: 7px 10px;
	border: 1px solid var(--color-border);
	border-left: 3px solid var(--color-primary);
	background: var(--color-surface);
	color: var(--color-link);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.post-sidebar .wp-block-tag-cloud a:hover,
.post-sidebar .wp-block-tag-cloud a:focus-visible {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: var(--color-surface);
}

.post-sidebar form {
	padding: 14px;
	border-radius: 12px;
	background: var(--color-primary);
}

.post-sidebar form label {
	display: block;
	margin-bottom: 10px;
	color: var(--color-surface);
	font-size: 18px;
	font-weight: 700;
}

.post-sidebar form input[type="search"],
.post-sidebar form input[type="text"] {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
}

.post-sidebar form button,
.post-sidebar form input[type="submit"] {
	min-height: 40px;
	margin-top: 8px;
	padding: 8px 14px;
	border: 1px solid var(--color-surface);
	border-radius: 999px;
	background: var(--color-surface);
	color: var(--color-primary);
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 900px) {
	.post-hero-image {
		width: 270px;
		height: 270px;
		flex-basis: 270px;
		margin-bottom: -14px;
	}

	.post-hero-image img {
		width: 250px;
		height: 250px;
	}

	.wrapper {
		grid-template-columns: 1fr;
	}

	.post-sidebar {
		width: 100%;
	}
}

@media (max-width: 650px) {
	.post-hero-content {
		flex-direction: column;
		text-align: center;
	}

	.post-hero-text {
		width: 100%;
		padding-bottom: 20px;
	}

	.wrapper {
		width: calc(100% - 24px);
		gap: 20px;
	}

	.post-content {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.post-content .wp-block-button__link {
		transition: none;
	}
}
