/* ==================================================
   案例详情页专属样式 (case-show.css) - 净化绿主题
   ================================================== */
:root {
  --accent-green: #29924D;
  --accent-hover: #1b6e3a;
  --bg-soft-green: #F0FDF4;
  --primary-dark: #1a2432;
  --text-dark: #1F2937;
  --text-gray: #6B7280;
  --border-color: #E5E7EB;
  --paper: #F9FAFB;
}

/* 最外层包裹 */
.cx-page-wrapper {
  width: 100%;
  position: relative;
  background: #fff;
}

.cx-wrap {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== 顶部 Banner (遮罩层已与列表页完全对齐) ===== */
.cx-hero {
  position: relative;
  padding: 4.5rem 0 4rem;
  color: #fff;
  overflow: hidden;
  background: var(--primary-dark); /* 图片加载前的底色 */
  margin-top: 72px; /* 避开固定导航 */
}

/* 使用与 case-list.css 完全相同的深色遮罩和背景图片 */
.cx-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(31, 41, 55, 0.95) 0%, rgba(31, 41, 55, 0.86) 50%, rgba(31, 41, 55, 0.6) 100%), url('/images/banner.jpg') center right / cover no-repeat;
}

.cx-hero .cx-wrap { position: relative; z-index: 2; }
.cx-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .16em;
  color: #fff; text-transform: uppercase; margin-bottom: .8rem;
}
.cx-eyebrow::before {
  content: ""; width: 22px; height: 6px; background: #fff; transform: skewX(-30deg);
}
.cx-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.3; margin: 0 0 1rem; text-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.cx-hero-desc {
  color: rgba(255,255,255,.9); font-size: 1.1rem; margin: 0; max-width: 800px; line-height: 1.6;
}

/* ===== 面包屑 ===== */
.cx-breadcrumb-bar { background: #fff; border-bottom: 1px solid var(--border-color); padding: 1rem 0; }
.cx-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--text-gray); margin: 0; list-style: none; padding: 0;
}
.cx-breadcrumb a { color: var(--text-dark); text-decoration: none; transition: color .2s; }
.cx-breadcrumb a:hover { color: var(--accent-green); }
.cx-breadcrumb .sep { color: #D1D5DB; }
.cx-breadcrumb .cur { color: var(--accent-green); font-weight: 600; }

/* ===== 布局 ===== */
.cx-section { padding: 3.5rem 0 5rem; }
.cx-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: start;
}

/* ===== 左侧主体 ===== */
.cx-article-content { min-width: 0; }
.cx-article-header { margin: 0 0 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.cx-article-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--text-dark);
  line-height: 1.4; margin: 0;
}

/* 项目卡片 */
.cx-info-card {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--paper) 100%);
  border: 1px solid var(--border-color); border-top: 4px solid var(--accent-green);
  border-radius: 12px; padding: 1.5rem 1.7rem; margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
}
.cx-info-title { font-size: 1.15rem; font-weight: 800; color: var(--text-dark); margin: 0 0 1.2rem; display: flex; align-items: center; gap: .5rem; }
.cx-info-title::before { content: ""; width: 14px; height: 14px; background: var(--accent-green); transform: rotate(45deg); flex: 0 0 14px; }
.cx-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 2rem; margin: 0; }
.cx-info-item { display: flex; align-items: baseline; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--border-color); font-size: 1rem; }
.cx-info-item dt { flex: 0 0 5.6em; color: var(--text-gray); font-weight: 600; white-space: nowrap; }
.cx-info-item dt::after { content: "："; }
.cx-info-item dd { margin: 0; color: var(--text-dark); font-weight: 700; flex: 1 1 auto; }
.cx-info-tel { color: var(--accent-green); font-weight: 800; text-decoration: none; }
.cx-info-tel:hover { color: var(--accent-hover); }

