/*
 Theme Name: Astra 子主题
 Template: astra
*/
/* H3 标签样式 */
h3 {
  color: #333; /* 深色文字，确保可读性 */
  background-color: #f7f7f7; /* 淡灰色背景，柔和且现代 */
  padding: 10px 20px; /* 内边距，确保文字不贴边 */
  font-size: 24px; /* 合适的字体大小 */
  font-weight: 600; /* 字体稍微加粗，增强标题感 */
  border-radius: 8px; /* 圆角效果，使标题柔和 */
  margin-top: 20px; /* 增加顶部间距 */
  margin-bottom: 15px; /* 增加底部间距 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
  position: relative; /* 使底部的色彩元素能够定位 */
  transition: all 0.3s ease; /* 为交互添加过渡效果 */
}

/* 使用::before伪元素添加带渐变的左边框 */
h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%; /* 使左边框的高度与h3相同 */
  width: 8px; /* 设置左边框的宽度 */
  background: linear-gradient(135deg, #2271b1, #6a11cb); /* 渐变左边框 */
  border-radius: 8px 0 0 8px; /* 圆角左边框 */
  box-sizing: border-box; /* 确保内边距和圆角不会影响显示 */
}

/* 给h3标题底部增加颜色条 */
h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px; /* 设置底部色条的高度 */
  background: linear-gradient(135deg, #2271b1, #6a11cb); /* 渐变底部条 */
  border-radius: 0 0 8px 8px; /* 圆角底部边缘 */
}
/* 面包屑导航css */
/* 防止面包屑导航换行并保持在同一行 */
.ast-breadcrumbs {
    white-space: nowrap; /* 禁止换行 */
    overflow: hidden;    /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 如果内容过长显示省略号 */
}

/* 保证每个面包屑项都在同一行 */
.ast-breadcrumbs .trail-items {
    display: inline; /* 或者 inline-block */
}

/* 每个面包屑项之间的间距 */
.ast-breadcrumbs .trail-item {
    display: inline-block;
    margin-right: 5px; /* 根据需要调整间距 */
}

/* 修复最后一个面包屑项的样式 */
.ast-breadcrumbs .trail-item.trail-end {
    font-weight: normal;
}
/* 搜索css样式 */
/* 搜索框外部容器 */
.wp-block-search {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 700px;
    margin: 1px auto;
    border-radius: 10px;  /* 圆角效果 */
    background-color: rgba(255, 255, 255, 0.5);  /* 半透明白色 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    overflow: visible;  /* 确保没有裁剪 */
    transition: all 0.3s ease;
}

