/* 全局样式 - 广东东方昆仑（东莞）律师事务所 */

/* 添加CSS变量支持 */
:root {
  --mobile-content-width: 420px;
}

/* 基础样式 */
body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  /* 优化字体栈，确保苹果和鸿蒙系统兼容性 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "HarmonyOS Sans SC", "HarmonyOS Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Serif SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  /* 苹果系统字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* 鸿蒙系统字体渲染优化 */
  font-feature-settings: "kern" 1;
  font-variant-ligatures: common-ligatures;
}

/* 自适应缩放样式 */
html {
  /* 确保缩放时不出现滚动条 */
  overflow: hidden;
  /* 设置flex布局来居中页面 */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

body {
  /* 确保页面内容居中 */
  transform-origin: top center;
  /* 防止缩放时出现空白 */
  min-width: 100%;
  min-height: 100vh;
  /* 确保body在html容器中居中 */
  margin: 0;
  position: relative;
}

/* 修复悬浮导航栏在缩放后的定位问题 */
.floating-nav {
  /* 确保悬浮导航栏不受body的transform影响 */
  position: fixed !important;
  z-index: 10000 !important;
}

/* 针对缩放模式的特殊处理 - 桌面端 */
@media (min-width: 577px) {
  body[style*="transform"] .floating-nav {
    /* 当body被缩放时，确保悬浮导航栏保持正确位置 */
    position: fixed !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10000 !important;
  }
}

/* 针对缩放模式的特殊处理 - 移动端 */
@media (max-width: 576px) {
  body[style*="transform"] .floating-nav {
    /* 移动端保持底部居中 */
    position: fixed !important;
    bottom: 15px !important;
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 10000 !important;
  }
}

* {
  box-sizing: border-box;
  /* 确保触摸操作在所有系统上正常工作 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 允许文本选择的元素 */
p, span, div, h1, h2, h3, h4, h5, h6, li, td, th {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 容器 */
.container {
  max-width: 1400px;
  padding: 0 15px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}

/* 微信浏览器兼容性处理 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .container {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* 顶部信息栏 */
.top-bar {
  background-color: #1a1a1a;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.top-bar .container {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

.contact-info span {
  margin-right: 20px;
  color: #b8b8b8;
}

.contact-info i {
  color: #c5b17e;
  margin-right: 5px;
}

.top-bar .social-links a {
  color: #b8b8b8;
  margin-left: 15px;
  transition: color 0.3s ease;
  text-decoration: none; /* 确保没有下划线 */
  border-bottom: none; /* 明确移除底部边框 */
}

.top-bar .social-links a:hover {
  color: #c5b17e;
}

/* 导航栏 */
.header {
  padding: 15px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 100;
  background: #fff;
}

.header .container {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-left: 85px; /* 增加左内边距，与logo大小匹配 */
}

.logo:before {
  content: "";
  position: absolute;
  left: -20px; /* 向左移动10px */
  top: 50%;
  transform: translateY(-50%);
  width: 85px; /* 增加宽度 */
  height: 57px; /* 增加高度 */
  background-image: url("../images/miscellaneous/logo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "HarmonyOS Sans SC", "HarmonyOS Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Serif SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
  /* 确保在所有系统上字体渲染一致 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logo-en {
  font-size: 14px;
  font-weight: 500;
  color: #9a8652;
  letter-spacing: 1px;
  margin-top: 5px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "HarmonyOS Sans", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  /* 确保英文字体在所有系统上显示正确 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-nav ul {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0 15px;
}

.main-nav a {
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 5px;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #9a8652;
}

.main-nav a:not(.social-links a):after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #9a8652;
  transition: width 0.3s ease;
}

.main-nav a:not(.social-links a):hover:after,
.main-nav a:not(.social-links a).active:after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* 页面标题区域 */
.page-title {
  margin-bottom: 0;
  padding: 25px 0;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eaeaea;
  position: relative;
}

.page-title:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #9a8652, #c5b17e, #9a8652);
}

/* 首页保持原样式 */
.home-page .page-title {
  padding: 40px 0;
  background-color: #1a1a1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 确保内页样式正确应用 */
.inner-page .page-title {
  background-color: #f8f9fa;
  padding: 25px 0;
  border-bottom: 1px solid #eaeaea;
}

.page-title h1 {
  font-weight: 700;
  color: #333;
  margin: 0 0 10px;
  font-size: 30px;
}

.home-page .page-title h1 {
  color: #fff;
  font-size: 32px;
}

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  font-size: 14px;
  color: #666;
}

.home-page .breadcrumb {
  color: #b8b8b8;
}

.breadcrumb li {
  margin-right: 20px;
  position: relative;
}

.breadcrumb li:not(:last-child):after {
  content: "›";
  position: absolute;
  right: -15px;
  top: 0;
  color: #999;
}

.home-page .breadcrumb li:not(:last-child):after {
  color: #9a8652;
}

.breadcrumb a {
  color: #9a8652;
  text-decoration: none;
  transition: color 0.3s ease;
}

.home-page .breadcrumb a {
  color: #c5b17e;
}

.breadcrumb a:hover {
  color: #333;
  text-decoration: underline;
}

.home-page .breadcrumb a:hover {
  color: #fff;
  text-decoration: none;
}

/* 按钮样式 */
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 0;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
}

.btn-primary {
  background-color: #9a8652;
  color: #fff;
}

.btn-primary:hover {
  background-color: #7d6b42;
}

.btn-outline {
  background-color: transparent;
  color: #9a8652;
  border: 1px solid #9a8652;
}

.hero-section .btn-outline {
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-color: #fff;
}

.hero-section .btn-outline:hover {
  background-color: #fff;
  color: #333;
  border-color: #fff;
}

.btn-outline:hover {
  background-color: #9a8652;
  color: #fff;
}

/* 移动端按钮样式优化 */
@media (max-width: 768px) {
  .btn {
    padding: 10px 20px;
    font-size: 14px;
    letter-spacing: 0.5px;
    /* 添加触摸反馈 */
    -webkit-tap-highlight-color: transparent;
  }

  /* 改进触摸体验 */
  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  /* 确保按钮在小屏幕上有足够的触摸区域 */
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 联系我们区域 */
.cta-section {
  background-color: #f8f9fa;
  padding: 70px 0;
  border-top: 1px solid #eaeaea;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cta-content h2 {
  font-size: 30px;
  color: #333;
  margin-bottom: 15px;
}

.cta-content p {
  color: #666;
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.6;
}

/* 底部区域 */
.footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 80px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #9a8652, #c5b17e, #9a8652);
}

.footer-content {
  display: -webkit-flex;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  align-items: flex-start;
}

.footer-column {
  -webkit-flex: 1;
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
  padding-right: 30px;
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

/* 调整业务领域列的位置 */
.footer-column.practice {
  margin-left: 30px; /* 向右移动 */
  margin-right: -10px; /* 补偿空间 */
}

/* 第一列特殊样式，使其与其他列标题对齐 */
.footer-column:first-child {
  padding-top: 8px;
}

.footer-logo h2 {
  margin: 0;
  font-size: 26px;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  position: relative;
  padding-left: 75px;
  white-space: nowrap;
}

.footer-logo {
  position: relative;
  margin-bottom: 20px;
  padding: 5px 0;
  margin-left: -10px;
}

.footer-logo:before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 75px;
  height: 50px;
  background-image: url("../images/miscellaneous/logo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 5px;
}

.footer-logo .logo-en {
  font-size: 13px;
  margin-top: 5px;
  padding-left: 75px;
  color: #c5b17e;
  letter-spacing: 1.2px;
}

.footer-column p {
  color: #b8b8b8;
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 15px;
}

/* 第一列段落特殊样式 */
.footer-column:first-child p {
  max-width: 85%;
  padding-right: 0;
  font-size: 16px;
  margin-left: -15px;
  margin-top: -5px;
}

.footer-column h3 {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #fff;
  position: relative;
  padding-bottom: 10px;
  font-weight: 600;
}

.footer-column h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #9a8652, #c5b17e);
  border-radius: 3px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.footer-links li:hover {
  transform: translateX(5px);
}

.footer-links a {
  color: #b8b8b8;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  position: relative;
  padding-left: 15px;
}

.footer-links a:before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: #9a8652;
  font-size: 18px;
  line-height: 1;
}

.footer-links a:hover {
  color: #9a8652;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  margin-bottom: 10px;
  color: #b8b8b8;
  display: flex;
  align-items: flex-start;
  transition: transform 0.2s ease;
}

.footer-contact li:hover {
  transform: translateX(5px);
}

.footer-contact a {
  color: #b8b8b8;
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-contact i {
  color: #c5b17e;
  margin-right: 15px;
  min-width: 20px;
  text-align: center;
  margin-top: 5px;
  font-size: 16px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none; /* 确保没有下划线 */
  border-bottom: none; /* 明确移除底部边框 */
}

.social-links a:hover {
  background-color: #9a8652;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(154, 134, 82, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  text-align: center;
  color: #999;
  font-size: 14px;
  position: relative;
  clear: both;
  width: 100%;
}

.footer-bottom:before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #9a8652, transparent);
}

/* 图片轮播样式 */
.image-carousel-container {
  position: relative;
  overflow: hidden; /* 确保图片在容器内 */
  border-radius: 8px; /* 添加圆角效果 */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25); /* 增强阴影效果，使其更加明显 */
  margin: 10px 0; /* 增加上下间距 */
}

.image-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-image {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0; /* 默认透明 */
  transition: opacity 1s ease; /* 过渡时间为1秒，使渐变效果更平滑 */
  object-fit: cover; /* 确保图片覆盖整个容器 */
  border: 1px solid #eaeaea; /* 添加细边框 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* 增强图片阴影效果 */
}

.carousel-image.active {
  opacity: 1; /* 活动图片完全显示 */
  z-index: 1; /* 确保活动图片在最上层 */
}

/* 移除手动控制按钮样式，保留类名以兼容JS */
.carousel-control {
  display: none;
}

/* 关于我们页面特定轮播图尺寸调整 */
.about-section .about-image.image-carousel-container {
  width: 45%; /* 根据布局调整 */
  height: 400px; /* 设置固定高度 */
  overflow: hidden; /* 确保内容不溢出 */
}

.about-section .about-image .carousel-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 确保图片覆盖整个容器并保持比例 */
}

/* 响应式调整 */
@media (max-width: 992px) {
  .footer-column {
    flex: 0 0 50%;
    padding-right: 30px;
  }

  /* 确保在平板尺寸下业务领域列仍然正确对齐 */
  .footer-column.practice {
    margin-left: 0;
    margin-right: 0;
  }

  .footer {
    padding: 60px 0 25px;
  }

  .footer-content {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  /* 移除之前对移动端顶部信息栏的平移和宽度限制 */
  .top-bar .container {
    transform: none;
    width: 100%;
    padding: 10px 15px;
    text-align: center; /* 文字居中 */
    justify-content: center; /* 确保flex布局居中 */
  }

  /* 顶部信息栏字体和图标缩小 */
  .contact-info span {
    font-size: 12px; /* 缩小字体 */
    margin-right: 12px; /* 减小右边距 */
  }

  .contact-info i {
    font-size: 12px; /* 缩小图标 */
  }

  /* 移动端头部容器居中对齐 */
  .header .container {
    transform: none;
    width: 100%;
    flex-direction: row; /* 保持水平排列 */
    justify-content: center; /* 整体居中 */
    align-items: center;
    padding: 10px 15px;
    margin: 0;
  }

  /* LOGO样式保持与PC端相似，只是整体缩小 */
  .logo {
    padding-left: 60px; /* 保持左内边距给LOGO图标留空间 */
    margin-bottom: 0;
    position: relative;
  }

  .logo:before {
    width: 55px;
    height: 37px;
    left: -10px;
    top: 50%; /* 保持垂直居中 */
    transform: translateY(-50%); /* 保持原来的垂直居中变换 */
  }

  .logo h1 {
    font-size: 18px;
    line-height: 1.2;
  }

  .logo-en {
    text-align: left; /* 英文名称保持左对齐 */
  }

  /* 隐藏移动端菜单按钮 */
  .mobile-menu-btn {
    display: none !important;
  }

  /* 隐藏移动导航菜单 */
  .main-nav {
    display: none !important;
  }

  .main-nav.active {
    display: none !important;
  }

  .page-title {
    padding: 20px 0;
  }

  .page-title h1 {
    font-size: 26px;
  }

  .home-page .page-title h1 {
    font-size: 28px;
  }

  .footer {
    padding: 40px 0 15px;
  }

  .footer-content {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .footer-column {
    flex: 0 0 100%;
    padding-right: 0;
    margin-bottom: 25px;
  }

  .footer-column:first-child {
    padding-top: 0;
  }

  .footer-logo h2 {
    font-size: 22px;
    padding-left: 65px;
  }

  .footer-logo:before {
    width: 60px;
    height: 40px;
  }

  .footer-logo .logo-en {
    padding-left: 65px;
  }

  .footer-column h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 12px;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 8px;
    gap: 8px;
  }

  .footer-bottom {
    padding-top: 15px;
    font-size: 13px;
    clear: both;
    width: 100%;
  }

  .footer-links li {
    margin-bottom: 6px;
  }

  .footer-contact li {
    margin-bottom: 8px;
  }

  .footer-column p {
    margin-bottom: 10px;
  }

  /* 页脚栏目样式修改 */
  .footer-column.quick-links,
  .footer-column.practice,
  .footer-column.contact-info {
    display: none; /* 隐藏快速链接、业务领域和联系方式栏目 */
  }

  /* 隐藏页脚logo和律所名称 */
  .footer-logo {
    display: none;
  }

  .footer-column:first-child {
    padding-top: 0;
    flex: 0 0 100%;
    display: block; /* 确保第一个栏目显示 */
  }
}

/* 首页特定样式 */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background-color: #f8f9fa;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 15px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* 首页横幅移动端优化 */
@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
    min-height: 400px;
  }

  .hero-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 80%;
    max-width: 250px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* 关于我们页面样式 */
.about-section {
  padding: 80px 0;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  height: auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.about-text h2 {
  font-size: 36px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.about-text h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #9a8652;
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #666;
}

/* 关于我们页面移动端优化 */
@media (max-width: 768px) {
  .about-section {
    padding: 50px 0;
  }

  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  .about-text {
    order: 2; /* 在移动端，文字内容放在图片下方 */
  }

  .about-image {
    order: 1; /* 在移动端，图片放在文字内容上方 */
    width: 100%;
    height: 300px;
  }

  .about-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .about-text p {
    font-size: 15px;
    margin-bottom: 15px;
  }

  /* 图片轮播在移动端的调整 */
  .about-section .about-image.image-carousel-container {
    width: 100%;
    height: 300px;
  }
}

/* 业务领域页面样式 */
.practice-areas-section {
  padding: 80px 0;
  background-color: #f8f9fa;
}

.practice-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.practice-area-card {
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.practice-area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.practice-area-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 0;
  background-color: #9a8652;
  transition: height 0.3s ease;
}

.practice-area-card:hover:before {
  height: 100%;
}

.practice-area-content {
  padding: 30px;
}

.practice-area-icon {
  font-size: 40px;
  color: #9a8652;
  margin-bottom: 20px;
}

.practice-area-content h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #333;
}

.practice-area-content p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.practice-area-link {
  color: #9a8652;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.practice-area-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.practice-area-link:hover i {
  transform: translateX(5px);
}

/* 业务领域移动端优化 */
@media (max-width: 768px) {
  .practice-areas-section {
    padding: 50px 0;
  }

  .practice-areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
  }

  .practice-area-content {
    padding: 12px;
    text-align: center;
  }

  .practice-area-icon {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .practice-area-content h3 {
    font-size: 15px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .practice-area-content p {
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 减少显示行数 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 32px; /* 固定高度，确保一致性 */
  }

  .practice-area-link {
    font-size: 12px;
  }

  /* 确保卡片在移动端也有良好的触摸体验 */
  .practice-area-card {
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }

  .practice-area-card:active {
    transform: scale(0.98);
  }
}

/* 联系我们页面样式 */
.contact-section {
  padding: 80px 0;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-info h2 {
  font-size: 36px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.contact-info h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #9a8652;
}

.contact-info p {
  margin-bottom: 30px;
  line-height: 1.8;
  color: #666;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-details li {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
}

.contact-details i {
  color: #9a8652;
  font-size: 20px;
  margin-right: 15px;
  min-width: 20px;
  text-align: center;
}

.contact-details strong {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.contact-form h2 {
  font-size: 36px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.contact-form h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #9a8652;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #9a8652;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* 联系我们页面移动端优化 */
@media (max-width: 768px) {
  .contact-section {
    padding: 50px 0;
  }

  .contact-container {
    flex-direction: column;
    gap: 40px;
  }

  .contact-info,
  .contact-form {
    width: 100%;
  }

  .contact-info h2,
  .contact-form h2 {
    font-size: 28px;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .contact-info p {
    margin-bottom: 20px;
    font-size: 15px;
  }

  .contact-details li {
    margin-bottom: 15px;
  }

  .contact-details i {
    font-size: 18px;
    margin-right: 12px;
  }

  .contact-details strong {
    font-size: 16px;
  }

  .form-control {
    padding: 10px 12px;
    font-size: 15px;
  }

  textarea.form-control {
    min-height: 120px;
  }

  .btn {
    width: 100%;
    padding: 12px 20px;
  }

  /* 地图在移动端的调整 */
  .map-container {
    height: 300px;
    margin-top: 30px;
  }
}

/* 律师团队页面样式 */
.team-showcase {
  padding: 0;
  background-color: #f8f9fa;
  min-height: 60vh; /* 减少最小高度 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lawyer-carousel-container {
  position: relative;
  width: 100%;
  height: auto; /* 改为自适应高度 */
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  border: 1px solid #eaeaea;
}

.lawyer-carousel {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  height: 100%;
}

.lawyer-slide {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.lawyer-card {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: #fff;
}

.lawyer-image {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.lawyer-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lawyer-info-card {
  position: absolute;
  bottom: 50px;
  right: 50px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 25px 30px;
  min-width: 280px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #9a8652;
  z-index: 5;
  text-align: left;
}

.lawyer-info-card h3 {
  font-size: 32px;
  margin: 0 0 5px;
  font-weight: 700;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "Noto Serif SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 1px;
}

.lawyer-info-card .position {
  font-size: 18px;
  color: #9a8652;
  margin: 0 0 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.lawyer-info-card .specialty {
  font-size: 15px;
  color: #666;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #eaeaea;
  line-height: 1.5;
}

.lawyer-info-card:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background-image: linear-gradient(135deg, transparent 50%, #9a8652 50%);
  opacity: 0.2;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 10;
  padding: 0 140px;
  pointer-events: none;
}

.carousel-control {
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 22px;
  pointer-events: auto;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
}

.carousel-control:hover {
  background-color: #9a8652;
  color: #fff;
}

.slide-counter {
  position: absolute;
  bottom: 50px;
  left: 50px;
  background-color: #f8f9fa;
  color: #666;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 0;
  font-weight: 500;
  letter-spacing: 1px;
  border: 1px solid #eaeaea;
}

.page-tag {
  position: absolute;
  top: 50px;
  left: 50px;
  transform-origin: 0 0;
  transform: rotate(90deg) translateX(-100%);
  font-size: 13px;
  color: #999;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.page-tag:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background-color: #9a8652;
  margin-right: 10px;
}

/* 业务领域详情页移动端优化 */
@media (max-width: 768px) {
  .practice-detail-section {
    padding: 40px 0 !important;
  }

  /* 业务领域详情页的内容布局优化 */
  .practice-detail-section .container > div > div {
    flex-direction: column !important;
    gap: 30px !important;
  }

  .practice-detail-section .container > div > div > div {
    flex: 1 !important;
    min-width: 100% !important;
  }

  .practice-detail-section h2 {
    font-size: 24px !important;
    margin-bottom: 15px !important;
  }

  .practice-detail-section p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .practice-detail-section ul li {
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }

  .practice-detail-section img {
    max-height: 250px !important;
    object-fit: cover !important;
  }

  /* CTA部分的移动端优化 */
  .cta-section {
    padding: 30px 0 !important;
    margin-top: 0 !important;
  }

  /* 律师团队页面后的CTA部分特殊处理 */
  .team-showcase + .cta-section {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }

  .cta-content h2 {
    font-size: 24px !important;
  }

  .cta-content p {
    font-size: 15px !important;
    margin-bottom: 20px !important;
  }
}

/* 律师团队页面移动端优化 */
@media (max-width: 768px) {
  /* 重新设计律师团队页面布局 */
  .team-showcase {
    min-height: auto;
    padding: 0;
    margin: 0;
    background-color: transparent;
    line-height: 0; /* 移除行高导致的额外空间 */
    font-size: 0; /* 移除字体大小导致的额外空间 */
  }

  /* 轮播容器样式重置 */
  .lawyer-carousel-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    overflow: visible;
    line-height: 0; /* 移除行高导致的额外空间 */
    display: flex !important;
    flex-direction: column !important;
  }

  /* 轮播控制按钮容器 - 已隐藏 */
  .carousel-controls {
    display: none !important;
  }

  /* 轮播控制按钮 - 已隐藏 */
  .carousel-control {
    display: none !important;
  }

  .carousel-control.prev {
    display: none !important;
  }

  .carousel-control.next {
    display: none !important;
  }

  /* 轮播滑动区域 */
  .lawyer-carousel {
    height: auto;
    line-height: 0; /* 移除行高导致的额外空间 */
    font-size: 0; /* 移除字体大小导致的额外空间 */
  }

  /* 轮播滑动项 */
  .lawyer-slide {
    padding: 0;
    height: auto;
    margin: 0;
    display: block; /* 改为块级元素 */
    line-height: 0; /* 移除行高导致的额外空间 */
    font-size: 0; /* 移除字体大小导致的额外空间 */
  }

  /* 律师卡片 */
  .lawyer-card {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    position: relative;
    line-height: 0; /* 移除行高导致的额外空间 */
    font-size: 0; /* 移除字体大小导致的额外空间 */
    display: block; /* 改为块级元素 */
  }

  /* 律师图片容器 */
  .lawyer-image {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    aspect-ratio: unset;
    line-height: 0; /* 移除行高导致的额外空间 */
    font-size: 0; /* 移除字体大小导致的额外空间 */
  }

  /* 律师图片 */
  .lawyer-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    padding: 0;
    display: block;
    vertical-align: top;
  }

  .lawyer-info-card {
    bottom: 10px;
    right: 10px;
    padding: 10px;
    min-width: 150px;
    max-width: 70%;
    border-left: 3px solid #9a8652;
  }

  .lawyer-info-card h3 {
    font-size: 18px;
    margin-bottom: 2px;
  }

  .lawyer-info-card .position {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .lawyer-info-card .specialty {
    font-size: 12px;
    padding-top: 5px;
    line-height: 1.3;
    border-top: 1px solid #eaeaea;
  }

  .slide-counter {
    bottom: 20px;
    left: 20px;
    font-size: 12px;
    padding: 6px 10px;
  }

  .page-tag {
    display: none; /* 在移动端隐藏页面标签 */
  }

  /* 移动端轮播控制按钮 - 已隐藏 */
  .carousel-control {
    display: none !important;
  }

  .carousel-control.prev {
    display: none !important;
  }

  .carousel-control.next {
    display: none !important;
  }

  .carousel-controls {
    display: none !important;
  }

  /* 轮播控制按钮的触摸体验 - 已移除 */
  .carousel-control:active {
    display: none !important;
  }

  /* 确保图片在移动端可以正确显示 */
  .lawyer-card {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  /* 添加触摸滑动提示 - 使用CSS创建滑动图标而不是图片 */
  .lawyer-carousel-container:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
    animation: fadeOut 3s forwards 1s;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .lawyer-carousel-container:before {
    content: "←→";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    z-index: 11;
    pointer-events: none;
    animation: fadeOut 3s forwards 1s;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }

  @keyframes fadeOut {
    from {
      opacity: 0.7;
    }
    to {
      opacity: 0;
    }
  }
}

/* == 完全截图式缩放布局 - PC和移动端 == */

/* PC端：保持1920px视口宽度，但内容区域控制在1400px */
body.is-desktop-mode {
  width: 1920px !important;
  min-width: 1920px !important;
  max-width: 1920px !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  background-color: #f8f8f8 !important;
}

/* PC端头图、页眉、页脚等区域保持全宽 */
body.is-desktop-mode .header,
body.is-desktop-mode .footer,
body.is-desktop-mode .hero-section,
body.is-desktop-mode .top-bar {
  width: 100% !important;
  max-width: 1920px !important;
  box-sizing: border-box !important;
}

/* PC端容器宽度维持在1400px */
body.is-desktop-mode .container {
  width: 1400px !important;
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* 确保所有PC端内容区域容器都限制在1400px */
body.is-desktop-mode .about-section,
body.is-desktop-mode .practice-areas-section,
body.is-desktop-mode .cta-section {
  width: 1400px !important;
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* 确保头图内容居中 */
body.is-desktop-mode .hero-content {
  width: 1400px !important;
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* 移动端：正文固定宽度，但头图/页眉/页脚全宽 */
body.is-mobile-mode {
  width: 100% !important; /* 修改回100%以允许全宽元素 */
  min-width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  background-color: #f8f8f8 !important;
}

/* 移动端头图、页眉、页脚等区域保持全宽 */
body.is-mobile-mode .header,
body.is-mobile-mode .footer,
body.is-mobile-mode .hero-section,
body.is-mobile-mode .top-bar,
body.is-mobile-mode .page-title {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* 移动端容器使用全屏宽度 */
body.is-mobile-mode .container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  box-sizing: border-box !important;
}

/* 移动端内容区域使用全屏宽度 */
body.is-mobile-mode .about-section,
body.is-mobile-mode .practice-areas-section,
body.is-mobile-mode .cta-section {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* 确保头图内容使用全屏宽度 */
body.is-mobile-mode .hero-content {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* 确保移动端菜单正常工作 */
body.is-mobile-mode .mobile-menu-btn {
  display: block !important;
}

/* 防止响应式布局破坏移动端的全屏宽度设计 */
body.is-mobile-mode .header .container,
body.is-mobile-mode .footer .container,
body.is-mobile-mode .hero-section .container,
body.is-mobile-mode section .container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 弹出式菜单需要全屏覆盖 */
@media (max-width: 768px) {
  .main-nav.active {
    width: 100vw !important;
    height: 100vh !important;
    left: 0 !important;
    top: 0 !important;
    position: fixed !important;
  }

  /* 确保边缘没有白边 */
  body.is-mobile-mode .header,
  body.is-mobile-mode .footer,
  body.is-mobile-mode .hero-section,
  body.is-mobile-mode .top-bar,
  body.is-mobile-mode .page-title {
    left: 0 !important;
    right: 0 !important;
    overflow: hidden !important;
  }
}

/* 屏幕宽度小于420px时，页脚容器自适应屏幕宽度 */
@media (max-width: 420px) {
  body.is-mobile-mode .footer .container {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 恢复一些样式以适应420px宽度 */
body.is-mobile-mode .practice-areas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  width: 100% !important;
}

body.is-mobile-mode .practice-area-card {
  width: 100% !important;
}

/* 针对移动端模式的额外样式 */
body.is-mobile-mode .header .container {
  flex-direction: row !important; /* 保持水平排列 */
  justify-content: center !important; /* 整体居中 */
  align-items: center !important;
}

body.is-mobile-mode .logo {
  padding-left: 60px !important; /* 保持左侧内边距给LOGO留空间 */
  margin-bottom: 0 !important;
  padding-top: 0 !important; /* 移除顶部内边距 */
  position: relative !important;
  display: block !important; /* 使用块级显示 */
}

body.is-mobile-mode .logo:before {
  width: 55px !important;
  height: 37px !important;
  left: -10px !important; /* 保持原位置 */
  top: 50% !important; /* 垂直居中 */
  transform: translateY(-50%) !important; /* 垂直居中变换 */
}

body.is-mobile-mode .logo h1 {
  font-size: 18px !important;
  line-height: 1.2 !important;
  text-align: left !important; /* 文字保持左对齐 */
}

body.is-mobile-mode .logo-en {
  text-align: left !important; /* 英文名称保持左对齐 */
}

body.is-mobile-mode .mobile-menu-btn {
  display: none !important;
}

body.is-mobile-mode .footer-column.quick-links,
body.is-mobile-mode .footer-column.practice,
body.is-mobile-mode .footer-column.contact-info {
  display: none !important;
}

/* 隐藏移动模式下的页脚logo和律所名称 */
body.is-mobile-mode .footer-logo {
  display: none !important;
}

/* 针对移动端模式的额外样式 */
body.is-mobile-mode .top-bar .container {
  text-align: center !important; /* 文字居中 */
  justify-content: center !important; /* 确保flex布局居中 */
}

body.is-mobile-mode .contact-info span {
  font-size: 12px !important; /* 缩小字体 */
  margin-right: 12px !important; /* 减小右边距 */
}

body.is-mobile-mode .contact-info i {
  font-size: 12px !important; /* 缩小图标 */
}

/* 苹果系统和鸿蒙系统特定优化 */
/* 修复iOS Safari的viewport问题 */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari特定修复 */
  body {
    /* 移除固定定位以恢复正常滚动 */
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
  }
  
  html {
    /* 允许页面滚动 */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 修复iOS Safari的安全区域 */
  .header, .footer, .top-bar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .top-bar {
    padding-top: env(safe-area-inset-top);
  }
  
  .footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 鸿蒙系统特定优化 */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
  /* 高分辨率屏幕优化 */
  body {
    font-variant-numeric: lining-nums;
    font-feature-settings: "tnum" 1;
  }
  
  .logo:before {
    /* 确保logo在高分辨率屏幕上清晰显示 */
    background-size: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 移动端响应式设计增强 */
@media (max-width: 768px) {
  /* 确保移动端布局稳定 */
  .header .container {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  .logo {
    padding-left: 60px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
  }

  /* 确保footer在移动端正确显示 */
  .footer-content {
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  /* 确保顶部信息栏在移动端居中 */
  .top-bar .container {
    text-align: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
  
  /* 移动端触摸优化 */
  .main-nav a, .btn, .mobile-menu-btn {
    min-height: 44px; /* iOS推荐的最小触摸目标 */
    min-width: 44px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
  
  /* 防止移动端文本选择问题 */
  .mobile-menu-btn, .btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 95%;
    padding: 0 20px;
  }
  
  .logo h1 {
    font-size: 24px;
  }
  
  .main-nav a {
    font-size: 15px;
    margin: 0 10px;
  }
}

/* 大屏设备优化 */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
  .header {
    padding: 10px 0;
  }
  
  .logo h1 {
    font-size: 20px;
  }
  
  .logo:before {
    width: 40px;
    height: 27px;
  }
}

/* 苹果设备特定样式 */
.apple-device {
  /* 优化苹果设备的滚动性能 */
  -webkit-overflow-scrolling: touch;
}

.apple-device .header {
  /* 确保在苹果设备上头部固定正确 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.apple-device .main-nav a {
  /* 优化苹果设备的触摸响应 */
  -webkit-tap-highlight-color: rgba(154, 134, 82, 0.2);
}

/* 鸿蒙设备特定样式 */
.harmonyos-device {
  /* 鸿蒙系统字体优化 */
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

.harmonyos-device .logo h1 {
  /* 确保鸿蒙系统上的字体显示清晰 */
  font-variant-ligatures: common-ligatures;
  font-kerning: normal;
}

.harmonyos-device .btn {
  /* 优化鸿蒙系统的按钮触摸反馈 */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 进一步提升鸿蒙系统的显示效果 */
.harmonyos-device body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.harmonyos-device .main-nav a {
  -webkit-tap-highlight-color: rgba(154, 134, 82, 0.2);
}

.harmonyos-device .container {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* iOS Safari 特定修复 */
@supports (-webkit-touch-callout: none) {
  .apple-device body {
    /* 修复iOS Safari的滚动问题 */
    position: relative;
    overflow-x: hidden;
  }
  
  .apple-device .container {
    /* 确保容器在iOS上正确显示 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* 高分辨率屏幕优化（包括苹果Retina和鸿蒙高分屏） */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo:before {
    /* 确保logo在高分辨率屏幕上清晰 */
    background-image: url("../images/miscellaneous/logo.png");
    background-size: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  /* 优化高分辨率屏幕的字体渲染 */
  body, .logo h1, .main-nav a {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}