/* 图片轮播 */
.cx-gallery {
  position: relative; max-width: 100%; margin: 0 0 2.5rem;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,.05); background: var(--paper); user-select: none;
}
.cx-gallery-track { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.cx-gallery-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
.cx-gallery-slide.is-active { opacity: 1; visibility: visible; }
.cx-gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cx-gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(0,0,0,.4); color: #fff; border: 0; border-radius: 50%;
  cursor: pointer; z-index: 3; transition: all .2s ease;
}
.cx-gallery-btn:hover { background: var(--accent-green); color: #fff; }
.cx-gallery-prev { left: 14px; } .cx-gallery-next { right: 14px; }
.cx-gallery-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: .4rem; z-index: 3; }
.cx-gallery-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: all .2s; }
.cx-gallery-dot.is-active { background: var(--accent-green); transform: scale(1.25); }
.cx-gallery-counter {
  position: absolute; right: 14px; top: 14px; z-index: 3;
  padding: .25rem .7rem; background: rgba(0,0,0,.6); color: #fff;
  font-size: .78rem; font-weight: 700; border-radius: 4px;
}

/* 正文 */
.cx-article-body { font-size: 1.05rem; line-height: 1.95; color: #374151; word-wrap: break-word; margin-bottom: 2rem; }
.cx-article-body p { margin: 0 0 1.2rem; }
.cx-article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.5rem auto; display: block; }
.cx-article-body h2 { font-size: 1.45rem; font-weight: 800; color: var(--text-dark); margin: 2.5rem 0 1.2rem; border-left: 4px solid var(--accent-green); padding-left: .8rem; }
.cx-article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-dark); margin: 1.8rem 0 1rem; }
.cx-article-body strong { color: var(--accent-green); font-weight: 700; }

/* 标签云 */
.cx-tag-cloud { margin: 1.8rem 0 2.5rem; padding: 1.3rem 1.5rem; background: var(--paper); border: 1px solid var(--border-color); border-radius: 12px; }
.cx-tag-cloud-label { display: block; font-size: .9rem; font-weight: 800; color: var(--text-dark); margin-bottom: .8rem; border-left: 4px solid var(--accent-green); padding-left: .6rem; }
.cx-tag-cloud-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.cx-tag-pill {
  display: inline-block; padding: .35rem .95rem; background: #fff; border: 1px solid rgba(41,146,77,.3);
  border-radius: 999px; font-size: .88rem; color: var(--accent-green); font-weight: 600; text-decoration: none; transition: all .2s;
}
.cx-tag-pill:hover { background: var(--accent-green); color: #fff; transform: translateY(-2px); }

/* 公司转化块 */
.cx-company-intro {
  position: relative; margin: 0 0 3rem; padding: 2.2rem; background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-hover) 100%);
  border-radius: 12px; color: #fff; overflow: hidden; box-shadow: 0 10px 30px rgba(41,146,77,.2);
}
.cx-ci-eyebrow { display: inline-flex; font-size: .8rem; font-weight: 900; letter-spacing: .1em; color: rgba(255,255,255,.8); margin-bottom: .6rem; }
.cx-company-intro h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 1rem; color: #fff; }
.cx-company-intro h2 .hl { color: #fff; text-decoration: underline; }
.cx-company-intro p { font-size: .98rem; color: rgba(255,255,255,.9); line-height: 1.8; margin: 0 0 1.5rem; }
.cx-ci-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.2); }
.cx-ci-tel {
  display: inline-flex; align-items: center; gap: .5rem; font-size: 1.5rem; font-weight: 900; color: #fff; text-decoration: none;
}
.cx-ci-tel .cx-ci-ic { width: 36px; height: 36px; background: rgba(255,255,255,.2); border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; }
.cx-ci-contact-text { font-size: .9rem; color: rgba(255,255,255,.9); }

