/* 新闻列表页样式 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --accent-color: #ff6b6b;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --bg-dark: #1a1a2e;
    --bg-card: #232342;
    --bg-hover: #2a2a4a;
    --border-color: #3a3a5a;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --card-bg: #232342;
    --text-light: #e0e0e0;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    padding: 30px 0;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 14px;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.breadcrumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.breadcrumb-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 10px;
    background-color: var(--bg-hover);
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-label i {
    color: var(--primary-color);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 8px;
    border-radius: 4px;
    position: relative;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    background-color: var(--bg-hover);
}

.breadcrumb a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    animation: breadcrumbUnderline 0.3s ease forwards;
}

@keyframes breadcrumbUnderline {
    to {
        width: 80%;
        left: 10%;
    }
}

.breadcrumb i {
    margin: 0 6px;
    font-size: 12px;
    color: var(--accent-color);
    opacity: 0.8;
}

.current-page {
    color: var(--primary-color);
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 4px;
    background-color: rgba(74, 108, 247, 0.1);
}

/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.news-list-container {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* 页面标题 */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-item {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.news-image {
    width: 280px;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.news-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: var(--primary-color);
    opacity: 0.8;
}

.meta-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: var(--primary-color);
}

.news-summary {
    flex: 1;
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 4px;
}

.read-more:hover {
    background-color: rgba(74, 108, 247, 0.1);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 分页包装器 */
.pagination-wrapper {
    margin-top: 40px;
    padding: 20px 0;
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    padding: 0 20px;
}

/* PbootCMS分页兼容样式 */
.pagination .page-num, 
.pagination .page-index, 
.pagination .page-pre, 
.pagination .page-next, 
.pagination .page-last {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pagination .page-num::before, 
.pagination .page-index::before, 
.pagination .page-pre::before, 
.pagination .page-next::before, 
.pagination .page-last::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.6s ease;
}

.pagination .page-num:hover::before, 
.pagination .page-index:hover::before, 
.pagination .page-pre:hover::before, 
.pagination .page-next:hover::before, 
.pagination .page-last:hover::before {
    left: 100%;
}

.pagination .page-num:hover, 
.pagination .page-index:hover, 
.pagination .page-pre:hover, 
.pagination .page-next:hover, 
.pagination .page-last:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(74, 108, 247, 0.3);
}

.pagination .page-num-current {
    background: linear-gradient(135deg, var(--primary-color), #7a6cf7);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 5px 12px rgba(74, 108, 247, 0.3);
    font-weight: 600;
}

/* 首页和末页按钮 */
.pagination .page-index,
.pagination .page-last {
    padding: 0 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 上一页和下一页按钮 */
.pagination .page-pre,
.pagination .page-next {
    padding: 0 15px;
}

.pagination .page-pre::after,
.pagination .page-next::after {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    margin: 0 5px;
}

.pagination .page-pre::after {
    content: '\f104';
    margin-right: 0;
    margin-left: 5px;
}

.pagination .page-next::after {
    content: '\f105';
    margin-left: 0;
    margin-right: 5px;
}

/* 状态信息美化 */
.pagination .page-status {
    display: inline-block;
    margin: 0 10px;
    color: var(--text-muted);
    font-size: 14px;
    background-color: var(--bg-card);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

/* 确保PBoot分页符合样式 */
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PBoot分页样式在小屏幕上的调整 */
@media (max-width: 768px) {
    .pagination-wrapper {
        margin-top: 30px;
        padding: 15px 0;
        border-radius: 8px;
    }

    .pagination {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 15px;
    }

    .pagination .page-num,
    .pagination .page-index,
    .pagination .page-pre,
    .pagination .page-next,
    .pagination .page-last,
    .pagination span {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
        padding: 0 6px;
    }

    .pagination .page-status {
        width: 100%;
        text-align: center;
        margin: 15px 0 0 0;
        padding: 8px 12px;
        font-size: 13px;
        order: 10;
        border-radius: 6px;
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
    }

    .pagination .page-pre,
    .pagination .page-next {
        padding: 0 12px;
        font-weight: 600;
    }

    /* 隐藏过多的页码数字，只显示关键的 */
    .pagination .page-num:nth-child(n+8) {
        display: none;
    }
}

@media (max-width: 576px) {
    .pagination-wrapper {
        margin-top: 25px;
        padding: 12px 0;
        border-radius: 6px;
    }

    .pagination {
        gap: 3px;
        padding: 0 10px;
    }

    .pagination .page-num,
    .pagination .page-index,
    .pagination .page-pre,
    .pagination .page-next,
    .pagination .page-last,
    .pagination span {
        min-width: 34px;
        height: 34px;
        font-size: 12px;
        padding: 0 4px;
    }

    .pagination .page-pre,
    .pagination .page-next {
        padding: 0 8px;
    }

    /* 在极小屏幕上进一步限制显示的页码数量 */
    .pagination .page-num:nth-child(n+6) {
        display: none;
    }

    /* 简化按钮文字 */
    .pagination .page-index::after {
        content: '首';
    }
    .pagination .page-last::after {
        content: '末';
    }
    .pagination .page-index,
    .pagination .page-last {
        font-size: 0;
        padding: 0 8px;
    }

    /* 移动端触摸优化 */
    .pagination .page-num,
    .pagination .page-index,
    .pagination .page-pre,
    .pagination .page-next,
    .pagination .page-last {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* 移动端活跃状态 */
    .pagination .page-num:active,
    .pagination .page-index:active,
    .pagination .page-pre:active,
    .pagination .page-next:active,
    .pagination .page-last:active {
        transform: scale(0.95);
        background-color: var(--primary-color);
        color: white;
    }
}

/* 右侧边栏 */
.sidebar-widget {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.widget-title i {
    color: var(--primary-color);
}

/* 热门文章 */
.hot-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hot-article-item {
    display: flex;
    gap: 12px;
}

.hot-article-image {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.hot-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hot-article-item:hover .hot-article-image img {
    transform: scale(1.1);
}

.hot-article-info {
    flex: 1;
    min-width: 0;
}

.hot-article-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hot-article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hot-article-title a:hover {
    color: var(--primary-color);
}

.hot-article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.hot-article-meta i {
    color: var(--primary-color);
    opacity: 0.7;
    margin-right: 3px;
}

/* 图片懒加载样式 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: var(--bg-hover);
}

.lazy-image.loaded {
    opacity: 1;
}

/* 侧边栏响应式 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .hot-article-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 12px;
        margin-bottom: 20px;
        font-size: 12px;
    }

    .breadcrumb-label {
        padding: 4px 8px;
        margin-right: 6px;
        margin-bottom: 5px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

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

    .news-image {
        width: 100%;
        height: 180px;
    }

    .news-title {
        font-size: 18px;
    }

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

@media (max-width: 576px) {
    .news-meta {
        flex-direction: column;
        gap: 5px;
    }

    .news-image {
        height: 160px;
    }
}

