/**
news 通用样式（增加news-前缀，避免跨模块冲突）
 */
/* 统一命名规范：所有news相关类名增加news-前缀 */

.nav-item-highlight {
    border-radius: 50% !important;
    border-color: black !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(173, 216, 230, 0.8);
    margin: 0 auto; /* 确保在父容器中居中 */
    padding: 0 !important; /* 移除可能的内边距 */
}

/* 【修改点 2】提高图标和文字的优先级，覆盖 Bootstrap 的 text-white */
.nav-item-highlight > i,
.nav-item-highlight > span {
    font-weight: bold;
    margin: 0; /* 重置 margin */
}

/* 修正图标间距，只在非高亮或特定情况下需要，高亮时由 flex 居中控制 */
.nav-item-normal i {
    margin-bottom: 4px;
}


/**
news detail 专属样式
 */
/* 间距样式：语义化命名，替换无意义的.gap-4 */
.news-detail-gap {
    margin: 100px 20px;
}

/* 相关推荐卡片：优化样式一致性+响应式 */
.news-related-card {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 10px;
    margin-bottom: 8px; /* 增加底部间距，提升可读性 */
    transition: background-color 0.2s ease; /* 新增hover效果 */
}
.news-related-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
/* 新增hover效果，提升交互 */
.news-related-card:hover {
    background-color: #f8f9fa;
}

/* 时间和浏览量信息栏样式 */
.news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}
.news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6c757d;
}
.news-meta-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/**
news home 专属样式
 */
/* 卡片样式：保留原有属性，增加前缀避免冲突 */
.news-content-card {
    border: 1px solid #eee;
    padding: 10px;
    height: 100%;
    border-radius: 8px; /* 新增圆角，和其他卡片风格统一 */
    transition: box-shadow 0.2s ease; /* 新增hover阴影 */
}
.news-content-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.news-content-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: #f5f5f5; /* 占位背景 */
    border-radius: 4px; /* 新增图片圆角 */
}
.news-content-card-text {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 新增文字省略，避免溢出 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/**
news list 专属样式
 */
/* 结果列表样式：补充flex布局，完善样式 */
.news-result-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex; /* 新增：横向布局 */
    align-items: center; /* 新增：垂直居中 */
    gap: 15px; /* 新增：图文间距 */
}
.news-result-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
}
/* 结果文本容器：新增，避免文字溢出 */
.news-result-text {
    flex: 1;
    min-width: 0; /* 解决flex子元素文字溢出问题 */
}


/* 重置列表默认样式 - 核心修复：清除小黑点 */
.news-pagination-bar .news-pagination {
    list-style: none; /* 清除列表默认的小黑点 */
    padding-left: 0;  /* 清除列表默认的左内边距 */
    margin: 0;        /* 清除列表默认外边距 */
    gap: var(--spacing-md, 12px); /* 保留增大后的间距 */
    padding: 20px 0px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* 分页按钮基础样式 - 保留原有白底蓝字样式 */
.news-pagination-bar .news-page-link {
    border-radius: 50% !important;
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gray-2, #dee2e6);
    color: #007bff !important; /* 强制蓝字，确保优先级 */
    font-size: 0.9rem;
    transition: all var(--transition-base, 0.2s) ease;
    outline: none;
    background-color: #ffffff !important; /* 强制白底，避免被覆盖 */
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

/* 焦点样式 - 适配蓝色主题 */
.news-pagination-bar .news-page-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3); /* 增强焦点阴影对比度 */
    z-index: 1;
}

/* 核心：选中页样式 - 强化蓝底白字，提升权重 */
.news-pagination-bar .news-page-item.active .news-page-link,
.news-pagination-bar .pagination > .active > .news-page-link { /* 兼容Bootstrap原生结构 */
    background-color: #007bff !important; /* 强制蓝底 */
    border-color: #007bff !important;     /* 边框同步蓝色 */
    color: #ffffff !important;           /* 强制白字 */
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2); /* 优化阴影效果 */
}

/* 禁用状态 - 保持风格统一 */
.news-pagination-bar .news-page-item.disabled .news-page-link {
    color: #6c757d !important; /* 强制禁用色，避免继承 */
    background-color: #f8f9fa !important;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

/* 悬浮状态（非禁用） - 优化蓝色交互 */
.news-pagination-bar .news-page-link:hover:not(.disabled) {
    background-color: #e8f4f8; /* 浅蓝背景，增强交互感 */
    border-color: #007bff;
    color: #0056b3 !important; /* 深一点的蓝色，提升层次感 */
    transform: translateY(-1px);
}

/* 分页箭头适配 */
.news-pagination-bar .news-page-link:first-child,
.news-pagination-bar .news-page-link:last-child {
    font-size: 0.8rem;
    padding: 0;
    line-height: 1;
}






/* 响应式适配：小屏幕优化 - 同步增大间距 */
@media (max-width: 576px) {
    .news-pagination-bar .news-page-link {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.8rem;
    }

    .news-pagination-bar .news-pagination {
        gap: var(--spacing-md, 12px); /* 小屏幕间距从4px提升到12px */
        padding: 15px 0;
    }


    .news-result-item {
        flex-direction: column; /* 小屏幕竖向布局 */
        align-items: flex-start;
        gap: 10px;
    }



    .news-meta {
        gap: 10px;
        padding: 8px 0;
    }
    .news-meta-item {
        font-size: 13px;
    }
}