/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* 字体列表 */
:root {
	--font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, Helvetica Neue, Arial, sans-serif;
	--golden-liner-out: linear-gradient(135deg, #a8864e, #cdb788, #866632, #cdb788, #a8864e) 1;
	--golden-liner-in: linear-gradient(135deg, #a88b56, #fdf4ce, #866632);
	--box-shadow: 4px 4px 12px 0px rgba(0,0,0,0.08);
	--box-shadow-in: inset 1px 1px 3px rgba(0,0,0,0.4);
}

/* 宽度100% */
.width-100 { width: 100% !important; }

/* 两端对齐 */
.text-justify, h1, h2, h3, h4, h5, h6, p { text-align: justify;}

/* 图片235比例 */
.image-235 img { width: 100%; aspect-ratio: 2.35; object-fit: cover; object-position: center; }

/* 视频圆角 */
.video-round { border-radius: 16px !important; overflow: hidden !important; }
/* 里面的视频 iframe 也要同步圆角 */
.video-round video, .video-round iframe { border-radius: 16px !important; }

/* 侧边栏 */
#main aside { padding-top: 22px; background-color: #FAFAFC; }
.ct-sidebar { box-shadow: none !important; }

/* 搜索输入框 */
.wp-block-search__input { padding: 5px !important; }

/* 元数据组 */
.meta-group { display: flex; flex-direction: column; height: 100%; }
.meta-group > *:nth-last-child(2) { flex: 1; }

/* 彩色文字 */
.color-text {
	background-image:linear-gradient(to top right, var(--theme-palette-color-3) 0%, var(--theme-palette-color-4) 40%, var(--theme-palette-color-5) 80%);
	-webkit-background-clip: text !important;
	background-clip: text !important;
	color: transparent !important;
}

/* 彩色按钮 */
.color-div-btn,
.color-button > a {
	background: linear-gradient(to top right, var(--theme-palette-color-3) 0%, var(--theme-palette-color-4) 50%, var(--theme-palette-color-5) 100%) !important;
	color: #ffffff !important;
	filter: none !important;
}
.color-div-btn:hover,
.color-button > a:hover {
	background: linear-gradient(to bottom left, var(--theme-palette-color-3) 0%, var(--theme-palette-color-4) 50%, var(--theme-palette-color-5) 100%) !important;
}

/* =========================
 * 一般头图区
 * ========================= */
/* 头图区边距 */
.head-block { margin: 0 !important; }

/* 头图区按钮 */
.header-button .stk-button { padding: 8px 20px !important; border-radius: 30px !important; background: rgba(255, 255, 255, 0.2) !important; }
.header-button .stk-button__inner-text { color: white !important; font-weight: 500 !important; }
.header-button .stk-button:hover { background: rgba(255, 255, 255, 0.6) !important; }
.header-button .stk-button:hover .stk-button__inner-text { color: var(--theme-palette-color-1) !important; }

/* =========================
 * 大区块 big-block
 * ========================= */
/* 大区块边距 */
.big-block { margin: 0 !important; padding: 60px 15px 72px 15px !important; }
/* 大区块标题、摘要 */
.big-block-title  { margin-bottom: 40px !important; text-align: center !important; }
.big-block-title h2 { text-align: center !important; }
.big-block-summary { margin-bottom: 40px !important; text-align: justify !important; }
/* 大区块标题（矮） */
.big-block-title-short { margin-bottom: 12px !important; }
.big-block-title-short h2 { text-align: center !important; }
/* 大区底部按钮 */
.big-block-button { margin-top: 40px !important; }

/* ==========================
 * 卡片样式（边框、阴影、标签沉底）
 * ========================== */
/* 纵向卡片网格 */
.v-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
/* 纵向卡片 */
.v-card { display: flex; flex-direction: column; overflow: hidden; background: var(--theme-palette-color-16); border: 1px solid rgba(175,175,175,0.21); box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.08); border-radius: 16px; }
.v-card img { width: 100%; aspect-ratio: 2.35; object-fit: cover; border-radius: 16px 16px 0 0; }
.v-card-content { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.v-card-content h5 { margin-bottom: 6px; }
.v-card-content p { margin-bottom: 10px; font-size: 16px; color: var(--theme-palette-color-9); flex-grow: 1; }
.v-card-meta { margin-bottom: 6px; display: flex; align-items: center; gap:4px; font-size: 12px; color: var(--theme-palette-color-10); }

/* 横向卡片 */
.h-card .stk-block-content.stk-inner-blocks { height: 100%; }

/* 卡片阴影 */
.card-shadow { border: 1px solid rgba(175,175,175,0.21); box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.08); }

/* =========================
 * 文章单页格式定义
 * ========================= */
/* 博客、归档、搜索面标题居中 */
:is(.blog, .archive, .search, .error404) .page-title { text-align: center !important; }
/* 文章边框 */
.single .ct-container > article { border-left: 1px solid var(--theme-palette-color-12); border-right: 1px solid var(--theme-palette-color-12); }
/* 文章字体 */
.single .ct-container { font-family: var(--font-family); }
/* 文章正文 */
.single .entry-content { font-size: 18px; line-height: 1.667; }
/* 文章中的标题 */
.single .entry-content h2 { margin-top: 30px; font-size: 20px; font-weight: 500; color: var(--theme-palette-color-1); }
.single .entry-content h3 { font-size: 19px; font-weight: 500; }
.single .entry-content h4 { font-size: 18px; font-weight: 500; }
/* 文章中的图片 */
.single .entry-content img { border-radius: 8px; margin-bottom: 10px; }
/* 相关文章 */
.ct-related-posts-items { gap: 16px !important; }
.ct-related-posts-items article { padding-bottom: 16px; border-radius: 16px; border: 1px solid rgba(175,175,175,0.21); box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.08); }
.ct-related-posts-items div { height: 100%; display: flex !important; flex-direction: column; }
.ct-related-posts-items h5 { margin-left: 12px; margin-right: 12px; flex: 1; }
.ct-related-posts-items ul { margin-left: 12px; margin-right: 12px; }

