/*
Theme Name: PP Chalkboard 黑板课堂
Theme URI: https://example.com/pp-chalkboard
Author: PP Theme Studio
Author URI: https://example.com
Description: 面向 PP 酸洗槽厂家的黑板课堂风 WordPress 主题。墨绿黑板底配粉笔白与粉笔黄,手写感标题、粉笔手绘槽体插图、"四堂课"知识卡与"常见的坑"清单,以科普讲解建立专业信任,适合愿意用内容教育客户的工厂。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pp-chalkboard
Tags: dark, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --board: #22392f;
  --board-2: #1b2e26;
  --board-lit: #2c473b;
  --chalk: #f2f0e6;
  --chalk-dim: #b9c4bd;
  --yellow: #f5d76e;
  --coral: #e98a6b;
  --wood: #8a5a37;
  --container: 1120px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --hand: "Comic Sans MS", "Segoe Print", "PingFang SC", cursive;
  --dust: radial-gradient(circle at 20% 30%, rgba(255,255,255,.05), transparent 55%),
          radial-gradient(circle at 78% 68%, rgba(255,255,255,.04), transparent 50%);
}

/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: var(--chalk);
  background: var(--board);
  background-image: var(--dust);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
svg { max-width: 100%; height: auto; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.btn {
  display: inline-block; padding: 12px 26px; font-size: 15px; font-weight: 700;
  border: 2px solid var(--chalk); border-radius: 22px; background: transparent;
  color: var(--chalk); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--chalk); color: var(--board); }
.btn-main { background: var(--yellow); border-color: var(--yellow); color: var(--board-2); }
.btn-main:hover { background: #fae59a; border-color: #fae59a; color: var(--board-2); }

/* ===== Header ===== */
.site-header {
  background: var(--board-2); border-bottom: 2px solid var(--board-lit);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 22px; padding: 16px 0; }