/* 上下篇 */
.cx-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 3rem; }
.cx-pn-item {
  display: block; padding: 1.2rem; background: var(--paper); border: 1px solid var(--border-color);
  border-radius: 8px; text-decoration: none; transition: all .3s;
}
.cx-pn-item:hover { border-color: var(--accent-green); background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.cx-pn-label { display: block; font-size: .85rem; color: var(--text-gray); margin-bottom: .4rem; }
.cx-pn-title { display: block; font-size: 1rem; font-weight: 700; color: var(--text-dark); line-height: 1.5; }
.cx-pn-next { text-align: right; } .cx-pn-next .cx-pn-title { text-align: left; }
.cx-pn-disabled { opacity: 0.6; cursor: not-allowed; }

/* 相关案例 */
.cx-related-section h2 { font-size: 1.3rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1.5rem; border-left: 4px solid var(--accent-green); padding-left: .8rem; }
.cx-case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.cx-case-card { display: block; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; text-decoration: none; transition: all .3s; }
.cx-case-card:hover { border-color: var(--accent-green); box-shadow: 0 10px 20px rgba(0,0,0,.05); transform: translateY(-3px); }
.cx-case-media { aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }
.cx-case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cx-case-card:hover .cx-case-media img { transform: scale(1.05); }
.cx-case-info { padding: 1rem 1.2rem; }
.cx-case-info h3 { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin: 0 0 .5rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-case-info p { font-size: .85rem; color: var(--text-gray); margin: 0; }
.cx-case-info .cx-tag { background: var(--bg-soft-green); color: var(--accent-green); padding: .1rem .4rem; border-radius: 4px; font-weight: 600; font-size: .75rem; margin-right: .3rem; }

/* ===== 右侧边栏 ===== */
.cx-sidebar { position: sticky; top: 100px; }
.cx-sidebar-box { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,.03); }
.cx-sidebar-title { font-size: 1.15rem; font-weight: 800; color: var(--text-dark); margin: 0 0 1.2rem; padding-bottom: .8rem; border-bottom: 2px solid var(--bg-soft-green); }
.cx-hot-list { list-style: none; padding: 0; margin: 0; }
.cx-hot-list li { border-bottom: 1px dashed var(--border-color); }
.cx-hot-list li:last-child { border-bottom: none; }
.cx-hot-list a { display: block; padding: 1rem 0; color: var(--text-dark); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s; }
.cx-hot-list a:hover { color: var(--accent-green); }
.cx-hot-date { display: block; font-size: .8rem; color: var(--text-gray); margin-top: .4rem; }
.cx-contact-box p { font-size: .95rem; color: var(--text-gray); margin-bottom: 1.2rem; line-height: 1.7; }
.cx-btn-brand { display: flex; justify-content: center; align-items: center; gap: .5rem; width: 100%; background: var(--accent-green); color: #fff; font-weight: 600; padding: .8rem; border-radius: 8px; text-decoration: none; transition: background .3s; }
.cx-btn-brand:hover { background: var(--accent-hover); }
.cx-sidebar-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.cx-sidebar-menu a { display: block; padding: 0.8rem 1.05rem; background: var(--paper); color: var(--text-dark); text-decoration: none; border-radius: 8px; font-size: .95rem; font-weight: 500; transition: all .2s; border: 1px solid transparent; }
.cx-sidebar-menu a:hover { background: var(--bg-soft-green); color: var(--accent-green); transform: translateX(4px); }

/* ===== 底部 CTA ===== */
.cx-cta-section { padding: 0 0 5rem; background: #fff; }
.cx-cta { background: linear-gradient(135deg, #1a2432 0%, #0f1520 100%); border-radius: 20px; padding: 3.5rem 4rem; display: flex; justify-content: space-between; align-items: center; color: #fff; box-shadow: 0 20px 40px -10px rgba(0,0,0,.15); }
.cx-cta-text h2 { font-size: 1.8rem; font-weight: 800; margin: 0 0 .8rem; }
.cx-cta-text p { font-size: 1rem; color: rgba(255,255,255,.7); margin: 0; }
.cx-cta-actions { display: flex; gap: 1rem; }
.cx-cta-actions .btn { padding: .8rem 1.8rem; font-size: 1rem; font-weight: 600; border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.cx-cta-actions .btn-white { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); transition: all .3s; }
.cx-cta-actions .btn-white:hover { background: #fff; color: var(--primary-dark); }
.cx-cta-actions .btn-primary { background: var(--accent-green); color: #fff; border: none; transition: all .3s; }
.cx-cta-actions .btn-primary:hover { background: var(--accent-hover); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .cx-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .cx-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .cx-cta { flex-direction: column; text-align: center; gap: 2rem; padding: 2.5rem; }
}
@media (max-width: 768px) {
  .cx-hero { margin-top: 60px; }
  .cx-sidebar { grid-template-columns: 1fr; }
  .cx-case-grid { grid-template-columns: 1fr; }
  .cx-post-nav { grid-template-columns: 1fr; }
  .cx-pn-next { text-align: left; }
  .cx-info-grid { grid-template-columns: 1fr; gap: .4rem; }
  .cx-cta-actions { flex-direction: column; width: 100%; }
  .cx-cta-actions .btn { width: 100%; justify-content: center; }
}