/* 文章详情页样式 */
.article-detail-page {
    background-color: #f5f5f5;
    min-height: 100vh;
}

.article-detail-page .article-page-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 20px !important;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

.article-detail-page .article-main-content {
    width: 100% !important;
    float: none !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.article-detail-page .article-sidebar {
    width: 100% !important;
    float: none !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 面包屑导航 */
.article-detail-page .article-breadcrumb {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-page .breadcrumb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.article-detail-page .breadcrumb-item {
    display: flex;
    align-items: center;
}

.article-detail-page .breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #6c757d;
}

.article-detail-page .breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

.article-detail-page .breadcrumb-item a:hover {
    color: #0056b3;
}

.article-detail-page .breadcrumb-item.active {
    color: #6c757d;
}

/* 文章主体 */
.article-detail-page .article-detail {
    padding: 30px;
}

.article-detail-page .article-header {
    margin-bottom: 30px;
}

.article-detail-page .article-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 20px;
}

.article-detail-page .article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-page .meta-left,
.article-detail-page .meta-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-detail-page .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #6c757d;
}

.article-detail-page .meta-item i {
    font-size: 16px;
    color: #007bff;
}

.article-detail-page .category-tag,
.article-detail-page .city-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 文章摘要 */
.article-detail-page .article-summary {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.article-detail-page .summary-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.article-detail-page .summary-icon i {
    font-size: 20px;
}

.article-detail-page .summary-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
}

.article-detail-page .summary-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* 文章内容 */
.article-detail-page .article-content {
    line-height: 1.8;
    color: #2c3e50;
    font-size: 16px;
}

.article-detail-page .article-content h1,
.article-detail-page .article-content h2,
.article-detail-page .article-content h3,
.article-detail-page .article-content h4,
.article-detail-page .article-content h5,
.article-detail-page .article-content h6 {
    margin: 25px 0 15px 0;
    color: #2c3e50;
    font-weight: 600;
}

.article-detail-page .article-content p {
    margin-bottom: 15px;
}

.article-detail-page .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.article-detail-page .article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

/* 文章标签 */
.article-detail-page .article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.article-detail-page .tags-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.article-detail-page .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-detail-page .tag-item {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.2s;
}

.article-detail-page .tag-item:hover {
    background: #007bff;
    color: white;
}

/* 客服微信提示 */
.article-detail-page .attachment-notice {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.article-detail-page .notice-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.article-detail-page .notice-icon i {
    font-size: 20px;
}

.article-detail-page .notice-content {
    flex: 1;
}

.article-detail-page .notice-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.article-detail-page .notice-content p {
    margin: 0 0 12px 0;
    color: #6c757d;
    line-height: 1.6;
}

.article-detail-page .wechat-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-detail-page .wechat-nickname {
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
}

.article-detail-page .wechat-account {
    color: #007bff;
    font-weight: 600;
    font-size: 16px;
    background: #e3f2fd;
    padding: 4px 12px;
    border-radius: 20px;
}

/* 文章底部 */
.article-detail-page .article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.article-detail-page .article-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.article-detail-page .action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.article-detail-page .action-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.article-detail-page .action-btn i {
    font-size: 16px;
}

/* 右侧边栏 */
.article-detail-page .sidebar-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.article-detail-page .sidebar-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-page .sidebar-title {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-detail-page .sidebar-title i {
    color: #007bff;
    font-size: 18px;
}

/* 栏目导航 */
.article-detail-page .category-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-detail-page .category-nav-item {
    border-bottom: 1px solid #f1f3f4;
}

.article-detail-page .category-nav-item:last-child {
    border-bottom: none;
}

.article-detail-page .category-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
}

.article-detail-page .category-nav-link:hover {
    background: #f8f9fa;
    color: #007bff;
}

.article-detail-page .category-nav-link.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.article-detail-page .category-nav-name {
    flex: 1;
}

.article-detail-page .category-nav-count {
    background: #e9ecef;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* 热门文章 */
.article-detail-page .hot-articles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-detail-page .hot-article-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

.article-detail-page .hot-article-item:hover {
    background: #f8f9fa;
}

.article-detail-page .hot-article-item:last-child {
    border-bottom: none;
}

.article-detail-page .hot-article-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    width: 40px;
}

.article-detail-page .hot-rank {
    width: 24px;
    height: 24px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.article-detail-page .hot-article-item:nth-child(1) .hot-rank {
    background: #ff6b6b;
}

.article-detail-page .hot-article-item:nth-child(2) .hot-rank {
    background: #ffa726;
}

.article-detail-page .hot-article-item:nth-child(3) .hot-rank {
    background: #66bb6a;
}

.article-detail-page .hot-article-item:nth-child(n+4) .hot-rank {
    background: #9e9e9e;
}

.article-detail-page .hot-date {
    font-size: 11px;
    color: #9e9e9e;
    font-weight: 500;
}

.article-detail-page .hot-article-title {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    /* 标题最多两行，超过则隐藏 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.article-detail-page .hot-article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.article-detail-page .hot-article-title a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-detail-page .article-page-wrapper {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 15px;
    }
    
    .article-detail-page .article-sidebar {
        gap: 15px;
    }
    
    .article-detail-page .article-detail {
        padding: 20px;
    }
    
    .article-detail-page .article-title {
        font-size: 24px;
    }
    
    .article-detail-page .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-detail-page .meta-left,
    .article-detail-page .meta-right {
        gap: 15px;
    }
}

/* 在现有CSS基础上修改附件样式 */

/* 附件列表 */
.article-detail-page .article-attachments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.article-detail-page .attachments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.article-detail-page .attachments-header i {
    color: #007bff;
    font-size: 18px;
}

.article-detail-page .attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-detail-page .attachment-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s;
}

.article-detail-page .attachment-item:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.article-detail-page .attachment-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.article-detail-page .attachment-icon i {
    font-size: 20px;
}

.article-detail-page .attachment-info {
    flex: 1;
    min-width: 0;
}

.article-detail-page .attachment-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-detail-page .attachment-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.article-detail-page .attachment-size,
.article-detail-page .attachment-type,
.article-detail-page .attachment-downloads {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-detail-page .attachment-actions {
    flex-shrink: 0;
}

/* 重新设计下载按钮 */
.article-detail-page .attachment-actions .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.article-detail-page .attachment-actions .download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.article-detail-page .attachment-actions .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.article-detail-page .attachment-actions .download-btn:hover::before {
    left: 100%;
}

.article-detail-page .attachment-actions .download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.article-detail-page .attachment-actions .download-btn i {
    font-size: 14px;
    margin: 0;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .article-detail-page .attachment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-detail-page .attachment-actions {
        align-self: stretch;
    }
    
    .article-detail-page .attachment-actions .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .article-detail-page .attachment-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}