/**
 * Grid de artigos — Blog Valore RH
 *
 * @package Valore_RH_Core
 * @since   1.0.0
 */

.vr-posts-section,
.vr-posts-section *,
.vr-posts-section *::before,
.vr-posts-section *::after {
	box-sizing: border-box;
}

.vr-posts-section {
	width: min(100%, 1200px);
	margin: 0 auto;
	padding: 88px 0 24px;

	font-family:
		var(--valore-font-body, "Inter", Arial, sans-serif);
}

/* Cabeçalho */

.vr-posts-section__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;

	margin-bottom: 38px;
}

.vr-posts-section__heading {
	min-width: 0;
}

.vr-posts-section__eyebrow {
	display: block;

	margin-bottom: 10px;

	color: #b98524;

	font-family:
		var(--valore-font-display, "Montserrat", Arial, sans-serif);

	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vr-posts-section__title {
	margin: 0;

	color: #061a2f;

	font-family:
		var(--valore-font-display, "Montserrat", Arial, sans-serif);

	font-size: clamp(32px, 4vw, 44px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.035em;
}

.vr-posts-section__description {
	max-width: 440px;
	margin: 0;

	color: #667482;

	font-size: 16px;
	line-height: 1.7;
}

/* Grid */

.vr-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 28px;
}

/* Card */

.vr-post-card {
	display: flex;
	flex-direction: column;

	min-width: 0;
	height: 100%;
	overflow: hidden;

	background-color: #ffffff;

	border: 1px solid rgba(6, 26, 47, 0.1);
	border-radius: 20px;

	box-shadow:
		0 14px 36px rgba(6, 26, 47, 0.07),
		0 3px 10px rgba(6, 26, 47, 0.04);

	transition:
		transform 220ms ease,
		box-shadow 220ms ease,
		border-color 220ms ease;
}

.vr-post-card:hover {
	border-color: rgba(217, 164, 65, 0.34);

	box-shadow:
		0 24px 52px rgba(6, 26, 47, 0.11),
		0 5px 16px rgba(6, 26, 47, 0.05);

	transform: translateY(-6px);
}

/* Imagem */

.vr-post-card__media {
	position: relative;

	aspect-ratio: 16 / 10;
	overflow: hidden;

	background-color: #061a2f;
}

.vr-post-card__media > a {
	display: block;
	width: 100%;
	height: 100%;
}

.vr-post-card__image {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
	object-position: center;

	transition: transform 500ms ease;
}

.vr-post-card:hover .vr-post-card__image {
	transform: scale(1.045);
}

.vr-post-card__placeholder {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;

	overflow: hidden;

	background:
		radial-gradient(
			circle at 25% 20%,
			rgba(217, 164, 65, 0.28) 0%,
			rgba(217, 164, 65, 0) 52%
		),
		linear-gradient(
			135deg,
			#061a2f 0%,
			#0a2944 100%
		);
}

.vr-post-card__placeholder::before {
	content: "";

	position: absolute;
	top: -75px;
	right: -60px;

	width: 180px;
	height: 180px;

	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 50%;
}

.vr-post-card__placeholder span {
	position: relative;
	z-index: 1;

	color: #ffffff;

	font-family:
		var(--valore-font-display, "Montserrat", Arial, sans-serif);

	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.035em;
}

/* Conteúdo */

.vr-post-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;

	min-width: 0;
	padding: 24px 24px 22px;
}

.vr-post-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;

	margin-bottom: 16px;
}

