/* 文章页面样式 */
.post-main {
    padding: 2rem 0;
    background-color: var(--bg-color);
}

/* 文章头部 */
.post-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.post-header .container {
    max-width: 800px;
    margin: 0 auto;
}

.post-meta {
    margin-bottom: 1rem;
}

.post-category {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.post-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.post-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    line-height: 1.3;
}

.post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.post-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.author-info {
    text-align: left;
}

.author-name {
    display: block;
    font-weight: bold;
}

.author-title {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 文章内容 */
.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.post-featured-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.content-wrapper {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content-wrapper h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
}

.content-wrapper p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.content-wrapper ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* FAQ部分 */
.faq-section {
    margin: 2rem 0;
}

.faq-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-color);
}

/* 分享部分 */
.post-share {
    text-align: center;
    margin: 3rem 0;
}

.post-share h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-button {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button.wechat {
    background-color: #07C160;
}

.share-button.weibo {
    background-color: #E6162D;
}

.share-button.qq {
    background-color: #12B7F5;
}

/* 相关文章 */
.related-posts {
    margin: 3rem 0;
}

.related-posts h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-image {
    position: relative;
    padding-top: 60%;
}

.post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-category {
    color: var(--primary-color);
}

.post-date {
    color: #666;
}

.post-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.post-content h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.post-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* 订阅部分 */
.subscribe-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.subscribe-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.subscribe-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
}

.subscribe-form button {
    padding: 1rem 2rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.subscribe-form button:hover {
    transform: translateY(-2px);
}

.subscribe-message {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* RTL支持 */
[dir="rtl"] .post-author {
    flex-direction: row-reverse;
}

[dir="rtl"] .author-info {
    text-align: right;
}

[dir="rtl"] .post-author img {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .content-wrapper ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-header {
        padding: 3rem 0;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .content-wrapper {
        padding: 1.5rem;
    }

    .content-wrapper h2 {
        font-size: 1.5rem;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form button {
        width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* 打印样式 */
@media print {
    .post-header {
        background: none;
        color: black;
        padding: 0;
    }

    .post-share,
    .related-posts,
    .subscribe-section {
        display: none;
    }

    .content-wrapper {
        box-shadow: none;
        padding: 0;
    }

    .post-featured-image {
        max-width: 500px;
        margin: 0 auto 2rem;
    }
}

/* 阅读进度条 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* 目录样式 */
.table-of-contents {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.table-of-contents h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

/* 订阅消息样式 */
.subscribe-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 4px;
    text-align: center;
}

.subscribe-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.subscribe-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.subscribe-message.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
} 