/*
Theme Name: PP Hazard 警示标牌
Theme URI: https://example.com/pp-hazard
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-hazard
Tags: yellow, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --yellow: #f7c600;
  --yellow-2: #ffd633;
  --black: #17130c;
  --white: #fffdf4;
  --gray: #5d5748;
  --line: rgba(23, 19, 12, 0.35);
  --container: 1140px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

/* ===== 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.75;
  color: var(--black);
  background: var(--yellow);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--black); text-decoration: none; transition: all 0.18s ease; }
a:hover { color: #6b5400; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: var(--black); line-height: 1.28; font-weight: 900; }
table { border-collapse: collapse; width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
::selection { background: var(--black); color: var(--yellow); }

/* 黄黑斜纹条 */
.hz-stripe { height: 14px; background: repeating-linear-gradient(-45deg, var(--black) 0 18px, var(--yellow) 18px 36px); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 13px 32px;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  border: 3px solid var(--black);
  background: var(--white);
  color: var(--black);
  border-radius: 8px;
  transition: all 0.18s ease;
}
.btn:hover { background: var(--black); color: var(--yellow); }
.btn-black { background: var(--black); color: var(--yellow); }
.btn-black:hover { background: #2c261a; color: var(--yellow-2); }

/* ===== Header ===== */
.site-header { background: var(--black); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 24px; }
.site-branding { display: flex; align-items: center; gap: 13px; }
.site-branding .custom-logo { max-height: 46px; width: auto; }
.brand-mark {
  width: 46px; height: 46px; flex: none;
  background: var(--yellow);
  color: var(--black);
  border-radius: 8px;
  font-weight: 900; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.site-title { font-size: 21px; font-weight: 900; letter-spacing: 2px; color: var(--yellow); }
.site-title a { color: var(--yellow); }
.site-title a:hover { color: var(--yellow-2); }
.site-desc { font-family: var(--mono); font-size: 10.5px; color: #b9a95f; letter-spacing: 2px; text-transform: uppercase; }

.nav-toggle-input { display: none; }
.nav-toggle-label {
  display: none;
  width: 44px; height: 44px;
  cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
  padding: 10px;
  border: 3px solid var(--yellow);
  border-radius: 8px;
}
.nav-toggle-label span { display: block; height: 3px; background: var(--yellow); }

.site-nav ul { display: flex; }
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  padding: 25px 17px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #e8dfc2;
  border-bottom: 4px solid transparent;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--yellow); border-bottom-color: var(--yellow); }
.site-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: var(--black);
  border: 3px solid var(--yellow);
  border-radius: 0 0 10px 10px;
  display: none;
  z-index: 99;
}
.site-nav li:hover > .sub-menu { display: block; }
.site-nav .sub-menu a { padding: 11px 16px; border-bottom: 1px solid rgba(247, 198, 0, 0.25); font-size: 14px; }

/* ===== Hero(大标牌) ===== */
.hero { padding: 70px 0 64px; }
.signboard {
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 22px;
  padding: 52px 50px 44px;
  box-shadow: 0 14px 0 rgba(23, 19, 12, 0.25);
  position: relative;
}
.sign-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.sign-code { font-family: var(--mono); font-size: 12.5px; letter-spacing: 3px; color: var(--gray); }
.warn-tri {
  width: 0; height: 0;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 44px solid var(--black);
  position: relative;
}
.warn-tri::after {
  content: "!";
  position: absolute;
  left: -6px; top: 12px;
  color: var(--yellow);
  font-weight: 900;
  font-size: 24px;
}
.hero h1 { font-size: 47px; letter-spacing: 4px; margin-bottom: 14px; }
.hero h1 em { font-style: normal; background: var(--yellow); padding: 0 12px; border-radius: 8px; }
.hero-sub { font-size: 16px; color: var(--gray); max-width: 640px; margin-bottom: 28px; font-weight: 600; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }

