/**
 * Qing 分类文章列表（归档）小部件样式。
 *
 * 结构：
 *   .qing-pa（容器，对齐源码 .e_loopFocus-1：94% / max 1600 / 居中）
 *     > .qing-pa-grid（顶部特色卡片区，对齐源码 .p_focus）
 *         > article.qing-pa-card（对齐源码 .e_container-10）
 *             > .qing-pa-card__date + .qing-pa-card__title
 *               + a.qing-pa-card__media + .qing-pa-card__excerpt
 *               + .qing-pa-card__foot(.__more + .__arrow)（对齐源码 .e_text-15）
 *     > .qing-pa-list（列表区，对齐源码 .p_list）
 *         > article.qing-pa-row（对齐源码 .e_container-18）
 *             > a.qing-pa-row__media（对齐源码 .e_image-26）
 *             + .qing-pa-row__body
 *                 > .qing-pa-row__main(.__title + .__excerpt)
 *                 + .qing-pa-row__date(.__day + .__ym)
 *     > nav.qing-pa-pager（数字分页）
 *
 * 品牌主色：#1c59ad（对齐源码 hover 用色）。
 *
 * @package Qing
 */

/* ============ 字体（对齐源码 site.css @font-face）============ */
/* 标题：Gilroy Bold（源码从 CDN 加载 otf）。 */
@font-face {
	font-family: "gilroy-bold";
	src: url(https://omo-oss-file110.thefastfile.com/portal-saas/pg2025091621504639434/cms/file/gilroy-bold.otf) format("opentype");
	font-display: swap;
}

/* 正文/摘要：Gilroy Regular（主题本地字体文件）。 */
@font-face {
	font-family: "gilroy-regular";
	src: url(../static/font/gilroy-regular.ttf) format("truetype");
	font-display: swap;
}

/* 列表行「日号」大数字：Montserrat-Bold（源码 UUID 命名，主题本地 woff2）。 */
@font-face {
	font-family: "488065df-3953-4787-9862-dc1a826f0fba";
	src: url(../static/font/488065df-3953-4787-9862-dc1a826f0fba.woff2) format("woff2");
	font-display: swap;
}

/* 列表行「年/月」：Montserrat-Light（源码 UUID 命名，主题本地 woff2）。 */
@font-face {
	font-family: "49ce7a51-d997-4565-a8dc-c7940545034c";
	src: url(../static/font/49ce7a51-d997-4565-a8dc-c7940545034c.woff2) format("woff2");
	font-display: swap;
}

/* ============ 容器 ============ */
.qing-pa {
	font-family: "gilroy-regular", "Helvetica Neue", Arial, sans-serif;
	width: 94%;
	max-width: 1600px;
	margin: 0 auto;
	box-sizing: border-box;
}

.qing-pa * {
	box-sizing: border-box;
}

/* ============ 顶部特色卡片区（源码 .p_focus）============
   用 CSS Grid 固定三列，彻底避免像素取整导致的换行。
   列间距用 --qing-pa-grid-gap（对齐源码 2%），行距用 --qing-pa-card-gap。 */
.qing-pa-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: var(--qing-pa-grid-gap, 2%);
	row-gap: var(--qing-pa-card-gap, 50px);
	position: relative;
	max-width: 100%;
	margin-bottom: var(--qing-pa-card-gap, 50px);
}

/* 每张卡片。min-width:0 防止长标题/长词把卡片撑宽。 */
.qing-pa-card {
	min-width: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 35px;
	background-color: #f2f2f2;
	border-radius: 8px;
	box-shadow: 0 0 20px 0 rgba(29, 56, 75, 0);
	transform: translateY(0);
	transition: all 0.5s ease;
	box-sizing: border-box;
}

.qing-pa-card:hover {
	transform: translateY(-10px);
	background: #ffffff;
	box-shadow: 0 10px 30px 10px rgba(0, 0, 0, 0.1);
}

/* 日期（源码 .e_timeFormat-11）。 */
.qing-pa-card__date {
	min-height: 20px;
	font-size: 14px;
	color: #666666;
	line-height: 1.5;
	font-weight: normal;
}

/* 标题（源码 .e_text-12）：两行截断、悬停变主题蓝。 */
.qing-pa-card__title {
	margin: 15px 0 20px;
	line-height: 1.2;
	height: 50px;
	font-size: 20px;
	font-weight: normal;
	font-family: "gilroy-bold", "Helvetica Neue", Arial, sans-serif;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: all 0.5s ease;
}

.qing-pa-card__title a {
	color: #222222;
	text-decoration: none;
}

.qing-pa-card:hover .qing-pa-card__title,
.qing-pa-card:hover .qing-pa-card__title a {
	color: #1c59ad;
}

