/* ====== 内容页面专用样式 ====== */
/* content.css - 专用于文章详情页面 */

/* ====== 文章标题区域 ====== */

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-title {
    color: #1e5799;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: center;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 24px;
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .article-title {
        font-size: 20px;
    }
}

/* ====== 文章元信息 ====== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    color: #666;
    font-size: 14px;
    padding: 10px 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-style: normal;
    color: #1e5799;
    font-weight: 500;
}

@media (max-width: 768px) {
    .article-meta {
        gap: 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .article-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}

/* ====== 文章摘要 ====== */
.article-abstract {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid #1e5799;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.article-abstract p {
    margin: 0;
    color: #444;
    font-size: 16px;
    line-height: 1.7;
}

.article-abstract strong {
    color: #1e5799;
    font-weight: 600;
}

@media (max-width: 768px) {
    .article-abstract {
        padding: 15px;
        margin: 20px 0;
    }
    
    .article-abstract p {
        font-size: 15px;
    }
}

/* ====== 文章主图 ====== */
.article-main-image {
    margin: 30px 0;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.article-main-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.image-caption {
    padding: 12px 15px;
    background: #f8f9fa;
    color: #666;
    font-size: 14px;
    text-align: center;
    margin: 0;
    border-top: 1px solid #eee;
}

/* ====== 文章正文内容 ====== */
.article-body {
    padding: 20px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

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

.article-body h2,
.article-body h3,
.article-body h4 {
    color: #1e5799;
    margin: 30px 0 15px;
    font-weight: 600;
}

.article-body h2 {
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.article-body h3 {
    font-size: 20px;
    padding-left: 15px;
    border-left: 4px solid #1e5799;
}

.article-body h4 {
    font-size: 18px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.article-body img:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

.article-body li {
    margin-bottom: 10px;
}

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

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

.article-body th {
    background: #1e5799;
    color: white;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
}

.article-body td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.article-body tr:hover {
    background: rgba(30, 87, 153, 0.05);
}

/* ====== 文章标签 ====== */
.article-tags {
    margin: 40px 0 30px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-label {
    color: #666;
    font-weight: 600;
    font-size: 15px;
}

.tag-item {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(30, 87, 153, 0.1);
    color: #1e5799;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #1e5799;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 87, 153, 0.3);
    text-decoration: none;
}

/* ====== 上一篇下一篇导航 ====== */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous span,
.nav-next span {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-previous a,
.nav-next a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    line-height: 1.5;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #1e5799;
    text-decoration: none;
}

.nav-previous {
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.nav-next {
    padding-left: 20px;
    text-align: right;
}

@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .nav-previous,
    .nav-next {
        padding: 0;
        border: none;
        text-align: left;
    }
    
    .nav-next {
        text-align: left;
    }
}

/* ====== 相关推荐（正文下方） ====== */
.article-recommendations {
    margin: 50px 0 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.article-recommendations .recommend-header {
    padding: 10px 10px;
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    color: white;
}

.article-recommendations .recommend-header h3 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-recommendations .recommend-header h3::before {
    content: '📌';
    font-size: 20px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px;
}

@media (max-width: 992px) {
    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recommend-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

.recommend-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #1e5799;
}

.recommend-card-img {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.recommend-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recommend-card:hover .recommend-card-img img {
    transform: scale(1.1);
}

.recommend-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0.8;
}

.recommend-card-category {
    background: rgba(30, 87, 153, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.recommend-card-content {
    padding: 20px;
}

.recommend-card-title {
    margin: 0 0 10px 0;
}

.recommend-card-title a {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-card:hover .recommend-card-title a {
    color: #1e5799;
}

.recommend-card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.recommend-card-date,
.recommend-card-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ====== 图片查看器样式 ====== */
.image-overlay {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====== 侧边栏样式覆盖 ====== */
.content-page .sidebar-gallery {
    margin-bottom: 25px;
}

.content-page .sidebar-recommend .recommend-list.simple .recommend-item {
    padding: 12px 20px;
}

.content-page .sidebar-recommend .recommend-list.simple .recommend-item:hover {
    padding-left: 25px;
}

/* ====== 响应式调整 ====== */
@media (max-width: 768px) {
    .article-body {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 20px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-body ul,
    .article-body ol {
        margin-left: 20px;
    }
    
    .article-tags {
        padding: 15px 0;
    }
    
    .tag-item {
        padding: 5px 12px;
        font-size: 13px;
    }
    
    .article-recommendations .recommend-header {
        padding: 20px;
    }
    
    .article-recommendations .recommend-header h3 {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .article-body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .article-body p {
        margin-bottom: 15px;
    }
    
    .article-body h2 {
        font-size: 18px;
    }
    
    .article-body h3 {
        font-size: 16px;
    }
    
    .article-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tags-label {
        margin-bottom: 5px;
    }
}

/* ====== 打印样式 ====== */
@media print {
    .article-header,
    .article-abstract,
    .article-body {
        break-inside: avoid;
    }
    
    .article-body h2,
    .article-body h3 {
        break-after: avoid;
    }
    
    .article-body img {
        max-width: 80% !important;
    }
    
    .sidebar-gallery,
    .article-recommendations,
    #back-to-top {
        display: none;
    }
}
/* ====== 修复相关链接样式 ====== */
.article-recommendations .recommend-list {
    padding: 0 0px 10px;
}

/* 针对可能的结构1：直接包含链接文本 */
.article-recommendations .recommend-list,
.article-recommendations .recommend-list * {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

/* 为每个列表项添加样式 */
.article-recommendations .recommend-list > * {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    padding-left: 25px;
    transition: all 0.3s ease;
}

.article-recommendations .recommend-list > *:hover {
    border-left: 3px solid #1e5799;
    background-color: rgba(30, 87, 153, 0.03);
    padding-left: 32px;
}

/* 添加圆点 */
.article-recommendations .recommend-list > *::before {
    content: '•';
    position: absolute;
    left: 10px;
    color: #aaa;
    font-size: 18px;
    line-height: 1;
}

.article-recommendations .recommend-list > *:hover::before {
    color: #1e5799;
    left: 17px;
}

/* 前三项特殊颜色 */
.article-recommendations .recommend-list > *:nth-child(1)::before {
    color: #ff6b6b;
}

.article-recommendations .recommend-list > *:nth-child(2)::before {
    color: #ffa726;
}

.article-recommendations .recommend-list > *:nth-child(3)::before {
    color: #66bb6a;
}

/* 链接样式 */
.article-recommendations .recommend-list a {
    color: #333;
    text-decoration: none;
    display: inline;
}

.article-recommendations .recommend-list a:hover {
    color: #1e5799;
    text-decoration: underline;
}

/* 日期样式 */
.article-recommendations .recommend-list .date {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
    font-style: normal;
    padding-left: 0;
}

.article-recommendations .recommend-list > *:hover .date {
    padding-left: 7px;
}
