.bella-archive {
	--bella-ink: #16161a;
	--bella-body: #3f4045;
	--bella-muted: #6b6d72;
	--bella-card: #ffffff;
	--bella-line: #e6eaee;
	--bella-accent: var(--theme-color-text_link, #6f51c7);
	--bella-accent-dark: var(--theme-color-text_hover, #5f42b4);
	--bella-radius: 18px;
	--bella-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
	--bella-shadow-lift: 0 2px 4px rgba(16, 24, 40, .04), 0 18px 36px -16px rgba(16, 24, 40, .22);
}

/* ------------------------------------------------------------ the grid ---- */

.bella-archive .posts_container.columns_wrap {
	display: grid;
	/* Cards hold their proportions on any width instead of being pinned to the
	   theme's 1/3 floats, which collapse awkwardly between breakpoints. */
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 1.75rem;
	margin: 0;
}

/* The theme's column wrappers carry float/width/padding that fight the grid. */
.bella-archive .posts_container.columns_wrap > [class*="column-"] {
	float: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	display: flex;
}

.bella-archive .posts_container.columns_wrap > [class*="column-"]::before,
.bella-archive .posts_container.columns_wrap > [class*="column-"]::after {
	display: none;
}

/* ----------------------------------------------------------- the card ----- */

.bella-archive .posts_container.columns_wrap .post_item {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background-color: var(--bella-card);
	border: 1px solid var(--bella-line);
	border-radius: var(--bella-radius);
	box-shadow: var(--bella-shadow);
	transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, border-color .25s ease;
}

@media (hover: hover) {
	.bella-archive .post_item:hover {
		transform: translateY(-4px);
		border-color: transparent;
		box-shadow: var(--bella-shadow-lift);
	}
}

/* Keyboard users get the same affordance as the hover lift. */
.bella-archive .post_item:focus-within {
	border-color: var(--bella-accent);
	box-shadow: var(--bella-shadow-lift);
}

/* The whole card is clickable via the title's stretched link, so the media
   anchor underneath must not also swallow the pointer. */
.bella-archive .post_item .post_title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

/* ------------------------------------------------------------- the image -- */

.bella-archive .posts_container .post_item > .post_featured,
.bella-archive .bella-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	margin: 0 0 1.25rem;
	overflow: hidden;
	background-color: #eef1f5;
}

.bella-archive .bella-card__media {
	margin: 0 -1.5rem 1.25rem;
}

.bella-archive .post_item .post_featured img,
.bella-archive .bella-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* A slow, small zoom reads as depth; anything faster reads as a glitch. */
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

@media (hover: hover) {
	/* The theme zooms its own featured image on hovering the image; the card
	   is the hover target here, so both media types answer to the same one. */
	.bella-archive .post_item:hover .post_featured img,
	.bella-archive .post_item:hover .bella-card__media img {
		transform: scale(1.045);
	}
}

/* Cards with no image keep the top padding the media would have supplied. */
.bella-archive .post_item:not(:has(.post_featured)):not(:has(.bella-card__media)) .post_header {
	padding-top: 1.5rem;
}

/* ------------------------------------------------------------ the header -- */

.bella-archive .post_item .post_header {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	margin: 0;
	padding: 0 1.5rem 1.5rem;
}

/* -------------------------------------------------------------- the meta -- */

.bella-archive .post_item .post_meta {
	display: flex;
	align-items: center;
	gap: .625rem;
	margin: 0 0 .75rem;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}

/* The theme separates meta items with a "/" pseudo-element; the pill and the
   dot below do that job now. */
.bella-archive .post_item .post_meta_item::after,
.bella-archive .post_item .post_meta_item::before {
	display: none !important;
}

.bella-archive .post_item .post_categories a {
	display: inline-block;
	padding: .3125rem .625rem;
	color: var(--bella-accent);
	font-weight: 600;
	font-size: 11px;
	letter-spacing: .02em;
	text-transform: uppercase;
	background-color: color-mix(in srgb, var(--bella-accent) 10%, transparent);
	border-radius: 999px;
	transition: background-color .2s ease, color .2s ease;
}

/* color-mix is recent; older browsers get a flat tint instead of no tint. */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
	.bella-archive .post_item .post_categories a {
		background-color: #f1eefb;
	}
}

