/* ==========================================================================
   1. 基础全局设置
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

body {
  background: #f3f5f8;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-container {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1820px;
  margin: 0 auto;
  padding: 20px 15px;
  clear: both;
}

a {
  text-decoration: none;
  color: inherit;
}

.clearfix::after,
.sub-category-list::after,
.about-top-section::after,
.commitment-grid::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================================================================
   2. 首页幻灯片 (Slider)
   ========================================================================== */
.home-slider {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-top: 32%;
  clear: both;
}

.slider-list {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  list-style: none;
}

.slider-list li {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
}

.slider-list li.active {
  display: block;
}

.slider-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dots span {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.slider-dots span.active {
  background-color: #fff;
  width: 30px;
  border-radius: 6px;
}

/* ==========================================================================
   3. 产品列表卡片 (浮动布局修复区)
   ========================================================================== */
.sub-category-list {
  width: 100%;
  padding-bottom: 30px;
}

.parent-category-card {
  float: left;
  width: 48%;
  /* 稍微缩小一点防止间隙计算误差 */
  margin-right: 2%;
  margin-bottom: 30px;
  border: 1px solid #e0e0e0;
  background: #fff;
}

.parent-category-card:nth-child(2n) {
  margin-right: 0;
  /* 每行第二个去掉右边距 */
}

.card-top-title {
  display: block;
  background: #1e6cbf;
  color: #fff;
  padding: 12px 15px;
  font-size: 16px;
  font-weight: bold;
}

.card-main-body {
  overflow: hidden;
  height: 280px;
  position: relative;
}

.category-left-box {
  float: left;
  width: 40%;
  height: 100%;
  background: #f9f9f9;
  border-right: 1px solid #eee;
}

.category-right-list {
  margin-left: 40%;
  padding: 24px;
}

/* ==========================================================================
   4. 文章列表 (Article)
   ========================================================================== */
.article-item {
  display: flex;
  padding: 25px 0;
  border-bottom: 1px solid #eee;
}

.article-image-wrap {
  flex: 0 0 280px;
  margin-right: 30px;
  overflow: hidden;
}

.article-image-wrap img {
  width: 100%;
}

.article-info {
  flex: 1;
  min-width: 0;
}

.article-content img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   5. Footer 样式 (布局加固)
   ========================================================================== */
.site-footer {
  flex-shrink: 0;
  background-color: #1e6cbf;
  color: #ffffff;
  padding: 60px 0 30px;
  font-size: 16px;
  line-height: 1.8;
  clear: both;
  width: 100%;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5%;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-col h3 {
  font-size: 20px;
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-col ul li a:hover {
  color: #fff;
  padding-left: 5px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

/* ==========================================================================
   6. 其他组件 (BackToTop)
   ========================================================================== */
#backToTop {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: #1e6cbf;
  color: #fff;
  border-radius: 50%;
  border: 1px solid #fff;
  cursor: pointer;
  z-index: 999;
}

/* ==========================================================================
   7. 响应式布局 (关键修复区)
   ========================================================================== */

@media (max-width: 1138px) {
  .footer-col {
    flex: 0 0 45%;
  }
}

/* 手机端 (768px 以下) */
@media (max-width: 768px) {
  .parent-category-card {
    width: 100% !important;
    float: none !important;
    /* 强制取消浮动 */
    margin-right: 0;
  }

  .article-item {
    flex-direction: column;
  }

  .article-image-wrap {
    width: 100%;
    margin-bottom: 15px;
  }

  .footer-col {
    flex: 0 0 100%;
  }

  .empty-heading {
    display: none;
  }

  .category-left-box {
    height: 180px;
  }

  .empty-heading {
    display: none;
  }

  .footer-col.links+.footer-col.links {
    margin-top: -84px;
  }

  .rich-text-content p {
    text-align: start !important;
  }
}