/*
Theme Name: 泡学库
Theme URI: https://paoxueku.com/
Author: 泡学库
Description: 为健康关系、沟通与个人成长知识商城设计的轻量主题。
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: paoxueku
*/

:root {
  --ink: #102a3b;
  --ink-2: #244558;
  --muted: #637786;
  --paper: #f7f5ef;
  --white: #fff;
  --line: #dbe3e6;
  --teal: #147d80;
  --amber: #e89a3d;
  --navy: #071f31;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(7, 31, 49, .10);
  --wrap: min(1180px, calc(100% - 36px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #0b5e61; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(232,154,61,.75); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 99; padding: 10px 14px; background: #fff; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(219,227,230,.8); background: rgba(247,245,239,.93); backdrop-filter: blur(12px); }
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; color: white; background: linear-gradient(135deg, var(--teal), #0b4e6b); box-shadow: 0 6px 18px rgba(20,125,128,.22); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--ink-2); font-size: .94rem; font-weight: 650; text-decoration: none; }
.header-shop { padding: 9px 15px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink) !important; }
.mobile-menu { display: none; position: relative; margin-left: auto; }
.mobile-menu summary { display: grid; gap: 4px; padding: 9px; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { width: 22px; height: 2px; background: var(--ink); }
.mobile-menu nav { position: absolute; right: 0; top: 46px; width: min(300px, calc(100vw - 24px)); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.mobile-menu ul { margin: 0; padding: 0; list-style: none; }
.mobile-menu li + li { border-top: 1px solid var(--line); }
.mobile-menu a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; }

.hero { position: relative; overflow: hidden; min-height: 520px; display: grid; align-items: center; color: white; background: var(--navy); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,24,38,.98) 0%, rgba(4,24,38,.89) 34%, rgba(4,24,38,.28) 66%, rgba(4,24,38,.05) 100%), url('assets/hero-paoxueku.png') center right / cover no-repeat; }
.hero-inner { position: relative; z-index: 1; width: var(--wrap); margin-inline: auto; padding-block: 86px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 18px; color: #b7e3df; font-size: .82rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--amber); }
.hero h1 { max-width: 720px; margin: 0 0 18px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(2.5rem, 5vw, 4.65rem); line-height: 1.12; letter-spacing: -.035em; }
.hero p { max-width: 600px; margin: 0 0 32px; color: #d9e6ea; font-size: clamp(1.03rem, 1.6vw, 1.2rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-search { display: flex; width: min(670px, 100%); padding: 5px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.97); box-shadow: 0 18px 42px rgba(0,0,0,.18); }
.hero-search input { flex: 1; min-width: 0; padding: 10px 18px; border: 0; color: var(--ink); background: transparent; font-size: 1rem; outline: 0; }
.hero-search button { min-height: 44px; white-space: nowrap; }
.quick-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; color: #b7cbd4; font-size: .88rem; }
.quick-links a { color: #e4eef1; }
.button, .wp-element-button, button, input[type=submit] { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border: 0; border-radius: 999px; color: #081f2f; background: var(--amber); font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { color: #081f2f; background: #f0ac59; }
.button.secondary { color: white; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.35); }

.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.trust-item { padding: 24px 20px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; color: var(--navy); font-size: 1.04rem; }
.trust-item span { color: var(--muted); font-size: .86rem; }

.start-section { padding-block: 34px 0; background: white; }
.start-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; }
.start-card { min-height: 230px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #f8faf9; text-decoration: none; }
.start-card:hover { color: var(--ink); border-color: #abc8c8; box-shadow: var(--shadow); }
.start-card span { color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.start-card h2 { margin: 20px 0 9px; font-family: "Noto Serif SC", serif; font-size: 1.45rem; line-height: 1.35; }
.start-card p { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.start-card strong { color: var(--teal); font-size: .88rem; }
.start-card.start-primary { color: white; background: var(--navy); border-color: var(--navy); }
.start-card.start-primary span, .start-card.start-primary strong { color: #87d6d0; }
.start-card.start-primary p { color: #bfd0d8; }

.section { padding-block: 76px; }
.section.alt { background: #edf1ef; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; max-width: 650px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.3; }
.section-heading p { max-width: 520px; margin: 0; color: var(--muted); }
.section-kicker { display: block; margin-bottom: 8px; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .13em; }
.topic-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.topic-card { min-height: 210px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: white; text-decoration: none; box-shadow: 0 1px 0 rgba(7,31,49,.03); transition: transform .2s, box-shadow .2s; }
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.topic-index { color: var(--amber); font-size: .76rem; font-weight: 800; letter-spacing: .1em; }
.topic-card h3 { margin: 34px 0 6px; font-size: 1.2rem; }
.topic-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.topic-tags { display: block; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--teal); font-size: .78rem; font-weight: 700; }
.cluster-section { padding-top: 0; }
.cluster-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.cluster-grid a { min-height: 190px; padding: 28px; border-radius: var(--radius); color: white; background: var(--navy); text-decoration: none; }
.cluster-grid a:nth-child(2), .cluster-grid a:nth-child(3) { background: #123a4c; }
.cluster-grid span { color: #87d6d0; font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.cluster-grid h3 { margin: 20px 0 7px; font-family: "Noto Serif SC", serif; font-size: 1.35rem; }
.cluster-grid p { margin: 0; color: #bfd0d8; font-size: .9rem; }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; min-height: 250px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.post-card-body { padding: 24px; }
.post-meta { color: var(--teal); font-size: .78rem; font-weight: 700; }
.post-card h2, .post-card h3 { margin: 9px 0 10px; line-height: 1.45; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.resource-section { color: white; background: var(--navy); }
.resource-section .section-kicker { color: #7ed0ca; }
.resource-section .section-heading a { color: #dcecef; }
.resource-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.resource-card { display: flex; min-height: 260px; padding: 24px; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.resource-card h3 { margin: 16px 0 9px; line-height: 1.45; }
.resource-card h3 a { color: white; text-decoration: none; }
.resource-card p { color: #bcd0d8; }
.resource-label { display: inline-flex; padding: 4px 10px; border-radius: 999px; color: #ffd7a3; background: rgba(232,154,61,.15); font-size: .75rem; font-weight: 700; }
.resource-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.resource-card-foot a { color: #d6e9ec; font-size: .88rem; }
.editorial { background: white; }
.editorial-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.editorial h2 { margin: 0; font-family: "Noto Serif SC", serif; font-size: clamp(1.8rem,3vw,2.65rem); line-height: 1.35; }
.editorial-steps { display: grid; gap: 16px; }
.editorial-steps div { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.editorial-steps strong { color: var(--amber); }
.editorial-steps p { margin: 0; }
.related { margin-bottom: 70px; }
.site-search { display: flex; max-width: 620px; }
.site-search input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px 0 0 999px; font-size: 1rem; }
.site-search button { border-radius: 0 999px 999px 0; }

.content-layout { width: min(880px, calc(100% - 36px)); margin: 64px auto; }
.entry-header { margin-bottom: 32px; }
.entry-title { margin: 0 0 15px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.25; }
.entry-meta { color: var(--muted); font-size: .88rem; }
.entry-content { font-size: 1.05rem; }
.entry-content h2 { margin-top: 2.1em; font-family: "Noto Serif SC", serif; font-size: 1.7rem; }
.entry-content h3 { margin-top: 1.8em; }
.entry-content p, .entry-content ul, .entry-content ol { margin-block: 1.15em; }
.entry-content blockquote { margin: 28px 0; padding: 18px 22px; border-left: 4px solid var(--amber); background: #fff; }
.entry-content img { border-radius: 14px; }
.notice { padding: 18px 20px; border: 1px solid #d9c7a9; border-radius: 12px; background: #fff9ec; color: #5d4a2f; }

.site-footer { padding-block: 52px 28px; color: #c9d6dc; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.site-footer h2, .site-footer h3 { color: white; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #d4e7eb; }
.footer-note { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); color: #91a8b3; font-size: .82rem; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-menu { display: block; }
  .header-shop { margin-left: 0; }
  .hero { min-height: 520px; }
  .hero::before { background: linear-gradient(90deg, rgba(4,24,38,.98), rgba(4,24,38,.76)), url('assets/hero-paoxueku.png') center / cover; }
  .trust-grid, .topic-grid, .post-grid, .resource-grid, .start-grid { grid-template-columns: 1fr 1fr; }
  .start-card.start-primary { grid-column: 1 / -1; }
  .trust-item:nth-child(2) { border-right: 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .editorial-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 560px) {
  .site-wrap { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; }
  .hero-inner { padding-block: 62px; }
  .hero h1 { font-size: 2.7rem; }
  .section { padding-block: 54px; }
  .trust-grid, .topic-grid, .post-grid, .resource-grid, .footer-grid, .start-grid, .cluster-grid { grid-template-columns: 1fr; }
  .start-card.start-primary { grid-column: auto; }
  .hero-search { display: grid; border-radius: 18px; }
  .hero-search button { border-radius: 13px; }
  .header-shop { display: none; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
}
