/**
 * 单篇文章详情页样式
 * 基于 blog-how-to-choose-usb-connector.html 设计
 * 
 * @package Connectors
 */

/* ============================================
   文章头部区域
   ============================================ */
.article-header {
    padding: 60px 0 40px;
    text-align: center;
}

.article-header h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 30px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-image {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-summary {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
}

/* ============================================
   目录区域
   ============================================ */
.toc-section {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
    border: 1px solid var(--border);
}

.toc-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-list a:hover {
    color: var(--primary);
}

.toc-list a:before {
    content: "→";
    color: var(--primary);
}

/* ============================================
   文章内容区域
   ============================================ */
.article-content {
    padding: 40px 0;
}

.article-content h2 {
    font-size: 32px;
    margin: 50px 0 20px;
    color: var(--text);
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-size: 24px;
    margin: 40px 0 16px;
    color: var(--text);
}

.article-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.article-content ul,
.article-content ol {
    margin: 20px 0 20px 30px;
    color: #555;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.article-content img {
    margin: 30px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    max-width: 100%;
    height: auto;
}

/* ============================================
   对比表格
   ============================================ */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.comparison-table thead {
    background: var(--secondary);
    color: #ffffff;
}

.comparison-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* ============================================
   产品插入区域
   ============================================ */
.product-insert {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
    margin: 50px 0;
    border: 2px solid var(--primary);
}

.product-insert h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text);
}

.product-insert-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: center;
}

.product-image {
    background: #ffffff;
    border-radius: 8px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-insert-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ============================================
   视觉证明区域
   ============================================ */
.visual-proof {
    margin: 40px 0;
}

.visual-proof h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text);
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.visual-item {
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.visual-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.visual-item-caption {
    padding: 16px;
    font-size: 14px;
    color: #555;
}

/* ============================================
   FAQ 区域
   ============================================ */
.faq-section {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
    margin: 50px 0;
}

.faq-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--text);
}

.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.faq-answer {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* ============================================
   作者信息框
   ============================================ */
.author-box {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    margin: 50px 0;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    flex-shrink: 0;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text);
}

.author-title {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.author-bio {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

.author-links {
    margin-top: 12px;
}

.author-links a {
    font-size: 14px;
    margin-right: 16px;
    color: var(--primary);
    text-decoration: none;
}

.author-links a:hover {
    text-decoration: underline;
}

/* ============================================
   CTA 区域
   ============================================ */
.cta-section {
    background: var(--secondary);
    color: #ffffff;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    margin: 50px 0;
}

.cta-section h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #ffffff;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   相关文章区域
   ============================================ */
.related-section {
    margin: 50px 0;
}

.related-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.related-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.related-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.related-image {
    width: 100%;
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text);
}

.related-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ============================================
   文章导航
   ============================================ */
.post-navigation {
    margin: 50px 0;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.post-navigation__links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation__link {
    flex: 1;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--text);
}

.post-navigation__link:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.post-navigation__link--prev {
    text-align: left;
}

.post-navigation__link--next {
    text-align: right;
}

.post-navigation__subtitle {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.post-navigation__title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 900px) {
    .article-header h1 {
        font-size: 32px;
    }
    
    .product-insert-content {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation__links {
        flex-direction: column;
    }
    
    .post-navigation__link--next {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .comparison-table {
        font-size: 14px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }
    
    .article-content h2 {
        font-size: 24px;
    }
    
    .article-content h3 {
        font-size: 20px;
    }
    
    .cta-section {
        padding: 30px 20px;
    }
}
