/* ==========================================================================
   pages.css — 通用兜底页样式（search.php / 404.php / index.php / page.php）
   ========================================================================== */

/* ==========================================================================
   1. 搜索页
   ========================================================================== */
.l-search-page {
  padding-block: 0 var(--section-pad-desktop);
}

/* 搜索头 */
.l-search-head {
  padding-block: calc(var(--header-h) + var(--topbar-h) + 48px) 40px;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
}

.l-search-head__title {
  font-size: var(--fs-h2);
  margin-bottom: 10px;
}
.l-search-head__count {
  color: var(--color-text-muted);
  margin: 0;
}
.l-search-head__count strong {
  color: var(--color-primary);
}

.l-search-head__form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  max-width: 640px;
}
.l-search-head__input {
  flex: 1;
}

/* 分区 */
.l-search-section {
  padding-top: var(--section-pad-mobile);
}
.l-search-section + .l-search-section {
  border-top: 1px solid var(--color-border);
}

.l-search-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}

.l-search-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-h3);
  margin: 0;
}

.l-search-section__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

.l-search-section__more {
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* Pages / FAQ 文字链接列表 */
.c-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.c-link-list li {
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}
.c-link-list li:last-child {
  border-bottom: 0;
}
.c-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.c-link-list a:hover {
  color: var(--color-primary);
}
.c-link-list svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--color-text-muted);
}

/* 空结果 */
.l-search-empty {
  padding-block: var(--section-pad-desktop);
  text-align: center;
}
.l-search-empty__title {
  font-size: var(--fs-h2);
  margin-bottom: 14px;
}
.l-search-empty__desc {
  color: var(--color-text-muted);
  margin-bottom: 28px;
}
.l-search-empty__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   2. 404
   ========================================================================== */
.l-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  padding-block: calc(var(--header-h) + var(--topbar-h) + 40px) 80px;
}

.l-404__code {
  font-size: clamp(90px, 18vw, 200px);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 10px;
  color: var(--color-primary);
  letter-spacing: -0.04em;
}

.l-404__title {
  font-size: var(--fs-h3);
  margin-bottom: 14px;
}
.l-404__desc {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 30px;
}
.l-404__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.l-404__links {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.l-404__links li {
  margin: 0;
}

/* ==========================================================================
   3. index.php / page.php 兜底归档
   ========================================================================== */
.l-archive {
  padding-block: var(--section-pad-desktop);
}
@media (max-width: 767px) {
  .l-archive {
    padding-block: var(--section-pad-mobile);
  }
}

.l-archive__head {
  margin-bottom: var(--gap-lg);
}
.l-archive__title {
  font-size: var(--fs-h2);
  margin-bottom: 10px;
}
.l-archive__desc {
  color: var(--color-text-muted);
  margin: 0;
}

/* 兜底通用信息流卡片 */
.c-post-row {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--gap);
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--color-border);
}
.c-post-row:first-child {
  padding-top: 0;
}
.c-post-row__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
}
.c-post-row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.c-post-row:hover .c-post-row__img {
  transform: scale(1.05);
}
.c-post-row__title {
  font-size: 20px;
  margin-bottom: 8px;
}
.c-post-row:hover .c-post-row__title {
  color: var(--color-primary);
}
.c-post-row__desc {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 12px;
}
.c-post-row__meta {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.c-post-row__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

@media (max-width: 767px) {
  .c-post-row {
    grid-template-columns: 1fr;
  }
}

/* 空状态提示 */
.c-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   4. 追加补充（不改动以上既有规则）
   ========================================================================== */

/* 兜底信息流卡片：封面锚点脱离网格流，避免占用文章首列，覆盖整行可点击 */
.c-post-row > .c-post-row__cover {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* page.php 默认页面模板标题（避免继承首屏超大 h1 字号） */
.l-page-title {
  font-size: var(--fs-h2);
  margin-bottom: var(--gap);
}
