/* 丰豪律师事务所 - 全局样式（优化版）
 * 说明：
 * 1) 合并了重复选择器（例如 .navbar-logo、移动端 .navbar-menu 等）
 * 2) 统一了移动端导航展开逻辑：使用 max-height 过渡（不再 display:none / display:flex 冲突）
 * 3) 合并了 card-grid / stats-grid 的重复网格定义
 * 4) 合并了「经典案例 / 法律知识」模块中完全一致的样式（搜索框、筛选标签、面包屑等）
 */

/* =========================
   Reset
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   Variables
   ========================= */
:root {
  --primary-color: #C41E3A;
  --secondary-color: #D4AF37;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

/* =========================
   Base
   ========================= */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.matimg img {
  width: 100%;
}

/* =========================
   Navbar
   ========================= */
.navbar {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-right: 12px;
}

/* Logo 文本/图片都兼容 */
.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2px;
}

.logo-text p {
  font-size: 12px;
  color: var(--text-light);
}

/* Logo 图片（如使用 <img>） */
.navbar-logo .logo-text img {
  height: 56px;          /* PC默认高度，可按你导航高度调整 */
  width: auto;
  max-width: 220px;      /* 防止过宽挤压菜单 */
  object-fit: contain;
  display: block;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 16px;
  transition: color 0.3s;
  padding: 8px 0;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary-color);
}

.navbar-contact {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-phone {
  color: var(--text-light);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  line-height: 1; /* 关键：别让行高把基线搞乱 */
}

.contact-phone i {
  color: #C41E3A;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transform: translateY(1px);
}

.phone-text {
  line-height: 1.2;
}

.btn-consult {
  background: var(--secondary-color);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-consult:hover {
  background: #c29d2e;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-dark);
}

/* =========================
   Hero Slider
   ========================= */
.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.95), rgba(196, 30, 58, 0.85));
  display: flex;
  align-items: center;
}

.hero-content {
  color: #fff;
  max-width: 700px;
  animation: fadeInUp 0.7s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-content .subtitle {
  font-size: 28px;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--secondary-color);
  color: #fff;
}

.btn-primary:hover {
  background: #c29d2e;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.2);
}

/* 轮播控制 */
.slider-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.indicator.active {
  width: 32px;
  border-radius: 6px;
  background: #fff;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover {
  background: rgba(255,255,255,0.3);
}

.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

/* =========================
   Sections
   ========================= */
.section {
  padding: 16px 0;
}

.section-bg {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.section-header p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}
.aboutus{
  margin: 0 auto;
}
.aboutus h2{
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-dark);
}
/* =========================
   Grids (merged)
   ========================= */
.card-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* =========================
   Card
   ========================= */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(196, 30, 58, 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(196, 30, 58, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color);
  margin: 0 auto 15px;
  transition: all 0.3s;
}

.card:hover .card-icon {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* =========================
   Team Slider
   ========================= */
.team-slider {
  position: relative;
  overflow: hidden;
  padding: 0 60px;
}

.team-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s ease;
}
.team-track a{
  text-decoration:none;
}
.team-card {
  flex: 0 0 calc(33.333% - 20px);
  min-width: 300px;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.3s;
  border: 2px solid transparent;
  color: var(--primary-color);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(196, 30, 58, 0.5);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid rgba(196, 30, 58, 0.1);
  transition: all 0.3s;
}

.team-card:hover .team-avatar {
  border-color: rgba(196, 30, 58, 0.3);
  transform: scale(1.1);
}

.team-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.team-card:hover h3 {
  color: var(--primary-color);
}

