/* ============================================================
   律师门户网站 - 主样式表
   designed for AI indexing & SEO
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --primary: #0a1628;
  --primary-light: #132347;
  --accent: #c9a84c;
  --accent-hover: #dbb956;
  --accent-light: rgba(201, 168, 76, 0.08);
  --text: #1e293b;
  --text-light: #64748b;
  --text-white: #f8fafc;
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', Georgia, serif;
  --container: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--primary); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* --- Utility --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { position: relative; display: inline-block; }
.section-title h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent); margin: 12px auto 0; border-radius: 2px; }
.section-title p { color: var(--text-light); margin-top: 12px; font-size: 1.05rem; }

/* --- Skip Link --- */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--accent); color: var(--primary); padding: 8px 16px; z-index: 10000; font-weight: 600; border-radius: 0 0 4px 0; transition: top 0.2s; }
.skip-link:focus { top: 0; }

/* ============================================================ 
   HEADER / NAV
   ============================================================ */
.site-header { background: var(--primary); color: var(--text-white); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; color: var(--text-white) !important; }
.site-logo:hover { color: var(--accent) !important; }
.site-logo .logo-icon { width: 36px; height: 36px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 900; font-size: 1.1rem; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 16px; color: rgba(255,255,255,0.8); font-size: 0.95rem; border-radius: 6px; transition: all var(--transition); }
.main-nav a:hover, .main-nav a.active { color: var(--text-white); background: rgba(255,255,255,0.1); }
.main-nav a.active { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-white); border-radius: 2px; transition: all 0.3s; }

/* --- Mobile Nav --- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav { position: fixed; top: 64px; left: 0; right: 0; background: var(--primary); padding: 16px; transform: translateY(-110%); opacity: 0; transition: all 0.3s; pointer-events: none; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 12px 16px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: var(--text-white); padding: clamp(4rem, 8vw, 6rem) 0; }
.hero-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 3rem; align-items: center; }
.hero h1 { color: var(--text-white); margin-bottom: 1rem; }
.hero h1 .highlight { color: var(--accent); }
.hero p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 540px; margin-bottom: 2rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(201, 168, 76, 0.15); color: var(--accent); padding: 6px 16px; border-radius: 100px; font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: all var(--transition); font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: var(--accent-hover); color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,0.4); }
.btn-outline { background: transparent; color: var(--text-white); border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-image .placeholder-img { width: 100%; max-width: 320px; aspect-ratio: 3/4; background: rgba(255,255,255,0.05); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.2); font-size: 3rem; border: 1px solid rgba(255,255,255,0.08); }
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-image { display: none; }
}

/* --- Stats --- */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; margin-top: -2rem; position: relative; z-index: 2; }
.stat-item { background: var(--bg-card); padding: 1.5rem 1rem; text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-label { color: var(--text-light); font-size: 0.9rem; margin-top: 4px; }
@media (max-width: 600px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   LAWYER PROFILE CARD
   ============================================================ */
.profile-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.profile-header { background: var(--primary); padding: 2rem 2rem 1.5rem; color: var(--text-white); }
.profile-header h1 { color: var(--text-white); margin-bottom: 0.25rem; }
.profile-title { color: var(--accent); font-size: 1.05rem; font-weight: 500; }
.profile-body { padding: 2rem; }
.profile-info-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; margin-bottom: 2rem; }
.profile-info-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.profile-info-item .label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.profile-info-item .value { font-weight: 500; color: var(--text); }
.profile-info-item .icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
@media (max-width: 600px) {
  .profile-info-grid { grid-template-columns: 1fr; }
}

/* --- Expertise Tags --- */
.expertise-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0; }
.expertise-tag { background: var(--accent-light); color: var(--primary); padding: 4px 14px; border-radius: 100px; font-size: 0.85rem; font-weight: 500; border: 1px solid rgba(201,168,76,0.2); }

/* --- Certification --- */
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: 0.9rem; }
.cert-item .cert-badge { width: 32px; height: 32px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }

/* ============================================================
   CARDS (Articles / Cases)
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: all var(--transition); border: 1px solid var(--border); }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-image { aspect-ratio: 16/9; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 2rem; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem 1.5rem 1.5rem; }
.card-category { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.card h3 { margin-bottom: 8px; }
.card h3 a { color: var(--primary); }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--text-light); font-size: 0.92rem; line-height: 1.6; }
.card-meta { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-light); }
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ARTICLE DETAIL
   ============================================================ */
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-header .breadcrumbs { margin-bottom: 1rem; }
.article-header h1 { margin-bottom: 0.75rem; }
.article-meta-bar { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-light); font-size: 0.9rem; }
.article-meta-bar span { display: flex; align-items: center; gap: 4px; }
.article-content { font-size: 1.05rem; line-height: 1.9; color: var(--text); }
.article-content h2 { margin-top: 2rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--bg-alt); }
.article-content h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; }
.article-content p { margin-bottom: 1.2rem; }
.article-content ul, .article-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-light); font-style: italic; }
.article-content pre { margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--primary); color: #e2e8f0; border-radius: var(--radius-sm); overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
.article-content code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.9em; }

