/**
 * Vitrine de Posts — estilos do frontend
 *
 * Organização:
 *  1. Base e variáveis        6. Layouts
 *  2. Grade e cards           7. Efeitos de hover
 *  3. Mídia                   8. Animações de entrada
 *  4. Conteúdo                9. Barra de filtros e paginação
 *  5. Camadas (overlay)      10. Responsivo e acessibilidade
 */

/* ---------------------------------------------------------------- 1. Base */

.vpb-block {
	--vpb-cols: var(--vpb-columns, 3);
	--vpb-accent-c: var(--vpb-accent, #2563eb);
	--vpb-card-c: var(--vpb-card-bg, #ffffff);
	--vpb-radius-c: var(--vpb-radius, 14px);

	position: relative;
	box-sizing: border-box;
	color: var(--vpb-text, inherit);
}

.vpb-block *,
.vpb-block *::before,
.vpb-block *::after {
	box-sizing: border-box;
}

.vpb-block a {
	text-decoration: none;
	color: inherit;
}

.vpb-empty {
	margin: 0;
	padding: 2.5rem 1rem;
	text-align: center;
	opacity: 0.7;
}

/* ------------------------------------------------------- 2. Grade e cards */

.vpb-items {
	display: grid;
	grid-template-columns: repeat(var(--vpb-cols), minmax(0, 1fr));
	gap: var(--vpb-gap, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vpb-item {
	position: relative;
	min-width: 0;
}

.vpb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--vpb-radius-c);
	background: var(--vpb-card-c);
	transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.is-equal-height .vpb-card {
	height: 100%;
}

/* Variações de moldura. */
.vpb-style--shadow .vpb-card {
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.vpb-style--outline .vpb-card {
	border: 1px solid rgba(15, 23, 42, 0.12);
}

.vpb-style--flat .vpb-card {
	background: color-mix(in srgb, currentColor 5%, transparent);
}

.vpb-style--clean .vpb-card {
	background: transparent;
	border-radius: 0;
}

.vpb-style--clean .vpb-media {
	border-radius: var(--vpb-radius-c);
	overflow: hidden;
}

.vpb-style--glass .vpb-card {
	background: color-mix(in srgb, var(--vpb-card-c) 55%, transparent);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.35);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.vpb-style--gradient .vpb-card {
	background: linear-gradient(160deg, var(--vpb-card-c), color-mix(in srgb, var(--vpb-accent-c) 12%, var(--vpb-card-c)));
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* Posição da imagem. */
.vpb-img--left .vpb-card,
.vpb-img--right .vpb-card,
.vpb-img--alternate .vpb-card {
	flex-direction: row;
	align-items: stretch;
}

.vpb-img--alternate .vpb-item:nth-child(even) .vpb-card {
	flex-direction: row-reverse;
}

.vpb-img--left .vpb-media,
.vpb-img--right .vpb-media,
.vpb-img--alternate .vpb-media {
	flex: 0 0 var(--vpb-image-width, 40%);
	align-self: stretch;
}

.vpb-img--left .vpb-media,
.vpb-img--right .vpb-media,
.vpb-img--alternate .vpb-media {
	aspect-ratio: auto;
	min-height: 100%;
}

/* Card com link cobrindo toda a área. */
.vpb-card--linked .vpb-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.vpb-card__stretch {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.vpb-card--linked .vpb-readmore,
.vpb-card--linked .vpb-meta a,
.vpb-card--linked .vpb-badge {
	position: relative;
	z-index: 2;
}

/* ------------------------------------------------------------- 3. Mídia */

.vpb-media {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--vpb-ratio, 16 / 9);
	background: color-mix(in srgb, currentColor 8%, transparent);
	flex-shrink: 0;
}

.vpb-ratio--auto .vpb-media {
	aspect-ratio: auto;
}

.vpb-media__link {
	display: block;
	height: 100%;
}

.vpb-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--vpb-fit, cover);
	object-position: center;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease, opacity 0.45s ease;
}

.vpb-thumb--bg,
.vpb-thumb--gradient {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.vpb-thumb--gradient {
	display: flex;
	align-items: center;
	justify-content: center;
}

.vpb-thumb__letter {
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1;
	letter-spacing: 0.02em;
}

.vpb-badge {
	position: absolute;
	z-index: 3;
	padding: 0.28em 0.7em;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	background: var(--vpb-accent-c);
	border-radius: 999px;
}

.vpb-badge--top-left { top: 12px; left: 12px; }
.vpb-badge--top-right { top: 12px; right: 12px; }
.vpb-badge--bottom-left { bottom: 12px; left: 12px; }
.vpb-badge--bottom-right { bottom: 12px; right: 12px; }

/* ---------------------------------------------------------- 4. Conteúdo */

.vpb-content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: var(--vpb-padding, 20px);
	flex: 1 1 auto;
	min-width: 0;
}

.vpb-align--center .vpb-content { text-align: center; align-items: center; }
.vpb-align--right .vpb-content { text-align: right; align-items: flex-end; }

.vpb-number {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
	color: color-mix(in srgb, var(--vpb-accent-c) 45%, transparent);
}

.vpb-title {
	margin: 0;
	font-size: var(--vpb-title-size, 20px);
	line-height: 1.28;
	font-weight: 700;
	color: var(--vpb-title-color, inherit);
}

.vpb-title a {
	transition: color 0.25s ease;
}

.vpb-item:hover .vpb-title a {
	color: var(--vpb-accent-c);
}

.vpb-excerpt {
	margin: 0;
	font-size: var(--vpb-excerpt-size, 15px);
	line-height: 1.6;
	opacity: 0.85;
}

.vpb-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.85rem;
	font-size: var(--vpb-meta-size, 13px);
	color: var(--vpb-meta-color, inherit);
	opacity: 0.8;
}

.vpb-align--center .vpb-meta { justify-content: center; }
.vpb-align--right .vpb-meta { justify-content: flex-end; }

.vpb-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.vpb-meta--bottom .vpb-meta__item + .vpb-meta__item::before {
	content: "·";
	margin-right: 0.55em;
	opacity: 0.6;
}

.vpb-meta__cats a,
.vpb-meta__tags a {
	color: var(--vpb-accent-c);
	font-weight: 600;
}

.vpb-meta--top {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: calc(var(--vpb-meta-size, 13px) - 1px);
}

.vpb-avatar {
	border-radius: 50%;
	width: 22px;
	height: 22px;
}

.vpb-actions {
	margin-top: auto;
	padding-top: 0.35rem;
}

.vpb-readmore {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.9rem;
	font-weight: 600;
	transition: gap 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.vpb-readmore:hover { gap: 0.7em; }

.vpb-readmore--button {
	padding: 0.6em 1.15em;
	border-radius: 999px;
	background: var(--vpb-accent-c);
	color: #fff;
}

.vpb-readmore--button:hover {
	background: color-mix(in srgb, var(--vpb-accent-c) 82%, #000);
	color: #fff;
}

.vpb-readmore--outline {
	padding: 0.55em 1.1em;
	border-radius: 999px;
	border: 1.5px solid var(--vpb-accent-c);
	color: var(--vpb-accent-c);
}

.vpb-readmore--outline:hover {
	background: var(--vpb-accent-c);
	color: #fff;
}

.vpb-readmore--link { color: var(--vpb-accent-c); }
.vpb-readmore--link .vpb-readmore__icon { display: none; }
.vpb-readmore--arrow { color: var(--vpb-accent-c); }

/* -------------------------------------------------- 5. Camadas (overlay) */

.vpb-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.4s ease, background 0.4s ease;
}

.vpb-overlay--gradient .vpb-overlay {
	background: linear-gradient(to top, var(--vpb-overlay, rgba(0, 0, 0, 0.45)) 0%, transparent 62%);
}

.vpb-overlay--always .vpb-overlay {
	background: var(--vpb-overlay, rgba(0, 0, 0, 0.45));
}

.vpb-overlay--hover .vpb-overlay {
	background: var(--vpb-overlay, rgba(0, 0, 0, 0.45));
	opacity: 0;
}

.vpb-overlay--hover .vpb-item:hover .vpb-overlay {
	opacity: 1;
}

/* Cards em que a imagem é o plano de fundo. */
.vpb-card--media {
	min-height: var(--vpb-min-height, 380px);
	justify-content: flex-end;
	color: #fff;
}

.vpb-card--media .vpb-media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	z-index: 0;
}

.vpb-card--media .vpb-content {
	position: relative;
	z-index: 2;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.vpb-card--media .vpb-title,
.vpb-card--media .vpb-excerpt,
.vpb-card--media .vpb-meta {
	color: #fff;
}

.vpb-card--media .vpb-item:hover .vpb-title a,
.vpb-card--media .vpb-title a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ---------------------------------------------------------- 6. Layouts */

/* 6.1 Mosaico (masonry) */
.vpb-layout--masonry .vpb-items {
	display: block;
	columns: var(--vpb-cols);
	column-gap: var(--vpb-gap, 24px);
}

.vpb-layout--masonry .vpb-item {
	break-inside: avoid;
	page-break-inside: avoid;
	margin-bottom: var(--vpb-gap, 24px);
	display: inline-block;
	width: 100%;
}

.vpb-layout--masonry .vpb-media {
	aspect-ratio: auto;
}

.vpb-layout--masonry .vpb-thumb--img {
	height: auto;
}

/* 6.2 Lista */
.vpb-layout--list .vpb-card {
	flex-direction: row;
	align-items: stretch;
}

.vpb-layout--list .vpb-media {
	flex: 0 0 var(--vpb-image-width, 40%);
	aspect-ratio: auto;
	min-height: 100%;
}

.vpb-layout--list.vpb-img--right .vpb-card,
.vpb-layout--list.vpb-img--bottom .vpb-card {
	flex-direction: row;
}

.vpb-layout--list.vpb-img--top .vpb-card {
	flex-direction: row;
}

/* 6.3 Carrossel / slider / coverflow */
.vpb-viewport {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.vpb-track {
	display: flex;
	gap: var(--vpb-gap, 24px);
	transition: transform var(--vpb-transition, 600ms) cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.vpb-track .vpb-item {
	flex: 0 0 auto;
	width: 100%;
}

.vpb-track.is-dragging {
	transition: none;
	cursor: grabbing;
}

.vpb-track.no-transition {
	transition: none;
}

.vpb-layout--carousel .vpb-block,
.vpb-layout--slider .vpb-block {
	overflow: hidden;
}

.vpb-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: #111;
	background: rgba(255, 255, 255, 0.94);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
	cursor: pointer;
	transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.vpb-arrow:hover {
	transform: scale(1.08);
	background: #fff;
}

.vpb-arrow[disabled] {
	opacity: 0.35;
	cursor: default;
	transform: none;
}

.vpb-arrow--prev { left: 8px; }
.vpb-arrow--next { right: 8px; }

.vpb-dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.vpb-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: color-mix(in srgb, currentColor 30%, transparent);
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.vpb-dot.is-active {
	width: 26px;
	background: var(--vpb-accent-c);
}

/* Slider de tela cheia */
.vpb-layout--slider .vpb-card {
	min-height: var(--vpb-min-height, 380px);
}

.vpb-layout--slider .vpb-content {
	max-width: 620px;
	padding: clamp(24px, 4vw, 56px);
}

.vpb-layout--slider .vpb-title {
	font-size: calc(var(--vpb-title-size, 20px) * 1.6);
}

/* Coverflow 3D */
.vpb-layout--coverflow .vpb-viewport {
	perspective: 1400px;
	padding: 24px 0;
}

.vpb-layout--coverflow .vpb-item {
	transition: transform 0.55s ease, opacity 0.55s ease;
	transform: scale(0.8) rotateY(0deg);
	opacity: 0.45;
}

.vpb-layout--coverflow .vpb-item.is-prev {
	transform: scale(0.86) rotateY(38deg);
	opacity: 0.75;
}

.vpb-layout--coverflow .vpb-item.is-next {
	transform: scale(0.86) rotateY(-38deg);
	opacity: 0.75;
}

.vpb-layout--coverflow .vpb-item.is-active {
	transform: scale(1) rotateY(0deg);
	opacity: 1;
	z-index: 3;
}

.vpb-layout--coverflow .vpb-item.is-active .vpb-card {
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}

/* 6.4 Faixa deslizante (ticker) */
.vpb-layout--ticker .vpb-viewport {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.vpb-layout--ticker .vpb-track {
	gap: 0;
	width: max-content;
	transition: none;
	animation: vpb-ticker var(--vpb-ticker-speed, 40s) linear infinite;
}

.vpb-layout--ticker .vpb-item {
	margin-right: var(--vpb-gap, 24px);
}

.vpb-layout--ticker .vpb-track.is-paused {
	animation-play-state: paused;
}

.vpb-layout--ticker[data-vpb-dir="right"] .vpb-track {
	animation-direction: reverse;
}

@keyframes vpb-ticker {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(-50%, 0, 0); }
}

/* 6.5 Metro */
.vpb-layout--metro .vpb-items {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: minmax(calc(var(--vpb-min-height, 380px) / 2), auto);
}

.vpb-layout--metro .vpb-item--feature {
	grid-column: span 2;
	grid-row: span 2;
}

.vpb-layout--metro .vpb-item:nth-child(6n + 4) {
	grid-column: span 2;
}

.vpb-layout--metro .vpb-card {
	min-height: 100%;
}

/* 6.6 Linha do tempo */
.vpb-layout--timeline .vpb-items {
	display: flex;
	flex-direction: column;
	position: relative;
	gap: var(--vpb-gap, 24px);
	padding: 8px 0;
}

.vpb-layout--timeline .vpb-items::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background: color-mix(in srgb, var(--vpb-accent-c) 35%, transparent);
}

.vpb-layout--timeline .vpb-item {
	width: calc(50% - 34px);
}

.vpb-layout--timeline .vpb-item:nth-child(even) {
	align-self: flex-end;
}

.vpb-layout--timeline .vpb-item::before {
	content: "";
	position: absolute;
	top: 26px;
	right: -42px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var(--vpb-accent-c);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--vpb-accent-c) 22%, transparent);
	z-index: 2;
}

.vpb-layout--timeline .vpb-item:nth-child(even)::before {
	right: auto;
	left: -42px;
}

/* 6.7 Sanfona horizontal */
.vpb-layout--accordion .vpb-items {
	display: flex;
	gap: 10px;
	height: var(--vpb-min-height, 380px);
}

.vpb-layout--accordion .vpb-item {
	flex: 1 1 0;
	min-width: 44px;
	transition: flex 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	cursor: pointer;
}

.vpb-layout--accordion .vpb-item.is-open {
	flex: 4 1 0;
	cursor: default;
}

.vpb-layout--accordion .vpb-card {
	height: 100%;
	min-height: 0;
}

.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-content {
	padding: 14px 10px;
}

.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-title {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-height: 100%;
	font-size: calc(var(--vpb-title-size, 20px) * 0.8);
}

.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-excerpt,
.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-meta,
.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-actions,
.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-number {
	display: none;
}

.vpb-layout--accordion .vpb-item.is-open .vpb-content > * {
	animation: vpb-fade-in 0.5s ease both;
}

@keyframes vpb-fade-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

/* 6.8 Abas */
.vpb-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.vpb-tabs__btn {
	padding: 0.65em 1.1em;
	font: inherit;
	font-weight: 600;
	color: inherit;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	opacity: 0.62;
	transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.vpb-tabs__btn:hover { opacity: 0.9; }

.vpb-tabs__btn.is-active {
	opacity: 1;
	color: var(--vpb-accent-c);
	border-bottom-color: var(--vpb-accent-c);
}

.vpb-layout--tabs .vpb-tabs__panels {
	display: block;
}

.vpb-tabs__panel[hidden] { display: none; }

.vpb-tabs__panel .vpb-card {
	flex-direction: row;
	align-items: stretch;
}

.vpb-tabs__panel .vpb-media {
	flex: 0 0 var(--vpb-image-width, 40%);
	aspect-ratio: var(--vpb-ratio, 16 / 9);
}

/* 6.9 Revista */
.vpb-layout--magazine .vpb-items {
	grid-template-columns: 1.35fr 1fr;
	align-items: start;
}

.vpb-layout--magazine .vpb-item--feature {
	grid-column: 1;
	grid-row: 1 / -1;
}

.vpb-layout--magazine .vpb-item--small {
	grid-column: 2;
}

.vpb-layout--magazine .vpb-item--feature .vpb-title {
	font-size: calc(var(--vpb-title-size, 20px) * 1.35);
}

.vpb-layout--magazine .vpb-item--small .vpb-card {
	flex-direction: row;
	align-items: stretch;
}

.vpb-layout--magazine .vpb-item--small .vpb-media {
	flex: 0 0 34%;
	aspect-ratio: 1 / 1;
}

.vpb-layout--magazine .vpb-item--small .vpb-excerpt,
.vpb-layout--magazine .vpb-item--small .vpb-actions {
	display: none;
}

.vpb-layout--magazine .vpb-item--small .vpb-title {
	font-size: calc(var(--vpb-title-size, 20px) * 0.85);
}

/* 6.10 Cards com giro 3D */
.vpb-layout--flip .vpb-item {
	perspective: 1200px;
	min-height: var(--vpb-min-height, 380px);
}

.vpb-layout--flip .vpb-card {
	background: none;
	box-shadow: none;
	border: 0;
	overflow: visible;
	height: 100%;
}

.vpb-flip__inner {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: var(--vpb-min-height, 380px);
	transform-style: preserve-3d;
	transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.vpb-layout--flip .vpb-item:hover .vpb-flip__inner,
.vpb-flip__inner:focus-within,
.vpb-layout--flip .vpb-item.is-flipped .vpb-flip__inner {
	transform: rotateY(180deg);
}

.vpb-flip__face {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	border-radius: var(--vpb-radius-c);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	background: var(--vpb-card-c);
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.14);
}

.vpb-flip__front .vpb-media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}

.vpb-flip__front .vpb-title {
	position: relative;
	z-index: 2;
	padding: var(--vpb-padding, 20px);
	color: #fff;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.vpb-flip__front::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.vpb-flip__back {
	transform: rotateY(180deg);
	justify-content: center;
	background: linear-gradient(150deg, var(--vpb-card-c), color-mix(in srgb, var(--vpb-accent-c) 16%, var(--vpb-card-c)));
}

.vpb-flip__back .vpb-content {
	justify-content: center;
	overflow: hidden;
}

/* -------------------------------------------------- 7. Efeitos de hover */

.vpb-hover--zoom .vpb-item:hover .vpb-thumb { transform: scale(1.09); }
.vpb-hover--zoom-out .vpb-thumb { transform: scale(1.12); }
.vpb-hover--zoom-out .vpb-item:hover .vpb-thumb { transform: scale(1); }
.vpb-hover--grayscale .vpb-item:hover .vpb-thumb { filter: grayscale(1); }
.vpb-hover--colorize .vpb-thumb { filter: grayscale(1); }
.vpb-hover--colorize .vpb-item:hover .vpb-thumb { filter: grayscale(0); }
.vpb-hover--blur .vpb-item:hover .vpb-thumb { filter: blur(4px); transform: scale(1.05); }
.vpb-hover--lift .vpb-item:hover .vpb-card { transform: translateY(-10px); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2); }
.vpb-hover--rotate .vpb-item:hover .vpb-card { transform: rotate(-1.2deg) scale(1.02); }
.vpb-hover--glow .vpb-item:hover .vpb-card {
	box-shadow: 0 0 0 2px var(--vpb-accent-c), 0 12px 34px color-mix(in srgb, var(--vpb-accent-c) 35%, transparent);
}

.vpb-hover--tilt .vpb-card {
	transform-style: preserve-3d;
	transition: transform 0.2s ease-out, box-shadow 0.3s ease;
}

.vpb-hover--tilt .vpb-item:hover .vpb-card {
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
}

.vpb-hover--shine .vpb-media::after {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	z-index: 2;
	width: 50%;
	height: 100%;
	background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 100%);
	transform: skewX(-24deg);
	pointer-events: none;
}

