/* 美化标题样式 */

/* 基础样式（所有设备通用） */
/* 强制重置父容器样式，确保布局基础 */
.xun-posts-header {
  display: flex !important;  /* 强制开启弹性布局 */
  justify-content: center !important;  /* 强制水平居中 */
  align-items: center !important;  /* 垂直居中（可选） */
  width: 100% !important;  /* 确保父容器占满整行 */
  padding: 0 !important;   /* 清除内边距干扰 */
  float: none !important;  /* 清除浮动 */
  position: relative !important;
  box-sizing: border-box !important;
  flex-direction: column !important; /* 改为列布局，让标题和分类标签垂直排列 */
  gap: 15px !important; /* 添加间距 */
}

/* 基础标题样式 */
.xun-posts-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 20px 0 0 0 !important;
  padding: 10px 0 !important;
  font-size: 24px !important;
  font-weight: bold !important;
  color: #3B82F6 !important;
  text-align: center !important;
  position: relative !important;
}

/* 自定义字体大小支持 */
.title-fontsize-16 .xun-posts-title { font-size: 16px !important; }
.title-fontsize-17 .xun-posts-title { font-size: 17px !important; }
.title-fontsize-18 .xun-posts-title { font-size: 18px !important; }
.title-fontsize-19 .xun-posts-title { font-size: 19px !important; }
.title-fontsize-20 .xun-posts-title { font-size: 20px !important; }
.title-fontsize-21 .xun-posts-title { font-size: 21px !important; }
.title-fontsize-22 .xun-posts-title { font-size: 22px !important; }
.title-fontsize-23 .xun-posts-title { font-size: 23px !important; }
.title-fontsize-24 .xun-posts-title { font-size: 24px !important; }
.title-fontsize-25 .xun-posts-title { font-size: 25px !important; }
.title-fontsize-26 .xun-posts-title { font-size: 26px !important; }
.title-fontsize-27 .xun-posts-title { font-size: 27px !important; }
.title-fontsize-28 .xun-posts-title { font-size: 28px !important; }
.title-fontsize-29 .xun-posts-title { font-size: 29px !important; }
.title-fontsize-30 .xun-posts-title { font-size: 30px !important; }
.title-fontsize-31 .xun-posts-title { font-size: 31px !important; }
.title-fontsize-32 .xun-posts-title { font-size: 32px !important; }
.title-fontsize-33 .xun-posts-title { font-size: 33px !important; }
.title-fontsize-34 .xun-posts-title { font-size: 34px !important; }
.title-fontsize-35 .xun-posts-title { font-size: 35px !important; }
.title-fontsize-36 .xun-posts-title { font-size: 36px !important; }
.title-fontsize-37 .xun-posts-title { font-size: 37px !important; }
.title-fontsize-38 .xun-posts-title { font-size: 38px !important; }
.title-fontsize-39 .xun-posts-title { font-size: 39px !important; }
.title-fontsize-40 .xun-posts-title { font-size: 40px !important; }
.title-fontsize-41 .xun-posts-title { font-size: 41px !important; }
.title-fontsize-42 .xun-posts-title { font-size: 42px !important; }
.title-fontsize-43 .xun-posts-title { font-size: 43px !important; }
.title-fontsize-44 .xun-posts-title { font-size: 44px !important; }
.title-fontsize-45 .xun-posts-title { font-size: 45px !important; }
.title-fontsize-46 .xun-posts-title { font-size: 46px !important; }
.title-fontsize-47 .xun-posts-title { font-size: 47px !important; }
.title-fontsize-48 .xun-posts-title { font-size: 48px !important; }

.xun-posts-title span {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}



/* 样式2: 红色文字左右边框 */
.title-style-style2 .xun-posts-title {
  padding: 10px 20px !important;
  border-left: 4px solid !important;
  border-right: 4px solid !important;
}

.title-style-style2 .xun-posts-title::before,
.title-style-style2 .xun-posts-title::after {
  display: none !important;
}



/* 样式4: 紫色文字阴影 */
.title-style-style4 .xun-posts-title {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.title-style-style4 .xun-posts-title::before,
.title-style-style4 .xun-posts-title::after {
  display: none !important;
}

/* 样式5: 橙色文字下划线 */
.title-style-style5 .xun-posts-title {
  position: relative !important;
  padding: 0 !important;
}

.title-style-style5 .xun-posts-title::after {
  content: "" !important;
  display: block !important;
  width: 100% !important;
  height: 3px !important;
  margin: 5px 0 0 0 !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
}

.title-style-style5 .xun-posts-title::before {
  display: none !important;
}

/* 响应式设计 - 平板设备 */
@media (max-width: 768px) {
  .xun-posts-title {
    font-size: 20px !important;
    margin: 15px 0 0 0 !important;
  }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 480px) {
  .xun-posts-title {
    font-size: 18px !important;
    margin: 10px 0 0 0 !important;
  }
}

/* 强制重置标签容器样式，确保居中 */
.xun-posts-category-tabs.has-more,
.xun-posts-category-tabs { /* 统一设置基础样式，避免重复 */
  display: block !important;  /* 改为块级元素 */
  width: fit-content !important;  /* 宽度自适应内容（关键） */
  max-width: 100% !important; /* 新增：防止内容溢出屏幕 */
  margin: 0 auto !important;  /* 双重保障水平居中 */
  float: none !important;     /* 强制清除浮动（重点） */
  position: static !important;  /* 重置定位 */
  left: auto !important;
  right: auto !important;
  transform: none !important;  /* 清除位移干扰 */
  padding: 0 !important;
  box-sizing: border-box !important; /* 新增：确保宽高计算正确 */
  text-align: center !important; /* 新增：确保内部子元素也居中 */
}

/* 响应式适配 - 平板/小屏设备（屏幕宽度≤768px） */
@media (max-width: 768px) {
  .xun-posts-category-tabs.has-more,
  .xun-posts-category-tabs {
    width: 90% !important;  /* 小屏下宽度占90%，避免内容挤边 */
  }
}

/* 响应式适配 - 手机设备（屏幕宽度≤480px） */
@media (max-width: 480px) {
  .xun-posts-category-tabs.has-more,
  .xun-posts-category-tabs {
    width: 95% !important;  /* 更贴合屏幕宽度 */
    /* 新增：强化居中，覆盖任何可能的继承样式 */
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }
  
  /* 可选：如果标签是横向滚动/换行，手机端强制换行更友好 */
  .xun-posts-category-tabs .tab-item {
    margin: 0 5px 8px 5px !important;  /* 减小标签间距，增加上下间距 */
    white-space: normal !important;    /* 允许标签文字换行 */
    display: inline-block !important; /* 新增：确保标签是行内块，配合text-align:center居中 */
  }
}


@media (max-width: 767px) {
  .xun-posts-block.xun-posts-code {
    /* 手机端缩小后的上下外边距，数值可按需调整 */
    margin-top: -8px;
    margin-bottom: -8px;
    /* 如果需要调整内边距，取消注释并修改 */
    /* padding-top: 8px;
    padding-bottom: 8px; */
  }
}
