@charset "utf-8";
/* CSS Document */
/* ===== 文章页专用样式 ===== */

 /* 主体布局 */
.article-container {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.article-content {
    flex: 1;
    background: #f9f5eb;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.article-sidebar {
    width: var(--sidebar-width);
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 20px;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-meta span {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

.article-category {
    display: inline-block;
    background: var(--light-gray);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.article-image {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-image:hover img {
    transform: scale(1.03);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.article-body.collapsed {
    max-height: 600px;
}

.fade-out {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 70%, rgba(255,255,255,1) 100%);
    display: none;
    pointer-events: none;
}

.article-body img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin: 15px 0;
}

.article-body p {
    margin-bottom: 25px;
    text-align: justify;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    color: var(--primary);
}

.article-body h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--primary);
}

.article-body blockquote {
    background: var(--light);
    border-left: 4px solid var(--secondary);
    padding: 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--gray);
    border-radius: 5px;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--light-gray);
    color: var(--gray);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: white;
}

.article-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: var(--light-gray);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 阅读更多按钮 */
.read-more-btn {
    display: none;
    margin: 20px auto;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-weight: 500;
    font-size: 1rem;
}

.read-more-btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* 分享弹窗 */
.share-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 210px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.share-popup.active {
    display: flex;
    animation: popup 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
    display: none;
    backdrop-filter: blur(3px);
}

.share-popup-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.share-popup h4 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.1rem;
}

.share-popup img {
    width: 200px; 
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-popup:hover {
    background: #f5f5f5;
    color: var(--primary);
}

@keyframes popup {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 文章导航样式 */
.article-navigation {
    margin: 3rem 0;
    padding: 0 1rem;
}

.nav-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 导航卡片通用样式 */
.nav-article {
    display: block;
    perspective: 1000px;
}

.article-card {
    position: relative;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 卡片覆盖层，用于效果 */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
    transition: all 0.3s ease;
}

/* 卡片内容 */
.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #036236; /* 主要文字颜色为绿色 */
}

/* 导航方向指示器 */
.nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.prev-article .nav-direction {
    justify-content: flex-start;
}

.next-article .nav-direction {
    justify-content: flex-end;
}

/* 导航标签样式 */
.nav-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 文章标题 */
.nextarticle-title {
    font-size: 1.0rem;
    line-height: 1.5;
    max-height: 2em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0.9;
    transform: translateY(5px);
    transition: all 0.3s ease 0.1s;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* 卡片悬停效果 */
.nav-article:hover .article-card {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.nav-article:hover .card-overlay {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.prev-article:hover .nav-direction i {
    transform: translateX(-5px);
}

.next-article:hover .nav-direction i {
    transform: translateX(5px);
}

/* 为上一篇和下一篇设置不同的渐变颜色 - 使用相近的色调 */
.prev-article .article-card {
    background: linear-gradient(135deg, #E5DDDC 0%, #F5EEEC 100%);
}

.next-article .article-card {
    background: linear-gradient(135deg, #F6DBBF 10%, #fdba74 90%);
}

/* 图标样式 */
.yzm-iconfont {
    transition: transform 0.3s ease;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .article-card {
        height: 120px;
    }
    
    .nextarticle-title {
        font-size: 1.1rem;
    }
}    

/* 侧边栏卡片样式 */
.sidebar-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.related-articles {
    list-style: none;
}

.related-articles li {
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

.related-articles li:last-child {
    border-bottom: none;
}

.related-articles a {
    display: flex;
    transition: var(--transition);
}

.related-articles a:hover,
.related-articles a:focus {
    color: var(--primary);
}

.related-img {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
}

.related-title {
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--gray);
}

.author-card {
    text-align: center;
    padding: 10px;
}

.author-avatar {
    max-width: 350px;
    height: auto;
    border-radius: 12px; /* 圆角大小 */
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid var(--light-gray);
    display: inline-block; /* 使容器适应图片 */
}

.author-avatar img {
    max-width: 100%;
    height: auto;
    display: block; /* 消除图片底部间隙 */
}
.author-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.author-title {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.author-bio {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links-horizontal {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* 评论区 */
.comments-section {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 50px;
}

.comments-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 110, 155, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.comment-list {
    list-style: none;
}

.comment-item {
    padding: 25px 0;
    border-bottom: 1px solid var(--light-gray);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 500;
    color: var(--dark);
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--gray);
}

.comment-content {
    line-height: 1.7;
    color: #444;
}

.comment-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.comment-action {
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.comment-action:hover {
    color: var(--primary);
}

.comment-action i {
    margin-right: 5px;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .article-container {
        flex-direction: column;
    }
    
    .article-sidebar {
        width: 100%;
    }
    
    .article-content {
        padding: 25px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-image {
        height: 300px;
    }
    
    .article-body.collapsed {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-image {
        height: 250px;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.3rem;
    }
    
    .article-footer {
        flex-direction: column;

    }
    
    .article-actions {
        width: 100%;
        justify-content: center;
    }
    
    .article-body.collapsed {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 20px 15px;
    }
    
    .article-title {
        font-size: 1.4rem;
    }
    
    .article-image {
        height: 200px;
        margin: 20px 0;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-meta span {
        margin-bottom: 8px;
    }
    
    .article-body.collapsed {
        max-height: 350px;
    }
}