.vpb-hover--shine .vpb-item:hover .vpb-media::after {
	animation: vpb-shine 0.9s ease;
}

@keyframes vpb-shine {
	100% { left: 130%; }
}

.vpb-hover--slide-up .vpb-content {
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.vpb-hover--slide-up .vpb-excerpt,
.vpb-hover--slide-up .vpb-actions {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.45s ease, opacity 0.35s ease;
}

.vpb-hover--slide-up .vpb-item:hover .vpb-excerpt,
.vpb-hover--slide-up .vpb-item:focus-within .vpb-excerpt,
.vpb-hover--slide-up .vpb-item:hover .vpb-actions,
.vpb-hover--slide-up .vpb-item:focus-within .vpb-actions {
	max-height: 220px;
	opacity: 1;
}

/* --------------------------------------------- 8. Animações de entrada */

.vpb-anim {
	opacity: 0;
	transition:
		opacity var(--vpb-anim-duration, 600ms) ease,
		transform var(--vpb-anim-duration, 600ms) cubic-bezier(0.22, 1, 0.36, 1),
		filter var(--vpb-anim-duration, 600ms) ease;
	transition-delay: calc(var(--vpb-i, 0) * var(--vpb-anim-stagger, 0ms));
}

.vpb-anim--fade-up .vpb-anim { transform: translateY(32px); }
.vpb-anim--fade-down .vpb-anim { transform: translateY(-32px); }
.vpb-anim--fade-left .vpb-anim { transform: translateX(-40px); }
.vpb-anim--fade-right .vpb-anim { transform: translateX(40px); }
.vpb-anim--zoom-in .vpb-anim { transform: scale(0.86); }
.vpb-anim--zoom-out .vpb-anim { transform: scale(1.14); }
.vpb-anim--flip-in .vpb-anim { transform: perspective(900px) rotateY(35deg); }
.vpb-anim--blur-in .vpb-anim { filter: blur(12px); }

.vpb-anim.is-visible {
	opacity: 1;
	transform: none;
	filter: none;
}

@media (scripting: none) {
	.vpb-anim {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}
}

/* ------------------------------------ 9. Barra de filtros e paginação */

.vpb-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px;
}