/* --- Breadcrumbs --- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--text-light); margin-bottom: 1.5rem; }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--border); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* --- Table of Contents --- */
.toc { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; margin-bottom: 2rem; border: 1px solid var(--border); }
.toc-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: var(--primary); }
.toc-list { padding-left: 0; }
.toc-list li { margin-bottom: 4px; }
.toc-list a { color: var(--text-light); font-size: 0.9rem; display: block; padding: 3px 0; }
.toc-list a:hover { color: var(--accent); }
.toc-list .toc-h2 { padding-left: 0; }
.toc-list .toc-h3 { padding-left: 1.25rem; }

/* ============================================================
   CASE DETAIL
   ============================================================ */
.case-header { margin-bottom: 2rem; }
.case-result { display: inline-flex; align-items: center; gap: 6px; background: #dcfce7; color: #166534; padding: 4px 14px; border-radius: 100px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }
.case-result.won { background: #dcfce7; color: #166534; }
.case-result.ongoing { background: #fef9c3; color: #854d0e; }
.case-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 1.5rem 0; }
.case-meta-item { padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.case-meta-item .label { font-size: 0.78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.case-meta-item .value { font-weight: 500; font-size: 0.95rem; margin-top: 2px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; }
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
}
.sidebar-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.sidebar-card h3 { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); }
.sidebar-links a { display: block; padding: 6px 0; color: var(--text-light); font-size: 0.9rem; border-bottom: 1px solid var(--bg-alt); }
.sidebar-links a:last-child { border-bottom: none; }
.sidebar-links a:hover { color: var(--accent); padding-left: 4px; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; }
.contact-info-list { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-item .ci-icon { width: 44px; height: 44px; background: var(--accent-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.contact-info-item .ci-label { font-size: 0.85rem; color: var(--text-light); }
.contact-info-item .ci-value { font-weight: 500; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; transition: border-color var(--transition); background: var(--bg); }
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { min-height: 140px; resize: vertical; }
@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 2.5rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 0.9rem; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); transition: all var(--transition); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--primary); color: var(--text-white); border-color: var(--primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .site-logo { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer h4 { color: var(--text-white); margin-bottom: 1rem; font-size: 1rem; }
.footer-links a { display: block; padding: 4px 0; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 3fr 2fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .site-header, .site-footer, .nav-toggle, .btn, .sidebar-card { display: none !important; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: inherit; text-decoration: underline; }
  .hero { background: none !important; color: #000 !important; padding: 1rem 0; }
  .hero h1 { color: #000 !important; }
  .hero p { color: #333 !important; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.5s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* --- Breadcrumb 导航（页面顶部）--- */
.breadcrumb { background: var(--bg-alt); padding: 10px 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .container > a:first-child::before { content: '🏠 '; }

/* --- 律师详情页 --- */
.lawyer-detail { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; }
@media (max-width: 768px) {
  .lawyer-detail { grid-template-columns: 1fr; }
}
.lawyer-portrait { text-align: center; }
.lawyer-info h1 { margin-bottom: 0.25rem; }
.lawyer-info .subtitle { color: var(--accent); font-weight: 600; font-size: 1.05rem; margin-bottom: 1.5rem; }
.info-card-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; margin-bottom: 2rem; }
@media (max-width: 500px) {
  .info-card-grid { grid-template-columns: 1fr; }
}
.info-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.info-icon { font-size: 1.5rem; flex-shrink: 0; }
.info-label { font-size: 0.78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }
.info-value { font-weight: 600; }
.lawyer-bio { line-height: 1.9; }
.lawyer-bio h2 { margin-bottom: 1rem; font-size: 1.3rem; }
.philosophy-quote { margin: 1rem 0; padding: 1.5rem 2rem; background: var(--accent-light); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.philosophy-quote p { font-style: italic; font-size: 1.05rem; color: var(--text); }
.philosophy-quote cite { display: block; margin-top: 0.75rem; color: var(--accent); font-style: normal; font-weight: 600; }

/* --- Page Header（通用页面标题）--- */
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-light); font-size: 1.05rem; }

/* --- Contact Form 增强 --- */
.contact-form .form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; transition: border-color var(--transition); background: var(--bg); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-light); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* --- Loading --- */
.loading { display: flex; justify-content: center; padding: 3rem; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