/* 图片（源码 .e_image-13）：等比占位 65%，悬停放大。 */
.qing-pa-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	padding-bottom: 65%;
	border-radius: 5px;
}

.qing-pa-card__media img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(-50%, -50%);
	transition: all 0.5s ease;
}

.qing-pa-card:hover .qing-pa-card__media img {
	transform: translate(-50%, -50%) scale(1.1);
}

/* 摘要（源码 .e_richText-14）：三行截断。 */
.qing-pa-card__excerpt {
	margin: 20px 0;
	font-size: 15px;
	color: #555555;
	line-height: 26px;
	height: 74px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	transition: all 0.5s ease;
}

/* 底部 Learn more（源码 .e_text-15 / .new_top_more / .common_more / .more_box）。 */
.qing-pa-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	margin-top: auto;
	/* new_top_more：顶部 2px 浅灰分隔线。 */
	border-top: 2px solid #d8d8d8;
	box-sizing: border-box;
}

.qing-pa-card__more {
	color: #7f8c94;
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
	transition: color 0.3s ease;
}

/* 右侧圆点圈（源码 .more_box）：23px 圆 + 居中小圆点 + 向左连接线。 */
.qing-pa-card__arrow {
	position: relative;
	display: inline-block;
	width: 23px;
	height: 23px;
	border-radius: 50%;
	border: 1px solid #7f8c94;
	background-color: transparent;
	transition: border-color 0.3s ease;
}

/* 圆圈中心小圆点（源码 .more_box::before）。 */
.qing-pa-card__arrow::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -2.5px;
	margin-left: -2.5px;
	background: #7f8c94;
	border-radius: 50%;
	z-index: 1;
	transition: background-color 0.3s ease;
}

/* 向左延伸并连入圆圈的连接线（源码 .more_box::after：width:52px; left:-42px）。 */
.qing-pa-card__arrow::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -42px;
	width: 52px;
	height: 1px;
	margin-top: 0;
	background: #7f8c94;
	transition: background-color 0.3s ease;
}

/* 卡片悬停：Learn more、圆圈、圆点、连接线整体变主题蓝（源码 #1c59ad）。 */
.qing-pa-card:hover .qing-pa-card__more {
	color: #1c59ad;
}
.qing-pa-card:hover .qing-pa-card__arrow {
	border-color: #1c59ad;
}
.qing-pa-card:hover .qing-pa-card__arrow::before,
.qing-pa-card:hover .qing-pa-card__arrow::after {
	background: #1c59ad;
}

/* ============ 列表区（源码 .p_list）============ */
.qing-pa-list {
	display: flex;
	flex-wrap: wrap;
}

/* 单行（源码 .e_container-18）：整行卡片，悬停上浮 + 阴影。 */
.qing-pa-row {
	position: relative;
	flex: 0 0 100%;
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	margin-bottom: 40px;
	background-color: #f2f2f2;
	border-radius: 8px;
	transition: all 0.5s ease;
}

.qing-pa-row:hover {
	background: #ffffff;
	box-shadow: 0 10px 30px 10px rgba(0, 0, 0, 0.1);
	transform: translateY(-10px);
}

/* 左侧图片单元（源码 cbox-18-0 占 20%，内边距 35px；cbox-18-1 占 80%）。
   垂直居中，避免内容高度不一致时下方留大片空白。 */
.qing-pa-row__mediacell {
	flex: 0 0 20%;
	display: flex;
	align-items: center;
	padding: 35px;
}

/* 缩略图（源码 .e_image-26）：等比占位 60%，悬停放大。 */
.qing-pa-row__media {
	display: block;
	width: 100%;
	height: 0;
	padding-bottom: 60%;
	position: relative;
	overflow: hidden;
	border-radius: 5px;
}

.qing-pa-row__media img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(-50%, -50%);
	transition: all 0.5s ease;
}

.qing-pa-row:hover .qing-pa-row__media img {
	transform: translate(-50%, -50%) scale(1.1);
}

/* 右侧内容单元（源码 cbox-18-1 占 80% + e_container-19 内边距 4.8% 5%）。 */
.qing-pa-row__body {
	flex: 0 0 80%;
	display: flex;
	align-items: center;
	padding: 4.8% 5%;
}

/* 内容行（源码 .e_container-20）：文字块 + 右侧日期，两端对齐、垂直居中。 */
.qing-pa-row__inner {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
}

/* 文字块（源码 cbox-20-0 占 70%）。 */
.qing-pa-row__main {
	flex: 0 0 70%;
}