/* 搜索框输入框 */
.wp-block-search__input {
    width: 100%;
    padding: 12px 18px;
    font-size: 16px;
    color: #333;  /* 输入文字颜色 */
    border: 2px solid #ddd;
    border-radius: 10px; /* 圆角边框 */
    background-color: #fafafa; /* 浅灰色背景 */
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* 聚焦时输入框的变化 */
.wp-block-search__input:focus {
    border-color: #2575fc; /* 聚焦时蓝色边框 */
    background-color: #fff; /* 聚焦时背景变白 */
    outline: none;
}

/* 搜索按钮 */
.wp-block-search__button {
    background: linear-gradient(45deg, #2575fc, #6a11cb) !important; /* 渐变背景 */
    color: #fff;
    border: none;
    border-radius: 50%; /* 完全圆形按钮 */
    width: 40px; /* 固定宽度 */
    height: 40px; /* 固定高度，确保是圆形 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    cursor: pointer;
    padding: .7em .7em; /* 去掉 padding 以避免影响圆形 */
    transition: background 0.3s ease, transform 0.3s ease;
}

/* 搜索按钮悬浮效果 */
.wp-block-search__button:hover {
    background: linear-gradient(45deg, #6a11cb, #2575fc) !important; /* 悬浮时反转渐变色 */
    transform: scale(1.1); /* 放大效果 */
}

/* 搜索按钮中的图标 */
.wp-block-search__button svg {
    fill: #fff;
    width: 18px;
    height: 18px;
}

/* 屏幕阅读标签隐藏 */
.wp-block-search__label {
    display: none;
}
/* 热门推荐css样式 */
/* 栏目标题样式 */
.widget-title {
    background: linear-gradient(45deg, #6a11cb, #2575fc);  /* 渐变背景 */
    padding: 12px 20px;  /* 内边距，让标题与内容之间有空间 */
    font-size: 18px;  /* 设置字体大小 */
    color: #fff !important; /* 标题文字颜色 */
    text-align: center; /* 居中对齐 */
    border-radius: 10px 10px 0 0;  /* 圆角，上边为圆角 */
    margin: 0;         /* 去掉默认外边距 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);  /* 轻微阴影 */
}
/* 内容标题样式 */
.wp-block-latest-posts__post-title {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
	 font-weight:500;
    text-decoration: none;
}
/* 限制内容标题最多显示两行 */
.wp-block-latest-posts__post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 显示最多两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;  /* 超出部分隐藏 */
    text-overflow: ellipsis;  /* 超出部分使用省略号显示 */
}
/* 小工具外部容器样式 */
#block-23 {
    width: 100%;
    max-width: 350px;  /* 设置最大宽度 */
    margin: 20px auto;  /* 居中对齐 */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);  /* 阴影 */
    overflow: hidden;   /* 防止溢出 */
}

/* 小工具内容列表样式 */
.wp-block-latest-posts__list {
    display: flex;
    flex-direction: column;  /* 垂直排列 */
    gap: 5px;
    padding: 15px;
    list-style-type: none;
    margin: 0;
}

/* 每个列表项的样式 */
.wp-block-latest-posts__list li {
    display: flex;
    align-items: center;  /* 保证图片和标题垂直居中对齐 */
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
/* 图片外边距 */
.wp-block-latest-posts__featured-image {
    margin-top: 10px !important;  /* 设置图片容器的顶部外边距 */
}

/* 悬浮时列表项放大并增加阴影 */
.wp-block-latest-posts__list li:hover {
    transform: translateY(-5px);  /* 向上浮动 */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);  /* 增加阴影 */
}

/* 图片样式 */
.wp-block-latest-posts__featured-image img {
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;  /* 确保图片不失真 */
}

/* 悬停时标题颜色变化 */
.wp-block-latest-posts__post-title:hover {
    color: #2271b1;  /* 悬停时标题颜色 */
}
/* 云标签css样式 */
/* 紧凑小气泡标签云 */
.widget_tag_cloud .wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 标签间距调整为10px */
    justify-content: center;  /* 居中排列 */
    padding: 8px;  /* 减小外部内边距 */
}

/* 每个标签的紧凑小气泡样式 */
.widget_tag_cloud .tag-cloud-link {
    display: inline-flex;  /* 使用 flexbox 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    padding: 4px 6px;  /* 更小的内边距 */
    background-color: #6a11cb;  /* 保证背景色 */
    color: #fff;
    border-radius: 15px; /* 更小的圆角 */
    font-size: 11px;  /* 更小的字体 */
    transition: all 0.3s ease;
    text-decoration: none;
    box-sizing: border-box;  /* 确保内边距不会影响背景色渲染 */
}

/* 悬浮效果 - 小气泡放大 */
.widget_tag_cloud .tag-cloud-link:hover {
    background-color: #2575fc;
    transform: scale(1.1);  /* 放大效果 */
}

/* 标签字体大小适配 */
.widget_tag_cloud .tag-cloud-link {
    font-size: calc(9px + (13 - 9) * ((100vw - 320px) / (1920 - 320))); /* 根据屏幕大小自适应 */
}
/* 为所有文章添加圆角和阴影 */
article.post {
    border-radius: 16px; /* 圆角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    overflow: hidden; /* 防止圆角裁切内容 */
    padding: 20px; /* 添加内边距，使内容不贴边 */
    background-color: #fff; /* 背景颜色 */
}

/* 为“相关推荐”部分的文章添加圆角和阴影 */
.ast-related-post {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    overflow: hidden; /* 防止内容超出圆角范围 */
    margin-bottom: 20px; /* 给每个文章卡片添加底部间距 */
    background-color: #fff; /* 背景颜色 */
    padding: 10px; /* 添加内边距，增加可读性 */
}

/* 可选：调整图片样式，让图片显示为圆角 */
.ast-related-post .post-thumb-img-content img {
    border-radius: 8px; /* 图片圆角 */
}

