/* style.css - 全局样式表 */

/* --- 1. 基础变量 --- */
:root {
    --primary-dark: #0f172a;
    --primary-blue: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-gray: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    --font-sans: 'Inter', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
button { font-family: inherit; outline: none; }

/* --- 容器 --- */
.standard-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 导航栏 --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 64px;
    display: flex;
    align-items: center;
}

.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); display: flex; align-items: center; gap: 6px; }
.logo span { color: var(--primary-blue); }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: #334155; padding: 5px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-blue); }

.header-actions { display: flex; gap: 10px; align-items: center; }
.btn { padding: 8px 18px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; white-space: nowrap; }
.btn-primary { background: var(--primary-blue); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border: 1px solid #cbd5e1; background: transparent; color: #475569; }

/* 移动端菜单按钮 */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }

/* --- 首页 Hero --- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e293b 100%);
    color: white;
    padding: 60px 0 100px;
    text-align: center;
    margin-bottom: -60px;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 16px; line-height: 1.2; }
.hero p { color: #94a3b8; font-size: 1.1rem; max-width: 600px; margin: 0 auto 24px; }

/* --- 子页面 Hero (高度较小) --- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e293b 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
}
.page-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.page-hero p { color: #94a3b8; font-size: 1rem; }

/* --- 仪表盘 --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 10;
    margin-bottom: 50px;
}
.data-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--primary-blue);
    text-align: center;
    transition: transform 0.3s;
}
.data-card:hover { transform: translateY(-5px); }
.data-value { font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin: 8px 0; }
.data-label { font-size: 0.85rem; color: var(--text-light); font-weight: 600; }
.trend-indicator { font-size: 0.8rem; color: #10b981; display: block; margin-top: 4px; }

/* --- 主内容布局 --- */
.main-layout-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* 标题与链接 */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); border-left: 4px solid var(--primary-blue); padding-left: 12px; }
.section-link { font-size: 0.85rem; color: var(--primary-blue); font-weight: 600; }