/* 标题（源码 .e_text-23）：单行截断、悬停变蓝。 */
.qing-pa-row__title {
	margin: 0;
	line-height: 1.6;
	font-size: 20px;
	font-weight: normal;
	font-family: "gilroy-bold", "Helvetica Neue", Arial, sans-serif;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	transition: all 0.2s ease;
}

.qing-pa-row__title a {
	color: #222222;
	text-decoration: none;
}

.qing-pa-row:hover .qing-pa-row__title,
.qing-pa-row:hover .qing-pa-row__title a {
	color: #1c59ad;
}

/* 摘要（源码 .e_richText-24）：两行截断。 */
.qing-pa-row__excerpt {
	margin-top: 15px;
	font-size: 15px;
	color: #666666;
	line-height: 26px;
	height: 52px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* 右侧日期徽标（源码 cbox-20-1）。 */
.qing-pa-row__date {
	flex: 0 0 auto;
	text-align: center;
}

/* 日号大字（源码 .e_timeFormat-21）：60px，悬停变蓝。 */
.qing-pa-row__day {
	min-height: 20px;
	font-size: 60px;
	color: #333333;
	line-height: 60px;
	text-align: center;
	font-family: "488065df-3953-4787-9862-dc1a826f0fba", "Montserrat", Arial, sans-serif;
	transition: all 0.5s ease;
}

/* 年月小字（源码 .e_timeFormat-22）：18px，悬停变蓝。 */
.qing-pa-row__ym {
	font-size: 18px;
	line-height: 32px;
	color: #333333;
	text-align: center;
	font-family: "49ce7a51-d997-4565-a8dc-c7940545034c", "Montserrat", Arial, sans-serif;
	transition: all 0.5s ease;
}

.qing-pa-row:hover .qing-pa-row__day,
.qing-pa-row:hover .qing-pa-row__ym {
	color: #1c59ad;
}

/* ============ 数字分页 ============ */
.qing-pa-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	margin-top: 10px;
}

/* 圆形分页（源码 .page_a）：40×40 圆、浅灰底 #f2f2f2。 */
.qing-pa-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0 4px;
	color: #333333;
	font-size: 14px;
	line-height: 40px;
	text-align: center;
	text-decoration: none;
	background-color: #f2f2f2;
	border: 1px solid transparent;
	border-radius: 50%;
	transition: all 0.3s ease;
}

/* 悬停：蓝底 + 白字 + 白图标。 */
.qing-pa-pager a.page-numbers:hover {
	color: #ffffff !important;
	border-color: #1c59ad !important;
	background-color: #1c59ad !important;
}

.qing-pa-pager a.page-numbers:hover svg {
	stroke: #ffffff;
	color: #ffffff;
}

/* 置灰不可点的左右箭头（首页/末页）。 */
.qing-pa-pager .page-numbers.disabled {
	color: #bbbbbb;
	background-color: #f2f2f2;
	cursor: default;
	pointer-events: none;
}

.qing-pa-pager .page-numbers.disabled svg {
	stroke: #bbbbbb;
	color: #bbbbbb;
}

/* 当前页：蓝底白字（源码 .page_a.current，用 !important 覆盖主题全局分页色）。 */
.qing-pa-pager .page-numbers.current,
.qing-pa-pager span.page-numbers.current {
	color: #ffffff !important;
	background-color: #1c59ad !important;
	border-color: #1c59ad !important;
}

.qing-pa-pager .page-numbers.current svg {
	stroke: #ffffff;
	color: #ffffff;
}

/* 省略号：无底无边。 */
.qing-pa-pager .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: #999;
}

/* 编辑器空态提示。 */
.qing-pa-empty {
	padding: 40px;
	text-align: center;
	color: #999;
	background: #f7f8fa;
	border-radius: 8px;
}

/* ============ 平板 + 手机端（≤1024）============
 * 复刻源码 blog 列表 @media(max-width:768px) 的整套规则，并把堆叠断点扩到 1024，
 * 覆盖平板区间（768–1024）——源码平板段为空会沿用桌面横排，在窄屏上会把列表行
 * 内容顶出屏幕，故这里统一用单列堆叠布局。
 * 布局关键属性（堆叠方向 / flex 占比 / 列数 / 内边距）用 !important，
 * 以压过 Elementor 每元素响应式控件（columns / row_media_ratio / row_body_pad
 * / card_padding 等）生成的 `.elementor-element-xxx .qing-pa-*` 高优先级 CSS——
 * 否则桌面的「图 20% / 文 80% / 三列卡片」会在窄屏继续生效，导致行不堆叠、乱版。 */
