/* ==========================================================================
   平衡版样式：保留高颜值，剔除显存杀手
   ========================================================================== */

/* --- 满宽度背景容器 --- */
.two-columns-section-wrapper {
  /* 恢复背景图和混合模式，但在移动端会自动降级 */
  background: #faf8f3 url('../img/back/7.jpg') center/cover no-repeat;
  
  /* 关键修复：使用相对定位+负边距的安全写法，配合 hidden 防止抖动 */
  position: relative;
  width: 100vw; 
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden; /* 必须加上，防止横向滚动条触发重排循环 */
  
  padding: 50px 0;
  margin-bottom: 0;
  border-top: 3px solid rgba(139, 115, 85, 0.3);
  box-sizing: border-box;
}

/* 恢复蒙版层，但移除 GPU 强制渲染 */
.two-columns-section-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(245, 240, 232, 0.75); /* 稍微调高不透明度 */
  pointer-events: none;
  z-index: 0;
}

.two-columns-section-wrapper > .two-columns-module {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* --- 布局保持 Flex --- */
.two-columns-section-wrapper .row {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* 等高 */
  width: 100%;
}

.two-columns-section-wrapper .col-md-6 {
  width: calc(50% - 15px); /* 精确计算间距 */
  flex: 0 0 calc(50% - 15px);
  padding: 0;
  margin: 0;
  display: flex;
}

/* --- 卡片样式还原 --- */
.sidebar,
.cbox-left {
  /* 1. 用半透明白色代替毛玻璃，既有通透感又不吃显卡 */
  background: rgba(255, 255, 255, 0.92); 
  
  /* 2. 恢复圆角和边框 */
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  
  /* 3. 恢复阴影，但使用静态阴影 */
  box-shadow: 0 8px 20px rgba(139, 115, 85, 0.08);
  
  /* 4. 安全的过渡动画 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  width: 100%;
  padding: 35px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* Hover 效果：恢复上浮，但幅度减小 */
.sidebar:hover,
.cbox-left:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(139, 115, 85, 0.15);
  border-color: #fff;
}

/* --- 标题区域还原 --- */
.sidebar .post-head,
.cbox-left .post-head {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar .post-title,
.cbox-left .post-title {
  font-size: 28px;
  font-weight: 700;
  color: #5a4a3a;
  font-family: 'KaiTi', 'STKaiti', '楷体', serif;
  position: relative;
  z-index: 1;
}

/* 恢复标题两侧的装饰线 (纯 CSS 绘制，性能开销极低) */
.sidebar .post-title::before,
.cbox-left .post-title::before {
  content: '';
  position: absolute;
  left: -60px;
  top: 50%;
  width: 40px;
  height: 2px;
  background: rgba(139, 115, 85, 0.4);
}

.sidebar .post-title::after,
.cbox-left .post-title::after {
  content: '';
  position: absolute;
  right: -60px;
  top: 50%;
  width: 40px;
  height: 2px;
  background: rgba(139, 115, 85, 0.4);
}

/* --- More 按钮还原 --- */
.sidebar .post-more,
.cbox-left .post-more {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.sidebar .post-more a,
.cbox-left .post-more a {
  color: #8b7355;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.sidebar .post-more a:hover,
.cbox-left .post-more a:hover {
  color: #5a4a3a;
}
.sidebar .post-more a::before, .cbox-left .post-more a::before { content: 'more'; }
.sidebar .post-more a::after, .cbox-left .post-more a::after { content: ' \203A'; font-size: 16px; margin-left: 2px; }

/* --- 列表样式还原 --- */
.sidebar .post-news,
.cbox-left .post-news {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  flex: 1;
}

.sidebar .news-item,
.cbox-left .news-item {
  padding: 15px 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.15); /* 恢复分割线颜色 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.sidebar .news-item:last-child,
.cbox-left .news-item:last-child {
  border-bottom: none;
}

/* Hover 背景微变 */
.sidebar .news-item:hover,
.cbox-left .news-item:hover {
  background: rgba(139, 115, 85, 0.05);
  padding-left: 10px;
  padding-right: 10px;
  margin: 0 -10px;
  border-radius: 6px;
}

.sidebar .meta-title,
.cbox-left .meta-title {
  flex: 1;
  padding-right: 15px;
  overflow: hidden;
}

.sidebar .meta-title a,
.cbox-left .meta-title a {
  color: #5a4a3a;
  font-size: 16px;
  text-decoration: none;
  line-height: 1.5;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .news-item:hover .meta-title a,
.cbox-left .news-item:hover .meta-title a {
  color: #8b7355;
}

.sidebar .meta-time,
.cbox-left .meta-time {
  color: #999;
  font-size: 13px;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

/* ==========================================================================
   移动端优化 (保留样式，但确保安全)
   ========================================================================== */
@media (max-width: 991px) {
  .two-columns-section-wrapper {
    padding: 30px 0;
    /* 手机端禁用混合模式，防止显存爆满 */
    background-blend-mode: normal; 
  }

  .two-columns-section-wrapper .row {
    flex-direction: column;
    gap: 20px;
  }

  .two-columns-section-wrapper .col-md-6 {
    width: 100%;
    flex: 0 0 100%;
  }

  /* 调整手机端卡片内边距 */
  .sidebar, .cbox-left {
    padding: 25px 20px;
    height: auto; /* 手机端取消固定高度 */
  }

  /* 缩小手机端标题字号 */
  .sidebar .post-title,
  .cbox-left .post-title {
    font-size: 24px;
  }
  
  /* 缩短装饰线 */
  .sidebar .post-title::before, .cbox-left .post-title::before { left: -40px; width: 25px; }
  .sidebar .post-title::after, .cbox-left .post-title::after { right: -40px; width: 25px; }

  /* 手机端列表允许换行，因为空间不够 */
  .sidebar .meta-title a,
  .cbox-left .meta-title a {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

@media (max-width: 768px) {
  /* 进一步优化小屏幕布局 */
  .sidebar .post-head,
  .cbox-left .post-head {
    justify-content: space-between; /* 标题靠左，More靠右 */
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2); /* 手机端加个底线区分 */
    margin-bottom: 15px;
  }

  .sidebar .post-title,
  .cbox-left .post-title {
    font-size: 20px;
    margin: 0;
  }
  
  /* 手机端太窄，移除两侧装饰线，保持简洁 */
  .sidebar .post-title::before, .cbox-left .post-title::before,
  .sidebar .post-title::after, .cbox-left .post-title::after {
    display: none;
  }

  .sidebar .post-more,
  .cbox-left .post-more {
    position: static; /* 取消绝对定位 */
    transform: none;
  }
}