/* 全局基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft Yahei", sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
/* ==============
Blog main page paging
================= */
/* 分页容器整体样式 —— 通用底部适配 */
.paging {
  width: 100%;
  display: flex;
  justify-content: center; /* 水平居中 */
  margin: 40px 0 20px 0;    /* 上下间距，可自行调整 */
  padding: 0;
  box-sizing: border-box;
}

/* 分页列表基础样式 */
.pagination {
  display: flex;
  flex-wrap: wrap;          /* 小屏幕自动换行 */
  gap: 6px;                 /* 页码之间空隙 */
  padding: 0;
  margin: 0;
  list-style: none;
  justify-content: center;
}

/* 单个页码按钮 */
.page-item {
  margin: 0;
}

/* 页码链接样式 */
.page-link {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 36px;
  text-align: center;
  border-radius: 6px;       /* 圆角 */
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0 10px;
  box-sizing: border-box;
}

/* 鼠标悬浮 */
.page-link:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
  color: #000;
}

/* 当前页高亮样式（你代码里已经加了 font-weight:700） */
.page-link[style="font-weight: 700;"],
.page-item.active .page-link {
  background-color: #2d8cf0;
  border-color: #2d8cf0;
  color: #fff;
}

/* 小屏幕适配（手机自动缩小） */
@media (max-width: 768px) {
  .page-link {
    min-width: 32px;
    height: 32px;
    line-height: 30px;
    font-size: 13px;
    padding: 0 8px;
  }
  .pagination {
    gap: 4px;
  }
}
/* 响应式适配：小屏幕（如手机）进一步优化 */
@media (max-width: 375px) {
  .captcha-input-group {
    flex-direction: column; /* 垂直排列，彻底解决溢出 */
    gap: 8px;
  }
  .download-btn {
    width: 100%; /* 按钮宽度100%，适配小屏幕 */
  }
}
/* 头部导航样式 */
.header {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
  color: #2980b9;
}

.logo {
  text-align: center;
}

.logo a {
  font-size: 24px;
  color: #000000;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.logo span {
  font-size: 14px;
  color: #7f8c8d;
}

/* 桌面端导航 */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* 1. 修复导航主项的对齐方式（核心） */
.nav-main {
  display: flex;
  gap: 15px;
  align-items: center; /* 新增：让所有导航项垂直居中 */
}

/* 2. 统一导航项的内边距和行高（消除图标导致的高度差） */
.nav-item {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  padding: 8px 12px;
  position: relative;
  cursor: pointer;
  transition: color 0.3s ease;
  display: inline-flex; /* 新增：让文字和下拉图标在同一行垂直居中 */
  align-items: center; /* 新增：图标和文字垂直居中 */
  line-height: 1; /* 统一行高，消除基线偏移 */
  gap: 4px; /* 新增：文字和下拉图标之间留少量间距，更美观 */
}

/* 3. 微调下拉图标大小，避免视觉占比过大 */
.nav-item .fas.fa-chevron-down {
  font-size: 12px; /* 缩小下拉箭头，减少偏移影响 */
  margin-top: 0; /* 重置默认间距 */
}

/* 4. 确保下拉容器不影响行高 */
.nav-dropdown {
  position: relative;
  display: inline-flex; /* 替换inline-block为inline-flex，对齐更精准 */
  align-items: center;
}

.nav-item:hover {
  color: #2980b9;
}


.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  border-radius: 6px;
  padding: 8px 0;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f0f7ff;
  color: #2980b9;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

/* 🌟 核心：美化搜索框（桌面端） */
.search-box {
  display: flex;
  align-items: center;
  position: relative;
  width: 280px; /* 加宽搜索框 */
}