.team-position {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.team-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.specialty-tag {
  padding: 4px 12px;
  background: rgba(196, 30, 58, 0.1);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid rgba(196, 30, 58, 0.2);
}

.team-experience {
  color: var(--text-light);
  font-size: 14px;
}

.team-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.team-arrow:hover {
  background: #a01830;
  transform: translateY(-50%) scale(1.1);
}

.team-arrow.prev { left: 0; }
.team-arrow.next { right: 0; }

/* =========================
   News
   ========================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.news-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-card:hover .news-image {
  transform: scale(1.1);
}

.news-image-wrapper {
  overflow: hidden;
  position: relative;
}

.news-badge {
  background: var(--primary-color);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}
.fisrt-news.news-badge {
  top: 15px;
  left: 15px;
  position: absolute;
  color: #fff;
}
.news-content {
  padding: 25px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 12px;
}

.news-content h3 {
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.4;
  transition: color 0.3s;
}

.news-card:hover h3 {
  color: var(--primary-color);
}

.news-excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 15px;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  gap: 10px;
}

/* 首页新闻布局 */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* 让外层 a 不改变原有样式 */
.news-link {
  display: block;          /* 整卡可点 */
  color: inherit;          /* 不要默认蓝色 */
  text-decoration: none;   /* 去掉下划线 */
}

.news-link:visited,
.news-link:hover,
.news-link:active {
  color: inherit;
  text-decoration: none;
}

.news-link * {
  color: inherit;
}

/* =========================
   Footer
   ========================= */
.footer {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #fff;
}

.footer-section p,
.footer-section li {
  color: #999;
  line-height: 1.8;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 30px;
  text-align: center;
  color: #666;
}

/* =========================
   Float Buttons
   ========================= */
.float-buttons {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none !important; /* 干掉下划线 */
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-btn.contact {
  background: var(--primary-color);
}

.float-btn.scroll-top {
  background: var(--secondary-color);
}

.float-btn .tooltip {
  position: absolute;
  right: 70px;
  background: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  font-size: 14px;
}

.float-btn:hover .tooltip {
  opacity: 1;
}

/* =========================
   Common Banner (Image Only)
   ========================= */
.page-banner {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #111;
}

.page-banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ==========================================================
   Shared styles: Case & Legal (完全一致的内容合并)
   ========================================================== */
.case-search,
.legal-search {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.case-search-icon,
.legal-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

.case-search input,
.legal-search input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s;
  background: #fff;
}

.case-select,
.legal-select {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  color: var(--text-dark);
  outline: none;
  transition: all 0.3s;
}

.case-search input:focus,
.legal-search input:focus,
.case-select:focus,
.legal-select:focus {
  border-color: rgba(196, 30, 58, 0.45);
  box-shadow: 0 0 0 4px rgba(196, 30, 58, 0.10);
}

.case-chip,
.legal-cat {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.case-chip:hover,
.legal-cat:hover {
  border-color: rgba(196, 30, 58, 0.35);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.case-chip.active,
.legal-cat.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.case-grid,
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.case-breadcrumb,
.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 22px;
}

.case-breadcrumb a,
.legal-breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.case-breadcrumb a:hover,
.legal-breadcrumb a:hover {
  color: var(--primary-color);
}

.case-breadcrumb .sep,
.legal-breadcrumb .sep { opacity: 0.6; }

.case-breadcrumb .current,
.legal-breadcrumb .current {
  color: var(--text-dark);
  font-weight: 500;
}

/* =========================
   经典案例模块（列表 + 详情）
   ========================= */
.case-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.case-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.case-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(196, 30, 58, 0.25);
}

.case-card-head {
  margin-bottom: 12px;
}

.case-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.case-badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(196, 30, 58, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(196, 30, 58, 0.18);
  font-weight: 500;
}

.case-badge-top {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.case-title {
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.case-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s;
}

.case-card:hover .case-title a {
  color: var(--primary-color);
}

.case-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 12px;
}

.case-meta-lg {
  font-size: 14px;
  gap: 14px;
}

.case-summary {
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.case-sort {
  color: var(--text-light);
  font-size: 13px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s;
}

.page-btn:hover {
  border-color: rgba(196, 30, 58, 0.35);
  color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ===== 案例详情 ===== */
.case-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
  align-items: start;
}

.case-detail-main {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px;
  border: 2px solid transparent;
}

.case-detail-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.case-detail-title {
  font-size: 28px;
  line-height: 1.35;
  margin: 8px 0 14px;
  color: var(--text-dark);
}

.case-detail-summary {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-light);
  line-height: 1.8;
}

.case-detail-content {
  color: var(--text-dark);
  line-height: 1.85;
}

.case-detail-content h2 {
  font-size: 18px;
  margin: 18px 0 10px;
}

.case-detail-content p {
  margin: 10px 0;
  color: var(--text-light);
}

.case-detail-content ul {
  padding-left: 18px;
  margin: 10px 0;
  color: var(--text-light);
}

.case-detail-content blockquote {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--secondary-color);
  background: rgba(212, 175, 55, 0.08);
  border-radius: 10px;
  color: var(--text-light);
}

.case-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.case-detail-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case-aside-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.case-aside-card h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--text-dark);
}

.case-aside-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-aside-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-light);
  font-size: 14px;
}

.case-aside-list li span { opacity: 0.9; }

.case-aside-list li b {
  color: var(--text-dark);
  font-weight: 600;
}

.case-more-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-more-list a {
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.6;
  transition: color 0.3s;
}

.case-more-list a:hover {
  color: var(--primary-color);
}

/* =========================
   法律知识模块（简洁版：卡片网格 + 单栏详情）
   ========================= */
.legal-hero {
  padding-bottom: 8px;
}

