/*
Theme Name: FGS Mirror
Author: Generated by automation
Version: 0.1.0
Description: 静态镜像佛光山网站的初始WordPress主题，用于后续模板化改造。
*/

/* ========== 统一全站字体设置和修正中文标点符号显示位置 ========== */
* {
    font-family: 'SimHei', '黑体', 'STHeiti', '华文黑体', 'Microsoft YaHei', '微软雅黑', 'Microsoft JhengHei', '微软正黑体', 'Arial', 'Helvetica Neue', 'Helvetica', sans-serif !important;
    font-weight: 500 !important;
    vertical-align: baseline !important;
}

body, p, span, div, a, li, td, th, h1, h2, h3, h4, h5, h6 {
    font-family: 'SimHei', '黑体', 'STHeiti', '华文黑体', 'Microsoft YaHei', '微软雅黑', 'Microsoft JhengHei', '微软正黑体', 'Arial', 'Helvetica Neue', 'Helvetica', sans-serif !important;
    font-weight: 500 !important;
    font-feature-settings: normal !important;
    text-orientation: mixed !important;
    vertical-align: baseline !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 首页顶部菜单栏背景图 */
body.home #mainnav {
    background-color: #732719;
    background-image: url('assets/images/bg_header.png');
    background-repeat: repeat-x;
    background-position: center top;
}

/* ========== 文章详情页样式（复刻 lnanews.com） ========== */

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 15px;
    padding: 10px 0;
}