.site-branding { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2.5px solid var(--chalk); color: var(--chalk);
  font-family: var(--hand); font-weight: 700; font-size: 18px;
}
.site-title { font-size: 21px; font-weight: 700; line-height: 1.3; font-family: var(--hand); }
.site-desc { font-size: 12px; color: var(--chalk-dim); }
.site-nav .menu { display: flex; gap: 26px; list-style: none; }
.site-nav a { font-size: 15px; font-weight: 600; color: var(--chalk-dim); padding: 4px 0; }
.site-nav a:hover, .site-nav .current-menu-item > a {
  color: var(--yellow);
  text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 6px;
}
.chalk-tray { height: 8px; background: linear-gradient(180deg, var(--wood), #6b4529); }
.nav-toggle-input, .nav-toggle-label { display: none; }

/* ===== Hero ===== */
.hero { padding: 66px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero-chip {
  display: inline-block; font-family: var(--hand); font-size: 14px; color: var(--yellow);
  border: 2px dashed rgba(245,215,110,.55); border-radius: 20px; padding: 3px 16px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.25; font-weight: 800; font-family: var(--hand); }
.hero h1 em {
  font-style: normal; color: var(--yellow);
  text-decoration: underline; text-decoration-style: wavy; text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.hero-sub { margin-top: 20px; font-size: 16px; color: var(--chalk-dim); max-width: 29em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-draw { text-align: center; }
.draw-note { display: block; margin-top: 8px; font-family: var(--hand); font-size: 14px; color: var(--chalk-dim); }

/* ===== Sections ===== */
.section { padding: 58px 0; }
.sec-head { text-align: center; margin-bottom: 38px; }
.sec-head h2 {
  font-family: var(--hand); font-size: 30px; font-weight: 800; display: inline-block;
  padding-bottom: 8px; border-bottom: 3px solid var(--yellow);
}
.sec-sub { display: block; margin-top: 10px; font-size: 14px; color: var(--chalk-dim); }

/* ===== Lessons ===== */
.lesson-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.lesson {
  background: rgba(255,255,255,.035); border: 2px solid var(--board-lit);
  border-radius: 12px; padding: 26px 24px; position: relative;
}
.lesson:hover { border-color: var(--yellow); }
.lesson-no {
  display: inline-block; font-family: var(--hand); font-size: 14px; color: var(--board-2);
  background: var(--yellow); border-radius: 12px; padding: 2px 14px; margin-bottom: 12px;
}
.lesson h3 { font-family: var(--hand); font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.lesson p { font-size: 15px; color: var(--chalk-dim); line-height: 1.85; }

/* ===== Products ===== */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prod {
  background: rgba(255,255,255,.035); border: 2px dashed var(--board-lit);
  border-radius: 12px; padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .16s ease, border-color .16s ease;
}
.prod:hover { transform: translateY(-4px); border-color: var(--chalk); }
.prod-draw { background: rgba(0,0,0,.16); border-radius: 8px; padding: 10px 8px 4px; }
.prod h3 { font-family: var(--hand); font-size: 20px; font-weight: 800; }
.prod h3 a:hover { color: var(--yellow); }
.prod p { font-size: 14px; color: var(--chalk-dim); flex: 1; }
.prod-link { font-size: 14px; font-weight: 700; color: var(--yellow); }

/* ===== Pit list ===== */
.pit-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pit-list li {
  background: rgba(233,138,107,.08); border-left: 5px solid var(--coral);
  border-radius: 0 10px 10px 0; padding: 18px 22px; font-size: 15px; color: var(--chalk-dim);
}
.pit-list b {
  display: inline-block; font-family: var(--hand); font-size: 18px;
  color: var(--coral); margin-right: 10px;
}

/* ===== Notes ===== */
.note-list { display: flex; flex-direction: column; gap: 2px; }
.note-row {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 14px;
  padding: 15px 18px; border-bottom: 1px dashed var(--board-lit); transition: background .15s ease;
}
.note-row:hover { background: rgba(255,255,255,.045); }
.note-tick { color: var(--yellow); font-weight: 800; }
.note-row h3 { font-size: 16px; font-weight: 500; }
.note-row:hover h3 { color: var(--yellow); }
.note-row time { font-size: 13px; color: var(--chalk-dim); }

/* ===== CTA ===== */
.cta-board {
  position: relative; margin: 56px 0; padding: 32px 34px;
  background: var(--board-2); border: 3px solid var(--yellow); border-radius: 14px;
  display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between;
}
.cta-pin {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
}
.cta-board h2 { font-family: var(--hand); font-size: 25px; font-weight: 800; }
.cta-board p { font-size: 14px; color: var(--chalk-dim); margin-top: 6px; }
.cta-side { display: flex; align-items: center; gap: 18px; }
.cta-phone { font-family: var(--hand); font-size: 24px; font-weight: 800; color: var(--yellow); }

/* ===== Page hero / inner ===== */
.page-hero { background: var(--board-2); border-bottom: 2px solid var(--board-lit); padding: 38px 0; }
.page-hero h1 { font-family: var(--hand); font-size: 30px; font-weight: 800; }
.breadcrumbs { margin-top: 8px; font-size: 13px; color: var(--chalk-dim); }
.breadcrumbs a:hover { color: var(--yellow); }

.layout { display: grid; grid-template-columns: 1fr 290px; gap: 34px; padding: 44px 0 64px; align-items: start; }
.layout-full { padding: 44px 0 64px; }
.entry-card {
  background: rgba(255,255,255,.035); border: 2px dashed var(--board-lit);
  border-radius: 12px; padding: 24px; margin-bottom: 18px;
}
.entry-card:hover { border-color: var(--chalk); }
.entry-card h2 { font-family: var(--hand); font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.entry-card h2 a:hover { color: var(--yellow); }
.entry-meta { display: flex; gap: 14px; font-size: 12px; color: var(--chalk-dim); }
.entry-meta a { color: var(--yellow); }
.entry-excerpt { margin-top: 10px; font-size: 15px; color: var(--chalk-dim); }
.entry-thumb { margin-bottom: 16px; border-radius: 8px; overflow: hidden; }
.single-header { border-bottom: 3px solid var(--yellow); padding-bottom: 14px; margin-bottom: 22px; }
.single-header h1 { font-family: var(--hand); font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.entry-content {
  background: rgba(255,255,255,.035); border: 2px solid var(--board-lit);
  border-radius: 12px; padding: 26px; font-size: 16px;
}
.entry-content > * + * { margin-top: 16px; }
.entry-content h2 { font-family: var(--hand); font-size: 23px; font-weight: 800; color: var(--yellow); }
.entry-content h3 { font-family: var(--hand); font-size: 19px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 4px solid var(--coral); padding-left: 16px; color: var(--chalk-dim); }
.entry-content code { font-family: Menlo, Consolas, monospace; background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 3px; }
.entry-content a { color: var(--yellow); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; font-size: 14px; }
.post-nav a:hover { color: var(--yellow); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 2px solid var(--board-lit); border-radius: 20px; font-weight: 700;
}
.pagination .current, .pagination .page-numbers:hover { background: var(--yellow); color: var(--board-2); border-color: var(--yellow); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.sidebar-cta {
  background: var(--board-2); border: 2px solid var(--yellow); border-radius: 12px;
  padding: 22px 20px; text-align: center;
}
.sidebar-cta h3 { font-family: var(--hand); font-size: 19px; font-weight: 800; }
.sidebar-cta p { font-size: 13px; color: var(--chalk-dim); margin: 8px 0 12px; }
.sidebar-cta strong { display: block; font-family: var(--hand); font-size: 22px; color: var(--yellow); margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; }
.widget { background: rgba(255,255,255,.035); border: 2px dashed var(--board-lit); border-radius: 12px; padding: 20px; }
.widget-title { font-family: var(--hand); font-size: 18px; font-weight: 800; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid var(--board-lit); }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.widget li a { font-size: 14px; color: var(--chalk-dim); }
.widget li a:hover { color: var(--yellow); }

.search-form { display: flex; gap: 8px; }
.search-field {
  flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--board-lit);
  border-radius: 20px; background: rgba(0,0,0,.2); color: var(--chalk); font-family: inherit; font-size: 14px;
}
.search-field:focus { outline: none; border-color: var(--yellow); }
.search-submit {
  padding: 10px 18px; border: 2px solid var(--yellow); border-radius: 20px;
  background: var(--yellow); color: var(--board-2); font-weight: 700; cursor: pointer;
}

/* ===== Comments ===== */
.comments-area { margin-top: 28px; background: rgba(255,255,255,.035); border: 2px solid var(--board-lit); border-radius: 12px; padding: 24px; }
.comments-area h2, .comment-reply-title { font-family: var(--hand); font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.comment-list .comment-body { border-left: 3px solid var(--board-lit); padding-left: 14px; font-size: 15px; color: var(--chalk-dim); }
.comment-notes { font-size: 13px; color: var(--chalk-dim); margin-bottom: 10px; }
.comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 2px solid var(--board-lit); border-radius: 10px;
  background: rgba(0,0,0,.2); color: var(--chalk); font-family: inherit; font-size: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--yellow); }
.comment-form .submit {
  padding: 12px 28px; border: 2px solid var(--yellow); border-radius: 22px;
  background: var(--yellow); color: var(--board-2); font-weight: 800; cursor: pointer;
}

/* ===== 404 ===== */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--hand); font-size: 92px; font-weight: 800; color: var(--yellow); line-height: 1; }
.error-page h1 { font-family: var(--hand); font-size: 27px; font-weight: 800; margin: 10px 0 8px; }
.error-page p { color: var(--chalk-dim); margin-bottom: 18px; }
.error-page .search-form { max-width: 420px; margin: 0 auto 18px; }

/* ===== Footer ===== */
.site-footer { background: var(--board-2); border-top: 8px solid var(--wood); margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 34px; padding: 46px 0 34px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { font-family: var(--hand); font-size: 18px; }
.footer-col p { font-size: 14px; color: var(--chalk-dim); }
.footer-col h3 { font-family: var(--hand); font-size: 17px; font-weight: 800; color: var(--yellow); margin-bottom: 14px; }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: var(--chalk-dim); }
.footer-col a:hover { color: var(--yellow); }
.footer-contact li { font-size: 14px; display: flex; gap: 8px; color: var(--chalk-dim); }
.footer-contact b { color: var(--chalk); font-weight: 600; min-width: 34px; }
.footer-bottom { border-top: 1px dashed var(--board-lit); padding: 15px 0; font-size: 13px; color: var(--chalk-dim); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 780px) {
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 8px; border: 2px solid var(--board-lit); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--chalk); }
  .site-nav { display: none; order: 10; width: 100%; padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--board-lit); }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav .menu { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 10px 0; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .lesson-grid, .prod-grid { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 20px 1fr; }
  .note-row time { display: none; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
}
