/**
 * Single Post (Article Detail) Styles
 * 文章详情页样式
 * 
 * @package Corporate_Theme
 * @since 1.0.0
 */

/* ==========================================================================
   单篇文章页面样式 - 与新闻列表页完全一致
   ========================================================================== */

/* 强制单栏布局 - 确保所有内容垂直排列 */
.single-news-page,
.single-news-page .site-main,
.single-news-page .archive-content,
.single-news-page .archive-content .container,
.single-news-page .content-area,
.single-news-page .content-area-full-width {
    display: block !important;
    grid-template-columns: none !important;
    flex-direction: column !important;
    grid-template-rows: none !important;
}

/* 确保内容区域全宽显示 - 覆盖其他CSS的限制 */
.single-news-page .content-area,
.single-news-page .content-area-full-width {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    flex: none !important;
}

/* 确保所有直接子元素都是块级元素 */
.single-news-page .content-area > *,
.single-news-page .content-area-full-width > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

/* 面包屑导航 */
.single-news-page .breadcrumb-nav {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.single-news-page .breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-news-page .breadcrumb-nav a:hover {
    color: #ffffff;
}

.single-news-page .breadcrumb-nav .separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.6);
}

.single-news-page .breadcrumb-nav .current {
    color: rgba(255, 255, 255, 0.7);
}

/* Banner 文章元信息 */
.single-news-page .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
}

.single-news-page .article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-news-page .article-meta .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* 文章内容容器 */
.single-news-page .single-article-content {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(25, 118, 210, 0.08);
    margin-bottom: 50px;
}

/* 特色图片 */
.single-news-page .article-featured-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #f5f5f5;
}

.single-news-page .article-featured-image img {
    width: 100% !important;
    height: 500px !important;
    max-width: none !important;
    object-fit: cover !important;
    display: block;
    /* 优化图片渲染质量 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
}

/* 文章正文 */
.single-news-page .article-body {
    padding: 40px;
}

.single-news-page .article-body p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.single-news-page .article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.single-news-page .article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 30px 0 15px;
}

.single-news-page .article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 25px 0 12px;
}

.single-news-page .article-body img {
    width: 100% !important;
    max-width: 900px !important;
    height: 500px !important;
    object-fit: cover !important;
    border-radius: 8px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* 优化图片渲染质量 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
}

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

.single-news-page .article-body li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
}

.single-news-page .article-body blockquote {
    border-left: 4px solid #1976d2;
    padding: 20px 30px;
    margin: 30px 0;
    background: #f5f9fc;
    font-style: italic;
    color: #555;
}

.single-news-page .article-body code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
    color: #d63384;
}

.single-news-page .article-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

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

.single-news-page .article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.single-news-page .article-body table th,
.single-news-page .article-body table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.single-news-page .article-body table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* 文章底部 */
.single-news-page .article-footer {
    padding: 30px 40px;
    border-top: 1px solid #e0e0e0;
    background: #fafbfc;
}

/* 标签 */
.single-news-page .article-tags {
    margin-bottom: 30px;
}

.single-news-page .article-tags .tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.single-news-page .article-tags .tags-label .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #1976d2;
}

.single-news-page .article-tags .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-news-page .article-tags .tag-item {
    display: inline-block;
    padding: 6px 16px;
    background: #ffffff;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.single-news-page .article-tags .tag-item:hover {
    background: #1976d2;
    color: #ffffff;
    border-color: #1976d2;
}

/* 社交分享 */
.single-news-page .article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.single-news-page .article-share .share-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #666;
}

.single-news-page .article-share .share-label .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #1976d2;
}

.single-news-page .article-share .share-buttons {
    display: flex;
    gap: 10px;
}

.single-news-page .article-share .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-news-page .article-share .share-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.single-news-page .article-share .share-btn.facebook {
    background: #1877f2;
    color: #ffffff;
}

.single-news-page .article-share .share-btn.facebook:hover {
    background: #145dbf;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.single-news-page .article-share .share-btn.twitter {
    background: #1da1f2;
    color: #ffffff;
}

.single-news-page .article-share .share-btn.twitter:hover {
    background: #0c85d0;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.single-news-page .article-share .share-btn.linkedin {
    background: #0077b5;
    color: #ffffff;
}

.single-news-page .article-share .share-btn.linkedin:hover {
    background: #005885;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

/* 相关文章 */
.single-news-page .related-articles {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid #e0e0e0;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    display: block !important;
}

.single-news-page .related-articles .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
}

/* 强制相关文章网格为3列布局 - 覆盖其他样式 */
.single-news-page .related-articles .news-grid-archive {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 推荐产品区域 */
.single-news-page .recommended-products {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid #e0e0e0;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    display: block !important;
}

.single-news-page .recommended-products .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
}

.single-news-page .recommended-products .products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 评论区域 - 已移除，由推荐产品替代 */
.single-news-page .comments-wrapper {
    margin-top: 60px;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(25, 118, 210, 0.08);
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    display: block !important;
    grid-column: 1 / -1 !important; /* 如果在grid容器中，占据所有列 */
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

/* 平板 */
@media (max-width: 768px) {
    .single-news-page .article-body {
        padding: 30px 20px;
    }
    
    .single-news-page .article-body p,
    .single-news-page .article-body li {
        font-size: 1rem;
    }
    
    .single-news-page .article-body h2 {
        font-size: 1.5rem;
    }
    
    .single-news-page .article-body h3 {
        font-size: 1.25rem;
    }
    
    .single-news-page .article-footer {
        padding: 24px 20px;
    }
    
    .single-news-page .article-meta {
        gap: 12px;
        font-size: 0.875rem;
    }
    
    .single-news-page .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 相关文章 - 平板端改为2列 */
    .single-news-page .related-articles .news-grid-archive {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    
    /* 推荐产品 - 平板端改为2列 */
    .single-news-page .recommended-products .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    
    .single-news-page .comments-wrapper {
        padding: 30px 20px;
    }
}

/* 手机 */
@media (max-width: 480px) {
    .single-news-page .article-body {
        padding: 24px 16px;
    }
    
    .single-news-page .article-body p,
    .single-news-page .article-body li {
        font-size: 0.9375rem;
    }
    
    .single-news-page .article-body h2 {
        font-size: 1.375rem;
        margin: 30px 0 16px;
    }
    
    .single-news-page .article-body h3 {
        font-size: 1.125rem;
        margin: 24px 0 12px;
    }
    
    .single-news-page .article-footer {
        padding: 20px 16px;
    }
    
    .single-news-page .article-tags .tags-list {
        gap: 8px;
    }
    
    .single-news-page .article-tags .tag-item {
        padding: 5px 12px;
        font-size: 0.8125rem;
    }
    
    .single-news-page .article-share .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .single-news-page .article-share .share-btn .dashicons {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
    
    /* 相关文章 - 手机端改为单列 */
    .single-news-page .related-articles .news-grid-archive {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* 推荐产品 - 手机端改为单列 */
    .single-news-page .recommended-products .products-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .single-news-page .comments-wrapper {
        padding: 24px 16px;
    }
}
