/* 彻底解决页面横向拖动问题 */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 所有图片响应式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 所有 flex 子项约束 */
.baidu-tool-card,
.baidu-site-grid a,
.baidu-article-item {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}


/* ===== 通用卡片容器样式 ===== */
.baidu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1px;
}
.baidu-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 24px;
  margin-bottom: 20px;
}
.baidu-card-title {
  font-size: 20px;
  font-weight: bold;
  color: #222;
  margin-bottom: 20px;
}

/* ===== 推荐文章轮播图 ===== */
.baidu-slider {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  border-radius: 8px;
}
.baidu-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.baidu-slide.active {
  opacity: 1;
  z-index: 2;
}
.baidu-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
.baidu-slide-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 15px;
  padding: 8px 12px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ===== 最新文章区域 ===== */
.baidu-article-box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.baidu-article-left,
.baidu-article-right {
  flex: 1;
  min-width: 300px;
}

.baidu-article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.baidu-article-item {
  display: flex;
  height: 80px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.baidu-article-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.baidu-article-item a {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}
.baidu-article-thumb {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.baidu-article-info {
  padding: 6px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.baidu-article-list-title-sm {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.baidu-article-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ===== 热门工具卡片 ===== */
.baidu-tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.baidu-tool-card {
  width: calc(50% - 10px);
  background: #f8f8f8;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
}
.baidu-tool-card:hover {
  transform: translateY(-2px);
}
.baidu-tool-image img {
  width: 100%;
  height: auto;
  display: block;
}
.baidu-tool-title {
  text-align: center;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* ===== 名站导航 ===== */
.baidu-site-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.baidu-site-grid a {
  width: 140px;
  height: 50px;
  border: 1px solid #eee;
  background: #fff;
  display: block;
  position: relative; 
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.baidu-site-grid a:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.baidu-site-grid img {
  position: absolute;  
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px; 
}

/* ===== 关于我们模块 ===== */
.baidu-about-section {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.baidu-about-text {
  font-size: 15.5px;
  line-height: 1.85;
  color: #444;
}
.baidu-about-text p {
  margin-bottom: 16px;
}
.baidu-about-features {
  background: #f9f9f9;
  border-left: 4px solid #ff9900;
  padding: 10px 15px;
  border-radius: 6px;
  margin: 20px 0;
}
.baidu-about-features p {
  margin: 8px 0;
  font-weight: 500;
  color: #333;
}
.baidu-about-features span {
  color: #00aa66;
  font-weight: bold;
  margin-right: 6px;
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
  .baidu-article-box {
    flex-direction: column;
  }
  .baidu-tool-card {
    width: 100%;
  }
  .baidu-site-grid {
    justify-content: center;
  }
  
  .baidu-article-box {
    flex-direction: column !important;
  }

  .baidu-article-left,
  .baidu-article-right {
    width: 100% !important;
    flex: none !important;
  }

  .baidu-slider,
  .baidu-article-list {
    width: 100%;
  }
  
}

/* ==== 搜索模块完整版补丁（PC + 移动 80%/19% 布局 + 细节） ==== */

/* 容器 & 表单基准 */
.search-module {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px 0 8px;
  box-sizing: border-box;
}
.search-form.index-search {
  width: 100%;
  max-width: 1200px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  flex-wrap: nowrap;
}

/* PC 端输入 + 按钮 */
#index-search-input {
  flex: 1;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #e6e6e9;
  border-radius: 25px;
  font-size: 15px;
  background: #f7f9fc;
  outline: none;
  transition: border .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
}
#index-search-input:focus {
  border-color: #ff8c00;
  box-shadow: 0 0 0 4px rgba(255,140,0,0.18);
  background: #fff;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 22px;
  background: linear-gradient(90deg, #ff8c00 0%, #ffa500 90%);
  border: none;
  border-radius: 25px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s, transform .1s;
  white-space: nowrap;
  box-sizing: border-box;
}
.search-button i {
  font-size: 16px;
}
.search-button:hover {
  filter: brightness(1.07);
}
.search-button:active {
  transform: translateY(1px);
}

/* 移动端：搜索框 80% + 按钮 19% + 1% 间隙 横排 */
@media (max-width: 1024px) {
  .search-form.index-search {
    flex-direction: row !important;
    gap: 1% !important;
    padding: 0 12px;
    width: 100%;
    align-items: center;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }
  #index-search-input {
    flex: none !important;
    width: 80% !important;
    min-width: 0;
    height: 44px !important;
    border-radius: 10px !important;
    font-size: 14px;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .search-button {
    flex: none !important;
    width: 19% !important;
    height: 44px !important;
    border-radius: 10px !important;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    box-sizing: border-box;
  }
}

/* 极窄屏 fallback：堆叠 */
@media (max-width: 380px) {
  .search-form.index-search {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 12px;
  }
  #index-search-input,
  .search-button {
    width: 100% !important;
  }
  #index-search-input {
    height: 44px !important;
    border-radius: 10px !important;
  }
  .search-button {
    height: 44px !important;
    border-radius: 10px !important;
  }
}


.baidu-tool-more {
  text-align: center;
  margin-top: 20px;
}

.baidu-tool-more-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(90deg, #ff8c00, #ffa500);
  color: #fff;
  font-weight: bold;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  transition: filter 0.2s ease;
}

.baidu-tool-more-btn:hover {
  filter: brightness(1.1);
}

