/* 文章詳情頁專屬樣式 - 不包含基礎樣式，使用統一的 header/footer */

/* Main 區域 */
.main {
    padding: 2rem 0;
    background: #f5f7fa;
}

/* 容器優化 - 與其他頁面一致 */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 900px) 320px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 面包屑優化 */
.breadcrumb {
    background: white;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.95rem;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: #999;
    font-size: 1.1rem;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumb li:last-child {
    color: #666;
    font-weight: 500;
}

/* 文章詳情卡片優化 */
.article-detail {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* 文章頭部優化 */
.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f5f5f5;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #666;
    align-items: center;
}

.article-meta .category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.article-meta .category a {
    color: white;
    text-decoration: none;
}

.article-meta .date,
.article-meta .updated,
.article-meta .views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 文章標題優化 */
.article-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #1a1a1a;
    margin: 1.5rem 0;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* 文章摘要優化 */
.article-excerpt {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

/* 作者信息 */
.article-author {
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-label {
    font-weight: 500;
}

.author-name {
    color: #667eea;
}

/* 封面圖片優化 */
.article-cover {
    margin: 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.article-cover:hover img {
    transform: scale(1.02);
}

/* 文章內容優化 - 最重要的部分 */
.article-body {
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
    margin: 2.5rem 0;
    letter-spacing: 0.01em;
}

.article-body h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin: 3rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
    font-weight: 700;
    line-height: 1.4;
}

.article-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-body h3 {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin: 2rem 0 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0 2rem 2rem;
    line-height: 2;
}

.article-body li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.article-body ul li {
    list-style-type: disc;
}

.article-body ol li {
    list-style-type: decimal;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-body blockquote {
    border-left: 4px solid #667eea;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
    border-radius: 8px;
    font-size: 1.05rem;
}

.article-body a {
    color: #667eea;
    text-decoration: underline;
    text-decoration-color: rgba(102, 126, 234, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s;
}

.article-body a:hover {
    color: #764ba2;
    text-decoration-color: #764ba2;
}

.article-body code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95em;
    color: #e83e8c;
}

.article-body pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* 標籤區域 */
.article-tags {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.tag-label {
    font-weight: 500;
    color: #666;
    margin-right: 0.5rem;
}

.article-tags .tag {
    display: inline-block;
    background: #e8f4fd;
    color: #667eea;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    margin: 0.3rem;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.article-tags .tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* 分享按鈕優化 */
.article-share {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
}

.article-share h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #333;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.line {
    background: #00b900;
}

.share-btn.copy {
    background: #6c757d;
}

/* 文章導航優化 */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
}

.nav-link.prev {
    text-align: left;
}

.nav-link.next {
    text-align: right;
}

.nav-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-link:hover .nav-label {
    color: #667eea;
}

.nav-title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
}

/* 側邊欄優化 */
.article-sidebar {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}

.article-sidebar::-webkit-scrollbar {
    width: 6px;
}

.article-sidebar::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.article-sidebar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.sidebar-widget {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* 目錄優化 */
.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 0.6rem;
}

.toc-item a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
    line-height: 1.5;
}

.toc-item a:hover {
    color: #667eea;
    background: #f8f9fa;
    padding-left: 1.2rem;
}

.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.toc-h3 a {
    color: #777;
}

.no-toc {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* 相關文章和熱門文章 */
.related-articles,
.popular-articles {
    list-style: none;
}

.related-articles li,
.popular-articles li {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #f0f0f0;
}

.related-articles li:last-child,
.popular-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-articles a,
.popular-articles a {
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.2s;
}

.related-articles a:hover,
.popular-articles a:hover {
    color: #667eea;
}

.views-count {
    font-size: 0.85rem;
    color: #999;
}

.no-related {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
}

.cta-widget h3 {
    color: white;
}

.cta-widget p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* FAQ 區域 */
.article-faq {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.article-faq h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
    font-weight: 700;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    padding: 1.8rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.faq-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(5px);
}

.faq-item h3 {
    font-size: 1.15rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 600;
}

.faq-item p {
    color: #555;
    line-height: 1.8;
    margin: 0;
}

.faq-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* 免責聲明 */
.article-disclaimer {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    padding: 2rem;
    border-radius: 16px;
    margin: 3rem 0;
}

.article-disclaimer h3 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.article-disclaimer p {
    color: #856404;
    line-height: 1.8;
    margin: 0;
    font-size: 1.05rem;
}

/* 響應式設計 - 文章詳情頁專屬 */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
    
    .article-detail {
        padding: 2.5rem;
    }
}

@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .article-detail {
        padding: 2rem;
    }
    
    .article-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
    }
    
    .article-body {
        font-size: 1.05rem;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-detail {
        padding: 1.5rem;
    }
    
    .article-body {
        font-size: 1rem;
        line-height: 1.9;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.25rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        padding: 1rem;
    }
    
    .breadcrumb ol {
        font-size: 0.85rem;
    }
    
    .article-detail {
        padding: 1.2rem;
    }
    
    .article-meta {
        font-size: 0.85rem;
        gap: 0.8rem;
    }
    
    .article-faq,
    .article-disclaimer {
        padding: 1.5rem;
    }
}

/* 工具列表样式 */
.tools-widget .tools-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tools-widget .tools-list li {
    margin-bottom: 0.8rem;
}

.tools-widget .tools-list li:last-child {
    margin-bottom: 0;
}

.tools-widget .tools-list a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tools-widget .tools-list a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.tools-widget .tool-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.tools-widget .tool-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.view-all-tools {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.6rem;
    background: #f8f9fa;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.view-all-tools:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}


/* 工具對比按鈕樣式 */
.compare-tools-btn {
    display: block;
    text-align: center;
    margin-top: 0.8rem;
    padding: 0.6rem;
    background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.compare-tools-btn:hover {
    background: linear-gradient(135deg, #6c5ce7, #4a6cf7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,108,247,0.3);
}


/* 響應式設計 - 文章詳情頁專屬 */