/* 新闻列表 */
.news-tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.tab { padding: 6px 16px; background: #e2e8f0; border-radius: 20px; font-size: 0.85rem; cursor: pointer; color: #475569; white-space: nowrap; }
.tab.active { background: var(--primary-dark); color: white; }

.news-item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid #f1f5f9; }
.news-image { width: 160px; height: 100px; border-radius: 8px; background: #cbd5e1; object-fit: cover; flex-shrink: 0; }
.news-content h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-main); }
.news-meta { font-size: 0.75rem; color: #94a3b8; display: flex; gap: 10px; }
.tag { color: var(--primary-blue); background: #eff6ff; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

/* 侧边栏 */
.sidebar-widget { background: white; padding: 24px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 24px; }
.newsletter-input { width: 100%; padding: 10px; margin: 12px 0; border: 1px solid #cbd5e1; border-radius: 6px; }

/* --- 公司库 --- */
.company-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.company-card { background: white; border: 1px solid var(--border-color); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; height: 100%; transition: all 0.3s ease; }
.company-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); border-color: var(--primary-blue); }
.company-header { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.company-logo-box { width: 48px; height: 48px; background: var(--primary-dark); border-radius: 8px; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.company-desc { font-size: 0.85rem; color: #475569; margin-bottom: 20px; flex-grow: 1; }
.company-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.company-tag { font-size: 0.7rem; padding: 4px 10px; background: #f1f5f9; border-radius: 20px; color: #64748b; }
.company-tag.highlight { color: var(--primary-blue); background: #eff6ff; }

/* =========================================
   弹窗样式 (Modal) - 用于图表详情展示
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    display: none; justify-content: center; align-items: center; z-index: 2000;
}
.modal-box {
    background: white; padding: 30px; border-radius: 12px;
    width: 90%; max-width: 500px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    position: relative; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
    position: absolute; top: 15px; right: 15px; font-size: 1.5rem;
    cursor: pointer; color: #94a3b8; line-height: 1;
}
.modal-close:hover { color: #ef4444; }

.modal-title { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.modal-content { font-size: 0.95rem; color: #475569; line-height: 1.6; }
.modal-meta { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e2e8f0; font-size: 0.85rem; color: #64748b; }

/* =========================================
   7. Footer 页脚 (增强版样式)
   ========================================= */
footer { 
    background: var(--primary-dark); 
    color: #94a3b8; 
    padding: 80px 0 30px; /* 增加顶部内边距，更显大气 */
    margin-top: 60px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr 1fr; /* 2:1:1:1 比例 */
    gap: 40px; 
}

.footer-col h4 { 
    color: white; 
    margin-bottom: 20px; 
    font-size: 1rem; 
    font-weight: 600;
}

.footer-col ul li { 
    margin-bottom: 12px; 
    font-size: 0.9rem; 
}

.footer-col a {
    transition: color 0.2s;
}

.footer-col a:hover { 
    color: var(--primary-blue) !important; /* 鼠标悬停变蓝 */
}

/* 移动端适配：变成单列 */
@media (max-width: 768px) {
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 40px;
        text-align: center; /* 手机端居中更好看 */
    }
    
    /* 手机端图标也居中 */
    .brand-col div {
        justify-content: center;
    }
}

/* 1. 政策法规列表 */
.policy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-list li {
    padding: 12px 0; /* 上下间距加大，更透气 */
    border-bottom: 1px dashed #e2e8f0; /* 虚线分隔符 */
    display: flex;
    flex-direction: column; /* 垂直排列：标题在上，标签在下 */
    gap: 6px; /* 标题和标签的距离 */
}

.policy-list li:last-child {
    border-bottom: none; /* 最后一个去掉虚线 */
}

.policy-list a {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s;
}

.policy-list a:hover {
    color: var(--primary-blue);
}

.policy-region {
    align-self: flex-start; /* 靠左对齐 */
    background-color: #f1f5f9; /* 浅灰背景 */
    color: #64748b; /* 灰色文字 */
    font-size: 0.75rem; /* 小字号 */
    padding: 2px 6px;
    border-radius: 2px; /* 微圆角 */
    line-height: 1;
}

/* 政策标签 (截图中的灰色小块) */
.policy-tag {
    align-self: flex-start; /* 靠左 */
    display: inline-block;
    background-color: #f1f5f9; /* 浅灰背景 */
    color: #94a3b8; /* 浅灰文字 */
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 2. 专家观点卡片 */
.expert-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.expert-avatar {
    width: 48px;
    height: 48px;
    background-color: #cbd5e1; /* 截图中的灰色圆圈 */
    border-radius: 50%;
    flex-shrink: 0;
}

.expert-info {
    display: flex;
    flex-direction: column;
}

.expert-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.expert-role {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.expert-quote {
    font-size: 0.9rem;
    color: #475569;
    font-style: italic; /* 斜体 */
    line-height: 1.6;
    background: #fff;
    margin: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-layout-grid { grid-template-columns: 1fr; }
    .company-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .standard-container { padding: 0 16px; }
    .nav-links { display: none; position: absolute; top: 64px; left: 0; width: 100%; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .header-actions { display: none; }
    .hero h1 { font-size: 2rem; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .news-item { flex-direction: column; }
    .news-image { width: 100%; height: 160px; }
}
@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .company-grid { grid-template-columns: 1fr; }
}

/* --- 强制修正侧边栏标题样式 --- */
.sidebar-widget .widget-title {
    font-size: 1.1rem !important;    /* 字号稍微大一点 */
    font-weight: 800 !important;     /* 800 是特粗，确保肉眼可见 */
    color: #0f172a !important;       /* 深黑色 */
    margin-bottom: 18px !important;  /* 底部留出间距 */
    border-bottom: none !important;  /* 去掉可能存在的下划线干扰 */
    padding-bottom: 0 !important;
}

/* 加载占位 */
.loading-spinner { text-align: center; color: #94a3b8; padding: 40px; }

/* 分页按钮样式微调 */
.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

/* 针对混合列表的样式调整 */
.news-image.placeholder-policy {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}