/* 首页样式：桌面 + 手机自适应（在 style/css.css 之后加载） */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: #f2f3f5; font-family: Microsoft YaHei, "PingFang SC", "宋体", sans-serif;
  color: #333;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

:root {
  --gold: #b89b5f;
  --gold-dark: #8f7640;
  --ink: #2c3038;
  --muted: #6b7280;
  --line: #e6e6e6;
  --card: #ffffff;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100000; padding: 8px 16px; background: #fff; color: var(--gold); }
.skip-link:focus { left: 8px; }

/* ============ 页头 ============ */
div#container, div.container { width: 100%; max-width: 1200px; margin: 0 auto; }
#header { background: #fff; }
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0; position: relative;
}
.header-top .brand { display: block; width: 100%; }
.header-top .brand img { width: 100%; max-width: 1200px; margin: 0 auto; }
.nav-toggle {
  display: none; width: 40px; height: 36px; border: 1px solid var(--line);
  background: #fff; border-radius: 4px; cursor: pointer; padding: 7px 8px;
}
.nav-toggle span { display: block; height: 2px; background: #444; margin: 3px 0; border-radius: 2px; }

.site-nav { background: var(--gold); }
.site-nav .container ul {
  display: flex; justify-content: center; align-items: center; flex-wrap: nowrap;
  margin: 0 auto; padding: 0; list-style: none;
}
.site-nav .container ul li { flex: 0 0 auto; }
.site-nav .container ul li a {
  display: block; padding: 0 24px; height: 46px; line-height: 46px;
  color: #fff; font-size: 16px; white-space: nowrap;
}
.site-nav .container ul li a:hover { background: rgba(0, 0, 0, .12); }
.site-nav .container ul li a[aria-current="page"] { background: rgba(0, 0, 0, .16); }
.site-nav .container ul li.nav-tel { margin-left: auto; }
.site-nav .container ul li.nav-tel a {
  background: #c9302c; font-weight: 700; padding: 0 20px;
}
.site-nav .container ul li.nav-tel a:hover { background: #b02a27; }

.header-info {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 8px 12px; background: #fafafa;
  border-bottom: 1px solid var(--line);
}
.header-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.header-time .time-label { color: var(--ink); }
.header-notice { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; line-height: 1.6; }
.header-notice img { flex: 0 0 auto; margin: 0; }

/* ============ 顶部大图 ============ */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 20px; background: #fff; padding: 20px;
}
.hero-item { display: block; }
.hero-item a { display: block; }
.hero-item img { width: 100%; height: auto; }
.hero-cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  background: #fff; padding: 0 20px 20px; margin-bottom: 20px;
}
.hero-cta img { width: 100%; height: auto; }

/* ============ 横幅下方查询入口 ============ */
.quick-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
  width: 100%; max-width: 1200px; margin: 0 auto 20px; padding: 0;
}
.quick-grid a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 86px; padding: 12px 4px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; color: var(--ink); font-size: 15px; text-align: center;
}
.quick-grid a:hover { color: var(--gold-dark); border-color: var(--gold); box-shadow: 0 4px 14px rgba(184, 155, 95, .18); }
.q-icon { font-size: 24px; line-height: 1; color: var(--gold); }