.search-input {
  padding: 10px 15px 10px 40px; /* 左侧留空间放搜索图标 */
  border: 1px solid #e0e0e0;
  border-radius: 25px; /* 圆角更圆润 */
  outline: none;
  width: 100%;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

/* 输入框聚焦样式 */
.search-input:focus {
  border-color: #2980b9;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

/* 搜索图标（内置到输入框） 
.search-box::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  color: #999;
  font-size: 14px;
  transition: color 0.3s ease;
}
*/
.search-input:focus + .search-btn + .search-box::before,
.search-box:focus-within::before {
  color: #2980b9;
}

/* 搜索按钮样式优化 */
.search-btn {
  position: absolute;
  right: 0;
  padding: 10px 20px;
  border: none;
  background-color: #2980b9;
  color: #fff;
  border-radius: 25px; /* 与输入框匹配圆角 */
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.search-btn:hover {
  background-color: #1f6fb1;
}

/* 移动端导航（默认隐藏） */
.mobile-nav {
  display: none;
  background-color: #fff;
  padding: 15px 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
}

.mobile-nav-item {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
}

.mobile-nav-item:hover {
  color: #2980b9;
}

.mobile-dropdown-content {
  display: none;
  padding-left: 20px;
  gap: 5px;
  margin-top: 5px;
}

.mobile-sub-item {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  padding: 8px 0;
  display: block;
  transition: color 0.3s ease;
}

.mobile-sub-item:hover {
  color: #2980b9;
}

/* 🌟 移动端搜索框美化 */
.mobile-search-box {
  margin-top: 15px;
  display: flex;
  position: relative;
  width: 100%;
}

.mobile-search-box .search-input {
  padding: 12px 15px 12px 45px;
  border-radius: 25px;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  width: 100%;
}

.mobile-search-box::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

.mobile-search-box .search-btn {
  right: 0;
  padding: 12px 20px;
  border-radius: 25px;
}

/* 🌟 恢复瀑布流布局（核心） */
.main {
  padding: 40px 0;
}

.masonry-grid {
  /* 瀑布流核心属性 */
  column-count: 3; /* 桌面端3列 */
  column-gap: 20px; /* 列间距 */
  column-fill: balance; /* 列高平衡 */
}

/* 瀑布流卡片样式 */
.card {
  break-inside: avoid; /* 防止卡片跨列断裂 */
  page-break-inside: avoid;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px; /* 卡片底部间距 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 卡片hover动效 */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* 文字卡片样式 */
.card-text {
  padding: 25px;
  color: #333;
}

.card-text h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.card-text p {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
}

/* 图片卡片样式 */
.card-image {
  cursor: pointer;
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block; /* 消除图片底部空白 */
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 12px;
  font-weight: 600;
}

.card-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 详情页样式（保留） */
.single-main {
  padding: 40px 0;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #2980b9;
  text-decoration: none;
}

.work-intro {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.intro-title {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.intro-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}
.intro-content img{
    max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}
.intro-content p {
  margin-bottom: 15px;
}

.intro-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

/* 下载区域样式 */
.download-section {
  display: flex;
  gap: 30px;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.download-info {
  flex: 1;
}

.download-info-title {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 20px;
}

.download-info-list {
  list-style: none;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.download-info-list li {
  font-size: 16px;
  color: #333;
  display: flex;
}

.download-info-list li span {
  font-weight: bold;
  color: #2c3e50;
  margin-right: 10px;
}

.captcha-download {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #eee;
  padding-left: 30px;
}

.captcha-title {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
}

.captcha-desc {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

.captcha-input-group {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.captcha-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease;
}

.captcha-input:focus {
  border-color: #2980b9;
}

.download-btn {
  padding: 10px 20px;
  background-color: #2980b9;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: #1f6fb1;
}

.qrcode {
  border-radius: 8px;
}

/* 底部样式 */
.footer {
  background-color: #2c3e50;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #34495e;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-qrcode {
  border-radius: 8px;
  margin-bottom: 10px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #34495e;
  font-size: 14px;
  color: #bdc3c7;
}

/* 响应式适配 */
@media (max-width: 992px) {
  /* 平板端瀑布流改为2列 */
  .masonry-grid {
    column-count: 2;
  }
  /* 平板端搜索框宽度调整 */
  .search-box {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .desktop-nav {
    display: none;
  }

  /* 移动端瀑布流改为1列 */
  .masonry-grid {
    column-count: 1;
  }

  .download-section {
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    /* 新增：强制长文本自动换行 */
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .captcha-download {
    border-left: none;
    border-top: 1px solid #eee;
    padding-left: 0;
    padding-top: 20px;
  }
/* 隐藏“关于我们”列 */
    .footer-col:nth-child(1) {
        display: none;
    }
    /* 隐藏“资源分类”列（如果是single.html有第四列，这里对应index.html是:nth-child(2)） */
    .footer-col:nth-child(2) {
        display: none;
    }
    /* 若有“友情链接”列（如single.html的第三列），也隐藏 */
    .footer-col:nth-child(3) {
        display: none;
    }
    /* 兼容不支持:has的浏览器（备选方案）：给友情链接列加class，比如class="footer-col friend-link" */
    /* .footer-col.friend-link { display: none; } */
    
    /* 仅保留“关注我们”列，居中显示（可选） */
    .footer-top {
        justify-content: center;
    }
    .footer-col:last-child {
        width: 100%;
        text-align: center;
    }
    .footer-col .footer-qrcode {
        margin: 0 auto 5px;
    }

}
