/*
 * Category masthead. It follows the same image-led language as the forum
 * archive masthead while remaining a standalone full-width widget.
 */
.moedes-category-masthead {
	--moedes-category-primary: var(--moedes-primary, var(--theme-color, #2f6fed));
	--moedes-category-primary-hover: var(--moedes-primary-hover, var(--focus-color, #2f6fed));
	--moedes-category-primary-foreground: var(--moedes-primary-foreground, #fff);
	--moedes-category-tertiary: var(--moedes-tertiary, #51A2FF);
	--moedes-category-overlay: rgba(15, 23, 42, .64);
	position: relative;
	isolation: isolate;
	width: 100%;
	min-height: 150px;
	margin: 0 0 20px;
	overflow: hidden;
	border-radius: var(--moedes-forum-radius, var(--main-radius, 8px));
	background: var(--muted-bg-2-color, #f6f7f8);
	color: #fff;
}

.moedes-category-masthead__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, var(--moedes-category-overlay) 0%, rgba(15, 23, 42, .25) 55%, rgba(15, 23, 42, .68) 100%),
		var(--moedes-category-cover, linear-gradient(135deg, var(--moedes-category-primary), #172554));
	background-position: center;
	background-size: cover;
	filter: saturate(.92);
}

.moedes-category-masthead__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	width: calc(100% - 32px);
	max-width: var(--mian-max-width, 1200px);
	min-height: 150px;
	margin: 0 auto;
	padding: 18px 0;
	box-sizing: border-box;
}

.moedes-category-masthead__thumb {
	display: block;
	flex: 0 0 86px;
	width: 86px;
	height: 86px;
	overflow: hidden;
	border: 3px solid rgba(255, 255, 255, .88);
	border-radius: var(--moedes-forum-radius, var(--main-radius, 8px));
	background: rgba(255, 255, 255, .18);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.moedes-category-masthead__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.moedes-category-masthead__body {
	min-width: 0;
	flex: 1 1 auto;
}

.moedes-category-masthead__heading {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.moedes-category-masthead__label,
.moedes-category-masthead__rank {
	display: inline-flex;
	align-items: center;
	min-height: 20px;
	padding: 2px 8px;
	border-radius: var(--mini-radius, var(--moedes-forum-radius, var(--main-radius, 8px)));
	font-size: 12px;
	line-height: 1.3;
}

.moedes-category-masthead__label {
	background: var(--moedes-category-primary);
	color: var(--moedes-category-primary-foreground);
}

.moedes-category-masthead__rank {
	border: 1px solid rgba(255, 255, 255, .48);
	background: rgba(15, 23, 42, .2);
	color: rgba(255, 255, 255, .9);
}

.moedes-category-masthead h1 {
	margin: 7px 0 3px;
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 700;
	line-height: 1.2;
}

.moedes-category-masthead h1 a {
	color: #fff;
}

.moedes-category-masthead__stats {
	display: flex;
	align-items: baseline;
	gap: 22px;
	margin-top: 8px;
}

.moedes-category-masthead__stat {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.moedes-category-masthead__stat b {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.moedes-category-masthead__stat small {
	color: rgba(255, 255, 255, .78);
	font-size: 12px;
}

.moedes-category-masthead p {
	max-width: 680px;
	margin: 8px 0 0;
	color: rgba(255, 255, 255, .84);
	font-size: 13px;
	line-height: 1.55;
}

.moedes-category-masthead__action {
	flex: 0 0 auto;
	align-self: flex-end;
	margin-bottom: 4px;
	border: 0;
	background: var(--moedes-category-primary);
	color: var(--moedes-category-primary-foreground);
}

.moedes-category-masthead__action:hover,
.moedes-category-masthead__action:focus-visible {
	background: var(--moedes-category-primary-hover);
	color: var(--moedes-category-primary-foreground);
}

/*
 * The native Zibll category cover is relocated by the child script to the
 * document flow above <main>. This keeps the parent's search/sort behaviour
 * while giving the archive the same full-bleed masthead treatment as forum
 * boards and tags.
 */
body.moedes-content-category .moedes-category-page-cover {
	position: relative !important;
	display: block !important;
	width: var(--moedes-forum-viewport-width, 100vw) !important;
	max-width: var(--moedes-forum-viewport-width, 100vw) !important;
	height: 184px !important;
	min-height: 184px !important;
	margin: 0 0 0 calc((100% - var(--moedes-forum-viewport-width, 100vw)) / 2) !important;
	padding-bottom: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--muted-bg-2-color, #f6f7f8) !important;
	box-shadow: none !important;
}

body.moedes-content-category .moedes-category-page-cover > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	filter: saturate(.92);
}

body.moedes-content-category .moedes-category-page-cover > img[src*="thumbnail-lg.svg"],
body.moedes-content-category .moedes-category-page-cover > img[src*="user_t.jpg"] {
	background:
		linear-gradient(135deg, var(--moedes-primary, var(--theme-color, #2f6fed)), #172554);
	object-fit: cover;
}

body.moedes-content-category .moedes-category-page-cover > .linear-mask {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(15, 23, 42, .74) 0%, rgba(15, 23, 42, .3) 58%, rgba(15, 23, 42, .68) 100%);
}

body.moedes-content-category .moedes-category-page-cover .page-cover-con {
	position: absolute;
	z-index: 1;
	right: max(18px, calc((100vw - var(--mian-max-width, 1250px)) / 2 + 18px));
	bottom: 22px;
	left: max(18px, calc((100vw - var(--mian-max-width, 1250px)) / 2 + 18px));
	width: auto;
	padding: 0 !important;
	color: #fff;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-con .title-h-left {
	margin: 0;
	color: #fff;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-con .title-h-left > b {
	display: block;
	color: #fff;
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 700;
	line-height: 1.2;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-con .title-h-left > b > i {
	color: var(--moedes-primary, var(--theme-color, #2f6fed));
	font-size: .72em;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-con .icon-spot {
	display: inline-flex;
	margin-left: 8px;
	padding: 3px 8px;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, .42);
	border-radius: var(--moedes-forum-radius, var(--main-radius, 8px));
	background: rgba(15, 23, 42, .22);
	color: rgba(255, 255, 255, .9);
	font-size: 12px;
	font-weight: 500;
	vertical-align: middle;
}

body.moedes-content-category .moedes-category-page-cover .page-desc {
	max-width: 720px;
	margin-top: 8px;
	color: rgba(255, 255, 255, .84);
	font-size: 13px;
	line-height: 1.55;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-more-btns {
	position: absolute;
	z-index: 2;
	right: max(18px, calc((100vw - var(--mian-max-width, 1250px)) / 2 + 18px));
	bottom: 22px;
	display: flex;
	gap: 8px;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-more-btns > a {
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .48);
	border-radius: var(--moedes-forum-radius, var(--main-radius, 8px));
	background: rgba(15, 23, 42, .28);
	color: #fff;
}

body.moedes-content-category .moedes-category-page-cover .page-cover-more-btns > a:hover,
body.moedes-content-category .moedes-category-page-cover .page-cover-more-btns > a:focus-visible {
	background: var(--moedes-primary-hover, var(--theme-color, #2f6fed));
	color: var(--moedes-primary-foreground, #fff);
}

body.moedes-content-category .header-slider-container {
	display: none !important;
}

body.moedes-content-category main.container {
	margin-top: 0 !important;
}

@media (max-width: 767px) {
	.moedes-category-masthead {
		min-height: 132px;
		margin-bottom: 14px;
		border-radius: var(--moedes-forum-radius, var(--main-radius, 8px));
	}

	.moedes-category-masthead__inner {
		align-items: flex-start;
		gap: 12px;
		width: calc(100% - 24px);
		min-height: 132px;
		padding: 15px 0;
	}

	.moedes-category-masthead__thumb {
		flex-basis: 66px;
		width: 66px;
		height: 66px;
		border-width: 2px;
	}

	.moedes-category-masthead h1 {
		margin-top: 6px;
		font-size: 21px;
	}

	.moedes-category-masthead__stats {
		gap: 14px;
		margin-top: 6px;
	}

	.moedes-category-masthead__stat b {
		font-size: 16px;
	}

	.moedes-category-masthead__action {
		position: absolute;
		right: 0;
		bottom: 15px;
		margin: 0;
		font-size: 12px;
	}

	body.moedes-content-category .moedes-category-page-cover {
		height: 150px !important;
		min-height: 150px !important;
		padding-bottom: 0 !important;
	}

	body.moedes-content-category .moedes-category-page-cover .page-cover-con {
		right: 14px;
		bottom: 18px;
		left: 14px;
	}

	body.moedes-content-category .moedes-category-page-cover .page-cover-con .title-h-left > b {
		font-size: 22px;
	}

	body.moedes-content-category .moedes-category-page-cover .page-desc {
		max-width: calc(100% - 50px);
		font-size: 12px;
	}

	body.moedes-content-category .moedes-category-page-cover .page-cover-more-btns {
		right: 14px;
		bottom: 18px;
	}
}
