/*
Theme Name: PF Portal
Theme URI: https://www.ohmiot.com
Author: ProtectFile
Description: 指标加密工具官网门户主题（第一层改版：导航+首页+交易学院）——轻量、无构建依赖、扁平风格
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/

:root {
  --brand: #1f4e79;        /* 品牌深蓝（与客户端品牌条同色） */
  --accent: #2e7cd6;
  --ink: #24303c;
  --muted: #66788c;
  --line: #e3e9f1;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.site-brand {
  font-weight: 700; font-size: 18px; color: var(--brand); white-space: nowrap;
}
.site-brand:hover { text-decoration: none; }
.nav-menu { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; flex-wrap: wrap; }
.nav-menu li a {
  display: block; padding: 6px 14px; border-radius: 6px;
  color: var(--ink); font-size: 15px;
}
.nav-menu li a:hover { background: #eef4fb; text-decoration: none; color: var(--brand); }
.nav-menu li.current-menu-item > a { color: var(--brand); font-weight: 600; }
.nav-cta {
  padding: 7px 18px !important; border-radius: 6px;
  background: var(--brand); color: #fff !important;
}
.nav-cta:hover { background: var(--accent); }

/* ---------- 首页 Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1f4e79 0%, #2e7cd6 100%);
  color: #fff; padding: 72px 0 84px;
}
.hero h1 {
  margin: 0 0 14px; font-size: 40px; line-height: 1.3; letter-spacing: 1px;
}
.hero p.sub { margin: 0 0 30px; font-size: 18px; opacity: .92; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 8px;
  font-size: 16px; cursor: pointer; border: none;
}
.btn-primary { background: #fff; color: var(--brand); font-weight: 600; }
.btn-primary:hover { background: #eef4fb; text-decoration: none; }
.btn-ghost {
  background: transparent; color: #fff; font-weight: 600;
  border: 1px solid rgba(255,255,255,.7);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { margin: 0 0 8px; font-size: 28px; color: var(--brand); }
.section-head p { margin: 0; color: var(--muted); }

/* 特性三栏 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
  transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 6px 24px rgba(31,78,121,.10); }
.card .icon {
  width: 46px; height: 46px; border-radius: 9px; margin-bottom: 14px;
  background: #eaf2fc; display: flex; align-items: center; justify-content: center;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--brand); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* 三步流程 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 22px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 8px 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* 文章卡片 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.post-card time { color: var(--muted); font-size: 13px; }
.post-card h3 { margin: 6px 0 8px; font-size: 17px; line-height: 1.5; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }
.more-link { margin-top: 34px; text-align: center; }
.more-link a {
  display: inline-block; padding: 10px 28px; border: 1px solid var(--brand);
  color: var(--brand); border-radius: 8px; font-weight: 600;
}
.more-link a:hover { background: #eef4fb; text-decoration: none; }

/* ---------- 内页（页面/文章/归档） ---------- */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 44px 20px 64px; }
.page-title, .entry-title { margin: 0 0 6px; font-size: 30px; color: var(--brand); }
.entry-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.entry-content h2 { margin-top: 30px; font-size: 22px; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; }
.article-list { display: grid; gap: 16px; }
.article-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px;
}
.article-item h2 { margin: 0 0 6px; font-size: 18px; }
.article-item time { color: var(--muted); font-size: 13px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #16293e; color: #b9c6d6; padding: 40px 0 28px; margin-top: 60px; }
.footer-grid { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.site-footer a { color: #b9c6d6; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; font-size: 14px; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; font-size: 13px; color: #8093a8; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .grid-3, .steps, .grid-2 { grid-template-columns: 1fr; }
  .nav-bar { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .nav-menu { margin-left: 0; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 48px 0 56px; }
}