.bella-archive .post_item .post_categories a:hover {
	color: #fff;
	background-color: var(--bella-accent);
}

.bella-archive .post_item .post_date,
.bella-archive .post_item .post_date a {
	color: var(--bella-muted);
	font-weight: 400;
	font-size: 12px;
}

.bella-archive .post_item .post_date::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	margin-right: .625rem;
	vertical-align: middle;
	background-color: #c6cad0;
	border-radius: 50%;
}

/* ------------------------------------------------------------- the title -- */

.bella-archive .post_item .post_title {
	margin: 0 0 .625rem;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -.011em;
}

.bella-archive .post_item .post_title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	color: var(--bella-ink);
	transition: color .2s ease;
}

.bella-archive .post_item:hover .post_title a,
.bella-archive .post_item .post_title a:hover {
	color: var(--bella-accent);
}

/* ----------------------------------------------------------- the excerpt -- */

.bella-archive .bella-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin: 0 0 1.125rem;
	color: var(--bella-muted);
	font-size: 14px;
	line-height: 1.6;
}

/* Pushed to the bottom so the row of "Đọc tiếp" links stays level across cards
   of unequal title length. */
.bella-archive .bella-card__more {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	margin-top: auto;
	color: var(--bella-accent);
	font-size: 13px;
	font-weight: 600;
}

.bella-archive .bella-card__more svg {
	transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}

@media (hover: hover) {
	.bella-archive .post_item:hover .bella-card__more svg {
		transform: translateX(3px);
	}
}

/* The theme's own read-more button would duplicate this. */
.bella-archive .post_item .more-wrap {
	display: none;
}

/* -------------------------------------------------------- archive header -- */

.bella-archive .page_title_inner,
.bella-archive .post_header_archive {
	margin-bottom: 2.25rem;
}

/* ---------------------------------------------------------- pagination ---- */

.bella-archive .pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin-top: 3rem;
}

.bella-archive .pagination .nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 .75rem;
	color: var(--bella-body);
	font-size: 14px;
	font-weight: 500;
	background-color: var(--bella-card);
	border: 1px solid var(--bella-line);
	border-radius: 999px;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.bella-archive .pagination .nav-links .page-numbers:hover {
	color: var(--bella-accent);
	border-color: var(--bella-accent);
}

.bella-archive .pagination .nav-links .page-numbers.current {
	color: #fff;
	background-color: var(--bella-ink);
	border-color: var(--bella-ink);
}

.bella-archive .pagination .nav-links .page-numbers.dots {
	background: none;
	border-color: transparent;
}

/* --------------------------------------------------------------- tablet --- */

@media (max-width: 1023px) {
	.bella-archive .posts_container.columns_wrap {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.75rem 1.5rem;
	}

	.bella-archive .post_item .post_title {
		font-size: 18px;
	}
}

/* --------------------------------------------------------------- mobile --- */

@media (max-width: 639px) {
	.bella-archive .posts_container.columns_wrap {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.bella-archive .post_item .post_header {
		padding: 0 1.25rem 1.25rem;
	}

	.bella-archive .posts_container .post_item > .post_featured,
	.bella-archive .bella-card__media {
		aspect-ratio: 16 / 9;
		margin: 0 0 1rem;
	}

	.bella-archive .bella-card__media {
		margin: 0 -1.25rem 1rem;
	}

	.bella-archive .post_item .post_title {
		font-size: 17px;
	}

	.bella-archive .pagination .nav-links {
		margin-top: 2rem;
	}
}

/* ----------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
	.bella-archive .post_item,
	.bella-archive .post_item .post_featured img,
	.bella-archive .bella-card__media img,
	.bella-archive .bella-card__more svg {
		transition: none;
	}

	.bella-archive .post_item:hover {
		transform: none;
	}

	.bella-archive .post_item:hover .post_featured img,
	.bella-archive .post_item:hover .bella-card__media img {
		transform: none;
	}
}
