/* 移动优先的响应式CSS */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* 移除移动设备点击高亮 */
}

/* 修复Chrome和Safari颜色差异 */
html {
  /* 确保颜色渲染一致 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 修复iOS颜色渲染和文本大小调整 */
  -webkit-text-size-adjust: 100%;
  /* 移除color-adjust保证Chrome颜色正常 */
  /* color-adjust: exact; */
  /* 标准颜色显示 */
  color-scheme: light;
  font-size: 16px; /* 基础字号设置 */
  line-height: 1.5;
  scroll-behavior: smooth; /* 启用平滑滚动 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* 使用系统字体栈提高性能 */
  background-color: #f5f5f5;
  color: #333;
  overflow-x: hidden; /* 防止水平滚动 */
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* 防止图片下方出现间隙 */
}

/* 无障碍跳过链接 */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0056b3;
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* 容器 */
.container {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}

/* 按钮共享样式 */
.btn {
  display: inline-block;
  background-color: #ff5722;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: center;
}

.btn:hover, .btn:focus {
  background-color: #e64a19;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

/* 导航栏样式 */
.minimal-header {
  background-color: #0056b3;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.site-slogan {
  display: none; /* 在移动端隐藏 */
}

/* 移动菜单样式 */
.mobile-nav {
  position: relative;
  z-index: 101;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  z-index: 110;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 24px;
  height: 3px;
  background-color: white;
  position: absolute;
  left: 8px;
  transition: all 0.3s;
}

.menu-icon {
  top: 18px;
}

.menu-icon::before {
  content: "";
  top: -8px;
}

.menu-icon::after {
  content: "";
  top: 8px;
}

.menu-open .menu-icon {
  background-color: transparent;
}

.menu-open .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-open .menu-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0056b3;
  padding: 80px 20px 20px;
  z-index: 100;
  flex-direction: column;
  align-items: center;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 15px;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu a.highlight {
  background-color: #ff5722;
  border-radius: 4px;
  margin-top: 10px;
  border: none;
}

/* 英雄区域 */
.hero {
  padding: 40px 0;
  text-align: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('bak.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* 半透明叠加层提高可读性 */
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 1.75rem;
  margin-bottom: 15px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 1rem;
  margin-bottom: 25px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero .btn {
  padding: 12px 30px;
  font-size: 1.125rem;
}

/* 部分标题 */
.section-title {
  text-align: center;
  font-size: 1.75rem;
  color: #0056b3;
  margin: 30px 0 20px;
}

/* 服务卡片网格 */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 30px 0;
}

.service-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.service-icon {
  height: 180px;
  overflow: hidden;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-icon img {
  transform: scale(1.05);
}

.service-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 240px; /* 设置最小高度，可根据内容调整 */
  position: relative;
  padding-bottom: 70px; /* 为按钮预留空间 */
}

.service-content h3 {
  font-size: 1.25rem;
  color: #0056b3;
  margin-bottom: 10px;
}

.service-content p {
  color: #666;
  margin-bottom: 10px;
  font-size: 0.9375rem;
}

.service-content .btn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  width: calc(100% - 40px); /* 减去左右padding */
}

/* 产品展示网格 */
.product-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 30px 0;
}

.product-showcase-card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.product-image {
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-image:hover img {
  transform: scale(1.05);
}

/* 视频缩略图样式 */
.video-thumbnail {
  position: relative;
  cursor: pointer;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-thumbnail:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: rgba(255, 87, 34, 0.7);
}

/* 广告位样式 */
.ad-placeholder {
  position: relative;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  transition: background-color 0.3s ease;
  height: 100%;
}

.ad-placeholder:hover {
  background-color: #e0e0e0;
}

.ad-placeholder-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #999;
  text-align: center;
}

