/*
Theme Name: ZY Law Hualv
Theme URI: https://zaishangyanfa.com/
Author: WorkBuddy
Description: Legal portal theme with Hualv-style three-tier header, knowledge blocks, lawyer entry, and floating consult.
Version: 1.1.0
Text Domain: zy-law-hualv
*/

:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --ink:#152033;
  --muted:#667085;
  --line:#e5eaf2;

  /* 三段配色：金 / 深蓝 / 红 */
  --gold:#c89b3c;
  --gold-2:#a87a23;
  --gold-soft:#fbf6e8;

  --nav:#143258;
  --nav-2:#0b1f33;
  --nav-grad:linear-gradient(180deg, #1a3f6b 0%, #102845 100%);

  --red:#c4262e;
  --red-2:#8a1018;
  --red-grad:linear-gradient(135deg,#c4262e 0%,#8a1018 100%);
  --brand-mark-grad:linear-gradient(135deg,#c89b3c 0%,#8a1018 130%);

  --shadow:0 10px 30px rgba(21,32,51,.08);
  --radius:10px;
  --radius-sm:8px;
  --max:1200px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button,input,textarea,select{font:inherit}
.container{
  width:min(var(--max),calc(100% - 32px));
  margin:0 auto;
}

/* ============== 三段式顶部样式 ============== */

/* 第 1 段：顶部 utility 条 */
.site-utility{
  background:var(--gold-soft);
  border-bottom:1px solid #ead7a7;
  color:#6a4a14;
  font-size:13px;
}
.util-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:36px;
}
.util-stats{
  display:flex;gap:18px;flex-wrap:wrap;
}
.util-stats span b{color:var(--red);margin-right:2px;font-weight:700;}
.util-stats span{opacity:.95}
.util-contact{
  display:flex;gap:16px;flex-wrap:wrap;align-items:center;
}
.util-contact strong{color:var(--nav-2)}

/* 第 2 段：主品牌行 */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.header-main{
  display:flex;
  align-items:center;
  gap:20px;
  min-height:84px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:240px;
  text-decoration:none;
}
.brand-mark{
  width:54px;height:54px;
  border-radius:14px;
  background:var(--brand-mark-grad);
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:26px;
  letter-spacing:.5px;
  flex:0 0 auto;
  box-shadow:0 6px 14px rgba(200,155,60,.35);
}
.brand .site-title{
  font-size:22px;
  font-weight:800;
  margin:0;
  line-height:1.1;
  color:var(--nav-2);
  letter-spacing:.5px;
}
.brand .site-desc{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
  letter-spacing:.4px;
}

.header-search{
  flex:1;
  display:flex;
  align-items:center;
  gap:0;
  min-width:240px;
}
.header-search form{
  width:100%;
  display:flex;
  align-items:center;
}
.header-search input[type="search"]{
  width:100%;
  height:46px;
  border:2px solid var(--nav);
  border-right:0;
  border-radius:10px 0 0 10px;
  padding:0 14px;
  outline:none;
  background:#fff;
}
.header-search input[type="search"]:focus{
  border-color:var(--red);
  box-shadow:0 0 0 3px rgba(196,38,46,.12);
}
.header-search button{
  height:46px;
  border:0;
  background:var(--red-grad);
  color:#fff;
  padding:0 22px;
  border-radius:0 10px 10px 0;
  cursor:pointer;
  font-weight:600;
}
.header-search button:hover{filter:brightness(1.08)}

.header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:42px;
  padding:0 18px;
  border-radius:10px;
  border:1px solid transparent;
  cursor:pointer;
  white-space:nowrap;
  font-weight:600;
  text-decoration:none;
  transition:all .15s ease;
}
.btn-outline{
  background:#fff;
  border-color:var(--nav);
  color:var(--nav);
}
.btn-outline:hover{background:var(--nav);color:#fff;}
.btn-cta{
  background:var(--red-grad);
  color:#fff;
  box-shadow:0 4px 12px rgba(196,38,46,.3);
}
.btn-cta:hover{filter:brightness(1.1);transform:translateY(-1px);}
.menu-toggle{
  display:none;
  width:44px;height:44px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  align-items:center;
  justify-content:center;
  font-size:20px;
  cursor:pointer;
  color:var(--nav);
}

/* 第 3 段：主导航（唯一主菜单） */
.site-nav{
  background:var(--nav-grad);
  border-top:0;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.06);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:54px;
}
.primary-menu{
  display:flex;
  gap:0;
  list-style:none;
  margin:0;
  padding:0;
  flex-wrap:wrap;
}
.primary-menu > li{
  position:relative;
}
.primary-menu > li > a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:54px;
  padding:0 18px;
  color:rgba(255,255,255,.92);
  font-weight:500;
  font-size:15px;
  border-right:1px solid rgba(255,255,255,.06);
  transition:all .15s ease;
}
.primary-menu > li:first-child > a{border-left:1px solid rgba(255,255,255,.06);}
.primary-menu > li > a:hover{
  background:rgba(200,155,60,.18);
  color:#f7d684;
}
.primary-menu > li.current-menu-item > a{
  background:var(--red-grad);
  color:#fff;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.18);
}
.primary-menu .sub-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:240px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:8px;
  list-style:none;
  margin:0;
  z-index:50;
}
.primary-menu > li:hover .sub-menu{
  display:block;
}
.primary-menu .sub-menu a{
  display:block;
  padding:10px 12px;
  border-radius:8px;
  color:var(--ink);
  border-right:0;
  height:auto;
}
.primary-menu .sub-menu a:hover{
  background:var(--bg);
  color:var(--red);
}
.nav-right{
  display:flex;
  gap:10px;
  align-items:center;
}
.btn-pay{
  background:linear-gradient(135deg,#d4a04a 0%,#8a1018 100%);
  color:#fff !important;
  height:38px;
  padding:0 18px;
  border-radius:8px;
  font-weight:700;
  box-shadow:0 4px 10px rgba(138,16,24,.35);
}
.btn-pay:hover{filter:brightness(1.1);}

/* ============== 主体内容样式 ============== */

.hero{
  margin:18px 0 24px;
}
.hero-panel{
  background:
    radial-gradient(circle at top right, rgba(196,38,46,.10), transparent 28%),
    radial-gradient(circle at bottom left, rgba(200,155,60,.10), transparent 30%),
    linear-gradient(180deg,#fff,#fafcff);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:32px;
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.3fr .7fr;
  gap:24px;
  align-items:center;
}
.hero h1{
  margin:0 0 12px;
  font-size:36px;
  line-height:1.2;
  color:var(--nav-2);
}
.hero h1 span.hl-red{color:var(--red);}
.hero h1 span.hl-gold{color:var(--gold-2);}
.hero p{
  margin:0 0 22px;
  color:var(--muted);
  max-width:760px;
  font-size:15px;
}
.hero-search{
  display:flex;
  gap:10px;
  max-width:760px;
}
.hero-search input{
  flex:1;
  min-width:0;
  height:54px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:0 16px;
  outline:none;
}
.hero-search button{
  height:54px;
  padding:0 24px;
  border:0;
  border-radius:12px;
  background:var(--red-grad);
  color:#fff;
  cursor:pointer;
  font-weight:600;
}
.hero-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.stat{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px;
}
.stat b{
  display:block;
  font-size:22px;
  margin-bottom:4px;
  background:var(--red-grad);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.stat:nth-child(2) b{background:linear-gradient(135deg,var(--gold) 0%,var(--gold-2) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.stat:nth-child(3) b{background:linear-gradient(135deg,var(--nav) 0%,var(--nav-2) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.stat span{
  color:var(--muted);
  font-size:13px;
}
.quick-links{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.quick-link{
  background:#fff;
  border:1px solid var(--line);
  border-top:3px solid var(--gold);
  border-radius:10px;
  padding:14px 10px;
  text-align:center;
  box-shadow:0 2px 6px rgba(21,32,51,.04);
  transition:all .15s ease;
}
.quick-link:nth-child(2n){border-top-color:var(--red);}
.quick-link:nth-child(3n){border-top-color:var(--nav);}
.quick-link:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 18px rgba(21,32,51,.1);
  border-color:var(--gold);
}
.quick-link strong{
  display:block;
  font-size:14px;
  margin-bottom:4px;
  color:var(--nav-2);
}
.quick-link span{
  font-size:12px;
  color:var(--muted);
}

.section{
  margin:0 0 22px;
}
.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  padding-left:12px;
  border-left:4px solid var(--red);
}
.section-head h2{margin:0;}
.section-title{
  margin:0;
  font-size:22px;
  color:var(--nav-2);
  position:relative;
}
.section-sub{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.section-more{
  color:var(--red);
  font-size:14px;
  white-space:nowrap;
  font-weight:600;
}
.section-more:hover{text-decoration:underline;}
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 2px 10px rgba(21,32,51,.04);
  overflow:hidden;
  transition:box-shadow .15s ease;
}
.card:hover{box-shadow:0 8px 20px rgba(21,32,51,.1);}
.card-head{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:linear-gradient(180deg,#fbfcff 0%,#fff 100%);
}
.card-head h3{
  margin:0;
  font-size:18px;
  color:var(--nav-2);
}
.card-body{
  padding:8px 18px 16px;
}
.list{
  list-style:none;
  padding:0;
  margin:0;
}
.list li{
  padding:12px 0;
  border-bottom:1px dashed #edf1f6;
}
.list li:last-child{border-bottom:0}
.list a{
  display:block;
}
.list-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}
.list-title span{
  color:var(--ink);
  font-weight:500;
}
.list-title em{
  font-style:normal;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.list p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.lawyer-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.lawyer{
  padding:18px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  border-left:4px solid var(--gold);
}
.lawyer strong{
  display:block;
  font-size:16px;
  color:var(--nav-2);
}
.lawyer small{
  display:block;
  margin:4px 0 10px;
  color:var(--muted);
}
.badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.badge{
  padding:4px 10px;
  border-radius:999px;
  background:var(--gold-soft);
  color:#7c5a14;
  font-size:12px;
  font-weight:500;
}
.badge.red{background:#fdecee;color:var(--red);}
.badge.blue{background:#eaf2fb;color:var(--nav);}

/* ============== 底部 ============== */

.site-footer{
  margin-top:28px;
  background:var(--nav-2);
  background-image:linear-gradient(180deg,#0b1f33 0%,#050d1a 100%);
  color:#dbe7f5;
}
.footer-inner{
  padding:32px 0;
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:18px;
}
.footer-inner h4{
  margin:0 0 12px;
  font-size:16px;
  color:#fff;
  position:relative;
  padding-bottom:8px;
}
.footer-inner h4::after{
  content:"";
  position:absolute;
  bottom:0;left:0;
  width:30px;height:2px;
  background:var(--gold);
}
.footer-links{
  list-style:none;
  padding:0;
  margin:0;
}
.footer-links li{
  margin:0 0 8px;
}
.footer-links a{color:#dbe7f5;opacity:.9}
.footer-links a:hover{opacity:1;color:var(--gold);}
.footer-copy{
  border-top:1px solid rgba(255,255,255,.12);
  padding:14px 0;
  font-size:13px;
  color:#b7c7d9;
}
.entry-content{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  box-shadow:var(--shadow);
}
.content-wrap{
  margin:18px 0 28px;
}
.page-title{
  margin:0 0 14px;
  font-size:30px;
  color:var(--nav-2);
}
.notice{
  background:var(--gold-soft);
  border:1px solid #ead7a7;
  color:#7c5a14;
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:16px;
  font-size:14px;
}
.breadcrumb{
  font-size:13px;
  color:var(--muted);
  margin:0 0 12px;
}
.breadcrumb a{color:var(--red);}
.breadcrumb a:hover{text-decoration:underline;}

@media (max-width:1100px){
  .quick-links{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hero-grid,.grid-3,.grid-2,.lawyer-grid,.footer-inner{grid-template-columns:1fr}
  .header-main{flex-wrap:wrap;padding:14px 0;gap:14px;}
  .brand{min-width:auto}
  .header-search{order:3;flex-basis:100%}
  .header-actions{order:2;}
}
@media (max-width:780px){
  .site-utility{display:none;}
  .menu-toggle{display:inline-flex}
  .site-nav{display:none}
  .site-nav.is-open{display:block}
  .nav-inner{flex-direction:column;align-items:stretch;padding:10px 0;gap:8px;}
  .primary-menu{flex-direction:column}
  .primary-menu > li > a{width:100%;justify-content:space-between;height:46px;border-right:0;border-bottom:1px solid rgba(255,255,255,.06);}
  .primary-menu > li:first-child > a{border-left:0;}
  .primary-menu .sub-menu{
    position:static;
    display:block;
    box-shadow:none;
    border:0;
    padding:0 0 0 14px;
  }
  .quick-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-panel{padding:18px}
  .hero h1{font-size:26px}
}
