/* news-detail.css - 新闻列表和内容页样式 */

/* 通用样式 */
.news-detail-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.breadcrumb {
    padding: 10px 0;
    color: #666;
    font-size: 14px;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.breadcrumb a {
    color: #666;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #1890ff;
}

/* 服务器菜单 */
.server-menu {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.server-menu .wp {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.server-menu a {
    display: inline-block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.server-menu a:hover {
    background: #e6f7ff;
    color: #1890ff;
}
.server-menu a.on {
    background: #1890ff;
    color: #fff;
}

/* 列表页样式 */
.news-list-container {
    margin-top: 20px;
}

.news-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    transition: background-color 0.3s;
}
.news-item:hover {
    background-color: #f9f9f9;
}
.news-link {
    display: flex;
    text-decoration: none;
    color: #333;
}
.news-left {
    width: 120px;
    flex-shrink: 0;
    margin-right: 15px;
}
.news-left img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.news-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-main {
    flex: 1;
    padding-right: 15px;
}
.news-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}
.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.news-meta {
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.meta-year {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}
.meta-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.view-detail {
    display: inline-block;
    background: #1890ff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
    height: 32px;
    line-height: 22px;
    transition: background-color 0.3s;
}
.view-detail:hover {
    background: #096dd9;
}

/* 分页样式 */
.pagination-container {
    margin: 30px 0;
    text-align: center;
}
.fenye {
    display: inline-block;
}
.fenye a,
.fenye span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
}
.fenye a:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}
.fenye span.current {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 内容页样式 */
.content-main {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 新闻标题 */
.news-detail-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* 新闻信息 */
.news-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}
.info-item {
    display: flex;
    align-items: center;
}
.info-item i {
    margin-right: 5px;
    color: #1890ff;
}

/* 摘要 */
.news-detail-abstract {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #1890ff;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 标题图片 */
.news-detail-titlepic {
    margin: 20px 0;
    text-align: center;
}
.news-detail-titlepic img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 新闻正文 */
.news-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    padding: 20px 0;
}
.news-detail-content p {
    margin-bottom: 1.2em;
    text-indent: 2em;
}
.news-detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 4px;
}

/* 上一篇下一篇 */
.news-detail-navigation {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}
.nav-item {
    flex: 1;
}
.nav-prev {
    text-align: left;
    padding-right: 10px;
}
.nav-next {
    text-align: right;
    padding-left: 10px;
}
.nav-label {
    color: #666;
    font-size: 14px;
}

/* 相关推荐 */
.related-news {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}
.related-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1890ff;
}
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}
.related-list li:last-child {
    border-bottom: none;
}
.related-date {
    color: #999;
    font-size: 12px;
    margin-right: 15px;
    min-width: 80px;
}
.related-link {
    color: #333;
    text-decoration: none;
    flex: 1;
}
.related-link:hover {
    color: #1890ff;
}
.no-related {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px !important;
}

/* 评论区域 */
.news-detail-comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.comments-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

/* 侧边栏 */
.sidebar-left {
    width: 280px;
    flex-shrink: 0;
}
.sidebar-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}
.sidebar-title {
    background: #1890ff;
    color: #fff;
    padding: 12px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}
.sidebar-content {
    padding: 15px;
}
.sidebar-content table {
    width: 100%;
    border-collapse: collapse;
}
.sidebar-content td {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.sidebar-content tr:last-child td {
    border-bottom: none;
}
.sidebar-content a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}
.sidebar-content a:hover {
    color: #1890ff;
}
.index {
    color: #1890ff;
    font-weight: bold;
    margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar-left {
        width: 250px;
    }
}
@media (max-width: 992px) {
    .news-detail-wrapper {
        flex-direction: column;
    }
    .sidebar-left {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .news-detail-title {
        font-size: 20px;
    }
    .news-detail-navigation {
        flex-direction: column;
        gap: 15px;
    }
    .nav-prev,
    .nav-next {
        text-align: center;
        padding: 0;
    }
    .news-left {
        width: 100px;
    }
    .news-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .news-meta {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
    }
    .view-detail {
        margin-top: 0;
    }
}

/* 图标样式 */
.icon-time, .icon-eye, .icon-user, .icon-source {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}
.icon-time {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z'%3E%3C/path%3E%3Cpath d='M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z'%3E%3C/path%3E%3C/svg%3E");
}
.icon-eye {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'%3E%3C/path%3E%3C/svg%3E");
}
.icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'%3E%3C/path%3E%3C/svg%3E");
}
.icon-source {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z'%3E%3C/path%3E%3C/svg%3E");
}