/* 主要内容区 */
.main-container {
  display: flex;
  max-width: 1200px;
  margin: 30px auto;
  gap: 20px;
  position: relative;
}

/* 左侧服务内容区 - 默认样式 */
.service-content {
  width: 280px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.service-header {
  background-color: #1a56a8;
  color: white;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
}

.service-list {
  padding: 15px;
}

.service-item {
  margin-bottom: 15px;
  /* 确保这些属性不会阻止点击 */
  pointer-events: auto !important;
  cursor: pointer;
}

/* 移除可能覆盖点击区域的元素 */
.service-item::before,
.service-item::after {
  content: none !important;
}

.service-item h3 {
  font-size: 16px;
  color: #333;
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.service-item h3:hover {
  background-color: #f5f5f5;
}

/* 右侧内容区 */
.right-content {
  flex: 1;
  position: relative;
}

/* 右侧展开的服务内容 */
.service-detail-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  overflow-y: auto;
}

.service-detail-panel.active {
  display: block;
  animation: fadeIn 0.3s;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff6b00;
}

.panel-title {
  font-size: 20px;
  color: #1a56a8;
  font-weight: bold;
}

.panel-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

.service-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.service-category {
  width: calc(50% - 8px);
  margin-bottom: 20px;
}

.category-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 3px solid #ff6b00;
}

.service-submenu {
  list-style: none;
}

.service-submenu li {
  margin-bottom: 10px;
}

.service-submenu a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  transition: all 0.3s;
}

.service-submenu a:hover {
  background-color: #f5f5f5;
  color: #ff6b00;
}

/* 服务详情弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-overlay.active {
  display: flex;
}

.service-modal {
  background-color: #fff;
  border-radius: 8px;
  width: 600px;
  max-width: 90%;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

.modal-title {
  font-size: 20px;
  color: #1a56a8;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff6b00;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}

.modal-section p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.contact-base p {
  margin: 8px 0;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .service-content {
    width: 100%;
  }

  .service-category {
    width: 100%;
  }

  .main-menu {
    display: none;
  }

  .banner-slides {
    height: 200px;
  }

  /* 服务内容区（父容器，确保能容纳详情面板） */
  .service-content {
    position: relative;
    /* 关键！让子元素绝对定位基于它 */
    width: 100%;
    min-height: 300px;
    /* 避免高度塌陷 */
    background: white;
    /* 可选，让背景统一 */
    border-radius: 8px;
    /* 圆角 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 阴影 */
    overflow: hidden;
    /* 防止内容溢出 */
  }

  /* 服务列表（默认显示） */
  .service-list {
    display: block;
    padding: 15px;
  }

  /* 详情面板（默认隐藏，绝对定位覆盖） */
  .service-detail-panel {
    position: fixed;
    /* 关键！覆盖在列表上方 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    /* 确保背景覆盖 */
    z-index: 100;
    /* 关键！确保层级高于列表 */
    display: none;
    padding: 15px;
    overflow-y: auto;
    /* 可滚动 */
  }

  /* 激活时显示详情面板 */
  .service-detail-panel.active {
    display: block;
  }

  /* 返回按钮样式 */
  .panel-back-btn {
    display: inline-block;
    margin-bottom: 15px;
    color: #1a56a8;
    font-weight: bold;
    cursor: pointer;
  }
}

/* 服务菜单浮窗样式 - 支持点击和悬停 */
.service-item {
  position: relative;
  cursor: pointer;
}

/* 同时支持点击和悬停显示 */
.service-item.hover .service-menu-popup,
.service-item.active .service-menu-popup {
  position: absolute;
  left: 100%;
  top: 0;
  width: 400px;
  background: #fff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 20px;
  display: none;
  z-index: 10;
  animation: fadeIn 0.3s;
}

/* 添加悬停效果 */
.service-item.hover-active {
  background-color: #f5f5f5;
  /* 悬停背景色 */
  transition: background-color 0.2s;
}

/* 面板动画（可选） */
#serviceDetailPanel {
  transition: opacity 0.3s, transform 0.3s;
}

#serviceDetailPanel.active {
  opacity: 1;
  transform: translateX(0);
}

/* 图片画廊样式 */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.image-gallery img {
  height: 120px;
  width: auto;
  border: 1px solid #eee;
  border-radius: 4px;
  object-fit: cover;
  transition: transform 0.3s;
}

.image-gallery img:hover {
  transform: scale(1.05);
}


#serviceModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  /* 确保足够高 */
  background-color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  /* 阻止弹窗整体滚动 */
}

.modal-content {
  position: relative;
  z-index: 101;
  background: white;
  /* 其他样式 */
  max-height: 80vh;
  /* 视口高度的80% */
  overflow-y: auto;
  /* 允许垂直滚动 */
  padding: 20px;
}

/* 优化后的CSS样式 */
.license-modal {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  position: relative;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-title {
  color: #1a73e8;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #ff9800;
  margin-bottom: 20px;
}


@media (max-width: 768px) {


  .service-item:hover {
    background-color: transparent !important;
  }

  .service-item.hover .service-menu-popup {
    display: none !important;
  }



}