/* ==========================================================================
   Life Hub 资讯模块 — 主题容器覆盖层（v1.0.158 QA pass）
   News pages use the same full-width shell as the site's other inner pages.

   本次统一化调整要点：
   1. 资讯页面宽度此前被强制改为 90vw / max-width:1600px，比全站其余内页
      （住房、二手市场、资源库、学生指南、通用内容页……全部使用
      var(--lhc-page-wide) / var(--lhc-page-max)，即 min(90vw, 1320px)）
      更宽，视觉上会明显比其它页面"胀开"。现改为直接引用同一组 token，
      并让平板/手机断点也对齐（1100px / 480px），不再各写各的。
   2. 资讯子导航、投稿按钮、分类激活态等胶囊按钮此前使用资讯模块自造的
      深藏青 #092b5b，现改为全站唯一的品牌胶囊色 var(--lhc-brand-action)
      （即品牌蓝 #1687F8），与"查看详情""发送验证邮件"等按钮同源。
   3. 资讯列表/详情/投稿三个页面的内容区此前整体向左偏移（左边距明显小于
      右边距）。根源是主题（Twenty Twenty-Five 区块主题）给 alignfull 区块
      自动生成的负 margin 断板写法——本应配合同步放宽的 width 才能两侧对称
      撑满，但被我们（以及 inner-header.css）加在同一批选择器上的
      `width:100% !important` 锁死了宽度，只剩负 margin 单独生效，于是整段
      内容被整体向左推了一个 root-padding 的量。只对资讯页面涉及的这一层
      alignfull 容器把 margin 归零，交由 .lhc-news-archive/.lhc-news-detail/
      .lhc-news-submit 自身的 margin:auto 居中，不影响其它页面的同一套主题
      行为。 */

body.lhc-inner-page-shell :where(.wp-site-blocks, main, .site-main, .content-area, .entry-content, .wp-block-post-content, .wp-block-shortcode, .is-layout-constrained, .alignwide, .alignfull) {
	width: 100% !important;
	max-width: none !important;
	margin-top: 0 !important;
	padding-top: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;
}

body.lhc-inner-page-shell:has(.lhc-news-archive, .lhc-news-detail, .lhc-news-submit) main.wp-block-group.has-global-padding > .alignfull {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.lhc-inner-page-shell :where(.wp-block-post-title, .entry-title, .page-title, h1.wp-block-post-title, main > h1:first-child, .site-main > h1:first-child, .content-area > h1:first-child) {
	display: none !important;
}

/* 与全站 var(--lhc-page-wide)/var(--lhc-page-max) 完全一致（min(90vw, 1320px)），
   不再单独硬编码 90vw / 1600px。平板、手机断点见文件底部媒体查询。 */
body.lhc-inner-page-shell .lhc-news-archive,
body.lhc-inner-page-shell .lhc-news-detail,
body.lhc-inner-page-shell .lhc-news-submit {
	width: var(--lhc-page-wide) !important;
	max-width: var(--lhc-page-max) !important;
	margin-right: auto !important;
	margin-left: auto !important;
}

/* 子导航（资讯列表/资讯详情/投稿资讯）此前单独占一整行、紧贴在顶部主导航
   下方，和主导航挤在一起。现在改为嵌进 .lhc-news-toolbar（见 news.css），
   与分类筛选并排放在横幅下方、卡片内容区正上方，本身不再需要独立的外边距
   和分隔线。 */
.lhc-news-subnav {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.lhc-news-subnav a {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid #a9d2ff;
	border-radius: var(--lhc-brand-pill-radius, 999px);
	color: var(--lhc-ink-strong, #08182c) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.lhc-news-subnav a:hover {
	border-color: var(--lhc-brand-action, var(--lhc-brand-blue, #1687F8));
}

.lhc-news-subnav a.is-active,
.lhc-news-filters a.is-active {
	background: var(--lhc-brand-action, var(--lhc-brand-blue, #1687F8)) !important;
	border-color: var(--lhc-brand-action, var(--lhc-brand-blue, #1687F8)) !important;
	color: #fff !important;
}

.lhc-news-subnav a.is-active:hover {
	background: var(--lhc-brand-action-hover, #0f6fd6) !important;
	border-color: var(--lhc-brand-action-hover, #0f6fd6) !important;
	color: #fff !important;
}

.lhc-news-archive--complete {
	padding-top: clamp(34px, 5vw, 64px);
}

.lhc-news-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	margin: 0 0 24px;
	overflow: hidden;
	border: 1px solid #dce8f2;
	border-radius: 12px;
	background: #f7fbff;
}

.lhc-news-featured__image,
.lhc-news-card--placeholder .lhc-news-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	background: linear-gradient(135deg, #e8f3ff, #dcecf9 52%, #f7fbff);
	color: #6c8aaa;
	text-decoration: none;
}

.lhc-news-featured__image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
}

.lhc-news-featured__copy {
	padding: clamp(22px, 3vw, 34px);
}

.lhc-news-featured__copy h2 {
	margin: 16px 0 12px;
	font: var(--lhc-type-h2-size, clamp(24px, 2.1vw, 30px))/var(--lhc-type-h2-line-height, 1.25) var(--lhc-type-display-family, Georgia, serif);
	color: var(--lhc-ink-strong, #08182c);
}

.lhc-news-featured__copy h2 a {
	color: inherit;
	text-decoration: none;
}

.lhc-news-featured__copy p {
	/* 这段摘要之前没有单独设 font-size，实际渲染时会往上继承主题正文的
	   阅读字号（这个站点上量出来是 18px），跟同一个资讯模块里普通卡片
	   摘要用的 .lhc-news-card p（13px）差了一大截，在主推卡片这个偏窄的
	   栏位里显得明显偏大。这里显式给一个字号，用插件自己的"正文"字号
	   token（--lhc-type-body-size），跟主题的字号脱钩，同时比普通小卡片
	   摘要稍大一些，跟主推卡片更突出的定位相称。 */
	font-size: var(--lhc-type-body-size, 16px);
	color: var(--lhc-muted, #5c6b7a);
	line-height: 1.7;
}

.lhc-news-grid--complete {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lhc-news-card--placeholder .lhc-news-card__image {
	min-height: 220px;
}

.lhc-news-card--placeholder .lhc-news-card__body {
	min-height: 190px;
}

/* 平板：与 news.css 中 .lhc-news-archive/.lhc-news-detail 在 1100px 收窄为
   --lhc-page-wide-tablet 的规则保持一致，主推区改为单列，避免图文比例被
   两列挤压变形；完整卡片网格与占位网格一并降为两列。 */
@media (max-width: 1100px) {
	body.lhc-inner-page-shell .lhc-news-archive,
	body.lhc-inner-page-shell .lhc-news-detail,
	body.lhc-inner-page-shell .lhc-news-submit {
		width: var(--lhc-page-wide-tablet) !important;
	}

	.lhc-news-featured {
		grid-template-columns: 1fr;
	}

	.lhc-news-grid--complete {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.lhc-news-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.lhc-news-subnav {
		overflow-x: auto;
	}

	.lhc-news-subnav a {
		white-space: nowrap;
	}

	.lhc-news-featured__image,
	.lhc-news-featured__image img {
		min-height: 220px;
	}
}

@media (max-width: 480px) {
	body.lhc-inner-page-shell .lhc-news-archive,
	body.lhc-inner-page-shell .lhc-news-detail,
	body.lhc-inner-page-shell .lhc-news-submit {
		width: var(--lhc-page-wide-mobile) !important;
	}

	.lhc-news-grid--complete {
		grid-template-columns: 1fr;
	}
}