.vpb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vpb-filter {
	padding: 0.5em 1.05em;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	color: inherit;
	background: color-mix(in srgb, currentColor 8%, transparent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.vpb-filter:hover { transform: translateY(-1px); }

.vpb-filter.is-active {
	background: var(--vpb-accent-c);
	color: #fff;
}

.vpb-search {
	display: flex;
	gap: 6px;
}

.vpb-search__input {
	padding: 0.55em 0.9em;
	font: inherit;
	font-size: 0.9rem;
	color: inherit;
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: 999px;
	min-width: 200px;
}

.vpb-search__input:focus {
	outline: 2px solid var(--vpb-accent-c);
	outline-offset: 1px;
}

.vpb-search__btn {
	padding: 0.55em 1.1em;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	color: #fff;
	background: var(--vpb-accent-c);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.vpb-pagination-wrap:empty { display: none; }

.vpb-pages {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 28px;
}

.vpb-page {
	min-width: 40px;
	padding: 0.5em 0.75em;
	font: inherit;
	font-weight: 600;
	color: inherit;
	background: color-mix(in srgb, currentColor 8%, transparent);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.vpb-page:hover { background: color-mix(in srgb, var(--vpb-accent-c) 22%, transparent); }

.vpb-page.is-active {
	background: var(--vpb-accent-c);
	color: #fff;
}

.vpb-page--gap {
	background: none;
	cursor: default;
}

.vpb-loadmore {
	display: block;
	margin: 28px auto 0;
	padding: 0.8em 2em;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--vpb-accent-c);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.25s ease;
}

.vpb-loadmore:hover { transform: translateY(-2px); }
.vpb-loadmore.is-loading { opacity: 0.6; cursor: wait; }

.vpb-loader {
	display: grid;
	place-items: center;
	padding: 20px 0;
}

.vpb-loader[hidden] { display: none; }

.vpb-spinner {
	width: 26px;
	height: 26px;
	border: 3px solid color-mix(in srgb, currentColor 20%, transparent);
	border-top-color: var(--vpb-accent-c);
	border-radius: 50%;
	animation: vpb-spin 0.8s linear infinite;
}

@keyframes vpb-spin {
	to { transform: rotate(360deg); }
}

.vpb-body.is-loading {
	opacity: 0.45;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.vpb-block .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------- 10. Responsivo e acessibilidade */

@media (max-width: 1024px) {
	.vpb-block { --vpb-cols: var(--vpb-columns-tablet, 2); }

	.vpb-layout--metro .vpb-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vpb-layout--magazine .vpb-items { grid-template-columns: 1fr; }
	.vpb-layout--magazine .vpb-item--feature,
	.vpb-layout--magazine .vpb-item--small { grid-column: 1; grid-row: auto; }
}

@media (max-width: 640px) {
	.vpb-block { --vpb-cols: var(--vpb-columns-mobile, 1); }

	.vpb-layout--list .vpb-card,
	.vpb-img--left .vpb-card,
	.vpb-img--right .vpb-card,
	.vpb-img--alternate .vpb-card,
	.vpb-img--alternate .vpb-item:nth-child(even) .vpb-card,
	.vpb-tabs__panel .vpb-card {
		flex-direction: column;
	}

	.vpb-layout--list .vpb-media,
	.vpb-img--left .vpb-media,
	.vpb-img--right .vpb-media,
	.vpb-img--alternate .vpb-media,
	.vpb-tabs__panel .vpb-media {
		flex-basis: auto;
		width: 100%;
		aspect-ratio: var(--vpb-ratio, 16 / 9);
		min-height: 0;
	}

	.vpb-layout--metro .vpb-items { grid-template-columns: 1fr; }
	.vpb-layout--metro .vpb-item--feature,
	.vpb-layout--metro .vpb-item:nth-child(6n + 4) { grid-column: span 1; grid-row: span 1; }

	.vpb-layout--timeline .vpb-items::before { left: 8px; }
	.vpb-layout--timeline .vpb-item { width: calc(100% - 34px); align-self: flex-end !important; }
	.vpb-layout--timeline .vpb-item::before,
	.vpb-layout--timeline .vpb-item:nth-child(even)::before { left: -34px; right: auto; }

	.vpb-layout--accordion .vpb-items { flex-direction: column; height: auto; }
	.vpb-layout--accordion .vpb-item { min-height: 88px; }
	.vpb-layout--accordion .vpb-item:not(.is-open) .vpb-title { writing-mode: horizontal-tb; transform: none; }

	.vpb-toolbar { justify-content: flex-start; }
	.vpb-search__input { min-width: 0; flex: 1; }
	.vpb-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
	.vpb-block *,
	.vpb-block *::before,
	.vpb-block *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.vpb-anim {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}
}

.vpb-block :focus-visible {
	outline: 2px solid var(--vpb-accent-c);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Pré-visualização dentro do editor: o carrossel vira rolagem horizontal. */
.vpb--preview .vpb-viewport {
	overflow-x: auto;
}

.vpb--preview .vpb-track {
	transition: none;
	animation: none;
}

.vpb--preview .vpb-layout--ticker .vpb-track,
.vpb--preview.vpb-layout--ticker .vpb-track {
	animation: none;
}

.vpb--preview .vpb-item {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

.vpb--preview.vpb-layout--carousel .vpb-track .vpb-item,
.vpb--preview.vpb-layout--coverflow .vpb-track .vpb-item,
.vpb--preview.vpb-layout--slider .vpb-track .vpb-item {
	width: calc((100% - (var(--vpb-cols) - 1) * var(--vpb-gap, 24px)) / var(--vpb-cols));
}

.vpb--preview.vpb-layout--ticker .vpb-track .vpb-item {
	width: 280px;
}
