/* ============================================
   广东安山（东莞）律师事务所 - 公共样式
   风格：红白主调 · 庄重大气 · 现代专业
   ============================================ */

/* ---------- 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2c2c2c;
  background: #ffffff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ---------- 设计变量 ---------- */
:root {
  --primary: #b12a2a;       /* 主红 */
  --primary-dark: #8b0000;  /* 暗红 */
  --primary-light: #c8161d; /* 亮红 CTA */
  --gold: #c9a961;          /* 金色点缀 */
  --dark: #1a1a1a;
  --text: #2c2c2c;
  --text-light: #666;
  --bg-light: #f8f6f4;      /* 浅米色背景 */
  --bg-gray: #f5f5f5;
  --border: #e8e8e8;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

/* ---------- 容器 ---------- */
.container {
  max-width: 82vw;          /* 大屏占视口宽度 82% */
  margin: 0 auto;
  padding: 0 24px;
}

/* 超大屏限制最大宽度，防止内容过于分散 */
@media (min-width: 1920px) {
  .container {
    max-width: 82vw;        /* 1920px+ 仍保持 82% (≈1574px) */
  }
}

/* 平板及以下：保持原占比（接近100%），手机端不变 */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0 16px;
  }
}

/* ---------- 顶部公告栏 ---------- */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a:hover {
  color: var(--gold);
}

.top-bar-right span {
  margin-left: 24px;
  white-space: nowrap;
}

.top-bar-right i {
  margin-right: 4px;
  color: var(--gold);
}

.top-bar > .container > span {
  white-space: nowrap;
}

/* ---------- 导航栏 ---------- */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--primary);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo img {
  height: 56px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-logo-text .name-cn {
  font-family: "STSong", "SimSun", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 1px;
  white-space: nowrap;
}

.nav-logo-text .name-en {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: rgba(177, 42, 42, 0.06);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-menu .nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-menu .nav-phone:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(177, 42, 42, 0.3);
  color: #ffffff !important;
}

/* ---------- 移动端切换按钮（默认桌面端隐藏）---------- */
.nav-menu-toggle {
  display: none;            /* 桌面端不显示 */
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(177, 42, 42, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
}

.btn-gold:hover {
  background: #b8964f;
  color: var(--white);
}

/* ---------- 页面标题横幅 ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201,169,97,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  font-family: "STSong", "SimSun", serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.page-banner .subtitle {
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
}

.page-banner .breadcrumb {
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.page-banner .breadcrumb a {
  color: rgba(255,255,255,0.7);
}

.page-banner .breadcrumb a:hover {
  color: var(--gold);
}

.page-banner .breadcrumb .sep {
  margin: 0 12px;
  color: var(--gold);
}

/* ---------- 区块标题 ---------- */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title .eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 16px;
  background: rgba(177, 42, 42, 0.08);
  border-radius: 16px;
}

.section-title h2 {
  font-family: "STSong", "SimSun", serif;
  font-size: 38px;
  color: var(--dark);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title .divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 20px;
}

.section-title .divider::before,
.section-title .divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--gold);
}

.section-title .divider .diamond {
  width: 8px;
  height: 8px;
  background: var(--primary);
  transform: rotate(45deg);
}

.section-title p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- 页脚 ---------- */
.footer {
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.footer-brand img {
  height: 48px;
  background: var(--white);
  padding: 4px;
  border-radius: 4px;
}

.footer-brand .firm-name {
  font-family: "STSong", "SimSun", serif;
  font-size: 20px;
  color: var(--white);
  font-weight: 700;
}

.footer-brand .firm-en {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-top: 4px;
}

.footer-brand .desc {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-brand .contact {
  font-size: 14px;
}

.footer-brand .contact p {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.footer-brand .contact i {
  color: var(--gold);
  margin-top: 4px;
  flex-shrink: 0;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--primary);
}

.footer-col ul li {
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-col ul a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-col .qrcode {
  width: 120px;
  height: 120px;
  background: var(--white);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.footer-col .qrcode-text {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 32px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.6);
  margin: 0 8px;
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeInUp 0.8s ease both;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .nav-menu { gap: 20px; }
  .nav-menu a { padding: 10px 14px; font-size: 14px; }
  .nav-logo-text .name-cn { font-size: 18px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-menu.active { display: flex; }
  .nav-menu-toggle { display: block; }   /* 移动端才显示切换按钮 */
  .page-banner h1 { font-size: 32px; letter-spacing: 2px; }
  .section-title h2 { font-size: 28px; }
  .section { padding: 60px 0; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
/* ============================================
   预约弹窗（全局组件，所有页面通用）
   ============================================ */
.booking-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.25s ease;
}

.booking-modal.active {
  display: flex !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.booking-modal-content {
  background: #fff;
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  animation: modalSlideUp 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  position: relative;
}

.booking-modal-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.booking-modal-header::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.25) 0%, transparent 60%);
  border-radius: 50%;
}

.booking-modal-header h3 {
  font-family: "STSong", "SimSun", serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  position: relative;
  letter-spacing: 1px;
}

.booking-modal-header h3 small {
  display: block;
  font-family: "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
  letter-spacing: 1px;
}

.booking-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.booking-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

.booking-modal-body {
  padding: 28px 32px 32px;
  overflow-y: auto;
}

.modal-lead {
  font-size: 14px;
  color: var(--text-light);
  background: linear-gradient(90deg, rgba(177, 42, 42, 0.05) 0%, transparent 100%);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.booking-modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}

.booking-modal-body .form-group {
  margin-bottom: 16px;
}

.booking-modal-body label {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 500;
}

.booking-modal-body label .req {
  color: var(--primary);
  margin-left: 2px;
}

.booking-modal-body input,
.booking-modal-body select,
.booking-modal-body textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  transition: var(--transition);
  color: var(--text);
}

.booking-modal-body input:focus,
.booking-modal-body select:focus,
.booking-modal-body textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(177, 42, 42, 0.1);
}

.booking-modal-body textarea {
  resize: vertical;
  min-height: 90px;
  max-height: 200px;
}

.booking-modal-body .form-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 2px;
  margin-top: 8px;
}

.booking-modal-body .form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(177, 42, 42, 0.3);
}

.booking-modal-body .form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
  line-height: 1.6;
}

.form-agree input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-agree a {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .booking-modal { padding: 12px; align-items: flex-end !important; }
  .booking-modal-content { max-height: 95vh; border-radius: 14px 14px 0 0; }
  .booking-modal-header { padding: 18px 20px; }
  .booking-modal-header h3 { font-size: 18px; }
  .booking-modal-body { padding: 20px; }
  .booking-modal-body .form-row { grid-template-columns: 1fr; gap: 0; }
}