.vr-post-card__category {
	display: inline-flex;
	align-items: center;

	max-width: 62%;
	padding: 7px 10px;

	overflow: hidden;

	color: #8a6314;
	background-color: rgba(217, 164, 65, 0.13);

	border: 1px solid rgba(217, 164, 65, 0.26);
	border-radius: 999px;

	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.vr-post-card__reading-time {
	flex: 0 0 auto;

	color: #7a8793;

	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

.vr-post-card__title {
	display: -webkit-box;

	min-height: calc(1.3em * 2);
	margin: 0;
	overflow: hidden;

	font-family:
		var(--valore-font-display, "Montserrat", Arial, sans-serif);

	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.025em;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.vr-post-card__title a {
	color: #061a2f;
	text-decoration: none;

	transition: color 180ms ease;
}

.vr-post-card__title a:hover {
	color: #b98524;
}

.vr-post-card__excerpt {
	display: -webkit-box;

	min-height: calc(1.7em * 3);
	margin: 16px 0 0;
	overflow: hidden;

	color: #667482;

	font-size: 15px;
	line-height: 1.7;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.vr-post-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;

	margin-top: auto;
	padding-top: 20px;

	border-top: 1px solid rgba(6, 26, 47, 0.08);
}

.vr-post-card__date {
	color: #85919c;

	font-size: 12px;
	line-height: 1.4;
}

.vr-post-card__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;

	color: #9a6c16;

	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.vr-post-card__link svg {
	transition: transform 180ms ease;
}

.vr-post-card__link:hover {
	color: #061a2f;
}

.vr-post-card__link:hover svg {
	transform: translateX(4px);
}

/* Paginação */

.vr-posts-pagination {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 22px;

	margin-top: 52px;
}

.vr-posts-pagination__side {
	display: flex;
	align-items: center;
}

.vr-posts-pagination__side--previous {
	justify-content: flex-start;
}

.vr-posts-pagination__side--next {
	justify-content: flex-end;
}

.vr-posts-pagination__numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.vr-posts-pagination a,
.vr-posts-pagination span {
	text-decoration: none;
}

.vr-posts-pagination__previous,
.vr-posts-pagination__next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	min-height: 44px;
	padding: 10px 16px;

	color: #52616f;
	background-color: #ffffff;

	border: 1px solid rgba(6, 26, 47, 0.12);
	border-radius: 12px;

	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;

	transition:
		color 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease,
		transform 180ms ease;
}

.vr-posts-pagination__previous:hover,
.vr-posts-pagination__next:hover {
	color: #061a2f;
	background-color: rgba(217, 164, 65, 0.08);
	border-color: rgba(217, 164, 65, 0.62);
	transform: translateY(-1px);
}

.vr-posts-pagination__previous.is-disabled,
.vr-posts-pagination__next.is-disabled {
	color: #a8b1ba;
	background-color: #f8fafc;
	border-color: rgba(6, 26, 47, 0.08);

	cursor: not-allowed;
	opacity: 0.72;
}

.vr-posts-pagination__numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-width: 42px;
	min-height: 42px;
	padding: 8px 12px;

	color: #52616f;
	background-color: #ffffff;

	border: 1px solid rgba(6, 26, 47, 0.12);
	border-radius: 10px;

	font-size: 14px;
	font-weight: 700;
	line-height: 1;

	transition:
		color 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease,
		transform 180ms ease;
}

.vr-posts-pagination__numbers a.page-numbers:hover {
	color: #061a2f;
	background-color: rgba(217, 164, 65, 0.08);
	border-color: rgba(217, 164, 65, 0.62);
	transform: translateY(-1px);
}

.vr-posts-pagination__numbers .is-current {
	color: #061a2f;
	background-color: #e4ad34;
	border-color: #e4ad34;

	box-shadow: 0 8px 20px rgba(217, 164, 65, 0.22);
}

.vr-posts-pagination__numbers .dots {
	min-width: auto;
	padding-inline: 4px;

	color: #8a949d;
	background: transparent;
	border-color: transparent;
}

/* Sem artigos */

.vr-posts-empty {
	padding: 48px 28px;

	color: #667482;
	background-color: #f8fafc;

	border: 1px solid rgba(6, 26, 47, 0.08);
	border-radius: 18px;

	text-align: center;
}

.vr-posts-empty h3 {
	margin: 0;

	color: #061a2f;

	font-family:
		var(--valore-font-display, "Montserrat", Arial, sans-serif);

	font-size: 24px;
}

.vr-posts-empty p {
	margin: 12px 0 0;
}

/* Acessibilidade */

.vr-posts-section a:focus-visible {
	outline: 3px solid rgba(217, 164, 65, 0.85);
	outline-offset: 3px;
}

/* Tablet */

@media (max-width: 1024px) {
	.vr-posts-section {
		padding-top: 72px;
	}

	.vr-posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vr-posts-pagination {
		grid-template-columns: 1fr;
	}

	.vr-posts-pagination__numbers {
		order: -1;
	}

	.vr-posts-pagination__side--previous,
	.vr-posts-pagination__side--next {
		justify-content: center;
	}
}

/* Mobile */

@media (max-width: 767px) {
	.vr-posts-section {
		padding: 58px 0 16px;
	}

	.vr-posts-section__header {
		display: block;
		margin-bottom: 30px;
	}

	.vr-posts-section__description {
		margin-top: 16px;
	}

	.vr-posts-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.vr-post-card:hover {
		transform: none;
	}

	.vr-post-card__content {
		padding: 22px 20px 20px;
	}

	.vr-post-card__top {
		align-items: flex-start;
	}

	.vr-post-card__category {
		max-width: 58%;
	}

	.vr-post-card__title {
		min-height: auto;

		font-size: 21px;

		-webkit-line-clamp: 3;
	}

	.vr-post-card__excerpt {
		min-height: auto;

		-webkit-line-clamp: 3;
	}

	.vr-post-card__footer {
		gap: 12px;
	}

	.vr-posts-pagination {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 14px;

		margin-top: 42px;
	}

	.vr-posts-pagination__numbers {
		order: -1;

		width: 100%;
	}

	.vr-posts-pagination__side {
		flex: 1 1 calc(50% - 7px);
	}

	.vr-posts-pagination__side--previous {
		justify-content: flex-end;
	}

	.vr-posts-pagination__side--next {
		justify-content: flex-start;
	}

	.vr-posts-pagination__previous,
	.vr-posts-pagination__next {
		width: 100%;
		max-width: 170px;
	}

	.vr-posts-pagination__numbers .page-numbers {
		min-width: 40px;
		min-height: 40px;
	}
}

/* Telas muito pequenas */

@media (max-width: 420px) {
	.vr-post-card__top {
		flex-wrap: wrap;
	}

	.vr-post-card__category {
		max-width: 100%;
	}

	.vr-post-card__reading-time {
		width: 100%;
	}

	.vr-post-card__footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.vr-posts-pagination__side {
		flex-basis: 100%;
	}

	.vr-posts-pagination__side--previous,
	.vr-posts-pagination__side--next {
		justify-content: center;
	}
}

/* Movimento reduzido */

@media (prefers-reduced-motion: reduce) {
	.vr-post-card,
	.vr-post-card__image,
	.vr-post-card__title a,
	.vr-post-card__link svg,
	.vr-posts-pagination__previous,
	.vr-posts-pagination__next,
	.vr-posts-pagination__numbers .page-numbers {
		transition: none;
	}

	.vr-post-card:hover,
	.vr-post-card:hover .vr-post-card__image,
	.vr-post-card__link:hover svg,
	.vr-posts-pagination__previous:hover,
	.vr-posts-pagination__next:hover,
	.vr-posts-pagination__numbers a.page-numbers:hover {
		transform: none;
	}
}