/* 为什么选择我们部分 */
.why-us {
  background-color: #e8f5e9;
  padding: 40px 0;
  margin: 30px 0;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.feature {
  text-align: center;
  padding: 20px;
}

.feature svg {
  margin-bottom: 15px;
}

.feature h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.feature p {
  color: #666;
  font-size: 0.9375rem;
}

/* 行动召唤区域 */
.cta {
  background-color: #0056b3;
  color: white;
  padding: 40px 0;
  text-align: center;
}

.cta h2 {
  font-size: 1.75rem;
  margin-bottom: 15px;
}

.cta p {
  margin-bottom: 25px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn {
  background-color: white;
  color: #0056b3;
}

.cta .btn:hover {
  background-color: #f0f0f0;
}

/* 页脚 */
footer {
  background-color: #263238;
  color: white;
  padding: 40px 0 20px;
  /* 确保iOS设备上颜色显示一致 */
  -webkit-font-smoothing: antialiased;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  text-align: center;
  justify-items: center; /* 居中页脚内容 */
}

.footer-section {
  width: 100%;
  max-width: 300px; /* 控制页脚每个区块的最大宽度 */
}

.footer-section h3 {
  color: #90caf9;
  margin-bottom: 15px;
  font-size: 1.125rem;
  /* 确保标题颜色在跨浏览器上显示一致 */
  opacity: 1;
}

.footer-section p {
  color: #b0bec5;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  /* 确保文本颜色在跨浏览器上显示一致 */
  opacity: 1;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

/* 修改：添加社交图标统一样式 */
.social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
}

.address-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-nav a {
  margin-left: 5px;
  /* 添加以下属性 */
  color: #ffffff !important; /* 白色文字确保在深色背景上可见 */
  font-weight: bold; /* 加粗增强可读性 */
  text-decoration: underline; /* 添加下划线强调是链接 */
  opacity: 1; /* 确保在跨浏览器上显示一致 */
}

/* 为备案信息添加样式 */
.beian a {
  color: #ffffff !important; /* 白色文字 */
  text-decoration: underline; /* 添加下划线 */
  opacity: 1; /* 确保在跨浏览器上显示一致 */
}

.copyright {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0bec5;
  font-size: 0.875rem;
  text-align: center;
  /* 确保iOS上显示一致 */
  -webkit-font-smoothing: antialiased;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.modal-content {
  background-color: white;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  padding: 25px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
}

.close-btn:hover {
  color: #000;
  background-color: #f0f0f0;
}

.modal-title {
  font-size: 1.5rem;
  color: #0056b3;
  margin-bottom: 20px;
  text-align: center;
}

/* 联系按钮 */
.phone-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #0056b3;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.phone-btn:hover {
  background-color: #003d7e;
}

.phone-note {
  text-align: center;
  color: #666;
  margin-top: 10px;
}

/* 服务详情模态框 */
.service-detail-modal {
  max-width: 700px;
}

.service-detail-text {
  color: #333;
  line-height: 1.6;
}

.service-detail-text ul {
  padding-left: 20px;
  margin: 15px 0;
}

.service-detail-text li {
  margin-bottom: 8px;
}

/* 图片模态框样式 */
.image-modal-content {
  max-width: 800px;
}

#enlargedImage {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin-bottom: 15px;
}

#enlargedImageCaption {
  text-align: center;
  font-size: 16px;
  color: #333;
}

/* 视频模态框样式 */
.video-modal-content {
  max-width: 800px;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 宽高比 */
  margin-bottom: 15px;
}

#productVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background-color: #000;
}

#videoCaption {
  text-align: center;
  font-size: 16px;
  color: #333;
  margin-top: 10px;
}

/* 浮动联系按钮 */
.floating-contact-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background-color: #ff5722;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 90;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  /* 确保在所有设备上显示 */
  opacity: 1;
  visibility: visible;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  background-color: #0056b3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 90;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 触摸活动状态 */
.touch-active {
  opacity: 0.8;
}

/* 延迟加载图片placeholder */
.lazyload {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazyload.loaded {
  opacity: 1;
}

/* 平板和桌面响应式样式 */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .product-image {
    height: 140px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  .site-slogan {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    text-align: center; /* 保持居中对齐 */
    justify-items: center; /* 保持水平居中 */
  }
  
  .social-links {
    justify-content: center; /* 保持社交图标居中 */
  }
  
  .product-image {
    height: 160px;
  }
  
  .floating-contact-btn {
    bottom: 30px;
    right: 30px;
    /* 确保也在平板上显示 */
    display: flex !important;
  }
  
  .back-to-top {
    bottom: 30px;
    left: 30px;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .modal-content {
    padding: 30px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .product-showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* 增加各栏之间的间距 */
  }
  
  .service-icon {
    height: 200px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 2.25rem;
    margin: 40px 0 30px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .service-icon {
    height: 220px;
  }
  
  .product-image {
    height: 180px;
  }
}

/* 打印样式 */
@media print {
  .floating-contact-btn,
  .back-to-top,
  .menu-toggle,
  .mobile-menu,
  .btn {
    display: none !important;
  }
  
  body {
    background-color: white;
    color: black;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .service-card,
  .product-showcase-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  footer {
    background-color: white;
    color: black;
    border-top: 1px solid #ddd;
  }
  
  .footer-section h3 {
    color: black;
  }
  
  .footer-section p,
  .copyright {
    color: #666;
  }
}
/* FAQ部分样式 */
.faq-section {
  background-color: #f8f9fa;
  padding: 40px 0;
  margin: 30px 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  background-color: white;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.faq-question {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s;
  background-color: #f9f9f9;
}

.faq-question:hover {
  background-color: #f0f0f0;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0056b3;
  padding-right: 20px;
  flex: 1;
}

.faq-toggle {
  font-size: 24px;
  width: 30px;
  height: 30px;
  line-height: 24px;
  text-align: center;
  color: #0056b3;
  background: none;
  border: 2px solid #0056b3;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
  background-color: #0056b3;
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 20px;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* 足够大的值，以确保内容完全展示 */
  padding: 20px;
}

.faq-answer p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .faq-question h3 {
    font-size: 1rem;
  }
  
  .faq-toggle {
    font-size: 20px;
    width: 26px;
    height: 26px;
    line-height: 20px;
  }
}