/* 山城标讯 - 专业政府采购信息平台样式 */

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    padding: 30px 0 40px;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-top: 10px;
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
    line-height: 1.4;
}

.hero-description {
    font-size: 13px;
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.5;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-search {
    max-width: 500px;
    margin-top: 10px;
}

.search-input-lg {
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 10px 14px;
    font-size: 14px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input-lg:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.hero-search .btn-lg {
    padding: 8px 16px;
    font-size: 14px;
    height: 40px;
}

.hero-stats {
    position: relative;
    z-index: 2;
    margin-top: 15px;
    margin-left: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.stat-item {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.3);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.95);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    cursor: pointer;
}

/* 快速导航区域 */
.quick-nav-section {
    padding: 25px 0;
    background: #f8fafc;
}

.nav-card {
    background: white;
    border-radius: 10px;
    padding: 18px 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.nav-icon {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 8px;
}

.nav-content h5 {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
    font-size: 14px;
}

.nav-content p {
    color: #64748b;
    margin: 0;
    font-size: 12px;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}



/* 标讯分类区域 */
.biddings-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* 分类标签样式 - 优化版本 */
.category-tabs {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.category-tabs .nav-pills {
    gap: 12px;
}

.category-tabs .nav-link {
    background: white !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #212529 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* 强制显示所有按钮文字 */
.category-tabs .nav-link span,
.category-tabs .nav-link i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 强制显示按钮内的所有文本内容 */
.category-tabs .nav-link * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* 全部标讯 - 深灰色边框 */
.category-tabs .nav-link#all-tab {
    background: #f8f9fa !important;
    border-color: #495057 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #212529 !important;
}

.category-tabs .nav-link#all-tab .badge {
    background: #495057 !important;
    color: white !important;
}

/* 招标公告 - 主品牌蓝色 */
.category-tabs .nav-link#zhaobiao-tab {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
}

.category-tabs .nav-link#zhaobiao-tab i {
    color: #0d6efd !important;
}

/* 中选结果 - 绿色 */
.category-tabs .nav-link#zhongbiao-tab {
    border-color: #198754 !important;
    color: #198754 !important;
}

.category-tabs .nav-link#zhongbiao-tab i {
    color: #198754 !important;
}

.category-tabs .nav-link#zhongbiao-tab .badge {
    background: #198754 !important;
    color: white !important;
}

/* 公示公告 - 橙色 */
.category-tabs .nav-link#gongshi-tab {
    border-color: #fd7e14 !important;
    color: #fd7e14 !important;
}

.category-tabs .nav-link#gongshi-tab i {
    color: #fd7e14 !important;
}

.category-tabs .nav-link#gongshi-tab .badge {
    background: #fd7e14 !important;
    color: white !important;
}

/* 采购需求 - 灰色（数量为0时浅灰） */
.category-tabs .nav-link#caigou-tab {
    border-color: #6c757d !important;
    color: #6c757d !important;
}

.category-tabs .nav-link#caigou-tab i {
    color: #6c757d !important;
}

.category-tabs .nav-link#caigou-tab .badge {
    background: #6c757d !important;
    color: white !important;
}

/* 通用悬停效果 */
.category-tabs .nav-link:hover {
    background: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 700 !important;
}

/* 终极修复 - 确保文字可见 */
.category-tabs .nav-link::before,
.category-tabs .nav-link::after {
    display: none !important;
}

/* 强制显示按钮内容 */
.category-tabs button.nav-link {
    overflow: visible !important;
    white-space: nowrap !important;
}

/* 修复可能的颜色继承问题 */
.category-tabs .nav-link,
.category-tabs .nav-link:not(.active) {
    color: inherit !important;
}

/* 针对每个按钮的具体颜色 */
.category-tabs #all-tab { color: #212529 !important; }
.category-tabs #zhaobiao-tab { color: #0d6efd !important; }
.category-tabs #zhongbiao-tab { color: #198754 !important; }
.category-tabs #gongshi-tab { color: #fd7e14 !important; }
.category-tabs #caigou-tab { color: #6c757d !important; }

/* 强制显示按钮内的文本节点 */
.category-tabs .nav-link {
    color: #212529 !important;
}

.category-tabs .nav-link#zhaobiao-tab,
.category-tabs .nav-link#zhaobiao-tab i,
.category-tabs .nav-link#zhaobiao-tab span:not(.badge) {
    color: #0d6efd !important;
}

.category-tabs .nav-link#zhongbiao-tab,
.category-tabs .nav-link#zhongbiao-tab i,
.category-tabs .nav-link#zhongbiao-tab span:not(.badge) {
    color: #198754 !important;
}

.category-tabs .nav-link#gongshi-tab,
.category-tabs .nav-link#gongshi-tab i,
.category-tabs .nav-link#gongshi-tab span:not(.badge) {
    color: #fd7e14 !important;
}