/* 限字圆牌 */
.limit-row { display: flex; gap: 22px; flex-wrap: wrap; }
.limit {
  width: 116px; height: 116px;
  border-radius: 50%;
  border: 7px solid #d81e05;
  background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  flex: none;
}
.limit b { font-size: 26px; font-weight: 900; line-height: 1.1; }
.limit small { font-size: 11px; font-weight: 800; color: var(--gray); letter-spacing: 1px; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-dark { background: var(--black); color: #e8dfc2; }
.section-dark h2, .section-dark h3 { color: var(--yellow); }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-sign {
  background: var(--black);
  color: var(--yellow);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 6px 16px;
  border-radius: 6px;
}
.section-dark .sec-sign { background: var(--yellow); color: var(--black); }
.sec-head h2 { font-size: 30px; letter-spacing: 3px; }
.sec-head .sec-en { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; color: var(--gray); text-transform: uppercase; }
.section-dark .sec-en { color: #9a8f6a; }

/* ===== 路标产品卡 ===== */
.road-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.road {
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.road:hover { transform: translateY(-5px); box-shadow: 0 10px 0 rgba(23, 19, 12, 0.3); }
.road-head {
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.road-head b { font-size: 17px; letter-spacing: 2px; color: var(--yellow); }
.road-head span { font-family: var(--mono); font-size: 11px; color: #b9a95f; letter-spacing: 1px; }
.road-body { padding: 22px 22px 20px; flex: 1; display: flex; flex-direction: column; }
.road-body svg { width: 100%; max-width: 210px; height: auto; margin: 0 auto 14px; }
.road-body p { font-size: 13.5px; color: var(--gray); font-weight: 600; flex: 1; }
.road-go {
  margin-top: 14px;
  align-self: flex-start;
  font-size: 13.5px; font-weight: 900; letter-spacing: 1px;
  border-bottom: 3px solid var(--black);
}

/* ===== 里程碑 ===== */
.km-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.km {
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 14px;
  text-align: center;
  padding: 26px 18px 20px;
}
.km b { display: block; font-size: 40px; font-weight: 900; line-height: 1.1; }
.km b i { font-style: normal; font-size: 18px; color: #d81e05; }
.km span { font-size: 13px; font-weight: 800; color: var(--gray); letter-spacing: 1px; }

/* ===== 安全守则 ===== */
.rules { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.rule {
  display: flex; align-items: center; gap: 18px;
  background: rgba(247, 198, 0, 0.1);
  border: 2px solid rgba(247, 198, 0, 0.4);
  border-radius: 12px;
  padding: 16px 22px;
}
.rule i {
  font-style: normal;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.rule h3 { font-size: 17px; letter-spacing: 1px; margin-bottom: 2px; }
.rule p { font-size: 13.5px; color: #b9ae8c; }

/* ===== 指路流程 ===== */
.way-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.way {
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
}
.way::after {
  content: "➜";
  position: absolute;
  right: -20px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 900;
  z-index: 2;
}
.way:last-child::after { display: none; }
.way b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: #d81e05; margin-bottom: 6px; }
.way h3 { font-size: 16.5px; letter-spacing: 1px; }
.way p { font-size: 12px; color: var(--gray); font-weight: 600; margin-top: 4px; }

/* ===== 公告栏 ===== */
.board { background: var(--white); border: 4px solid var(--black); border-radius: 16px; overflow: hidden; }
.board-head { background: var(--black); color: var(--yellow); padding: 12px 22px; font-weight: 900; letter-spacing: 3px; display: flex; justify-content: space-between; }
.board-head span { font-family: var(--mono); font-size: 11px; color: #b9a95f; letter-spacing: 1px; align-self: center; }
.notice {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 16px 24px;
  border-bottom: 2px dashed var(--line);
  color: inherit;
}
.notice:last-child { border-bottom: none; }
.notice:hover { background: rgba(247, 198, 0, 0.15); }
.notice time { font-family: var(--mono); font-size: 12px; color: var(--gray); letter-spacing: 1px; }
.notice h3 { font-size: 16px; font-weight: 800; }
.notice .pin { color: #d81e05; font-weight: 900; font-size: 13px; white-space: nowrap; }

/* ===== CTA ===== */
.cta-hz {
  background: var(--black);
  border-radius: 20px;
  color: var(--yellow);
  padding: 8px;
}
.cta-hz-inner {
  border: 3px dashed var(--yellow);
  border-radius: 14px;
  padding: 42px 46px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.cta-hz h2 { color: var(--yellow); font-size: 29px; letter-spacing: 3px; margin-bottom: 6px; }
.cta-hz p { color: #cdbf87; font-weight: 700; font-size: 14px; }
.cta-side { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-phone { font-size: 25px; font-weight: 900; letter-spacing: 2px; color: var(--white); }
.cta-hz .btn { border-color: var(--yellow); background: var(--yellow); color: var(--black); }
.cta-hz .btn:hover { background: var(--yellow-2); }

/* ===== Footer ===== */
.site-footer { background: var(--black); color: #b9ae8c; font-size: 14px; margin-top: 72px; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding: 54px 0 42px; }
.footer-col h3 { color: var(--yellow); font-size: 14px; letter-spacing: 3px; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #b9ae8c; }
.footer-col a:hover { color: var(--yellow); }
.footer-col p { margin-bottom: 10px; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.footer-brand strong { color: var(--white); font-size: 18px; letter-spacing: 2px; }
.footer-contact li b { color: #e8dfc2; margin-right: 8px; }
.footer-bottom { border-top: 1px solid rgba(247, 198, 0, 0.25); padding: 15px 0; font-size: 12.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ===== Inner pages ===== */
.page-hero { background: var(--black); padding: 46px 0; }
.page-hero h1 { color: var(--yellow); font-size: 30px; letter-spacing: 3px; }
.breadcrumbs { margin-top: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: #b9a95f; }
.breadcrumbs a { color: var(--yellow); }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 54px 0; }
.layout-full { padding: 54px 0; }
.main-col { min-width: 0; }

.entry-card {
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(23, 19, 12, 0.25); }
.entry-card h2 { font-size: 21px; letter-spacing: 1px; margin-bottom: 8px; }
.entry-card h2 a { color: var(--black); }
.entry-meta { font-family: var(--mono); font-size: 12px; color: var(--gray); letter-spacing: 1px; margin-bottom: 10px; }
.entry-meta span { margin-right: 16px; }
.entry-excerpt { color: var(--gray); font-weight: 600; font-size: 14.5px; }
.entry-thumb { margin-bottom: 16px; border: 4px solid var(--black); border-radius: 10px; overflow: hidden; }

.entry-content { font-size: 16px; }
.entry-content h2, .entry-content h3 { margin: 1.6em 0 0.7em; letter-spacing: 2px; }
.entry-content h2 { font-size: 24px; }
.entry-content h2::before { content: "⚠ "; }
.entry-content h3 { font-size: 19px; }
.entry-content p { margin-bottom: 1.1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.6em; }
.entry-content ul { list-style: square; }
.entry-content ol { list-style: decimal; }
.entry-content blockquote {
  border: 3px solid var(--black);
  border-radius: 12px;
  background: rgba(23, 19, 12, 0.06);
  padding: 16px 22px;
  margin: 1.4em 0;
  font-weight: 800;
}
.entry-content table th, .entry-content table td { border: 2px solid var(--black); padding: 10px 14px; background: var(--white); }
.entry-content table th { background: var(--black); color: var(--yellow); letter-spacing: 1px; }
.entry-content a { text-decoration: underline; font-weight: 800; }
.entry-content img { border: 4px solid var(--black); border-radius: 10px; }
.single-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 4px solid var(--black); }
.single-header h1 { font-size: 27px; letter-spacing: 2px; margin-bottom: 8px; }
.post-nav { display: flex; justify-content: space-between; gap: 18px; margin-top: 38px; padding-top: 20px; border-top: 3px dashed var(--line); font-size: 13.5px; font-weight: 900; }

/* Sidebar */
.sidebar .widget { background: var(--white); border: 4px solid var(--black); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.sidebar .widget-title, .sidebar .widget h2 {
  display: inline-block;
  background: var(--black);
  color: var(--yellow);
  font-size: 13.5px;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.sidebar .widget ul li { padding: 8px 0; border-bottom: 2px dashed var(--line); font-size: 14px; font-weight: 600; }
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar-cta {
  background: var(--black);
  border-radius: 14px;
  color: var(--yellow);
  padding: 26px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.sidebar-cta h3 { color: var(--yellow); font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.sidebar-cta p { font-size: 13px; color: #cdbf87; margin-bottom: 12px; font-weight: 700; }
.sidebar-cta strong { display: block; font-size: 21px; font-weight: 900; color: var(--white); letter-spacing: 1px; margin-bottom: 16px; }
.sidebar-cta .btn-black { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.sidebar-cta .btn-black:hover { background: var(--yellow-2); }

/* Search form */
.search-form { display: flex; border: 3px solid var(--black); border-radius: 10px; overflow: hidden; background: var(--white); }
.search-form .search-field { flex: 1; min-width: 0; padding: 11px 14px; border: none; outline: none; background: transparent; font-weight: 600; }
.search-form .search-submit {
  padding: 11px 18px;
  background: var(--black);
  color: var(--yellow);
  border: none;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 42px;
  padding: 8px 13px;
  text-align: center;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 8px;
  color: var(--black);
  font-weight: 900;
  font-size: 13.5px;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--black); color: var(--yellow); }

/* Comments */
.comments-area { margin-top: 44px; }
.comments-area > h2 { font-size: 20px; letter-spacing: 2px; margin-bottom: 20px; }
.comment-list > li { background: var(--white); border: 3px solid var(--black); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.comment-list .children { margin: 12px 0 0 22px; }
.comment-meta { font-family: var(--mono); font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.comment-meta b { color: #d81e05; }
.comment-form p { margin-bottom: 13px; }
.comment-form label { display: block; font-size: 13px; font-weight: 900; letter-spacing: 1px; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 3px solid var(--black);
  border-radius: 10px;
  background: var(--white);
  outline: none;
  font-weight: 600;
}
.comment-form input:focus, .comment-form textarea:focus { background: #fffbe8; }

/* 404 */
.error-page { text-align: center; padding: 90px 20px; }
.error-code {
  display: inline-block;
  font-size: 96px; font-weight: 900; line-height: 1;
  background: var(--white);
  border: 5px solid var(--black);
  border-radius: 18px;
  padding: 16px 42px;
  box-shadow: 0 10px 0 rgba(23, 19, 12, 0.25);
}
.error-page h1 { font-size: 27px; letter-spacing: 3px; margin: 26px 0 10px; }
.error-page p { color: var(--gray); font-weight: 700; margin-bottom: 28px; }
.error-page .search-form { max-width: 420px; margin: 0 auto 26px; }

/* WP core */
.alignleft { float: left; margin: 0 22px 14px 0; }
.alignright { float: right; margin: 0 0 14px 22px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12.5px; color: var(--gray); text-align: center; padding: 7px 0; font-weight: 700; }
.sticky { outline: 4px dashed var(--black); outline-offset: 4px; }
.bypostauthor { display: block; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .road-grid { grid-template-columns: repeat(2, 1fr); }
  .km-row { grid-template-columns: repeat(2, 1fr); }
  .way-row { grid-template-columns: 1fr; gap: 22px; }
  .way::after { content: "▼"; right: 50%; top: auto; bottom: -24px; transform: translateX(50%); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle-label { display: flex; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black);
    border-bottom: 4px solid var(--yellow);
    display: none;
  }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 13px 22px; border-bottom: 1px solid rgba(247, 198, 0, 0.2); }
  .site-nav .sub-menu { position: static; display: block; border: none; border-radius: 0; }
  .signboard { padding: 34px 26px 30px; }
  .hero h1 { font-size: 32px; }
  .limit { width: 96px; height: 96px; border-width: 6px; }
  .limit b { font-size: 20px; }
  .cta-hz-inner { padding: 30px 24px; flex-direction: column; text-align: center; }
  .notice { grid-template-columns: 1fr; gap: 4px; }
  .notice .pin { justify-self: start; }
}
@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .hero h1 { font-size: 26px; letter-spacing: 2px; }
  .sec-head h2 { font-size: 24px; }
  .road-grid, .km-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
}
