:root {
  --primary-color: #1e40af;
  --secondary-color: #f5f7fa;
  --accent-gold: #b4943e;
  --accent-red: #8b0000;
  --text-color: #1a1a1a;
  --text-light: #666;
  --border-color: #e5e7eb;
  --bg-white: #ffffff;
  --container-width: 1200px;
  --border-radius: 8px;
  --font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); color: var(--text-color); background: var(--bg-white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select { font-family: inherit; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.main-header { background: var(--bg-white); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo img { height: 48px; width: auto; display: block; }

/* Navigation */
.nav-menu { display: flex; list-style: none; gap: 4px; align-items: center; }
.nav-item { position: relative; }
.nav-link { display: block; padding: 10px 16px; font-size: 15px; font-weight: 500; color: var(--text-color); transition: all 0.3s ease; white-space: nowrap; border-radius: 4px; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); background: rgba(30, 64, 175, 0.06); }
.dropdown-arrow { font-size: 10px; margin-left: 4px; opacity: 0.8; }

/* Dropdown Menu */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 210px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-radius: 0 0 var(--border-radius) var(--border-radius); z-index: 100; list-style: none; padding: 8px 0; border-top: 2px solid var(--primary-color); }
.nav-item:hover > .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 10px 20px; font-size: 14px; color: var(--text-color); transition: all 0.2s ease; }
.dropdown-menu li a:hover, .dropdown-menu li a.active { color: var(--primary-color); background: var(--secondary-color); padding-left: 24px; }

/* Submenu (Third Level) */
.submenu { display: none; position: absolute; left: 100%; top: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 101; min-width: 200px; list-style: none; padding: 8px 0; border-radius: var(--border-radius); border-top: 2px solid var(--primary-color); }
.has-submenu:hover > .submenu { display: block; }
.sub-arrow { float: right; font-size: 12px; opacity: 0.7; }

/* Mobile Menu Button */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--primary-color); padding: 8px; line-height: 1; border-radius: 4px; }
.mobile-menu-btn:hover { background: var(--secondary-color); }

/* Footer */
.main-footer { background: #1a1f2e; color: #b0b4be; padding: 60px 0 0; margin-top: 60px; }
.footer-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 18px; font-weight: 600; position: relative; padding-bottom: 12px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--accent-gold); }
.footer-col p { margin-bottom: 10px; font-size: 14px; line-height: 1.8; }
.footer-bottom { text-align: center; padding: 24px 0; font-size: 13px; color: #868a96; }

/* Fixed Side Consult */
.fixed-side-consult { position: fixed; right: 0; top: 50%; transform: translateY(-50%); background: var(--primary-color); color: #fff; padding: 18px 10px; writing-mode: vertical-rl; letter-spacing: 3px; font-size: 15px; font-weight: 500; border-radius: var(--border-radius) 0 0 var(--border-radius); cursor: pointer; z-index: 998; box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25); transition: all 0.3s ease; }
.fixed-side-consult:hover { background: #15307d; padding-right: 14px; }

/* Banner */
.banner { height: 450px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; position: relative; }
.banner::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.35)); }
.banner-content { position: relative; z-index: 1; max-width: 800px; padding: 0 20px; }
.banner-title { font-size: 42px; font-weight: 700; margin-bottom: 16px; line-height: 1.3; letter-spacing: 1px; }
.banner-subtitle { font-size: 20px; font-weight: 300; opacity: 0.95; line-height: 1.6; }

/* Section Title */
.section-title { font-size: 28px; font-weight: 700; color: var(--text-color); text-align: center; margin-bottom: 40px; position: relative; padding-bottom: 16px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: var(--primary-color); }
.section-title.left { text-align: left; }
.section-title.left::after { left: 0; transform: none; }

