/* ==================== 文章详情页样式 ==================== */

/* 文章详情页容器宽度优化 - 移除之前错误的设置 */
.article-detail .article-content {
    max-width: none;
}

.article-detail .article-body,
.article-detail .article-content-text {
    max-width: none;
}

/* 文章详情容器 */
.article-detail {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    min-height: calc(100vh - 400px);
}

/* 文章头部 */
.article-header {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

/* 隐藏分类标签 */
.article-detail .article-header .article-meta {
    display: none;
}

/* 隐藏分类标签后，给标题增加上方间距 */
.article-detail .article-header .article-title {
    margin-top: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-category {
    background-color: rgba(15, 52, 96, 0.08);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

.article-date {
    color: var(--gray-600);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.article-date i {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.article-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
}

.article-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.article-author,
.article-views,
.article-source {
    color: var(--gray-600);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.article-author i,
.article-views i,
.article-source i {
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* 文章内容区域 */
.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.article-content {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.article-body {
    color: var(--gray-800);
    font-size: 1rem;
    line-height: 1.8;
}

.article-summary {
    font-size: 1.0625rem;
    color: var(--gray-700);
    line-height: 1.75;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-top: 1.5rem;
    margin-bottom: 0.875rem;
}

.article-body p {
    margin-bottom: 1.25rem;
    color: var(--gray-800);
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.article-body strong {
    font-weight: 600;
    color: var(--dark-color);
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color var(--transition-normal);
}

.article-body a:hover {
    color: var(--primary-dark);
}

/* 文章底部 */
.article-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.article-tags {
    display: none;
}

.tags-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.article-tags .tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #495057;
    font-size: 0.8125rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    overflow: hidden;
}

.article-tags .tag::before {
    content: '#';
    color: #c9a961;
    font-weight: 600;
}

.article-tags .tag::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(26, 59, 93, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-tags .tag:hover::after {
    opacity: 1;
}

.article-tags .tag:hover {
    color: #1a3b5d;
    border-color: #c9a961;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.share-btn {
    padding: 0.625rem 1.125rem;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.share-btn:hover::before {
    width: 200px;
    height: 200px;
}

.share-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 59, 93, 0.3);
}

.share-btn i {
    position: relative;
    z-index: 1;
}

/* 不同分享按钮的配色 */
.share-wechat {
    background: linear-gradient(135deg, #09bb07 0%, #07a003 100%);
}

.share-wechat:hover {
    background: linear-gradient(135deg, #07a003 0%, #059002 100%);
}

.share-qq {
    background: linear-gradient(135deg, #12b7f5 0%, #0e9dd4 100%);
}

.share-qq:hover {
    background: linear-gradient(135deg, #0e9dd4 0%, #0a8bc2 100%);
}

.share-weibo {
    background: linear-gradient(135deg, #e6162d 0%, #c91223 100%);
}

.share-weibo:hover {
    background: linear-gradient(135deg, #c91223 0%, #b00f1f 100%);
}

.share-copy {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.share-copy:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
}

/* 侧边栏 */
.article-sidebar {
    position: sticky;
    top: 2rem;
}

.article-sidebar .sidebar-section {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.article-sidebar .sidebar-section:last-child {
    margin-bottom: 0;
}

.article-sidebar .sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-sidebar .sidebar-section h3 i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* 最新资讯列表 */
.latest-news {
    list-style: none;
}

.latest-news li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.latest-news li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.latest-news a {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.latest-news a:hover .news-title {
    color: var(--primary-color);
}

.news-title {
    color: var(--gray-800);
    font-size: 0.875rem;
    line-height: 1.5;
    transition: color var(--transition-normal);
}

.news-date {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* 相关分类 */
.related-categories {
    list-style: none;
}

.related-categories li {
    margin-bottom: 0.75rem;
}

.related-categories li:last-child {
    margin-bottom: 0;
}

.related-categories a {
    color: var(--gray-700);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--transition-normal);
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
}

.related-categories a:hover {
    color: var(--primary-color);
    background-color: rgba(15, 52, 96, 0.04);
}

/* 热门标签 */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.popular-tags .tag {
    padding: 0.375rem 0.875rem;
    background-color: var(--bg-secondary);
    color: var(--gray-700);
    font-size: 0.8125rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-300);
    font-weight: 500;
}

.popular-tags .tag:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ==================== 文章内容布局（左侧边栏 + 右侧内容） ==================== */

.article-content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* 左侧边栏 */
.article-content-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* 美化滚动条 */
    scrollbar-width: thin;
    scrollbar-color: #c9a961 #f0f0f0;
}

.article-content-sidebar::-webkit-scrollbar {
    width: 6px;
}

.article-content-sidebar::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.article-content-sidebar::-webkit-scrollbar-thumb {
    background: #c9a961;
    border-radius: 3px;
}

.article-content-sidebar::-webkit-scrollbar-thumb:hover {
    background: #b89647;
}

/* 右侧主要内容 */
.article-content-main {
    min-width: 0;
    /* 移除最大宽度限制，让内容自然占据剩余空间 */
}

/* ==================== 侧边栏区块样式 ==================== */

.content-sidebar-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(201, 169, 97, 0.1);
    position: relative;
    overflow: hidden;
}

.content-sidebar-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #c9a961 0%, #1a3b5d 100%);
    transition: height 0.3s ease;
}

.content-sidebar-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(201, 169, 97, 0.3);
}

.content-sidebar-section:hover::before {
    height: 100%;
}

.content-sidebar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.content-sidebar-title i {
    color: #c9a961;
    font-size: 1rem;
}

/* 侧边栏热门文章列表 */
.content-hot-articles-list,
.content-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.content-sidebar-article-item {
    display: block;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border-left: 3px solid #c9a961;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-sidebar-article-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.1), transparent);
    transition: right 0.5s ease;
}

.content-sidebar-article-item:hover::before {
    right: 100%;
}

.content-sidebar-article-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    transform: translateX(6px);
    border-left-color: #1a3b5d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-sidebar-article-title {
    font-size: 0.875rem;
    color: #2c3e50;
    line-height: 1.5;
    margin-bottom: 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.content-sidebar-article-item:hover .content-sidebar-article-title {
    color: #1a3b5d;
}

.content-sidebar-article-meta {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: #6c757d;
    position: relative;
    z-index: 1;
}

.content-sidebar-article-meta i {
    font-size: 0.75rem;
    color: #c9a961;
}

/* 侧边栏分类列表 */
.content-sidebar-category-item {
    display: block;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 0.625rem;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.content-sidebar-category-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(201, 169, 97, 0.15) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.content-sidebar-category-item:hover::after {
    width: 100%;
}

.content-sidebar-category-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: #1a3b5d;
    transform: translateX(6px);
    border-color: rgba(201, 169, 97, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-sidebar-category-name {
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* 侧边栏咨询框 */
.content-sidebar-cta {
    background: linear-gradient(135deg, #1a3b5d 0%, #2d5573 100%);
    color: #ffffff;
}

.content-sidebar-cta .content-sidebar-title {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.content-sidebar-cta .content-sidebar-title i {
    color: #c9a961;
}

.content-sidebar-cta .cta-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.content-sidebar-cta .cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #c9a961 0%, #b89647 100%);
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
    position: relative;
    overflow: hidden;
}

.content-sidebar-cta .cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.content-sidebar-cta .cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.content-sidebar-cta .cta-button:hover {
    background: linear-gradient(135deg, #b89647 0%, #a68539 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}

.content-sidebar-cta .cta-button i {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
}

.content-sidebar-cta .contact-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.content-sidebar-cta .contact-info p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-sidebar-cta .contact-info i {
    color: #c9a961;
    font-size: 0.875rem;
}

/* ==================== 相关推荐区域 ==================== */

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a3b5d;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-title i {
    color: #c9a961;
    font-size: 1.25rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-article-card {
    display: block;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.75rem;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.related-article-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, rgba(26, 59, 93, 0.03) 0%, rgba(201, 169, 97, 0.03) 100%);
    transition: height 0.3s ease;
}

.related-article-card:hover::after {
    height: 100%;
}

.related-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(201, 169, 97, 0.3);
}

.related-article-card .card-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(201, 169, 97, 0.15) 100%);
    color: #c9a961;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.related-article-card .card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.related-article-card:hover .card-title {
    color: #1a3b5d;
}

.related-article-card .card-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: #6c757d;
    position: relative;
    z-index: 1;
}

.related-article-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.3s ease;
}

.related-article-card:hover .card-meta span {
    color: #495057;
}

.related-article-card .card-meta i {
    font-size: 0.75rem;
    color: #c9a961;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-content-layout {
        grid-template-columns: 1fr;
    }

    .article-content-sidebar {
        position: static;
        order: 2;
        max-height: none;
    }

    .article-content-main {
        order: 1;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .article-detail {
        padding: 1.5rem 0;
    }

    .article-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-info {
        gap: 1rem;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 1.25rem;
    }

    .article-content {
        padding: 1.25rem;
    }

    .article-meta {
        gap: 0.75rem;
    }

    .article-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .article-body {
        font-size: 0.9375rem;
    }
}

/* 加载状态样式 */
.loading-state {
    text-align: center;
    color: #999;
}

/* 错误状态样式 */
.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
}

.error-state-icon {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-state-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.error-state-message {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.error-state-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
}

.error-state-link:hover {
    background-color: var(--primary-dark);
}