/* =========================
 * 案例实体页（cases）元数据格式
 * ========================= */
/* 行业胶囊 */
.taxonomy-industry.meta-industry { display: flex; gap: 4px; }
.taxonomy-industry.meta-industry span { display: none; }
.taxonomy-industry.meta-industry a { padding: 3px 8px; font-size: 12px; border-radius: 20px; background: var(--theme-palette-color-17); }
.taxonomy-industry.meta-industry > a:nth-of-type(n+2) { display: none; }
/* 场景胶囊 */
.taxonomy-scenario.meta-scenario { display: flex; gap: 4px; }
.taxonomy-scenario.meta-scenario span { display: none; }
.taxonomy-scenario.meta-scenario a { padding: 3px 8px; font-size: 12px; border-radius: 20px; background: var(--theme-palette-color-18); }
.taxonomy-scenario.meta-scenario > a:nth-of-type(n+3) { display: none; }

/* =========================
 * 案例归档页和单页的元数据
 * ========================= */
/* 归档页元数据胶囊 */
.archive[data-prefix="case_archive"] .meta-categories { font-size: 0; }
.archive[data-prefix="case_archive"] .meta-categories a { font-size: 12px; padding: 3px 8px; border-radius: 20px; }
.archive[data-prefix="case_archive"] .entry-meta li:nth-child(1) { margin-right: 4px; }
.archive[data-prefix="case_archive"] .entry-meta li:nth-child(1) > a:nth-of-type(n+2) { display: none; }
.archive[data-prefix="case_archive"] .entry-meta li:nth-child(2) > a:nth-of-type(n+3) { display: none; }
.archive[data-prefix="case_archive"] .entry-meta li:nth-child(1) a { background: var(--theme-palette-color-17); }
.archive[data-prefix="case_archive"] .entry-meta li:nth-child(2) a { background: var(--theme-palette-color-18); margin-right: 4px; }
/* 单页元数据胶囊 */
.single-case .meta-categories { font-size: 0; }
.single-case .meta-categories a { font-size: 12px; padding: 3px 8px; border-radius: 20px; }
.single-case .entry-meta li:nth-child(1) { margin-right: 4px; }
.single-case .entry-meta li:nth-child(2) > a:nth-of-type(n+6) { display: none; }
.single-case .entry-meta li:nth-child(1) a { background: var(--theme-palette-color-17); }
.single-case .entry-meta li:nth-child(2) a { background: var(--theme-palette-color-18); margin-right: 4px; }

/* =========================
 * 搜索页
 * ========================= */
.search-results section { padding-bottom: 80px; }
.search-results .card-content { padding: 18px 16px; }
@media (max-width:1024px) {
	.search-results .ct-container { padding-top: 16px; }
	.search-results article { margin-left: 16px; margin-right: 16px; }
	.search-results .ct-pagination { margin: 16px;}
}

/* =========================
 * 分页器
 * ========================= */
