.tab-container {
    margin: 0 auto;
    position: relative;
    background-color: transparent;
    overflow: visible;
  }

  /* 隐藏单选按钮 */
  .tab-input {
    display: none;
  }
  
  /* 内容面板 - 使用相对定位而非绝对定位 */
  .tab-panels {
    position: relative;
    margin-bottom: 20px;
    /* 移除固定高度 */
    /* 添加最小高度防止空内容导致面板坍塌 */
    min-height: 50px;
  }
  
  .tab-panel {
    /* 改为使用相对定位而不是绝对定位，允许面板根据内容自动调整高度 */
    position: relative;
    width: 100%;
    /* 默认隐藏所有面板 */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: transparent;
  }
  
  /* 显示选中的内容面板 */
  #tab1:checked ~ .tab-panels .tab-panel:nth-child(1),
  #tab2:checked ~ .tab-panels .tab-panel:nth-child(2),
  #tab3:checked ~ .tab-panels .tab-panel:nth-child(3),
  #tab4:checked ~ .tab-panels .tab-panel:nth-child(4),
  #tab5:checked ~ .tab-panels .tab-panel:nth-child(5),
  #tab6:checked ~ .tab-panels .tab-panel:nth-child(6) {
    display: block;
    opacity: 1;
  }
  
  /* 面板内容样式 */
  .panel-content {
    width: 100%;
    border-radius: 8px;
    /* 内容可以有不同的高度 */
    padding: 10px;
  }
  
  .panel-content img {
    width: 100%;
    height: auto; /* 让图片高度自动调整 */
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }
  
  /* 面板文本内容 */
  .text-content {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin-top: 10px;
  }
  
  .text-content h2 {
    margin-bottom: 10px;
    color: #333;
  }
  
  .text-content p {
    line-height: 1.6;
    color: #666;
  }
  
  /* 底部标签样式 */
  .tab-labels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
  }
  
  .tab-label {
    padding: 2px 10px;
    text-align: center;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    /* 半透明长条圆角矩形 */
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    min-width: 100px;
  }
  
  .tab-label:hover {
    background-color: rgba(0, 0, 0, 0.6);
  }
  
  /* 选中标签的样式 */
  #tab1:checked ~ .tab-labels .tab-label[for="tab1"],
  #tab2:checked ~ .tab-labels .tab-label[for="tab2"],
  #tab3:checked ~ .tab-labels .tab-label[for="tab3"],
  #tab4:checked ~ .tab-labels .tab-label[for="tab4"],
  #tab5:checked ~ .tab-labels .tab-label[for="tab5"],
  #tab6:checked ~ .tab-labels .tab-label[for="tab6"] {
    background-color: rgba(0, 162, 255, 0.6);
  }
  
  /* 响应式样式 */
  @media (max-width: 768px) {
    .tab-label {
      min-width: 80px;
      padding: 8px 15px;
      font-size: 14px;
    }
  }
  
  @media (max-width: 480px) {
    .tab-labels {
      gap: 5px;
    }
    
    .tab-label {
      min-width: 60px;
      padding: 6px 10px;
      font-size: 12px;
    }
  }

  /* Tab Child Container Styles */
  .tab-child-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
  }

  /* Main Image Section */
  .tab-child-container .main-image {
    position: relative;
    width: 100%;
    min-height: 500px; /* 最小高度 */
    background-color: #222;
    margin-bottom: 20px;
    overflow: hidden;
  }

  .tab-child-container .main-image img {
    width: 100%;
    height: auto; /* 让图片高度自适应内容 */
    min-height: 500px; /* 图片最小高度 */
    object-fit: cover;
    display: block; /* 消除图片底部间隙 */
  }

  .tab-child-container .text-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 40px;
    color: white;
  }

  .tab-child-container .text-overlay h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #fff;
  }

  .tab-child-container .text-overlay p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
  }

  .tab-child-container .learn-more {
    background-color: #0084ff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
  }

  .tab-child-container .learn-more:hover {
    background-color: #0056b3;
  }

  /* Thumbnail Gallery Section */
  .tab-child-container .thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
  }

  .tab-child-container .thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    border-radius: 8px;
  }

  .tab-child-container .thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
  }

  .tab-child-container .thumbnail:hover img {
    transform: scale(1.1);
  }

  /* Mobile Responsive Styles */
  @media (max-width: 768px) {
    .tab-child-container .main-image {
      min-height: auto;
    }

    .tab-child-container .main-image img {
      height: 300px;
      min-height: auto;
    }

    .tab-child-container .text-overlay {
      position: relative;
      width: 100%;
      height: auto;
      align-items: center;
      text-align: center;
      padding: 30px 20px;
    }

    .tab-child-container .text-overlay h1 {
      font-size: 28px;
      margin-bottom: 15px;
    }

    .tab-child-container .text-overlay p {
      font-size: 14px;
      margin-bottom: 20px;
    }

    /* 将缩略图改为滑动式布局 */
    .tab-child-container .thumbnail-gallery {
      display: flex;
      grid-template-columns: none;
      gap: 10px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      padding: 10px 0;
    }

    .tab-child-container .thumbnail {
      flex: 0 0 200px; /* 固定宽度 */
      padding-bottom: 150px; /* 固定高度 */
      scroll-snap-align: start;
      margin-right: 10px;
    }

    .tab-child-container .thumbnail:last-child {
      margin-right: 0;
    }

    /* 美化滚动条 */
    .tab-child-container .thumbnail-gallery::-webkit-scrollbar {
      height: 4px;
    }

    .tab-child-container .thumbnail-gallery::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 2px;
    }

    .tab-child-container .thumbnail-gallery::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 2px;
    }

    .tab-child-container .thumbnail-gallery::-webkit-scrollbar-thumb:hover {
      background: #555;
    }

    /* Tab标签响应式调整 */
    .tab-labels {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding: 10px 0;
      justify-content: flex-start;
    }

    .tab-label {
      flex: 0 0 auto;
      white-space: nowrap;
    }
  }

  /* 小屏幕设备的额外优化 */
  @media (max-width: 480px) {
    .tab-child-container .main-image img {
      height: 250px;
    }

    .tab-child-container .text-overlay {
      padding: 20px 15px;
    }

    .tab-child-container .text-overlay h1 {
      font-size: 24px;
    }

    .tab-child-container .learn-more {
      padding: 10px 25px;
      font-size: 14px;
    }

    .tab-child-container .thumbnail {
      flex: 0 0 160px;
      padding-bottom: 120px;
    }
  }

  /* 在Elementor控件中添加高度控制 */
  @media (min-width: 769px) {
    .tab-child-container .main-image.custom-height {
        min-height: var(--main-image-height, 500px);
    }
    
    .tab-child-container .main-image.custom-height img {
        min-height: var(--main-image-height, 500px);
    }
  }