/**
 * article.css - 图文详情页样式
 * 深圳助听器官网 - 文章详情页
 * 设计风格：专业、清晰、易读
 */

/* ========== 文章页面布局 ========== */
.article-page {
    padding: 40px 0 80px;
    background: #f5f7fa;
}

.article-page .wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ========== 文章主体内容 ========== */
.article-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    min-width: 0; /* 防止 flex 溢出 */
}

/* 文章头部 */
.article-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 14px;
    color: #95a5a6;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
}

.article-meta .date::before {
    content: "📅";
    margin-right: 6px;
}

.article-meta .views::before {
    content: "👁️";
    margin-right: 6px;
}

.article-meta .author::before {
    content: "✍️";
    margin-right: 6px;
}

/* 特色图片 */
.article-featured-image {
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.article-featured-image:hover img {
    transform: scale(1.02);
}

/* ========== 文章正文 ========== */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #34495e;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 正文排版优化 */
.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 40px 0 20px;
    padding-left: 15px;
    border-left: 4px solid #2a5298;
}

.article-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: #34495e;
    margin: 30px 0 15px;
}

.article-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: #555;
    margin: 25px 0 12px;
}

.article-body p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.article-body a {
    color: #2a5298;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-body a:hover {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
}

.article-body blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid #2a5298;
    border-radius: 8px;
    font-style: italic;
    color: #555;
}

.article-body code {
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: #e74c3c;
}

.article-body pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-body th,
.article-body td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.article-body th {
    background: #2a5298;
    color: #fff;
    font-weight: 600;
}

.article-body tr:hover {
    background: #f9f9f9;
}

/* ========== 文章标签 ========== */
.article-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    font-size: 14px;
}

.article-tags strong {
    color: #2c3e50;
    margin-right: 10px;
}

.article-tags .tag {
    display: inline-block;
    padding: 6px 15px;
    margin: 5px 8px 5px 0;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ========== 分享按钮 ========== */
.article-share {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
}

.article-share strong {
    color: #2c3e50;
    margin-right: 15px;
}

.share-btn {
    display: inline-block;
    padding: 8px 20px;
    margin: 5px 10px 5px 0;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn.wechat {
    background: #07c160;
    color: #fff;
}

.share-btn.weibo {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq {
    background: #12b7f5;
    color: #fff;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ========== 侧边栏 ========== */
.article-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.widget {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a5298;
}

/* 相关文章 */
.related-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.related-item:last-child {
    border-bottom: none;
}

.related-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-thumb:hover img {
    transform: scale(1.1);
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    display: block;
    font-size: 14px;
    color: #34495e;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.3s ease;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title:hover {
    color: #2a5298;
}

.related-date {
    font-size: 12px;
    color: #95a5a6;
}

.no-related {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px 0;
}

/* 联系组件 */
.contact-widget .widget-content p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}

.contact-widget .widget-content strong {
    color: #e74c3c;
    font-size: 18px;
}

.btn-appointment {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-appointment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .article-page .wrapper {
        flex-direction: column;
    }
    
    .article-sidebar {
        width: 100%;
    }
    
    .article-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 40px 0;
    }
    
    .page-banner h1 {
        font-size: 28px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .article-body h2 {
        font-size: 22px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .widget {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .page-banner h1 {
        font-size: 22px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-body h2 {
        font-size: 18px;
    }
    
    .share-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .article-sidebar,
    .article-share,
    .article-tags,
    .page-banner {
        display: none;
    }
    
    .article-content {
        box-shadow: none;
        padding: 0;
    }
    
    .article-body {
        font-size: 12pt;
        line-height: 1.6;
    }
}