.legal-hero-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.legal-hero-title h2 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.legal-hero-title p {
  color: var(--text-light);
  margin-bottom: 18px;
  line-height: 1.7;
}

/* 分类标签 */
.legal-cats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* 工具栏 */
.legal-toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* 列表网格 */
.legal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.legal-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(196, 30, 58, 0.18);
  transform: translateY(-6px);
}

.legal-card-media {
  display: block;
  height: 180px;
  overflow: hidden;
  background: var(--bg-light);
}

.legal-card-media img {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform: scale(1.02);
}

.legal-card:hover .legal-card-media img {
  transform: scale(1.10);
}

.legal-card-noimg {
  min-height: 300px;
}

.legal-card-noimg .legal-card-body {
  padding-top: 22px;
}

.legal-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.legal-card-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 标签 pill */
.legal-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(196, 30, 58, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(196, 30, 58, 0.18);
  font-weight: 500;
}

.legal-pill-hot {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.35);
  color: #9b7b10;
}

.legal-card-title {
  font-size: 18px;
  line-height: 1.45;
  margin-top: 2px;
}

.legal-card-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s;
}

.legal-card:hover .legal-card-title a {
  color: var(--primary-color);
}

.legal-card-summary {
  color: var(--text-light);
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* meta */
.legal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-light);
  font-size: 13px;
}

.legal-meta-lg {
  font-size: 14px;
  gap: 14px;
}

.legal-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ===== 详情页：单栏 ===== */
.legal-detail-main {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legal-detail-cover {
  height: 320px;
  background: var(--bg-light);
}

.legal-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legal-detail-head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--border-color);
}

.legal-detail-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.legal-detail-title {
  font-size: 30px;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.legal-detail-summary {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  line-height: 1.85;
}

.legal-detail-content {
  padding: 22px 26px 24px;
  line-height: 1.9;
  color: var(--text-dark);
}

.legal-detail-content h2 {
  font-size: 18px;
  margin: 18px 0 10px;
}

.legal-detail-content p {
  margin: 10px 0;
  color: var(--text-light);
}

.legal-detail-content ul {
  padding-left: 18px;
  margin: 10px 0;
  color: var(--text-light);
}

.legal-detail-content blockquote {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--secondary-color);
  background: rgba(212, 175, 55, 0.08);
  border-radius: 10px;
  color: var(--text-light);
}

.legal-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 26px 24px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1024px) {
  /* logo */
  .navbar-logo .logo-text img {
    height: 48px;
    max-width: 180px;
  }

  /* grids */
  .card-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* case detail */
  .case-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* logo */
  .navbar-logo .logo-text img {
    height: 40px;
    max-width: 150px;
  }

  /* navbar */
  .mobile-menu-btn {
    display: block;
  }

  .navbar-contact {
    display: none;
  }

  /* 移动端菜单展开样式（保留 max-height 动画；不再 display:none 冲突） */
  .navbar-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0 20px; /* 收起时不留上下 padding，避免露白 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    gap: 0;
  }

  .navbar-menu.active {
    max-height: 520px;
    padding: 20px;
  }

  .navbar-menu li {
    margin: 10px 0;
  }

  /* hero */
  .hero-slider {
    height: 500px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content .subtitle {
    font-size: 20px;
  }

  .hero-content p {
    font-size: 16px;
  }

  /* section */
  .section {
    padding: 16px 0;
  }

  .section-header h2 ,.aboutus h2{
    font-size: 28px;
  }
  /* grids */
  .card-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* team */
  .team-slider {
    padding: 0 20px;
  }

  .team-card {
    flex: 0 0 100%;
  }

  /* news */
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-layout {
    grid-template-columns: 1fr !important;
  }

  .news-card[style*="grid-row"] {
    grid-row: auto !important;
  }

  /* 首页新闻模块移动端适配（保留你原来的 inline style hack） */
  section .container > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* float buttons */
  .float-buttons {
    right: 20px;
    bottom: 20px;
  }

  .float-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  /* page banner */
  .page-banner {
    height: 220px;
  }

  /* case */
  .case-card {
    padding: 20px;
  }

  .case-detail-main {
    padding: 22px;
  }

  .case-detail-title {
    font-size: 22px;
  }

  .case-toolbar {
    margin-bottom: 22px;
  }

  /* legal */
  .legal-hero-inner {
    padding: 20px;
  }

  .legal-card-media {
    height: 160px;
  }

  .legal-detail-title {
    font-size: 22px;
  }

  .legal-detail-cover {
    height: 240px;
  }

  .legal-detail-content,
  .legal-detail-head,
  .legal-detail-nav {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 400px) {
  .navbar-logo .logo-text img {
    height: 34px;
    max-width: 120px;
  }
}