/* Generic Card */
.card { background: #fff; border-radius: var(--border-radius); box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s ease; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 32px; font-size: 16px; font-weight: 500; border-radius: var(--border-radius); transition: all 0.3s ease; cursor: pointer; border: none; text-align: center; line-height: 1.5; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: #15307d; box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2); }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* Form Base Style */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text-color); }
input, textarea, select { font-size: 15px; padding: 11px 14px; border: 1px solid var(--border-color); border-radius: var(--border-radius); width: 100%; transition: all 0.3s ease; background: #fff; color: var(--text-color); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1); }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.55); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; padding: 40px; border-radius: var(--border-radius); max-width: 520px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: #999; transition: color 0.2s; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.modal-close:hover { color: var(--text-color); background: var(--secondary-color); }
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; text-align: center; color: var(--text-color); }

/* Scroll to Top */
.scroll-top { position: fixed; bottom: 40px; right: 40px; width: 48px; height: 48px; background: var(--primary-color); color: #fff; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border: none; transition: all 0.3s ease; }
.scroll-top:hover { background: #15307d; transform: translateY(-2px); }
.scroll-top.show { display: flex; }

/* Toast */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: #fff; padding: 12px 28px; border-radius: var(--border-radius); z-index: 3000; font-size: 14px; animation: toastFade 3s ease forwards; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Article Detail Base Style */
.article-detail { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.article-detail .article-header { margin-bottom: 30px; }
.article-detail .article-title { font-size: 28px; font-weight: 700; color: #1a1a1a; line-height: 1.4; margin-bottom: 16px; }
.article-detail .article-meta { display: flex; align-items: center; gap: 16px; color: #999; font-size: 14px; padding-bottom: 20px; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.article-detail .article-author, .article-detail .article-date { font-size: 14px; }
.article-detail .article-cover { margin-bottom: 30px; }
.article-detail .article-cover img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 8px; display: block; }
.article-detail .article-summary { background: #f8f9fa; padding: 16px 20px; border-left: 3px solid var(--primary-color); margin-bottom: 30px; font-size: 15px; color: #555; line-height: 1.7; border-radius: 0 6px 6px 0; }
.article-detail .article-body { font-size: 16px; color: #333; line-height: 1.9; }
.article-detail .article-body h2 { font-size: 22px; font-weight: 600; margin: 32px 0 16px; color: #1a1a1a; }
.article-detail .article-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: #333; }
.article-detail .article-body p { margin-bottom: 16px; }
.article-detail .article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; display: block; }
.article-detail .article-body ul, .article-detail .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-detail .article-body ul { list-style: disc; }
.article-detail .article-body ol { list-style: decimal; }
.article-detail .article-body li { margin-bottom: 8px; }
.article-detail .article-body blockquote { border-left: 3px solid #ddd; padding: 8px 16px; margin: 16px 0; color: #666; background: #fafafa; border-radius: 0 4px 4px 0; }
.article-detail .article-actions { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.article-detail .btn-back { display: inline-block; padding: 8px 24px; border-radius: 6px; border: 1px solid var(--primary-color); color: var(--primary-color); text-decoration: none; transition: all 0.3s ease; }
.article-detail .btn-back:hover { background: var(--primary-color); color: #fff; }

/* Article List Base Style */
.article-card { display: flex; gap: 20px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s ease; margin-bottom: 24px; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.article-card .card-thumb { flex-shrink: 0; width: 280px; height: 200px; overflow: hidden; display: block; }
.article-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.article-card:hover .card-thumb img { transform: scale(1.05); }
.article-card .card-body { flex: 1; padding: 24px; min-width: 0; display: flex; flex-direction: column; }
.article-card .card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; line-height: 1.4; }
.article-card .card-body h3 a { color: #1a1a1a; text-decoration: none; transition: color 0.2s ease; }
.article-card .card-body h3 a:hover { color: var(--primary-color); }
.article-card .card-body p { color: #666; font-size: 14px; line-height: 1.7; margin-bottom: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.article-card .card-body .date { color: #999; font-size: 13px; margin-top: auto; }

.category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.category-btn { display: inline-block; padding: 8px 22px; border-radius: 24px; font-size: 14px; font-weight: 500; color: #666; background: #fff; border: 1px solid #ddd; text-decoration: none; transition: all 0.3s ease; cursor: pointer; }
.category-btn:hover, .category-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 6px; font-size: 14px; color: #333; background: #fff; border: 1px solid #ddd; text-decoration: none; transition: all 0.2s ease; }
.page-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.page-btn.disabled { color: #ccc; pointer-events: none; }

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .nav-menu { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 14px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .article-card .card-thumb { width: 220px; height: 160px; }
  .banner-title { font-size: 36px; }
  .banner { height: 380px; }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .header-inner { height: 70px; }
  .logo img { height: 40px; }
  .mobile-menu-btn { display: flex; }
  .main-nav { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.08); max-height: calc(100vh - 70px); overflow-y: auto; }
  .main-nav.active { display: block; }
  .nav-menu { flex-direction: column; padding: 8px 0; gap: 0; align-items: stretch; }
  .nav-link { padding: 14px 20px; border-radius: 0; font-size: 15px; }
  .nav-link:hover, .nav-link.active { background: var(--secondary-color); }
  .nav-item.has-dropdown > .nav-link { display: flex; justify-content: space-between; align-items: center; }
  .dropdown-menu { position: static; box-shadow: none; display: none; background: var(--secondary-color); padding: 0; border-top: none; border-radius: 0; min-width: auto; }
  .dropdown-menu li a { padding: 12px 20px 12px 40px; }
  .dropdown-menu li a:hover, .dropdown-menu li a.active { padding-left: 44px; }
  .nav-item.dropdown-open > .dropdown-menu { display: block; }
  .submenu { position: static; box-shadow: none; display: none; background: #e9ecef; padding-left: 0; border-radius: 0; min-width: auto; border-top: none; }
  .submenu li a { padding: 12px 20px 12px 60px; }
  .has-submenu.submenu-open > .submenu { display: block; }
  
  .fixed-side-consult { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; padding-bottom: 30px; }
  .footer-col h4 { margin-bottom: 12px; padding-bottom: 8px; }
  
  .article-card { flex-direction: column; }
  .article-card .card-thumb { width: 100%; height: 200px; }
  .article-card .card-body { padding: 20px; }
  
  .banner { height: 280px; }
  .banner-title { font-size: 26px; margin-bottom: 10px; }
  .banner-subtitle { font-size: 15px; }
  
  .section-title { font-size: 22px; margin-bottom: 24px; padding-bottom: 12px; }
  .article-detail { padding: 24px 16px; }
  .article-detail .article-title { font-size: 22px; }
  
  .scroll-top { bottom: 20px; right: 20px; width: 42px; height: 42px; font-size: 18px; }
  .modal-box { padding: 30px 20px; }
  .modal-title { font-size: 18px; margin-bottom: 20px; }
}