/* ===== CSS Variables ===== */
:root {
    --primary-start: #0ea5e9;
    --primary-end: #6366f1;
    --gradient: linear-gradient(90deg, #0ea5e9, #6366f1);
    --gradient-135: linear-gradient(135deg, #0ea5e9, #6366f1);
    --bg-white: #ffffff;
    --bg-light: #f0f9ff;
    --bg-light-blue: #f0f9ff;
    --bg-light-purple: #eef2ff;
    --bg-dark: #0f172a;
    --text-dark: #1e293b;
    --text-mid: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(14,165,233,0.08);
    --shadow-hover: 0 8px 32px rgba(99,102,241,0.15);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --nav-h: 70px;
    /* 兼容旧变量 */
    --primary: #0ea5e9;
    --secondary: #6366f1;
    --accent: #0ea5e9;
    --white: #fff;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: "微软雅黑","Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif; color: var(--text-dark); background: #fff; line-height: 1.6; padding-top: var(--nav-h); }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--primary-start); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, button, textarea, select { font-family: inherit; outline: none; border: none; }
button { cursor: pointer; background: none; }

/* ===== Layout ===== */
.wrap { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.wrap2 { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.clearfix::after { content: ''; display: table; clear: both; }
.l { float: left; }
.r { float: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.blank_h { height: var(--nav-h); }

/* ===== Typography ===== */
.f14{font-size:14px} .f16{font-size:16px} .f18{font-size:18px} .f20{font-size:20px}
.f22{font-size:22px} .f24{font-size:24px} .f28{font-size:28px} .f32{font-size:32px}
.f36{font-size:36px} .f40{font-size:40px} .f48{font-size:48px}

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 12px 32px; border-radius: 24px; font-size: 15px; transition: all var(--transition); cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }
.btn-outline { border: 1.5px solid var(--primary-start); color: var(--primary-start); }
.btn-outline:hover { background: var(--bg-light-blue); }

/* Sidebar Nav */
.sidebar-nav { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow); overflow: hidden; }
.sidebar-nav .sidebar-title { background: var(--gradient); color: #fff; padding: 18px 24px; font-size: 18px; font-weight: 600; }
.sidebar-nav ul li a { display: block; padding: 14px 24px; font-size: 15px; color: var(--text-mid); border-bottom: 1px solid var(--border); transition: all var(--transition); }
.sidebar-nav ul li a:hover, .sidebar-nav ul li a.csel { color: var(--primary-start); background: var(--bg-light-blue); padding-left: 30px; border-left: 3px solid var(--primary-start); }
.sidebar-nav ul li:last-child a { border-bottom: none; }

/* Content Box */
.content-box { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 40px; }
.content-box h2 { font-size: 26px; color: var(--text-dark); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.content-box p { font-size: 15px; color: var(--text-mid); line-height: 1.9; margin-bottom: 16px; }
.content-box img { border-radius: var(--radius-sm); margin: 20px 0; }

/* ===== Cards ===== */
.card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); display: block; color: var(--text-dark); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); color: var(--text-dark); }
.card .card-img { overflow: hidden; aspect-ratio: 16/9; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.05); }
.card .card-body { padding: 20px; }
.card .card-title { font-size: 17px; font-weight: 600; color: var(--text-dark); margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .card-desc { font-size: 14px; color: var(--text-light); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .card-more { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--primary-start); }
.card .card-more:hover { text-decoration: underline; }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

/* ===== Animations ===== */
.anim { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.anim.anim-show { opacity: 1; transform: translateY(0); }
.anim-1 { transition-delay: 0.1s; }
.anim-2 { transition-delay: 0.2s; }
.anim-3 { transition-delay: 0.3s; }
.anim-4 { transition-delay: 0.4s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .wrap, .wrap2 { padding: 0 16px; }
    :root { --nav-h: 60px; }
    .logo img { height: 36px; }
    .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .news-item .news-img { width: 100%; }
    .content-box { padding: 24px; }
}