/* 星蝶云官网增强套件 —— 前台样式
   只新增组件样式，尽量不覆盖主题既有规则，避免换版式时打架。 */

/* ---------- 列表卡片（新闻 / 知识库 / 常见问题列表） ---------- */
.xdy-cards {
	display: grid;
	gap: 24px;
	margin: 0 0 32px;
}
.xdy-cards.xdy-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xdy-cards.xdy-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xdy-cards.xdy-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.xdy-cards .xdy-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e6ecf4;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.xdy-cards .xdy-card:hover {
	box-shadow: 0 14px 34px rgba(15, 42, 74, .12);
	transform: translateY(-3px);
	border-color: #cddcf0;
}
.xdy-cards .xdy-thumb {
	aspect-ratio: 16 / 10;
	background: #eef3fa;
	overflow: hidden;
}
.xdy-cards .xdy-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.xdy-cards .xdy-card:hover .xdy-thumb img { transform: scale(1.04); }
.xdy-cards .xdy-thumb-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #13306a, #2563eb);
}
.xdy-cards .xdy-thumb-empty span {
	color: rgba(255, 255, 255, .9);
	font-weight: 700;
	letter-spacing: .18em;
	font-size: 14px;
}
.xdy-cards .xdy-body {
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
}
.xdy-cards .xdy-meta {
	font-size: 12.5px;
	color: #7b8aa3;
	letter-spacing: .02em;
}
.xdy-cards .xdy-body h3 {
	font-size: 16.5px;
	line-height: 1.55;
	margin: 0;
	font-weight: 700;
	color: #0f2a4a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.xdy-cards .xdy-body p {
	font-size: 13.5px;
	line-height: 1.75;
	color: #5a6b85;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.xdy-cards .xdy-more {
	margin-top: auto;
	padding-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--brand, #2563eb);
}

.xdy-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 8px 0 40px;
	font-size: 14px;
}
.xdy-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid #e0e8f2;
	border-radius: 10px;
	color: #3c5070;
	text-decoration: none;
	background: #fff;
}
.xdy-pager .page-numbers.current {
	background: var(--brand, #2563eb);
	border-color: var(--brand, #2563eb);
	color: #fff;
}

.xdy-empty {
	padding: 22px;
	border: 1px dashed #d6e0ee;
	border-radius: 12px;
	color: #7b8aa3;
	font-size: 14px;
	background: #fafcff;
}

/* ---------- 常见问题 ---------- */
.xdy-faq {
	display: grid;
	gap: 12px;
	margin: 0 0 24px;
}
.xdy-faq .xdy-faq-item {
	border: 1px solid #e4ebf5;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}
.xdy-faq .xdy-faq-item summary {
	cursor: pointer;
	list-style: none;
	padding: 16px 20px;
	font-weight: 600;
	font-size: 15.5px;
	line-height: 1.6;
	color: #0f2a4a;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}
.xdy-faq .xdy-faq-item summary::-webkit-details-marker { display: none; }
.xdy-faq .xdy-faq-item summary::after {
	content: "+";
	flex: 0 0 auto;
	color: var(--brand, #2563eb);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
}
.xdy-faq .xdy-faq-item[open] summary::after { content: "–"; }
.xdy-faq .xdy-faq-ans {
	padding: 0 20px 18px;
	color: #4d5f79;
	font-size: 14.5px;
	line-height: 1.9;
}
.xdy-faq .xdy-faq-ans p { margin: 0 0 10px; }
.xdy-faq .xdy-faq-ans p:last-child { margin-bottom: 0; }

/* ---------- 合规页面 ---------- */
.xdy-legal {
	max-width: 820px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.95;
	color: #3f4f68;
}
.xdy-legal h2 {
	font-size: 19px;
	margin: 28px 0 8px;
	color: #0f2a4a;
}
.xdy-legal p { margin: 0 0 12px; }

/* ---------- 新闻列表图（原站 Figure 比例不稳，统一裁切） ---------- */
.news-grid .news-card .news-thumb { overflow: hidden; }
.news-grid .news-card .news-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------- 首屏轮播：键盘可达性与移动端高度 ---------- */
.hero-slider .hs-dot:focus-visible,
.hero-slider .hs-arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
@media (max-width: 640px) {
	.hero-slider .hs-slide {
		min-height: 480px;
		padding: 56px 0 72px;
	}
	.hero-slider .hero-points { font-size: 12.5px; line-height: 1.7; }
}

/* ---------- 表单提交反馈 ---------- */
.xdy-form-msg {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.7;
}
.xdy-form-msg.is-ok {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}
.xdy-form-msg.is-err {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
	.xdy-cards.xdy-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.xdy-cards.xdy-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.xdy-cards.xdy-cols-2,
	.xdy-cards.xdy-cols-3,
	.xdy-cards.xdy-cols-4 { grid-template-columns: minmax(0, 1fr); }
	.xdy-faq .xdy-faq-item summary { font-size: 14.5px; padding: 14px 16px; }
	.xdy-faq .xdy-faq-ans { padding: 0 16px 16px; font-size: 14px; }
}

/* ============================================================
   1.2.0 修补（全站体检后补的细节）
   ============================================================ */

/* 1) 手机端首屏左右箭头会压住「预约演示 / 查看产品」按钮，小屏直接隐藏，
      圆点仍在，手指左右滑也能切。 */
@media (max-width: 768px) {
	.hero-slider .hs-arrow { display: none !important; }
}

/* 2) 联系页表单：标签后面带了一个 <br>，flex 布局下又多出一行空白，
      标签与输入框之间被撑开约 40px，看起来像断开了。 */
.xdy .form-field > br,
.xdy .form-field label br { display: none !important; }
.xdy .form-field { gap: 9px; }

/* 3) 顶部「在线咨询」按钮主题给的是紫色渐变，与全站蓝色主色调不一致，
      统一成主蓝。若想保留紫色，删掉下面三条即可。 */
.nav-cta .open-lead-modal,
.nav-cta a {
	background-color: #2563eb !important;
	background-image: none !important;
}
.nav-cta .open-lead-modal:hover,
.nav-cta a:hover { background-color: #1d4ed8 !important; }

/* 4) 知识库顶部横幅换图后，右侧装饰层太亮会压住文字，降一点透明度 */
.archive-hero > div:first-child { opacity: .45 !important; }

/* ============================================================
   1.6.5 正文配图与视频
   ============================================================ */

/* 1) 正文图片自适应，避免大图撑破内容区 */
.article-content img,
.entry-content img,
.post-content img,
.xdy-faq-ans img {
	max-width: 100%;
	height: auto;
}

/* 2) 文章里的图片单独成行时给点上下留白 */
.article-content p > img:only-child,
.entry-content p > img:only-child { margin: 8px auto; }

/* 3) 视频播放器：16:9 自适应，手机上也不会被压扁 */
.xdy-video {
	position: relative;
	padding-top: 56.25%;
	margin: 1.6em 0;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
}
.xdy-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ============================================================
   1.6.6 文章封面不再被裁切
   卡片外框原本是 16:10，图片却是 4:3 裁切件 → 二次裁切把文字切掉。
   这里把外框统一成 16:9，与封面图同比例，等于不裁。
   ============================================================ */
.news-card > a[style*="aspect-ratio"] {
	aspect-ratio: 16 / 9 !important;
}
.news-thumb {
	height: auto !important;
	aspect-ratio: 16 / 9;
}
.news-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
