/* 文章頁面樣式 */
.article-content {
    max-width: 800px;
    margin: 40px auto;
    padding: clamp(20px, 4vw, 40px);
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* 返回連結 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: clamp(14px, 2.5vw, 16px);
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

/* 文章頭部 */
.article-header {
    margin-bottom: 30px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: clamp(12px, 2vw, 14px);
}

.article-category {
    color: var(--primary-color);
    font-weight: 500;
}

.article-date {
    color: var(--text-color);
    opacity: 0.6;
}

.article-title {
    font-size: clamp(24px, 5vw, 32px);
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 15px;
}

.article-author {
    font-size: clamp(14px, 2.5vw, 16px);
    color: var(--text-color);
    opacity: 0.8;
}

/* 文章封面圖 */
.article-cover {
    margin: 30px -40px;
}

.article-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 文章內容 */
.article-body {
    font-size: clamp(16px, 2.5vw, 18px);
    line-height: 1.8;
    color: var(--text-color);
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-size: clamp(20px, 4vw, 24px);
    margin: 2em 0 1em;
    color: var(--text-color);
}

.article-body h3 {
    font-size: clamp(18px, 3.5vw, 20px);
    margin: 1.5em 0 1em;
    color: var(--text-color);
}

/* 文章頁尾 */
.article-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.article-tags {
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 8px 8px 0;
    background: var(--background-color);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.share-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.share-link:hover {
    color: var(--hover-color);
}

/* 響應式調整 */
@media (max-width: 768px) {
    .article-content {
        margin: 20px auto;
        padding: 20px;
    }

    .article-cover {
        margin: 20px -20px;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 15px;
    }

    .article-cover {
        margin: 15px -15px;
    }

    .article-share {
        flex-wrap: wrap;
    }
}

.article-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.article-navigation a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: white;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.article-navigation a:hover {
    background-color: var(--secondary-color);
    color: white;
}

.article-navigation a span {
    display: flex;
    flex-direction: column;
}

.article-navigation a small {
    font-size: 0.875rem;
    opacity: 0.8;
}

.article-navigation a strong {
    font-size: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.4em;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .article-navigation {
        flex-direction: column;
    }
    
    .article-navigation a {
        max-width: 100%;
    }
} 