.breadcrumb p {
    font-size: 0.9em;
    color: #666;
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 分类标题 */
.single-content .subtitle {
    margin-bottom: 20px;
}

.single-content .subtitle h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

/* 字体大小调整控件 */
.font-size-control {
    margin-bottom: 20px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-size-control span {
    font-size: 0.9em;
    margin-right: 5px;
}

.font-size-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.font-size-list li {
    margin: 0;
    padding: 0;
}

.font-size-btn {
    padding: 5px 15px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
    margin: 0;
}

.font-size-btn:hover {
    background: #f5f5f5;
}

.font-size-btn.active {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

/* 文章内容区域 */
.single-content {
    margin-top: 20px;
}

.single-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
    font-weight: bold;
}

.single-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.single-meta .single-date {
    margin-right: 15px;
}

.single-body {
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

/* 字体大小样式 */
.single-body.font-size-small {
    font-size: 0.85em;
}

.single-body.font-size-medium {
    font-size: 1em;
}

.single-body.font-size-large {
    font-size: 1.15em;
}

/* 文章中的图片样式 */
.single-body figure {
    margin: 20px 0;
    text-align: center;
}

.single-body figure img {
    max-width: 100%;
    height: auto;
}

.single-body figure figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* 上一则/下一则导航 */
.single-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous span,
.nav-next span {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.nav-previous a,
.nav-next a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.nav-previous a:hover,
.nav-next a:hover {
    text-decoration: underline;
    color: #8B4513;
}

/* 分享按钮区域 */
.single-share {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.share-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.share-btn.share-facebook:hover {
    background: #3b5998;
    color: #fff;
    border-color: #3b5998;
}

.share-btn.share-twitter:hover {
    background: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

/* 右侧边栏样式 */
.single-sidebar-social,
.single-sidebar-latest,
.single-sidebar-related,
.single-sidebar-about,
.single-sidebar-links {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
}

.single-sidebar-social h3,
.single-sidebar-latest h3,
.single-sidebar-related h3,
.single-sidebar-about h3,
.single-sidebar-links h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* 最新消息列表 */
.latest-news-list,
.related-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-news-list li,
.related-news-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dotted #ddd;
}

.latest-news-list li:last-child,
.related-news-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.latest-news-list li a,
.related-news-list li a {
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 1.5;
}

.latest-news-list li a:hover,
.related-news-list li a:hover {
    color: #8B4513;
    text-decoration: underline;
}

.news-date {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
}

.social-links img {
    max-width: 100%;
    height: auto;
}

.about-content {
    font-size: 0.9em;
    line-height: 1.6;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .single-title {
        font-size: 1.5em;
    }
    
    .font-size-control {
        flex-wrap: wrap;
    }
    
    .single-navigation {
        flex-direction: column;
    }
    
    .single-share {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========== Footer 优化样式 ========== */
footer {
    background-color: #f0e4d5;
    padding: 30px 0 0;
    margin-top: 50px;
}

footer .con {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 5%;
}

footer .footer_links {
    text-align: center;
    padding: 25px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px;
    line-height: 1.8;
}

footer .footer_links a {
    color: #555;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
    display: inline-block;
}

footer .footer_links a:hover {
    color: #8d4d4e;
    text-decoration: underline;
}

footer .footer_links .separator {
    color: #999;
    margin: 0 5px;
    font-weight: normal;
}

footer .copyright {
    background-color: #d9be9e;
    color: #fff;
    padding: 20px 0;
    margin-top: 0;
}

footer .copyright p {
    text-align: center;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1.8;
    padding: 0;
}

footer .copyright p br {
    display: block;
    margin: 8px 0;
}

@media (max-width: 768px) {
    footer {
        padding: 20px 0 0;
        margin-top: 30px;
    }
    
    footer .footer_links {
        padding: 20px 0;
        font-size: 14px;
    }
    
    footer .footer_links a,
    footer .footer_links span:not(.separator) {
        display: block;
        margin: 8px 0;
    }
    
    footer .footer_links .separator {
        display: none;
    }
    
    footer .copyright p {
        font-size: 12px;
        line-height: 1.6;
    }
}

/* ========== 搜索结果页 ========== */
.search-results-wrap {
    width: 70%;
    margin: 30px auto 0;
}

.search-results-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2d7c7;
}

.search-results-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #4a2a12;
}

.search-results-meta {
    font-size: 13px;
    color: #666;
}

.search-results-meta strong {
    color: #8B4513;
}

.search-results-meta__divider {
    margin: 0 8px;
    color: #b9a690;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-result-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #e3d8c9;
}

.search-result__thumb {
    width: 180px;
    flex: 0 0 180px;
    display: block;
}

.search-result__thumb img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e0d6c8;
}

.search-result__body {
    flex: 1;
    min-width: 0;
}

.search-result__body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.search-result__body h3 a {
    color: #333;
    text-decoration: none;
}

.search-result__body h3 a:hover {
    color: #8B4513;
}

.search-result__excerpt {
    margin: 0;
    color: #444;
    line-height: 1.8;
    display: -webkit-box;
    line-clamp: 5;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result__action {
    margin-top: 12px;
}

.search-result__action .publish-detail-btn {
    padding: 6px 16px;
    border: 1px solid #8B4513;
    background: #8B4513;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.search-result__action .publish-detail-btn:hover {
    background: #7a3d11;
}

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

.search-pagination .page-numbers {
    padding: 6px 12px;
    border: 1px solid #d7c7b4;
    background: #fff;
    color: #5d3b21;
    text-decoration: none;
    border-radius: 4px;
}

.search-pagination .page-numbers.current {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.search-pagination .page-numbers:hover {
    background: #f3ece3;
}

.search-empty {
    padding: 18px;
    background: #f9f6f1;
    border: 1px solid #e5ded2;
    color: #555;
}

/* 出版作品弹窗（复用 publish 模板样式） */
.publish-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.publish-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.publish-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.publish-modal-box.is-open {
    display: flex;
}

.publish-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    z-index: 2;
}

.publish-modal-close:hover {
    color: #000;
}

.publish-modal-title {
    margin: 0;
    padding: 16px 48px 12px 20px;
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.publish-modal-content-wrap {
    padding: 16px 20px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    max-height: 80vh;
}

@media (max-width: 768px) {
  .publish-modal-box {
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    width: 90%;
    height: 90%;
    max-height: none;
    transform: none;
  }
  .publish-modal-content-wrap {
    max-height: none;
    flex: 1;
    min-height: 200px;
  }
}

.publish-modal-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.publish-modal-image {
    flex-shrink: 0;
    width: 220px;
}

.publish-modal-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e0e0e0;
}

.publish-modal-body {
    flex: 1;
    min-width: 0;
}

.publish-modal-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.publish-modal-content p {
    margin: 0 0 0.8em;
}

.publish-modal-content p:last-child {
    margin-bottom: 0;
}

.fgs-pdf-viewer-wrap {
    margin: 1em 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.fgs-pdf-viewer-tip {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
    color: #666;
    background: #eee;
}

.fgs-pdf-viewer-tip a {
    color: #844c29;
    text-decoration: underline;
}

.fgs-pdf-viewer-pages {
    padding: 10px;
    max-height: 70vh;
    overflow-y: auto;
}

.fgs-pdf-canvas {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fgs-pdf-canvas:last-child {
    margin-bottom: 0;
}