@media screen and (max-width: 1024px) {
	/* 容器：源码 padding-top:30 / padding-bottom:50。防横向溢出。 */
	.qing-pa {
		padding-top: 30px;
		padding-bottom: 50px;
		overflow-x: hidden;
	}

	/* 通用横向溢出保护：任何 flex 子项都允许收缩、不超出容器。 */
	.qing-pa-grid,
	.qing-pa-list,
	.qing-pa-row,
	.qing-pa-row__mediacell,
	.qing-pa-row__body,
	.qing-pa-row__inner,
	.qing-pa-row__main {
		min-width: 0;
		max-width: 100%;
	}

	.qing-pa-card__media img,
	.qing-pa-row__media img {
		max-width: 100%;
	}

	/* 特色区堆叠为单列（源码 .p_focus flex-direction:column）。
	 * 卡片间距统一 30px：用 grid 的 row-gap 控制（下方卡片不再单独设 margin-bottom，
	 * 否则 row-gap + margin-bottom 会叠成 60px）。
	 * 加 !important 压过 Elementor「特色卡下间距」控件（card_bottom_gap 默认 50）。 */
	.qing-pa-grid {
		grid-template-columns: 1fr !important;
		row-gap: 30px !important;
		margin-bottom: 30px !important;
	}

	/* 特色卡片：源码 .e_container-10 内边距 15。间距交给 grid row-gap，
	 * 这里把 margin-bottom 归零，避免与 row-gap 叠加成双倍间距。 */
	.qing-pa-card {
		padding: 15px !important;
		margin-bottom: 0 !important;
	}

	/* 分页圆形手机端缩小为 32×32（源码移动端）。 */
	.qing-pa-pager .page-numbers {
		width: 32px;
		height: 32px;
		line-height: 32px;
	}

	/* 特色卡标题（源码 .e_text-12）。 */
	.qing-pa-card__title {
		font-size: 18px;
		line-height: 20px;
		height: 40px;
	}

	/* 特色卡图片比例：源码 .e_image-13 手机端 padding-bottom:60%。 */
	.qing-pa-card__media {
		padding-bottom: 60%;
	}

	/* 特色卡摘要（源码 .e_richText-14）。 */
	.qing-pa-card__excerpt {
		font-size: 14px;
		line-height: 1.3;
		height: 54px;
	}

	/* 列表行堆叠为单列（源码 .e_container-18 flex-direction:column，内边距 10，margin 30）。
	 * 关键：必须同时把 flex-wrap 设为 nowrap！桌面基础样式 .qing-pa-row 是
	 * display:flex;flex-wrap:wrap，仅改 flex-direction:column 后，两个子项各自
	 * flex:0 0 100%（此时 100% 落在纵向主轴 = 各占满整列高度），wrap 会把第二个子项
	 * 折到「新的一列」并排显示 —— 表现为「图左文右」的横排。nowrap + 子项改 basis:auto
	 * 才能真正上下堆叠。 */
	.qing-pa-row {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		padding: 10px !important;
		/* 列表行间距统一 30px；!important 压过 Elementor「列表行下间距」控件
		 * （row_bottom_gap 默认 40），否则手机端仍会是 40px。 */
		margin-bottom: 30px !important;
	}

	/* 图片单元占满整行（源码 .cbox-18-0 flex:0 0 100%）。
	 * 纵向堆叠时 basis 用 auto（按内容高度），宽度用 width:100% 撑满交叉轴，
	 * 避免 basis:100% 落在纵向主轴导致换列。 */
	.qing-pa-row__mediacell {
		flex: 0 0 auto !important;
		width: 100% !important;
		padding: 0 !important;
	}

	/* 内容单元占满整行（源码 .cbox-18-1 flex:0 0 100% + .e_container-19 内边距 20 2 2 2）。 */
	.qing-pa-row__body {
		flex: 0 0 auto !important;
		width: 100% !important;
		padding: 20px 2px 2px !important;
	}

	/* 内容行居中（源码 .e_container-20 align-items:center）。 */
	.qing-pa-row__inner {
		align-items: center;
	}

	/* 文字块占 75%（源码 .cbox-20-0 flex:0 0 75%）。 */
	.qing-pa-row__main {
		flex: 0 0 75%;
	}

	/* 列表行标题（源码 .e_text-23）。 */
	.qing-pa-row__title {
		font-size: 18px;
	}

	/* 列表行摘要（源码 .e_richText-24）。 */
	.qing-pa-row__excerpt {
		margin-top: 8px;
		font-size: 14px;
		line-height: 20px;
		height: 42px;
	}

	/* 日号大字（源码 .e_timeFormat-21）。 */
	.qing-pa-row__day {
		font-size: 40px;
		line-height: 40px;
	}

	/* 年月小字（源码 .e_timeFormat-22）。 */
	.qing-pa-row__ym {
		font-size: 13px;
		font-weight: bold;
		line-height: 30px;
	}
}