/* 相关推荐内文章标题样式 */
.ast-related-post .ast-related-post-title a {
    font-weight: 500;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    display: block;
    margin-top: 10px;
}

/* 可选：鼠标悬停时增加阴影效果 */
.ast-related-post:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 增强阴影效果 */
}

/* 相关推荐标题样式 */
.ast-related-posts-title-section {
    background: linear-gradient(135deg, #6a11cb, #2575fc);  /* 渐变背景 */
    padding: 20px 30px;  /* 内边距，增加可读性 */
    border-radius: 12px;  /* 圆角效果 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);  /* 柔和的阴影 */
    margin-bottom: 30px;  /* 底部间距 */
    text-align: center;  /* 居中对齐 */
    position: relative;  /* 为伪元素创造空间 */
    overflow: hidden;
}

/* 相关推荐标题文字和背景css样式 */
/* 相关推荐标题文字样式 */
.ast-related-posts-title {
    color: #fff !important;  /* 白色字体 */
    text-transform: uppercase;  /* 大写字母 */
    letter-spacing: 2px;  /* 字母间距 */
    position: relative;
    z-index: 1;  /* 确保文字在前面 */
}
/* 手机设备居中显示标题 */
@media (max-width: 768px) {
  .ast-related-posts-title {
    text-align: center !important;
    display: block;
    width: 100%;
    margin: 0 auto;
  }
}

/* 添加渐变的光影效果 */
.ast-related-posts-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(15px);
    transform: translate(-50%, -50%);
    z-index: 0;  /* 保证它位于文字后面 */
}
/* 减小背景区域的高度 */
.ast-related-posts-title-section {
    padding: 5px 30px; /* 保留左右的内边距，但减小上下的内边距 */
}
/* 额外减小底部padding */
.ast-related-posts-title-section {
    padding-bottom: 5px !important;  /* 进一步减少底部内边距 */
}
/* 分页优化css */
/* 定义分页容器 */
.custom-pagination {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    margin-top: 20px;        /* 增加分页容器与其他内容之间的间距 */
}

/* 定义分页按钮 */
.custom-pagination .nav-links {
    display: flex;           /* 水平排列分页按钮 */
    align-items: center;     /* 确保按钮垂直居中 */
}

/* 分页按钮的基本样式 */
.custom-pagination .page-numbers {
    padding: 8px 16px;      /* 为按钮添加适当的内边距 */
    margin: 0 5px;          /* 每个按钮之间的间距 */
    text-decoration: none;  /* 去掉链接的下划线 */
    color: #333;            /* 文字颜色 */
    background-color: #fafafa; /* 按钮背景颜色 */
    border: 1px solid #ddd; /* 按钮边框 */
    border-radius: 5px;     /* 圆角效果 */
    transition: background-color 0.3s ease, color 0.3s ease; /* 添加过渡效果 */
}

/* 当前页按钮样式 */
.custom-pagination .page-numbers.current {
    background-color: #2271b1; /* 当前页背景色 */
    color: white;             /* 当前页文字颜色 */
    font-weight: bold;        /* 当前页加粗 */
}

/* 鼠标悬浮时的按钮效果 */
.custom-pagination .page-numbers:hover {
    background-color: #6a11cb; /* 悬浮时背景色 */
    color: white;             /* 悬浮时文字颜色 */
}

/* 上一页按钮 */
.custom-pagination .prev {
    background-color: #f6f7f7;
    border: 1px solid #ccc;
}

/* 下一页按钮 */
.custom-pagination .next {
    background-color: #f6f7f7;
    border: 1px solid #ccc;
}

/* 悬浮时的上一页和下一页按钮效果 */
.custom-pagination .prev:hover, .custom-pagination .next:hover {
    background-color: #2271b1;
    color: white;
}

/* 禁用状态的按钮样式（例如“下一页”在最后一页时） */
.custom-pagination .disabled {
    background-color: #ddd; /* 禁用按钮背景色 */
    color: #aaa;            /* 禁用按钮文字颜色 */
    pointer-events: none;   /* 禁用点击事件 */
    border-color: #ddd;     /* 禁用按钮的边框 */
}

/* 可选：移动设备适配 */
@media (max-width: 768px) {
    .custom-pagination .page-numbers {
        padding: 6px 12px; /* 在移动设备上使用稍小的按钮 */
    }
}