/* SCI-BOOK MG 参考风格：适配 OMP 3.3 默认站点首页。
 * 视觉参考 https://sci-book.net/index.php/mg/index （2026-11-12）。
 * 独立完整 CSS，不需要同时加载旧蓝白版。
 * 美化总首页页眉、出版社列表及前台页脚，不改后台或书目功能。
 * 不生成出版社资料；Logo 由各出版社 pressThumbnail（缩略图）提供。
 * 更换配色可修改下方局部变量，不依赖 Tailwind 或 JavaScript。
 */
.page_index_site,
.pkp_structure_footer_wrapper {
  --scibook-blue: #2e6ea1;
  --scibook-ink: #243b4c;
  --scibook-muted: #596772;
  --scibook-line: #dce4ec;
  --scibook-tint: #f4f7fb;
}

/* 出版社目录：桌面双栏，窄屏单栏；不隐藏任何出版社。 */
.page_index_site .presses { margin: 28px 0 36px; }
.page_index_site .presses > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.page_index_site .presses > ul > li {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--scibook-line);
  border-top: 4px solid #afc4dd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(36, 59, 76, .035);
}
.page_index_site .presses > ul > li::before,
.page_index_site .presses > ul > li::after { content: none; }
.page_index_site .presses .thumb,
.page_index_site .presses .thumb + .body,
.page_index_site .presses .body {
  float: none;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}
.page_index_site .presses .thumb {
  display: flex;
  align-items: center;
  min-height: 88px;
  margin: 0 0 18px;
}
.page_index_site .presses .thumb > a { display: block; max-width: 100%; }
.page_index_site .presses .thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}
.page_index_site .presses .body { display: flex; flex-direction: column; flex: 1; }
.page_index_site .presses h3 {
  margin: 0 0 12px;
  padding: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.page_index_site .presses h3 a { color: var(--scibook-blue); text-decoration: none; }
.page_index_site .presses h3 a:hover { color: var(--scibook-blue); text-decoration: underline; }
.page_index_site .presses .description {
  margin: 0 0 18px;
  color: var(--scibook-muted);
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.page_index_site .presses .description p { margin: 0 0 8px; }
.page_index_site .presses .links {
  display: block;
  list-style: none;
  padding: 0;
  margin: auto 0 0;
}
.page_index_site .presses .links li { display: inline-block; margin: 0; padding: 0; border: 0; }
.page_index_site .presses .links a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #c5dbe9;
  border-radius: 3px;
  background: var(--scibook-tint);
  color: var(--scibook-blue);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}
.page_index_site .presses .links a:hover { background: #e6f1f8; text-decoration: underline; }
.page_index_site .presses a:focus-visible,
.pkp_structure_footer_wrapper a:focus-visible { outline: 3px solid #2e6ea1; outline-offset: 4px; }

/* 页脚：使用 OMP 原生容器，即使编辑器移除自定义 class 也能生效。
 * 请配合提供的简洁页脚内容使用；不删除或隐藏 PKP 系统标识。
 */
.pkp_structure_footer_wrapper {
  background: #696f74;
  border-top: 8px solid #afc4dd;
  color: #f3f6f9;
}
.pkp_structure_footer_wrapper .pkp_structure_footer {
  box-sizing: border-box;
  padding-top: 32px;
  padding-bottom: 24px;
}
.pkp_structure_footer_wrapper .pkp_footer_content {
  box-sizing: border-box;
  float: none;
  width: 100%;
  padding: 0;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.pkp_structure_footer_wrapper .pkp_footer_content h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
}
.pkp_structure_footer_wrapper .pkp_footer_content p { margin: 0 0 10px; }
.pkp_structure_footer_wrapper .pkp_footer_content strong { color: #ffffff; }
.pkp_structure_footer_wrapper a { color: #ffffff; text-underline-offset: 3px; }
.pkp_structure_footer_wrapper .pkp_footer_content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}
.pkp_structure_footer_wrapper .pkp_brand_footer {
  float: none;
  width: auto;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(255,255,255,.25);
  color: #f3f6f9;
  text-align: left;
}
.pkp_structure_footer_wrapper .pkp_brand_footer img { width: auto; max-width: 150px; height: auto; }
@media (max-width: 680px) {
  .page_index_site .presses > ul { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .page_index_site .presses > ul > li { padding: 20px; }
  .pkp_structure_footer_wrapper .pkp_structure_footer { padding-top: 24px; padding-bottom: 20px; }
}

/* 总首页页眉：以浅蓝色呼应参考站点，避免影响单家出版社书目页面。
 * 较旧浏览器不支持 :has 时，仅保留其原页眉，不影响卡片及页脚。
 */
@supports selector(body:has(.page_index_site)) {
  body:has(.page_index_site) .pkp_structure_head {
    background: linear-gradient(115deg, #c6d9e9 0%, #afc4dd 65%, #9fbddd 100%);
    border-bottom: 1px solid #9ebbd3;
    color: #243b4c;
  }
  body:has(.page_index_site) .pkp_head_wrapper { background: transparent; }
  body:has(.page_index_site) .pkp_site_name a { color: #243b4c; }
  body:has(.page_index_site) .pkp_site_name a:focus-visible { outline: 3px solid #245781; outline-offset: 4px; }
}
.page_index_site { font-family: "Open Sans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.pkp_structure_footer_wrapper .pkp_footer_content { color: #f3f6f9; font-family: "Open Sans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.pkp_structure_footer_wrapper a:hover { color: #ffffff; text-decoration-thickness: 2px; }
.pkp_structure_footer_wrapper a:focus-visible { outline-color: #ffffff; }
@media print {
  .page_index_site .presses > ul > li { break-inside: avoid; box-shadow: none; }
  .pkp_structure_footer_wrapper { background: #fff; color: #243b4c; border-top: 1px solid #ccc; }
  .pkp_structure_footer_wrapper .pkp_footer_content,
  .pkp_structure_footer_wrapper .pkp_footer_content h3,
  .pkp_structure_footer_wrapper .pkp_footer_content strong,
  .pkp_structure_footer_wrapper a,
  .pkp_structure_footer_wrapper .pkp_brand_footer { color: #243b4c; }
}

