:root {
  --primary: #1a56db;
  --primary-light: #f0f4ff;
  --accent: #c8a45a;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 10px 0;
}
.navbar.scrolled .nav-link,
.navbar.scrolled .nav-title { color: var(--text-dark); }
.navbar.scrolled .nav-toggle span { background: var(--text-dark); }
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; text-decoration: none; }
.nav-logo { height: 40px; margin-right: 12px; }
.nav-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  transition: color 0.3s;
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-link {
  text-decoration: none;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-link:hover { 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(--white);
  transition: all 0.3s;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('ho.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 60, 0.6);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}
.hero-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 6px;
  opacity: 0.9;
}
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
  opacity: 0.7;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-10px); }
  60% { transform: rotate(45deg) translateY(-5px); }
}

/* ========== 通用板块 ========== */
.section { padding: 80px 24px; }
.section-container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  display: inline-block;
  position: relative;
  padding-bottom: 12px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.bg-light { background: var(--primary-light); }

/* ========== 关于我们 ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p {
  margin-bottom: 16px;
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.8;
  text-indent: 2em;
}
.carousel-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.carousel-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s ease;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-dark);
  transition: background 0.3s;
}
.carousel-btn:hover { background: var(--white); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}
.carousel-dot.active { background: var(--white); }

/* ========== 业务领域 ========== */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.practice-card {
  background: var(--white);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.practice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.practice-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}
.practice-icon svg { width: 100%; height: 100%; }
.practice-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.practice-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========== 律师团队 ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.team-card {
  background: var(--white);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.team-photo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 3px solid var(--primary-light);
}
.team-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.team-title {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}
.team-skill {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 联系我们 ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.contact-label { font-size: 14px; color: var(--text-light); margin-bottom: 2px; }
.contact-value { font-size: 16px; color: var(--text-dark); }
.contact-value a { color: var(--primary); text-decoration: none; }
.contact-value a:hover { text-decoration: underline; }
.contact-map {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.contact-qrcodes {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-top: 16px;
}
.qrcode-item { text-align: center; }
.qrcode-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.qrcode-label {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-light);
}

/* ========== 页脚 ========== */
.footer {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 24px;
  font-size: 14px;
}

.footer a {
  color: #eee;
  text-decoration: none;
}
.footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.footer-links a {
  color: #c1bbbb;
  text-decoration: none;
}
.footer-links a:hover {
  color: #fff;
}

/* ========== 响应式 - 平板 ========== */
@media (min-width: 768px) and (max-width: 1023px) {
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 响应式 - 手机 ========== */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 0;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  }
  .nav-menu.active { right: 0; }
  .nav-menu .nav-link {
    color: var(--text-dark);
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
  }
  .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero-title { font-size: 28px; letter-spacing: 2px; }
  .hero-subtitle { font-size: 14px; letter-spacing: 3px; }

  .section { padding: 60px 20px; }
  .section-title { font-size: 26px; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .carousel-img { height: 240px; }

  .practice-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .practice-card { padding: 24px 16px; }

  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .team-photo { width: 80px; height: 80px; }

  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-qrcodes { gap: 24px; }
  .qrcode-img { width: 120px; height: 120px; }
}