/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; color: #333; background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Variables ===== */
:root {
  --primary: #1a6fd4;
  --primary-dark: #1558b0;
  --primary-light: #e8f0fe;
  --accent: #ff6b35;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --border: #e0e0e0;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a2e;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: .25s ease;
  --max-width: 1200px;
  --header-height: 80px;
}

/* ===== Utilities ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-title { font-size: 2rem; font-weight: 700; color: var(--text); margin-bottom: 12px; text-align: center; }
.section-subtitle { font-size: 1rem; color: var(--text-light); text-align: center; margin-bottom: 50px; }
.section-title-line { display: flex; flex-direction: column; align-items: center; margin-bottom: 50px; }
.section-title-line .title-bar { width: 50px; height: 4px; background: var(--primary); border-radius: 2px; margin-top: 14px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.bg-light { background: var(--bg-light); }
.bg-dark { background: var(--bg-dark); color: #fff; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: var(--radius); font-size: .95rem; font-weight: 600; cursor: pointer; border: none; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,111,212,.35); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }
.btn-lg { padding: 15px 36px; font-size: 1.05rem; }

/* ===== Header ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; height: var(--header-height); transition: all var(--transition); }
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo img { height: 50px; width: auto; }
.logo-text { font-size: 1.45rem; letter-spacing: .02em; }

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 8px 16px; border-radius: 6px; font-size: .95rem; color: var(--text); transition: all var(--transition); }
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--primary-light); }

/* Mobile menu toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* Mobile nav */
.mobile-nav { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); z-index: 999; padding: 16px 20px; box-shadow: var(--shadow-md); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 16px; border-radius: var(--radius); color: var(--text); font-size: 1rem; transition: all var(--transition); }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--primary); background: var(--primary-light); }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: #ccc; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: .9rem; line-height: 1.8; color: #aaa; max-width: 280px; }
.footer-col h4 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: .9rem; color: #aaa; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-qrcode { text-align: center; }
.footer-qrcode img { width: 100px; height: 100px; border-radius: 8px; margin: 0 auto 8px; background: #fff; padding: 4px; }
.footer-qrcode p { font-size: .8rem; color: #aaa; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: .85rem; color: #666; }
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #ccc; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 0; font-size: .9rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ===== Page Hero ===== */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, #0d4ea6 100%); color: #fff; padding: 100px 0 60px; margin-top: var(--header-height); }
.page-hero h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 12px; }
.page-hero p { font-size: 1.1rem; opacity: .85; }

/* ===== Cards ===== */
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: all var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 20px; }
.card-tag { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: .78rem; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; line-height: 1.4; color: var(--text); }
.card-title:hover { color: var(--primary); }
.card-desc { font-size: .9rem; color: var(--text-light); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: .82rem; color: var(--text-muted); margin-top: 14px; display: flex; gap: 12px; }

/* ===== Grid ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; flex-wrap: wrap; }
.page-btn { width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 16px; opacity: .3; }
.empty-state p { font-size: 1rem; }

/* ===== Loading ===== */
.loading-wrap { display: flex; justify-content: center; padding: 60px 0; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Back to top ===== */
#back-to-top { position: fixed; bottom: 90px; right: 30px; width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(26,111,212,.4); transition: all var(--transition); z-index: 500; }
#back-to-top.show { display: flex; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --header-height: 60px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 1.6rem; }
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-hero h1 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: 13px 26px; }
}
