/* =========================================================
   律解忧 · 法律资讯站 前台样式
   ========================================================= */
:root {
  --primary: #12325b;
  --primary-2: #1b4a86;
  --accent: #c8963e;
  --accent-2: #e2b25c;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e9f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 50, 91, .08);
  --shadow-hover: 0 12px 32px rgba(18, 50, 91, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; }
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- 顶部条 ---------- */
.topbar {
  background: var(--primary);
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  padding: 7px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar-tag { letter-spacing: .5px; }
.topbar-right { display: flex; gap: 18px; align-items: center; }
.topbar-right a { color: rgba(255, 255, 255, .82); }
.topbar-right a:hover { color: #fff; }

/* ---------- 头部 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(18, 50, 91, .05);
}
.header-inner { display: flex; align-items: center; gap: 26px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--accent-2); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "SimSun", serif;
  box-shadow: 0 6px 16px rgba(18, 50, 91, .25);
}
.logo-text strong { display: block; font-size: 21px; letter-spacing: 2px; color: var(--primary); line-height: 1.25; }
.logo-text small { color: var(--muted); font-size: 11.5px; letter-spacing: 1px; }

.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--text);
  transition: all .2s; white-space: nowrap;
}
.main-nav a:hover { background: #eef3fa; color: var(--primary-2); }
.main-nav a.active { background: var(--primary); color: #fff; }

.header-search {
  display: flex; align-items: center; background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 16px;
  transition: all .2s;
}
.header-search:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(27, 74, 134, .12); }
.header-search input { border: 0; background: transparent; outline: none; width: 190px; font-size: 13.5px; }
.header-search button {
  border: 0; background: var(--primary); color: #fff; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 13px;
}
.nav-toggle { display: none; border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 380px at 85% -10%, rgba(200, 150, 62, .22), transparent 60%),
    linear-gradient(135deg, #12325b 0%, #1b4a86 55%, #23599e 100%);
  color: #fff;
  padding: 58px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "§";
  position: absolute; right: 6%; top: -30px;
  font-size: 320px; opacity: .07; font-family: Georgia, serif;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); line-height: 1.35; letter-spacing: 1px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p.sub { margin: 16px 0 28px; color: rgba(255, 255, 255, .85); font-size: 16px; }
.hero-search {
  display: flex; background: #fff; border-radius: 999px; padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22); max-width: 640px;
}
.hero-search input {
  flex: 1; border: 0; outline: none; padding: 13px 22px;
  font-size: 15.5px; border-radius: 999px; color: var(--text);
}
.hero-search button {
  border: 0; cursor: pointer; padding: 0 30px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #4a3208; font-weight: 700; font-size: 15px;
}
.hero-tags { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-tags span { color: rgba(255, 255, 255, .7); font-size: 13px; }
.hero-tags a {
  color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 4px 13px; border-radius: 999px; font-size: 12.5px;
}
.hero-tags a:hover { background: rgba(255, 255, 255, .28); color: #fff; }

.hero-stats { display: flex; gap: 42px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 30px; color: var(--accent-2); line-height: 1.2; }
.hero-stats .stat span { color: rgba(255, 255, 255, .75); font-size: 13px; }

/* ---------- 快讯条 ---------- */
.ticker {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-top: -32px; position: relative; z-index: 5;
  box-shadow: var(--shadow); display: flex; align-items: center;
  padding: 12px 20px; gap: 16px; overflow: hidden;
}
.ticker-label {
  flex-shrink: 0; background: #fdeedd; color: #a86a12; font-size: 12.5px;
  padding: 4px 13px; border-radius: 999px; font-weight: 600;
}
.ticker-body { overflow: hidden; white-space: nowrap; flex: 1; }
.ticker-body .track { display: inline-block; animation: tickerMove 32s linear infinite; }
.ticker-body a { margin-right: 46px; font-size: 14px; color: var(--text); }
.ticker-body a:hover { color: var(--primary-2); }
.ticker-body a i { font-style: normal; color: var(--muted); font-size: 12.5px; margin-left: 8px; }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 布局 ---------- */
.main-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px; margin: 34px auto 50px;
}
.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; padding-left: 13px; border-left: 4px solid var(--accent);
}
.section-head h2 { font-size: 20px; color: var(--primary); letter-spacing: 1px; }
.section-head .more { color: var(--muted); font-size: 13px; }
.section-head .more:hover { color: var(--primary-2); }

/* ---------- 头条卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.feature-main {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(150deg, var(--primary), var(--primary-2));
  color: #fff; padding: 30px 28px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.feature-main:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: #fff; }
.feature-main::before {
  content: "典"; position: absolute; right: -12px; top: -34px;
  font-size: 190px; opacity: .1; font-family: "Songti SC", serif;
}
.feature-main .kicker {
  align-self: flex-start; background: var(--accent); color: #4a3208;
  font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 700; margin-bottom: 14px;
}
.feature-main h3 { font-size: 23px; line-height: 1.5; margin-bottom: 12px; position: relative; }
.feature-main p { color: rgba(255, 255, 255, .82); font-size: 13.5px; position: relative; }
.feature-side { display: flex; flex-direction: column; gap: 14px; }
.feature-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  border: 1px solid var(--line); flex: 1; transition: all .22s;
  display: flex; flex-direction: column; justify-content: center;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }
.feature-card .cat { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.feature-card h3 { font-size: 16.5px; line-height: 1.6; margin: 7px 0; }
.feature-card .meta { color: var(--muted); font-size: 12px; }

/* ---------- 文章卡片列表 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.article-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; transition: all .22s; display: block;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; color: var(--text); }
.article-card .cat {
  display: inline-block; background: #eef3fa; color: var(--primary-2);
  font-size: 12px; padding: 2px 11px; border-radius: 999px; margin-bottom: 10px;
}
.article-card h3 { font-size: 17px; line-height: 1.65; margin-bottom: 9px; color: var(--primary); }
.article-card p { color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.article-card .meta {
  display: flex; justify-content: space-between; color: var(--muted);
  font-size: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}

/* ---------- 列表页文章行 ---------- */
.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; transition: all .22s;
}
.article-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: transparent; }
.article-row .row-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.badge {
  background: var(--primary); color: #fff; font-size: 11.5px;
  padding: 2px 10px; border-radius: 999px;
}
.badge.gold { background: var(--accent); color: #4a3208; }
.article-row h3 { font-size: 18.5px; line-height: 1.6; }
.article-row h3 a { color: var(--primary); }
.article-row h3 a:hover { color: var(--primary-2); }
.article-row p { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.article-row .meta {
  display: flex; gap: 22px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap;
}
.article-row .meta span::before { margin-right: 5px; opacity: .65; }
.meta .m-src::before { content: "🏷"; }
.meta .m-time::before { content: "🕒"; }
.meta .m-view::before { content: "👁"; }
.meta .m-cat::before { content: "📁"; }

/* ---------- 侧边栏 ---------- */
.side-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
}
.side-card h3 {
  font-size: 16px; color: var(--primary); margin-bottom: 16px;
  padding-left: 11px; border-left: 4px solid var(--accent);
}
.hot-list { counter-reset: hot; }
.hot-item {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line);
  align-items: flex-start;
}
.hot-item:last-child { border-bottom: 0; }
.hot-item .no {
  counter-increment: hot; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 7px; background: #eef1f6; color: var(--muted);
  font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.hot-item:nth-child(-n+3) .no { background: var(--accent); color: #fff; }
.hot-item .no::before { content: counter(hot); }
.hot-item a { font-size: 13.5px; line-height: 1.65; color: var(--text); }
.hot-item a:hover { color: var(--primary-2); }
.hot-item .t { color: var(--muted); font-size: 11.5px; display: block; margin-top: 2px; }

.source-list { display: flex; flex-wrap: wrap; gap: 9px; }
.source-list a {
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px;
}
.source-list a:hover { border-color: var(--primary-2); color: var(--primary-2); background: #fff; }

.notice-box {
  background: linear-gradient(135deg, #fdf6e9, #fbf0dc);
  border: 1px solid #f0dfba; border-radius: var(--radius); padding: 18px 20px;
}
.notice-box h3 { color: #8a5f13; border-color: var(--accent); }
.notice-box p { color: #8a6b32; font-size: 12.5px; line-height: 1.9; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 34px 0 10px; flex-wrap: wrap; }
.page-item {
  min-width: 38px; height: 38px; padding: 0 13px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); font-size: 13.5px;
}
.page-item:hover { border-color: var(--primary-2); color: var(--primary-2); }
.page-item.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item.disabled { color: #c3c9d2; }

/* ---------- 详情页 ---------- */
.crumb {
  margin: 22px 0; color: var(--muted); font-size: 13px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.crumb a { color: var(--primary-2); }
.detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; margin-bottom: 50px; }
.detail-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 42px;
}
.detail-card h1 {
  font-size: 27px; line-height: 1.55; color: var(--primary);
  letter-spacing: .5px; margin-bottom: 18px;
}
.detail-meta {
  display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.detail-content { font-size: 16px; line-height: 2.1; color: #2b3444; word-break: break-word; }
.detail-content p { margin: 0 0 18px; }
.detail-content h2, .detail-content h3 { color: var(--primary); margin: 26px 0 14px; }
.detail-content img { border-radius: 10px; margin: 12px auto; display: block; }
.detail-content blockquote {
  border-left: 4px solid var(--accent); background: #faf7f1;
  padding: 14px 20px; border-radius: 0 10px 10px 0; color: #6b5b3b; margin: 18px 0;
}
.detail-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.detail-content th, .detail-content td { border: 1px solid var(--line); padding: 9px 12px; font-size: 14px; }
.detail-content th { background: #f2f5fa; }
.detail-content a { color: var(--primary-2); text-decoration: underline; }

.copyright-note {
  margin-top: 30px; background: var(--bg); border: 1px dashed var(--line);
  border-radius: 10px; padding: 14px 18px; color: var(--muted); font-size: 12.5px; line-height: 1.9;
}
.article-nav { display: flex; justify-content: space-between; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.article-nav a {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 18px; font-size: 13.5px; flex: 1; min-width: 220px;
}
.article-nav a:hover { border-color: var(--primary-2); color: var(--primary-2); }

/* ---------- 页面 / 搜索 ---------- */
.page-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 42px; margin: 26px 0 50px;
}
.page-card h1 { color: var(--primary); font-size: 25px; margin-bottom: 20px; }
.page-card .content { line-height: 2.1; font-size: 15.5px; }
.search-bar {
  display: flex; gap: 10px; margin: 20px 0 26px;
}
.search-bar input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 18px; font-size: 15px; outline: none;
}
.search-bar input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(27, 74, 134, .12); }
.search-bar button {
  border: 0; background: var(--primary); color: #fff; border-radius: 12px;
  padding: 0 32px; font-size: 15px; cursor: pointer;
}
.empty-tip {
  text-align: center; color: var(--muted); padding: 60px 20px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-tip .big { font-size: 44px; margin-bottom: 12px; }
em.hl { background: #fff2c2; color: #b45309; font-style: normal; padding: 0 2px; border-radius: 3px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--primary); color: rgba(255, 255, 255, .72); margin-top: 20px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 34px; padding: 46px 0 36px;
}
.footer-col h4 { color: #fff; font-size: 15.5px; margin-bottom: 16px; letter-spacing: 1px; }
.footer-col p { font-size: 13px; line-height: 2; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(255, 255, 255, .72); font-size: 13px; }
.footer-col a:hover { color: var(--accent-2); }
.footer-note {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px; padding: 13px 15px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0;
  font-size: 12px;
}
.footer-bottom .container { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-bottom a { color: rgba(255, 255, 255, .72); }
.footer-tech { margin-left: auto; opacity: .75; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .main-grid, .detail-wrap { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .header-search { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; width: 100%; flex-direction: column;
    padding: 12px 0 4px; border-top: 1px solid var(--line);
  }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .card-grid { grid-template-columns: 1fr; }
  .detail-card, .page-card { padding: 26px 20px; }
  .hero { padding: 42px 0 52px; }
  .hero-stats { gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
