/**
 * ========================================================
 * XT Projects Archive Fix CSS
 *
 * 文件位置：
 * wp-content/themes/elementra/xt-custom/assets/css/xt-projects-archive-fix.css
 *
 * 作用：
 * 1. 隐藏项目归档页右侧 Search / Categories / Recent Posts
 * 2. 强制项目归档页全宽
 * 3. 去掉项目列表页背景
 * 4. 不修改插件 PHP，不覆盖插件模板
 * ========================================================
 */

body.post-type-archive-xt_project,
body.tax-xt_project_category {
	background: #ffffff !important;
}

/* 隐藏主题默认标题区域 */
body.post-type-archive-xt_project .page_title_wrap,
body.post-type-archive-xt_project .top_panel_title,
body.post-type-archive-xt_project .sc_layouts_title,
body.post-type-archive-xt_project .post_header,
body.post-type-archive-xt_project .entry-header,
body.post-type-archive-xt_project .entry-title,
body.post-type-archive-xt_project .page_title,
body.post-type-archive-xt_project h1.page_title,
body.post-type-archive-xt_project h1.entry-title,
body.tax-xt_project_category .page_title_wrap,
body.tax-xt_project_category .top_panel_title,
body.tax-xt_project_category .sc_layouts_title,
body.tax-xt_project_category .post_header,
body.tax-xt_project_category .entry-header,
body.tax-xt_project_category .entry-title,
body.tax-xt_project_category .page_title,
body.tax-xt_project_category h1.page_title,
body.tax-xt_project_category h1.entry-title {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* 隐藏右侧 Search / Categories / Recent Posts */
body.post-type-archive-xt_project .sidebar,
body.post-type-archive-xt_project aside,
body.post-type-archive-xt_project aside.sidebar,
body.post-type-archive-xt_project .widget_area,
body.post-type-archive-xt_project .sidebar_right,
body.post-type-archive-xt_project .sidebar_left,
body.post-type-archive-xt_project .sidebar_default,
body.post-type-archive-xt_project .content + .sidebar,
body.post-type-archive-xt_project .widget_area_right,
body.post-type-archive-xt_project .widgets_area,
body.post-type-archive-xt_project .trx_addons_widgets_area,
body.post-type-archive-xt_project .widget,
body.tax-xt_project_category .sidebar,
body.tax-xt_project_category aside,
body.tax-xt_project_category aside.sidebar,
body.tax-xt_project_category .widget_area,
body.tax-xt_project_category .sidebar_right,
body.tax-xt_project_category .sidebar_left,
body.tax-xt_project_category .sidebar_default,
body.tax-xt_project_category .content + .sidebar,
body.tax-xt_project_category .widget_area_right,
body.tax-xt_project_category .widgets_area,
body.tax-xt_project_category .trx_addons_widgets_area,
body.tax-xt_project_category .widget {
	display: none !important;
	visibility: hidden !important;
	width: 0 !important;
	max-width: 0 !important;
	min-width: 0 !important;
	height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* 主内容全宽 */
body.post-type-archive-xt_project .page_content_wrap,
body.post-type-archive-xt_project .content_wrap,
body.post-type-archive-xt_project .content,
body.post-type-archive-xt_project .site-content,
body.post-type-archive-xt_project .post_content,
body.post-type-archive-xt_project .entry-content,
body.post-type-archive-xt_project .posts_container,
body.tax-xt_project_category .page_content_wrap,
body.tax-xt_project_category .content_wrap,
body.tax-xt_project_category .content,
body.tax-xt_project_category .site-content,
body.tax-xt_project_category .post_content,
body.tax-xt_project_category .entry-content,
body.tax-xt_project_category .posts_container {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* 取消主题左右栏结构 */
body.post-type-archive-xt_project .content_wrap,
body.tax-xt_project_category .content_wrap {
	display: block !important;
	grid-template-columns: 1fr !important;
}

/* 项目归档页容器 */
body.post-type-archive-xt_project .xt-project-archive-template-main,
body.tax-xt_project_category .xt-project-archive-template-main {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* 去掉米色背景 */
body.post-type-archive-xt_project .xt-project-archive-page,
body.tax-xt_project_category .xt-project-archive-page {
	background: #ffffff !important;
	background-image: none !important;
}

/* 去掉伪元素背景 */
body.post-type-archive-xt_project .xt-project-archive-page::before,
body.post-type-archive-xt_project .xt-project-archive-page::after,
body.tax-xt_project_category .xt-project-archive-page::before,
body.tax-xt_project_category .xt-project-archive-page::after {
	display: none !important;
	content: none !important;
}

/* 控制项目卡片版心 */
body.post-type-archive-xt_project .xt-project-archive-page .xt-container,
body.tax-xt_project_category .xt-project-archive-page .xt-container {
	width: min(1200px, calc(100% - 40px)) !important;
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* 三端卡片布局兜底 */
body.post-type-archive-xt_project .xt-project-archive-grid,
body.tax-xt_project_category .xt-project-archive-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 22px !important;
}

@media (max-width: 1100px) {
	body.post-type-archive-xt_project .xt-project-archive-grid,
	body.tax-xt_project_category .xt-project-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	body.post-type-archive-xt_project .xt-project-archive-page .xt-container,
	body.tax-xt_project_category .xt-project-archive-page .xt-container {
		width: min(100% - 28px, 1200px) !important;
	}

	body.post-type-archive-xt_project .xt-project-archive-grid,
	body.tax-xt_project_category .xt-project-archive-grid {
		grid-template-columns: 1fr !important;
	}
}