/* FAQ样式 */

.faq-section {
    margin: 40px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.faq-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--heading-color);
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.faq-toggle {
    width: 20px;
    height: 20px;
    position: relative;
}

.faq-toggle::before,
.faq-toggle::after {
    content: '';
    position: absolute;
    background: var(--primary-color);
    transition: transform 0.3s;
}

.faq-toggle::before {
    width: 2px;
    height: 12px;
    top: 4px;
    left: 9px;
}

.faq-toggle::after {
    width: 12px;
    height: 2px;
    top: 9px;
    left: 4px;
}

.faq-item.active .faq-toggle::before {
    transform: rotate(90deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 1000px;
}


/* 相关文章样式 */

.related-posts {
    margin: 40px 0;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--heading-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.related-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-post-title {
    padding: 15px;
    margin: 0;
    font-size: 1.1rem;
}

.related-post-title a {
    color: var(--heading-color);
    text-decoration: none;
}

.related-post-meta {
    padding: 0 15px 15px;
    color: #6c757d;
    font-size: 0.9rem;
}


/* 面包屑导航样式 */

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb .separator {
    color: #6c757d;
    margin: 0 5px;
}


/* 侧边栏美化 */

.widget-area {
    width: 29%;
    float: none;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem 1.2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s;
    border: 1px solid #f0f0f0;
}

.widget:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.widget-title {
    margin: 0 0 1.2rem 0;
    padding-bottom: 0.5rem;
    border-left: 4px solid var(--primary-color, #007bff);
    border-bottom: 1.5px solid #e9ecef;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color, #007bff);
    background: linear-gradient(90deg, #f7f9fa 60%, transparent);
    padding-left: 10px;
}

.widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.2s;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s, background 0.2s;
    border-radius: 4px;
    padding: 2px 4px;
    display: inline-block;
}

.widget a:hover {
    color: var(--primary-color, #007bff);
    background: #f0f7ff;
}

.widget_search input[type="search"] {
    width: 80%;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 1rem;
    background: #fafbfc;
    transition: border 0.2s;
}

.widget_search input[type="search"]:focus {
    border-color: var(--primary-color, #007bff);
}

.widget_search input[type="submit"] {
    padding: 7px 16px;
    border: none;
    border-radius: 0 4px 4px 0;
    background: var(--primary-color, #007bff);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.widget_search input[type="submit"]:hover {
    background: var(--secondary-color, #0056b3);
}


/* 响应式调整 */

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    .faq-question h3 {
        font-size: 1rem;
    }
    .widget {
        padding: 15px;
    }
}


/* 返回顶部按钮 */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    fill: currentColor;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 35px;
        height: 35px;
    }
}


/* 文章目录样式 */

.table-of-contents {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.toc-title {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: var(--heading-color);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.toc-item:last-child {
    margin-bottom: 0;
}

.toc-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 4px 0;
}

.toc-item a:hover {
    color: var(--primary-color);
}

.toc-item.level-2 {
    padding-left: 0;
}

.toc-item.level-3 {
    padding-left: 20px;
}


/* 当前目录项高亮 */

.toc-item.active>a {
    color: var(--primary-color);
    font-weight: 500;
}


/* 主要内容区域 */

.content-area {
    width: 69%;
    float: none;
    padding-right: 0;
}


/* 清除浮动 */

.site-content::after {
    content: "";
    display: table;
    clear: both;
}


/* 响应式布局 */

@media screen and (max-width: 768px) {
    .content-area,
    .widget-area {
        width: 100%;
        float: none;
        padding-right: 0;
    }
    .widget-area {
        margin-top: 2rem;
    }
}


/* 文章页上一篇/下一篇新版美化 */

.post-navigation-simple {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin: 2.5rem 0 1.5rem 0;
}

.prev-post,
.next-post {
    flex: 1 1 0;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: #333;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: color 0.2s;
}

.next-post .post-nav-link {
    align-items: flex-end;
    text-align: right;
}

.post-nav-link .nav-label {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 2px;
    font-weight: 400;
}

.post-nav-link .nav-title {
    font-size: 1.05rem;
    color: #007bff;
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.2s;
    line-height: 1.5;
    word-break: break-all;
}

.post-nav-link:hover .nav-title {
    color: #0056b3;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .post-navigation-simple {
        flex-direction: column;
        gap: 10px;
    }
    .next-post .post-nav-link,
    .prev-post .post-nav-link {
        align-items: center !important;
        text-align: center;
    }
    .post-nav-link .nav-title {
        text-align: center;
    }
}


/* 分页美化 */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 0 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-block;
    min-width: 36px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: background 0.2s, color 0.2s;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--primary-color, #007bff);
    color: #fff;
}

.page-numbers.dots {
    background: none;
    box-shadow: none;
    color: #bbb;
}


/* 文章页面包屑下间距紧凑 */

.site-content>.container>.breadcrumb {
    margin-bottom: 8px !important;
    padding-bottom: 1px;
}

.entry-header {
    margin-top: 0 !important;
}


/* 分类页/归档页面包屑下间距宽松 */

.archive-header .breadcrumb {
    margin-bottom: 20px;
}


/* 底部相关文章 */

.related-posts-full {
    width: 100%;
    margin: 40px 0 0 0;
    padding: 0;
    clear: both;
}

.related-posts-full .related-posts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}