/* 新闻页面样式 */

/* 新闻分类页面容器 */
.news-category-page {
    padding: 0;
}

/* 页面标题 */
.page-title {
    text-align: center;
    margin: 20px 0;
}

.page-title h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-title .breadcrumb {
    font-size: 14px;
    color: #7f8c8d;
}

.page-title .breadcrumb a {
    color: #3b7dd6;
    text-decoration: none;
}

.page-title .breadcrumb a:hover {
    text-decoration: underline;
}

/* 分类导航 - 横向排列 */
.category-nav {
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.category-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav-item a {
    display: block;
    padding: 12px 24px;
    background: #f5f5f5;
    color: #606266;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.category-nav-item a:hover {
    background: #e8f4ff;
    color: #3b7dd6;
}

.category-nav-item a.active {
    background: #3b7dd6;
    color: #fff;
}

/* 新闻列表区域 */
.news-section {
    margin-top: 30px;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: center;
}

/* 新闻卡片 */
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    display: flex;
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.news-card .news-image {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.news-card .news-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-card .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .news-content {
    padding: 10px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-card .news-title {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-card .news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card .news-title a:hover {
    color: #3b7dd6;
}

.news-card .news-date {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.news-card .news-date .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: currentColor;
}

.news-card .news-summary {
    color: #606266;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    min-width: 0;
}

.news-card .btn-view-details {
    display: inline-block;
    padding: 10px 30px;
    background: #3b7dd6;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.news-card .btn-view-details:hover {
    background: #2c5fb8;
}

.news-card .summary {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.8;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #95a5a6;
}

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

/* 新闻详情 */
.news-detail {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.news-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.4;
}

.news-detail .news-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.news-detail .news-image img {
    width: 100%;
    height: auto;
}

.news-summary {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #0066cc;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.news-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-content p {
    margin-bottom: 20px;
}

.news-content h2,
.news-content h3,
.news-content h4 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 25px 0;
    border-radius: 8px;
}

.news-content ul,
.news-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-content li {
    margin-bottom: 10px;
    list-style: inherit;
}

.news-content blockquote {
    margin: 25px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid #ffc107;
    font-style: italic;
}

.news-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.news-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.news-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 标签 */
.news-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.news-tags span {
    margin-right: 10px;
    color: #7f8c8d;
}

.news-tags .tag {
    display: inline-block;
    padding: 5px 12px;
    margin: 5px 5px 5px 0;
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.news-tags .tag:hover {
    background: #ffc107;
    color: #fff;
}

/* 相关新闻 */
.related-news {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.related-news h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.related-news ul li {
    margin-bottom: 12px;
}

.related-news ul li a {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.related-news ul li a:hover {
    background: #e9ecef;
    padding-left: 16px;
}

.related-news .title {
    color: #2c3e50;
}

.related-news .date {
    color: #95a5a6;
    font-size: 13px;
}

/* 分页样式 */
.pagination-box {
    padding: 20px 0;
    text-align: center;
}

/* ThinkPHP 默认分页样式覆盖 */
.pagination-box ul {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-box ul li {
    display: inline-block;
}

.pagination-box ul li a,
.pagination-box ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: none;
    background: #f5f5f5;
    color: #606266;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border-radius: 6px;
}
.pagination-box ul li.pageNum a{
    border-radius: 50%;
}
.pagination-box ul li a:hover {
    background: #e8e8e8;
}

/* 当前页样式 - 蓝色圆形 */
.pagination-box ul li.active span {
    background: #409eff;
    color: #fff;
    border-radius: 50%;
    min-width: 40px;
    width: 40px;
    height: 40px;
}

/* 禁用状态 */
.pagination-box ul li.disabled span,
.pagination-box ul li.disabled a {
    color: #c0c4cc;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination-box ul li.disabled a:hover {
    background: #f5f5f5;
}

/* 总数信息样式 */
.pagination-box ul li .total-info {
    color: #606266;
    border: none;
    background: none;
    padding: 0;
    min-width: auto;
}

/* 前往文字样式 */
.pagination-box ul li .goto-text {
    color: #606266;
    border: none;
    background: none;
    padding: 0;
    min-width: auto;
}

/* 输入框样式 */
.pagination-box ul li.goto-input {
    margin: 0 5px;
}

.pagination-box ul li.goto-input input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #606266;
    outline: none;
    transition: border-color 0.3s ease;
}

.pagination-box ul li.goto-input input:focus {
    border-color: #409eff;
}

.pagination-box ul li.goto-input input::-webkit-inner-spin-button,
.pagination-box ul li.goto-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 24px;
    }

    .category-nav-item a {
        padding: 10px 16px;
        font-size: 13px;
    }

    .news-container {
        padding: 0 15px;
    }

    .news-card {
        flex-direction: column;
    }

    .news-card .news-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }

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

    .news-detail {
        padding: 20px;
    }

    .news-header h1 {
        font-size: 24px;
    }

    .pagination-box {
        padding: 30px 0;
    }

    .pagination-box ul {
        gap: 6px;
        flex-wrap: wrap;
    }

    .pagination-box ul li a,
    .pagination-box ul li span {
        min-width: 36px;
        height: 36px;
        padding: 0 6px;
        font-size: 13px;
    }

    .pagination-box ul li.active span {
        min-width: 36px;
        width: 36px;
        height: 36px;
    }

    .pagination-box ul li.goto-input input {
        width: 45px;
        height: 36px;
        font-size: 13px;
    }
}

