
/*
Theme Name: Pro Tool Theme
Description: 对标古腾堡付费版的工具站主题，无古腾堡依赖
Version: 2.0
Author: 自定义
*/

/* 全局CSS变量 */
:root {
  --primary-color: #165DFF;
  --secondary-color: #36CFC9;
  --bg-color: #F7F8FA;
  --card-bg: #FFFFFF;
  --text-color: #1D2129;
  --text-light: #666666;
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "Inter", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 页眉 */
.header {
  background: var(--card-bg);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}
.logo a {
  color: var(--primary-color) !important;
  text-decoration: none !important;
}
.logo a span {
  color: #36B37E !important;
}
.logo a:hover {
  text-decoration: none !important;
}

.nav-main {
  display: flex;
  gap: 30px;
}
.nav-main a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}
.nav-main a:hover {
  color: var(--primary-color);
}
.nav-main a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}
.nav-main a:hover::after {
  width: 100%;
}

/* 内容区 */
.main-content {
  padding: 50px 0;
}

/* 首页专属样式 */
.home-banner {
  text-align: center;
  padding: 60px 0 40px;
  background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%);
  border-radius: var(--radius);
  margin-bottom: 50px;
  color: #fff;
}
.home-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.home-subtitle {
  font-size: 16px;
  opacity: 0.9;
}

.section {
  margin-bottom: 50px;
}
.section-title {
  font-size: 22px;
  margin-bottom: 25px;
  position: relative;
  padding-left: 15px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

.category-group {
  margin-bottom: 40px;
}
.category-title {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

/* 工具网格布局（统一） */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  width: 100%;
}
.hot-tool-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* 工具卡片样式（统一 + 更高更好看） */
.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}
.tool-icon {
  font-size: 26px;
  margin-bottom: 8px;
  line-height: 1;
}
.tool-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.4;
}
.tool-count {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: #0E48E5;
  transform: scale(1.05);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}
.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* 页脚 */
.footer {
  background: var(--card-bg);
  padding: 40px 0 20px;
  border-top: 1px solid #EEEEEE;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--text-color);
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col ul li a:hover {
  color: var(--primary-color);
}
.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #EEEEEE;
  color: var(--text-light);
  font-size: 13px;
}

/* 响应式适配 */
@media (max-width: 992px) {
  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hot-tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }
  .nav-main {
    gap: 20px;
  }
  .home-title {
    font-size: 28px;
  }
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hot-tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 🔥 手机端页脚：左右横排！关键修改在这里 */
  .footer-inner {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .footer-col {
    width: auto !important;
  }
}
@media (max-width: 576px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hot-tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-main {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 古腾堡块兼容样式 */
.wp-block-group.has-shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}
.wp-block-group.has-shadow:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

/* 分类页样式 */
.page-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-color);
  text-align: center;
}

.tool-desc {
  font-size: 12px;
  color: #999;
}

/* ============================================== */
/* 🔥 手机端终极精简美化（导航+顶部+卡片+页脚全变小） */
/* ============================================== */
@media (max-width: 768px) {
  /* 导航栏缩小 */
  .header {
    padding: 12px 0 !important;
  }
  .logo {
    font-size: 20px !important;
  }
  .nav-main {
    gap: 15px !important;
  }
  .nav-main a {
    font-size: 14px !important;
  }

  /* 顶部 Banner 缩小 */
  .home-banner {
    padding: 25px 15px !important;
    margin-bottom: 20px !important;
  }
  .home-title {
    font-size: 22px !important;
    margin-bottom: 5px !important;
  }
  .home-subtitle {
    font-size: 13px !important;
  }

  /* 内容间距收紧 */
  .main-content {
    padding: 20px 0 !important;
  }
  .section {
    margin-bottom: 22px !important;
  }
  .section-title {
    font-size: 18px !important;
    margin-bottom: 12px !important;
  }
  .category-section {
    margin-top: 15px !important;
  }

  /* 卡片网格：超级紧凑 */
  .tool-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .hot-tool-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  /* 卡片精致小巧 */
  .tool-card {
    min-height: auto !important;
    padding: 10px 6px !important;
    border-radius: 8px !important;
  }
  .tool-icon {
    font-size: 20px !important;
    margin-bottom: 3px !important;
  }
  .tool-name {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  .tool-desc,
  .tool-count {
    font-size: 9px !important;
    margin-top: 1px !important;
  }

  /* 页脚缩小 */
  .footer {
    padding: 20px 0 10px !important;
  }
  .footer-col h4 {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }
  .footer-col ul li {
    margin-bottom: 5px !important;
  }
  .footer-col ul li a {
    font-size: 12px !important;
  }
  .copyright {
    padding-top: 10px !important;
    font-size: 12px !important;
  }
}

/* 小屏手机（400px 以下）2列布局 */
@media (max-width: 400px) {
  .tool-grid,
  .hot-tool-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
}