.category-tabs .nav-link#caigou-tab,
.category-tabs .nav-link#caigou-tab i,
.category-tabs .nav-link#caigou-tab span:not(.badge) {
    color: #6c757d !important;
}

/* 徽章颜色保持白色文字 */
.category-tabs .nav-link .badge {
    color: white !important;
}

/* 徽章数字白色优先级提升，避免被上方ID颜色规则覆盖 */
.category-tabs .nav-link#all-tab .badge,
.category-tabs .nav-link#zhaobiao-tab .badge,
.category-tabs .nav-link#zhongbiao-tab .badge,
.category-tabs .nav-link#gongshi-tab .badge,
.category-tabs .nav-link#caigou-tab .badge {
    color: #ffffff !important;
}

/* 激活状态 - 统一白色背景 */
.category-tabs .nav-link.active {
    background: white !important;
    color: #212529 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border-width: 2px;
    font-weight: 700;
}

/* 激活状态下的特定边框颜色 */
.category-tabs .nav-link#all-tab.active {
    border-color: #555;
}

.category-tabs .nav-link#zhaobiao-tab.active {
    border-color: #2c9df3;
}

.category-tabs .nav-link#zhongbiao-tab.active {
    border-color: #4caf50;
}

.category-tabs .nav-link#gongshi-tab.active {
    border-color: #ff9800;
}

.category-tabs .nav-link#caigou-tab.active {
    border-color: #999;
}

.category-tabs .nav-link i {
    font-size: 1rem;
    margin-right: 6px;
}

.category-tabs .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    margin-left: 8px;
}

/* 采购需求数量为0时的特殊样式 */
.category-tabs .nav-link#caigou-tab .badge[data-count="0"] {
    background: #eee !important;
    color: #999 !important;
}

.category-tabs .nav-link#caigou-tab[data-count="0"] {
    border-color: #eee !important;
    color: #999 !important;
}

/* 分类内容区域 */
.tab-content {
    margin-top: 20px;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in;
}

.biddings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* 分类特定加载样式 */
#zhaobiaoLoading .spinner-border {
    color: #2c9df3 !important;
}

#zhongbiaoLoading .spinner-border {
    color: #4caf50 !important;
}

#gongshiLoading .spinner-border {
    color: #ff9800 !important;
}

#caigouLoading .spinner-border {
    color: #999 !important;
}

.bidding-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.bidding-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid #f1f5f9;
}

.bidding-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-completed {
    background: #f3f4f6;
    color: #6b7280;
}

.source-info {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.source-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ai-tag {
    background: #f0f9ff;
    color: #0c4a6e;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-body {
    padding: 20px 25px;
}

.ai-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.ai-summary h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 8px;
}

.ai-summary p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

.bidding-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
}

.info-item i {
    color: #94a3b8;
    width: 16px;
}

.card-footer {
    padding: 15px 25px 25px;
    border-top: 1px solid #f1f5f9;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* 加载状态和空状态 */
.loading-state, .empty-state {
    padding: 80px 20px;
}

.loading-state .spinner-border {
    border-width: 0.3em;
}

.empty-actions {
    margin-top: 20px;
}

/* 数据来源说明 - 已整合到页脚 */
.data-sources-section {
    display: none;
}

/* 页脚内数据来源区域样式 */
.footer-data-sources {
    padding: 10px 0;
}

/* 页脚右列对齐修复 */
.footer-right {
    text-align: right !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-right h5,
.footer-right p {
    text-align: right !important;
    width: 100%;
}

.footer-right h5 {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 12px;
}

.footer-right p {
    margin-bottom: 8px;
}

.footer-right p:last-child {
    margin-bottom: 0;
}

.footer-data-sources h6 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.footer-data-sources .source-badges {
    margin: 10px 0;
}

.footer-data-sources .badge {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
}

.footer-divider {
    border-color: rgba(255,255,255,0.2);
    margin: 15px 0 20px;
}

/* 文字颜色辅助类 */
.text-white-75 {
    color: rgba(255,255,255,0.85) !important;
}

.text-white-50 {
    color: rgba(255,255,255,0.6) !important;
}

/* 分页样式 */
.pagination-container {
    margin-top: 40px;
}

.pagination .page-link {
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
}

.pagination .page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .biddings-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .quick-nav-section .row {
        gap: 15px;
    }
    
    .nav-card {
        padding: 20px;
    }
    
    .search-input-lg {
        font-size: 1rem;
        padding: 12px 16px;
    }
}

/* 工具类 */
.min-vh-50 {
    min-height: 50vh;
}

.text-primary {
    color: #3b82f6 !important;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bidding-card {
    animation: fadeInUp 0.5s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