/* ============ 主体栏目 ============ */
.bg3 { width: 100%; display: flex; gap: 20px; align-items: stretch; padding: 0 0 20px; }
.bg3 .main { float: none; width: calc(100% - 306px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-content: start; }
.bg3 .right { float: none; width: 286px; flex: 0 0 286px; display: flex; flex-direction: column; }

.module, .side-block { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
/* 干净的标题栏：金色竖条 + 底部细线，覆盖旧模板带红线的背景图 */
.bg3 .main .module .tit_br,
.bg3 .right .side-block .tit_br {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 12px 0 14px; background-color: #fafaf8;
  background-image: none !important;
  border-bottom: 1px solid var(--line);
}
.bg3 .main .module .tit_br .title,
.bg3 .right .side-block .tit_br .title { display: flex; align-items: center; height: 100%; }
.bg3 .main .module .tit_br .title h2,
.bg3 .right .side-block .tit_br .title h2 {
  position: relative; padding-left: 12px; font-size: 17px; font-weight: 700;
  line-height: 44px; color: var(--ink); background: none !important;
  background-image: none !important; margin: 0 !important; letter-spacing: 0;
}
.bg3 .main .module .tit_br .title h2::before,
.bg3 .right .side-block .tit_br .title h2::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 4px; height: 18px;
  background: var(--gold); border-radius: 2px;
}
.bg3 .main .module .tit_br .more,
.bg3 .right .side-block .tit_br .more { float: none; padding: 0; font-size: 13px; }
.bg3 .main .module .tit_br .more a,
.bg3 .right .side-block .tit_br .more a { color: var(--muted); line-height: 44px; padding-top: 0; }
.bg3 .main .module .tit_br .more a:hover,
.bg3 .right .side-block .tit_br .more a:hover { color: var(--gold-dark); }

/* 栏目正文：左侧配图 + 右侧简约列表 */
.mod-body { display: flex; gap: 12px; padding: 12px; }
.mod-thumb {
  flex: 0 0 100px; width: 100px; height: 133px; overflow: hidden;
  background: #f2f2f2; border: 1px solid var(--line); border-radius: 3px;
}
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-list { flex: 1; min-width: 0; }
.mod-list ul { margin: 0; padding: 0; list-style: none; }
.mod-list li {
  position: relative; padding: 2px 0 2px 14px; font-size: 13.5px; line-height: 1.75;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mod-list li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 5px; height: 5px;
  background: var(--gold); border-radius: 50%;
}
.mod-list li span.left { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mod-list li a { color: #3d4149; }
.mod-list li a:hover { color: var(--gold-dark); }

/* ============ 右侧栏 ============ */
/* 右栏与主栏等高：卡片均分剩余高度，底部对齐，不留大片空白 */
.bg3 .right .side-block { flex: 1 1 auto; display: flex; flex-direction: column; }
.bg3 .right .side-block .list_br { flex: 1 1 auto; }

/* 「推荐律师」图文推荐卡 */
.lawyer-card {
  display: flex; gap: 10px; margin: 10px 12px 6px; padding: 10px;
  background: #fafaf8; border: 1px solid var(--line); border-radius: 4px;
}
.lawyer-photo {
  flex: 0 0 58px; width: 58px; height: 78px; overflow: hidden;
  background: #eee; border-radius: 3px;
}
.lawyer-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.lawyer-info { flex: 1; min-width: 0; }
.lawyer-info p { margin: 0 0 4px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.lawyer-name { font-size: 15px; font-weight: 700; margin-bottom: 5px !important; }
.lawyer-name a { color: var(--ink); }
.lawyer-name a:hover { color: var(--gold-dark); }
.lawyer-org { color: #4b5158; }
.lawyer-skill { color: var(--muted); }
.lawyer-more { display: inline-block; margin-top: 3px; font-size: 12.5px; color: var(--gold); }
.lawyer-more:hover { color: var(--gold-dark); }
.side-block .list_br ul { margin: 0; padding: 8px 14px; list-style: none; }
.side-block li {
  position: relative; padding: 3px 0 3px 14px; font-size: 13.5px; line-height: 1.8;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.side-block li::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px;
  background: var(--gold); border-radius: 50%;
}
.side-block li span.left { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-block li a { color: #3d4149; }
.side-block li a:hover { color: var(--gold-dark); }

/* ============ 横幅与自动播放图廊 ============ */
.banner-strip { background: #fff; margin-bottom: 20px; overflow: hidden; }
.banner-strip img { width: 100%; height: auto; }
.gallery-strip { background: #fff; padding: 16px 0 20px; margin-bottom: 20px; }
.gallery-viewport { overflow: hidden; }
.gallery-track { display: flex; gap: 12px; width: max-content; will-change: transform; }
.gallery-track img { flex: 0 0 auto; width: 200px; height: 150px; object-fit: cover; border-radius: 3px; }

/* ============ 友情链接 ============ */
.link-block { background: #fff; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.bg3 .right .side-block .tit_br + .list_br { border: 0; }
.link-block .tit_br {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 12px 0 14px; background-color: #fafaf8;
  background-image: none !important; border-bottom: 1px solid var(--line);
}
.link-block .tit_br .title h2 {
  position: relative; padding-left: 12px; font-size: 17px; font-weight: 700;
  line-height: 44px; color: var(--ink); background: none !important;
  background-image: none !important; margin: 0 !important;
}
.link-block .tit_br .title h2::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 4px; height: 18px;
  background: var(--gold); border-radius: 2px;
}
.links-list { display: flex; flex-wrap: wrap; gap: 0; padding: 6px 8px; }
.links-list a {
  flex: 0 0 auto; padding: 8px 18px; font-size: 13.5px; color: #555;
  border-right: 1px dashed var(--line);
}
.links-list a:hover { color: var(--gold-dark); }

/* ============ 页脚 ============ */
#siteFooter { background: #33383f; color: #c9ccd1; margin-top: 10px; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; padding: 26px 12px 20px; flex-wrap: wrap;
}
.footer-brand img { width: 200px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.8; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0; }
.footer-links a { padding: 6px 16px; color: #c9ccd1; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px;
  padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px; color: #9aa0a6;
}
.footer-bottom img { display: block; flex: 0 0 auto; }
.footer-bottom > span { display: inline-flex; align-items: center; gap: 6px; line-height: 20px; }
.footer-bottom .beian-txt { display: inline-block; line-height: 20px; }
.footer-bottom a { color: #9aa0a6; }
.footer-bottom a:hover { color: #fff; }

/* ============ 桌面端右侧固定咨询栏 ============ */
/* 图标与文字完整显示；号码气泡向左展开在视口内，绝不被裁切 */
.fixed {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 9999; display: block;
}
.fixed ul { margin: 0; padding: 0; list-style: none; }
.fixed ul li {
  width: 76px; height: 84px; background: var(--gold); color: #fff;
  text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .28);
  position: relative; cursor: pointer; overflow: visible;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.fixed ul li a { color: #fff; display: block; width: 100%; }
.fixed ul li .img { width: 40px; margin: 10px auto 0; padding: 0; }
.fixed ul li .img img { width: 40px; height: 40px; object-fit: contain; display: block; }
.fixed ul li p { margin: 5px 0 0; font-size: 12px; line-height: 1.2; color: #fff; }
/* 号码气泡：从右侧向左展开，完整落在视口内 */
.fixed ul li .p1 {
  position: absolute; top: 0; right: 76px; width: 180px; min-height: 84px;
  background: #fff; border: 1px solid var(--line); color: var(--gold-dark);
  font-weight: 700; font-size: 16px; line-height: 1.4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateX(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 99999; cursor: default;
}
.fixed ul li .p1 span { font-size: 12px; color: var(--muted); font-weight: 400; display: block; }
.fixed ul li:hover .p1 { opacity: 1; visibility: visible; transform: translateX(0); }
.m_fixed, .kong { display: none; }

/* ============ 手机端 ============ */
@media (max-width: 992px) {
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bg3 { flex-direction: column; }
  .bg3 .main, .bg3 .right { width: 100%; flex: 1 1 auto; }
}

@media (max-width: 768px) {
  body { background: #fff; }
  .header-top { height: 64px; overflow: hidden; }
  .header-top .brand { width: auto; }
  .header-top .brand img { width: auto; height: 64px; max-width: none; object-fit: cover; object-position: left center; }
  .nav-toggle { display: block; flex: 0 0 auto; position: absolute; right: 12px; top: 14px; z-index: 99999; }
  .site-nav { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .45); z-index: 99998; visibility: hidden; opacity: 0; transition: opacity .25s ease; }
  .site-nav .container { background: #fff; width: 78%; max-width: 320px; height: 100%; margin: 0; padding: 20px 0; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; }
  .site-nav.open { visibility: visible; opacity: 1; }
  .site-nav.open .container { transform: translateX(0); }
  .site-nav .container ul { display: block; }
  .site-nav .container ul li { width: 100%; }
  .site-nav .container ul li a { padding: 0 20px; height: 48px; line-height: 48px; color: var(--ink); border-bottom: 1px solid var(--line); font-size: 15px; }
  .site-nav .container ul li a[aria-current="page"] { color: var(--gold-dark); background: #faf8f3; }
  .site-nav .container ul li.nav-tel { margin-left: 0; }
  .site-nav .container ul li.nav-tel a { background: #c9302c; color: #fff; border-bottom: 0; margin: 12px 20px 0; border-radius: 4px; text-align: center; }
  body.nav-open { overflow: hidden; }
  .header-info { display: none; }

  .hero { display: block; padding: 12px; margin-top: 12px; }
  .hero-item { display: none; }
  .hero-item.active { display: block; animation: heroFade .6s ease; }
  @keyframes heroFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .hero-cta { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 12px; margin-bottom: 12px; }

  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px; margin-bottom: 14px; }
  .quick-grid a { min-height: 70px; font-size: 13px; padding: 8px 2px; }
  .q-icon { font-size: 20px; }

  .bg3 { padding: 0 12px 14px; }
  .bg3 .main { grid-template-columns: 1fr; gap: 12px; }
  .mod-body { padding: 10px; }
  .mod-thumb { flex: 0 0 86px; width: 86px; height: 115px; }
  .mod-list li { font-size: 13px; }
  .tit_br .title h2 { font-size: 15.5px; }
  .tit_br .more a { font-size: 12.5px; }

  .banner-strip { margin: 0 12px 14px; }
  .gallery-strip { margin: 0 12px 14px; padding: 12px 0 14px; }
  .gallery-track img { width: 148px; height: 112px; }
  .link-block { margin: 0 12px 14px; }
  .links-list { padding: 4px 2px; }
  .links-list a { padding: 8px 12px; font-size: 13px; }

  .footer-top { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 12px 14px; }
  .footer-brand img { width: 170px; }
  .footer-links a { padding: 6px 12px; }
  .footer-bottom { padding: 10px 12px; gap: 4px 18px; }

  .fixed { display: none; }
  .m_fixed {
    display: block; position: fixed; left: 0; bottom: 0; width: 100%;
    background: var(--gold); z-index: 99999; box-shadow: 0 -2px 10px rgba(0, 0, 0, .12);
  }
  .m_fixed ul { display: flex; }
  .m_fixed ul li { width: 50%; height: 54px; position: relative; }
  .m_fixed ul li + li::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 1px; background: rgba(255, 255, 255, .35);
  }
  .m_fixed ul li a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 100%; color: #fff; font-size: 14.5px;
  }
  .m_fixed .img { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .m_fixed .img img { width: 100%; height: 100%; object-fit: contain; }
  .m_fixed p { margin: 0; }
  /* 首项同时显示咨询号码，便于直接核对与拨打 */
  .m_fixed .m-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
  .m_fixed .m-txt p { font-size: 14.5px; font-weight: 700; }
  .m_fixed .mtel { font-size: 11.5px; font-style: normal; opacity: .95; letter-spacing: .2px; white-space: nowrap; }
  .kong { display: block; height: 54px; }
  .skip-link { display: none; }
}

@media (max-width: 480px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-top .brand img { max-width: 58%; }
  .mod-thumb { flex: 0 0 78px; width: 78px; height: 104px; }
  .mod-list li { font-size: 12.5px; line-height: 1.7; }
  .tit_br .title h2 { font-size: 14.5px; }
}
