/* /content/css/style.css
 * 2026-08-27 P3-③：内容模块共享样式
 * 卡片式布局，移动端友好
 */

.ct-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ========== 顶部导航 ========== */
.ct-nav {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ct-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.ct-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 18px;
}
.ct-nav__logo-icon { font-size: 24px; }
.ct-nav__menu {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.ct-nav__menu a {
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #555;
  font-size: 14px;
  transition: all .2s;
}
.ct-nav__menu a:hover { background: #f0f7ff; color: #1e88e5; }
.ct-nav__menu a.is-active { background: #1e88e5; color: #fff; }
.ct-nav__menu-agent {
  margin-left: auto;
  background: #ff6b35 !important;
  color: #fff !important;
}

/* ========== Hero ========== */
.ct-hero {
  text-align: center;
  padding: 48px 16px 32px;
  background: linear-gradient(135deg, #f8fbff 0%, #fff5f0 100%);
  border-radius: 12px;
  margin-bottom: 32px;
}
.ct-hero__title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}
.ct-hero__sub {
  font-size: 16px;
  color: #666;
  margin: 0 0 24px;
}
.ct-hero__search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.ct-hero__search input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.ct-hero__search input:focus { border-color: #1e88e5; }
.ct-hero__search button {
  padding: 12px 24px;
  background: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ct-hero__search button:hover { background: #1976d2; }

@media (max-width: 640px) {
  .ct-hero__title { font-size: 28px; }
  .ct-hero__sub    { font-size: 14px; }
  .ct-hero__search { flex-direction: column; }
  .ct-hero__search button { padding: 10px; }
}

/* ========== 通用 H2 ========== */
.ct-h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ct-more {
  font-size: 14px;
  font-weight: 400;
  color: #1e88e5;
  text-decoration: none;
}
.ct-more:hover { text-decoration: underline; }

/* ========== 领域分类 ========== */
.ct-cats { margin-bottom: 40px; }
.ct-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ct-cat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  text-decoration: none;
  color: #1a1a1a;
  transition: all .2s;
}
.ct-cat:hover {
  border-color: #1e88e5;
  box-shadow: 0 4px 12px rgba(30,136,229,0.1);
  transform: translateY(-2px);
}
.ct-cat__icon { font-size: 32px; }
.ct-cat__body { flex: 1; }
.ct-cat__name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.ct-cat__count {
  font-size: 12px;
  color: #1e88e5;
  font-weight: 500;
  margin-left: 6px;
}
.ct-cat__desc {
  font-size: 13px;
  color: #888;
}
.ct-cat__arrow { color: #1e88e5; font-size: 18px; }

/* ========== 卡片 ========== */
.ct-latest { margin-bottom: 40px; }
.ct-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.ct-card {
  display: block;
  padding: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  text-decoration: none;
  color: #1a1a1a;
  transition: all .2s;
}
.ct-card:hover {
  border-color: #1e88e5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.ct-card__cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.ct-card__cat--health { background: #4caf50; }
.ct-card__cat--system { background: #607d8b; }
.ct-card__cat--art    { background: #e91e63; }
.ct-card__cat--money  { background: #ff9800; }
.ct-card__cat--labor  { background: #2196f3; }
.ct-card__cat--mental { background: #9c27b0; }
.ct-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-card__desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-card__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #999;
}

/* ========== 热门文章 ========== */
.ct-hot { margin-bottom: 40px; }
.ct-hot__list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.ct-hot__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.ct-hot__list li:last-child { border-bottom: none; }
.ct-hot__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  background: #f0f0f0;
  color: #999;
}
.ct-hot__rank--top { background: #ff5252; color: #fff; }
.ct-hot__title {
  flex: 1;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
}
.ct-hot__title:hover { color: #1e88e5; }
.ct-hot__cat {
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
}
.ct-hot__view { font-size: 12px; color: #999; min-width: 60px; text-align: right; }

/* ========== CTA ========== */
.ct-cta {
  padding: 32px 24px;
  background: linear-gradient(135deg, #1e88e5 0%, #ff6b35 100%);
  border-radius: 12px;
  text-align: center;
  color: #fff;
}
.ct-cta .ct-h2 { color: #fff; }
.ct-cta__sub { font-size: 14px; opacity: 0.9; margin: 0 0 20px; }
.ct-cta__btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.ct-cta__btn {
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all .2s;
}
.ct-cta__btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* ========== Footer ========== */
.ct-foot {
  background: #1a1a1a;
  color: #ccc;
  padding: 32px 16px 16px;
  margin-top: 48px;
}
.ct-foot__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}
.ct-foot__col h3 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 12px;
}
.ct-foot__col a, .ct-foot__col p {
  display: block;
  color: #999;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 6px;
}
.ct-foot__col a:hover { color: #fff; }
.ct-foot__copy {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #333;
  color: #666;
  font-size: 12px;
}

/* ========== 文章详情页 ========== */
.ct-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.ct-article__bread {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}
.ct-article__bread a { color: #1e88e5; text-decoration: none; }
.ct-article__cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}
.ct-article__cat--health { background: #4caf50; }
.ct-article__cat--system { background: #607d8b; }
.ct-article__cat--art    { background: #e91e63; }
.ct-article__cat--money  { background: #ff9800; }
.ct-article__cat--labor  { background: #2196f3; }
.ct-article__cat--mental { background: #9c27b0; }
.ct-article__title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.ct-article__sub {
  font-size: 16px;
  color: #666;
  margin: 0 0 20px;
  line-height: 1.5;
}
.ct-article__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #999;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}
.ct-article__body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}
.ct-article__body h2 {
  font-size: 24px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1e88e5;
}
.ct-article__body h3 {
  font-size: 19px;
  margin: 24px 0 12px;
  color: #1e88e5;
}
.ct-article__body p { margin: 0 0 16px; }
.ct-article__body ul, .ct-article__body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.ct-article__body li { margin-bottom: 6px; }
.ct-article__body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: #f8fbff;
  border-left: 4px solid #1e88e5;
  color: #555;
}
.ct-article__body code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  color: #d6336c;
}
.ct-article__body pre {
  background: #f5f5f5;
  padding: 12px 16px;
  border-radius: 6px;
  overflow-x: auto;
}
.ct-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.ct-article__body th, .ct-article__body td {
  border: 1px solid #e0e0e0;
  padding: 8px 12px;
  text-align: left;
}
.ct-article__body th { background: #f5f5f5; }
.ct-article__body a { color: #1e88e5; }

/* ========== 文章详情页 - 相关推荐 ========== */
.ct-related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid #eee;
}
.ct-related h3 {
  font-size: 18px;
  margin: 0 0 16px;
}
.ct-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ct-related__item {
  display: block;
  padding: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  transition: all .2s;
}
.ct-related__item:hover {
  border-color: #1e88e5;
  background: #f8fbff;
}

/* ========== 列表页 ========== */
.ct-list-head {
  padding: 24px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}
.ct-list-head h1 {
  font-size: 28px;
  margin: 0 0 8px;
}
.ct-list-head p {
  font-size: 14px;
  color: #666;
  margin: 0;
}
.ct-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.ct-pagination a, .ct-pagination span {
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-decoration: none;
  color: #555;
  font-size: 14px;
}
.ct-pagination a:hover { border-color: #1e88e5; color: #1e88e5; }
.ct-pagination .is-active { background: #1e88e5; color: #fff; border-color: #1e88e5; }
.ct-pagination .is-disabled { color: #ccc; pointer-events: none; }

/* ========== 2026-08-28 P4：标签 + 搜索框内联 + 空结果 ========== */
.ct-tag {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 6px 6px 0;
    background: #f0f4ff;
    color: #1e88e5;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
}
.ct-tag:hover { background: #1e88e5; color: #fff; }
.ct-article__tags { margin: 12px 0 20px; }

.ct-search-inline {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    max-width: 480px;
}
.ct-search-inline input[type="text"] {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    font-size: 14px;
}
.ct-search-inline button {
    padding: 9px 18px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.ct-search-inline button:hover { background: #1565c0; }

.ct-empty {
    text-align: center;
    padding: 64px 16px;
    color: #666;
}