.new-pagination { margin: 24px auto; display: flex; justify-content: center; align-items: center; gap:2px; }
.new-pagination .wp-block-query-pagination-numbers { flex: 1; text-align: center; }
.new-pagination a, .new-pagination .current { padding: 4px 8px; line-height: 1.2em; border-style: solid; border-width: 2px; border-radius: 4px; }
.new-pagination .page-numbers { border-color: var(--theme-palette-color-16); }
.new-pagination .current { border-color: var(--theme-palette-color-1); background-color: var(--theme-palette-color-1); color: var(--theme-palette-color-16); }
.new-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) { border-color: var(--theme-palette-color-15); }
.new-pagination :is(.page-numbers, .wp-block-query-pagination-previous, .wp-block-query-pagination-next):hover { color: var(--theme-palette-color-16); background-color: var(--theme-palette-color-1); border-color: var(--theme-palette-color-1); }
@media (max-width:767px) { .new-pagination a, .new-pagination .current { font-size: 12px; padding: 5px 6px 4px 6px; } }

/* =========================
 *  资质认证页面
 * ========================= */
/* 外框 */
.cert-h > div, .cert-v > div { border: 12px solid; border-image: var(--golden-liner-out); box-shadow: var(--box-shadow); }
/* 内框 */
.cert-h > div > div, .cert-v > div > div { padding: 4px; height: 100%; background: var(--golden-liner-in); box-shadow: var(--box-shadow-in); }
/* 图片 */
.cert-h img { aspect-ratio: 1.5; }
.cert-v img { aspect-ratio: 0.667; }

/* =========================
 *  荣誉奖项页面
 * ========================= */
/* 外框 */
.awards-grid > div { border: 12px solid; border-image: var(--golden-liner-out); box-shadow: var(--box-shadow); }
/* 内框 */
.awards-grid > div > div { padding: 4px; height: 100%; background: var(--golden-liner-in); box-shadow: var(--box-shadow-in); }
/* 内容 */
.awards-grid > div > div > div { padding: 80px 10px; height: 100%; gap: 5px; background: #f7f6f2; background-image: url('/wp-content/uploads/2026/12/xb22.jpg'); }
.awards-grid img { margin: 0 auto !important; margin-bottom: 40px !important; width: 80% !important; aspect-ratio: 1.5; border: 1px solid; border-image: var(--golden-liner-out); }
.awards-grid h2 { font-size: 16px !important; margin-bottom: -10px !important; }
.awards-grid h3 { font-size: 20px !important; }
.awards-grid p { margin-top: 40px !important; font-size: 12px !important; color: var(--theme-palette-color-9); }

/* =========================
 * 法律声明页面
 * ========================= */
.legal-notice, .legal-notice h2, .legal-notice h3 { font-family: var(--font-family); font-size: 18px; line-height: 1.667; }



/* =========================
 * 浏览器适配
 * ========================= */
@media (max-width:1265px) {
	/* 隐藏 400 电话*/
	.ct-container-fluid .ct-header-text { display: none; }
}

@media (min-width:1025px) and (max-width:1248px) {
	/* 页脚中部区域边距 */
	.ct-footer div[data-row="middle"] { padding-left: 24px; padding-right: 24px; }
}

@media (min-width:1142px) {
	/* 大屏只显示前 3 个卡片 */
	.pc-3-cards > *:nth-child(n+4) { display: none; }
}

@media (max-width: 1024px) {
	/* 申请试用按钮	 */
	.ct-header-cta .ct-button[data-size="small"] { min-height: 32px !important; font-size: 16px !important; }
	/* 案例归档页左右留白 */
	body[data-prefix="case_archive"] .entries { margin-left: 16px; margin-right: 16px; }
	/* 单页文章边距 */
	.single .ct-container > article { padding: 30px 16px; }
	/* 只显示前4个卡片 */
	.mobile-4-cards > *:nth-child(n+5) { display: none; }
}

@media (max-width: 767px) {
	/* 通用头图区块 */
	.head-block { padding: 15px !important; min-height: 160px !important; }
	/* 内容区块 */
	.big-block { padding-top: 36px !important; padding-bottom: 48px !important; }
	/* 区块标题 */
	.big-block-title, .big-block-summary { margin-bottom: 20px !important; }
	/* 区块按钮*/
	.big-block-button { margin-top: 20px !important; }
	/* 手机端隐藏 */
	.mobile-hide { display: none; }
	/* 一行两列 */
	.mobile-two-cols .stk-row { display: grid !important; grid-template-columns: repeat(2, 1fr); }
	.mobile-two-cols .wp-block-stackable-column { width: 100% !important; flex: unset !important; }
	/* 网格一行一个 */
	.mobile-one-grid.wp-block-group-is-layout-grid { grid-template-columns: 1fr !important; }
	/* logo一行4个 */
	.logo-gallery .wp-block-image { width: calc( (100% - 3 * var(--wp--style--block-gap)) / 4 ) !important; flex: 0 0 auto !important; }
	/* 只显示24个logo */
	/* .logo-gallery > *:nth-child(n+25) { display: none !important; } */
	/* 图标列表的间隔 */
	.stk-block-icon-list__ul li { margin-bottom: 10px !important; }
}