/*
Theme Name: AI 智习室
Theme URI: https://aizxs.com
Author: AI 智习室
Author URI: https://aizxs.com
Description: AI 智习室 — 高端简约 WordPress 主题，适合 AI 资讯、工具库、课程和会员平台。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aizxs
Tags: one-column, two-columns, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, translation-ready

AI 智习室 WordPress Theme — Modern minimal, warm & premium.
*/

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --bg:      #FAF8F5;
  --surface: #FFFDF9;
  --fg:      #2D2A26;
  --muted:   #8B7355;
  --border:  #E8E2D9;
  --accent:  #C4956A;
  --accent2: #7B9E87;
  --font-display: 'Newsreader', 'Noto Serif SC', Georgia, serif;
  --font-body:    'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --shadow:  0 2px 20px rgba(45,42,38,0.06);
  --nav-height: 64px;
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit; font-size: inherit;
}

/* Selection */
::selection { background: rgba(196,149,106,0.2); color: var(--fg); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─────────────────────────────────────────────
   NAVIGATION — Card Style (温暖亲和)
───────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,245,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex; align-items: center; gap: 20px;
}

/* Logo Card */
.nav-logo-card {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
  flex-shrink: 0; padding: 8px 12px;
  border-radius: 14px; transition: all 0.25s;
}
.nav-logo-card:hover {
  background: rgba(45,42,38,0.06);
  transform: translateY(-1px);
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: var(--fg); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--bg);
  transition: transform 0.25s;
}
.nav-logo-card:hover .nav-logo-icon { transform: rotate(8deg) scale(1.06); }
.nav-logo-info { display: flex; flex-direction: column; }
.nav-logo-name {
  font-size: 15px; font-weight: 700; letter-spacing: 0.3px; line-height: 1.2;
}
.nav-logo-tagline {
  font-size: 11px; color: var(--muted); line-height: 1.2; margin-top: 2px;
}

/* Menu Cards */
.nav-menu-cards { flex: 1; display: flex; align-items: center; justify-content: center; }
.nav-cards-list {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-cards-list li { position: relative; }
.nav-card-item {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 10px;
  text-decoration: none; color: var(--muted);
  font-size: 14px; font-weight: 500;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}
.nav-card-item:hover {
  color: var(--accent);
  background: rgba(196,149,106,0.10);
  border-color: rgba(196,149,106,0.3);
}
.nav-cards-list .current-menu-item > .nav-card-item,
.nav-cards-list .current-menu-parent > .nav-card-item {
  color: var(--accent);
  background: rgba(196,149,106,0.12);
  border-color: rgba(196,149,106,0.35);
  font-weight: 600;
}

/* Dropdown */
.sub-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(45,42,38,0.12);
  z-index: 200;
}
/* Top arrow */
.sub-menu::before {
  content: '';
  position: absolute; top: -9px; left: 20px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--border);
}
.sub-menu::after {
  content: '';
  position: absolute; top: -7px; left: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--surface);
}
.nav-cards-list li:hover > .sub-menu { display: block; }
.sub-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); transition: all 0.15s;
}
.sub-menu a::after {
  content: '';
  width: 0; height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--border);
  transition: border-left-color 0.15s;
}
.sub-menu a:hover { color: var(--accent); background: rgba(196,149,106,0.08); padding-left: 18px; }
.sub-menu a:hover::after { border-left-color: var(--accent); }

/* Auth Card */
.nav-auth-card { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-auth-btn {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 8px 16px; border-radius: 12px;
  transition: all 0.2s ease;
}
.nav-auth-login {
  color: var(--muted); border: 1.5px solid var(--border);
}
.nav-auth-login:hover {
  color: var(--fg); border-color: var(--accent);
  background: rgba(196,149,106,0.06);
}
.nav-auth-start {
  color: var(--bg); background: var(--fg);
  box-shadow: 0 2px 12px rgba(45,42,38,0.15);
}
.nav-auth-start:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,149,106,0.3);
}

/* User Card */
.nav-user-dropdown { position: relative; }
.nav-user-card {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--muted);
  padding: 6px 14px 6px 6px;
  border-radius: 20px; border: 1.5px solid var(--border);
  transition: all 0.2s ease; cursor: pointer;
}
.nav-user-card:hover { border-color: var(--accent); }
.nav-user-avatar {
  width: 30px; height: 30px;
  background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.nav-user-name { font-size: 13px; font-weight: 600; }
.nav-dropdown-arrow { transition: transform 0.2s; color: var(--muted); }
.nav-user-dropdown.open .nav-dropdown-arrow { transform: rotate(180deg); }

/* User Dropdown Menu */
.nav-user-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(45,42,38,0.12);
  z-index: 200;
}
/* Top arrow */
.nav-user-menu::before {
  content: '';
  position: absolute; top: -9px; right: 20px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--border);
}
.nav-user-menu::after {
  content: '';
  position: absolute; top: -7px; right: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--surface);
}
.nav-user-dropdown.open .nav-user-menu { display: block; }
.nav-user-menu li { margin: 0; }
.nav-user-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); text-decoration: none;
  transition: all 0.15s;
}
.nav-user-menu a:hover { color: var(--accent); background: rgba(196,149,106,0.08); }

/* Mobile Toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--fg); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 1px; }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.container { max-width: 1250px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 32px; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
}
.section-sm {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
}

/* Hero section wrapper */
.hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─────────────────────────────────────────────
   HERO NEW — Premium Dark Immersive
───────────────────────────────────────────── */
.hero-new {
  position: relative;
  padding: 100px 0 100px;
  overflow: hidden;
  background: #0f0e0c;
}

/* Deep background */
.hero-deep-bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero-mesh {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(196,149,106,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); pointer-events: none;
}
.hero-glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(196,149,106,0.18) 0%, transparent 70%);
  top: -150px; right: 0;
}
.hero-glow-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(123,158,135,0.12) 0%, transparent 70%);
  bottom: -80px; left: 5%;
}
.hero-glow-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(196,149,106,0.10) 0%, transparent 70%);
  top: 30%; left: 40%;
}

/* Container */
.hero-container {
  position: relative; z-index: 1;
  max-width: 1250px; margin: 0 auto; padding: 0 40px;
}
.hero-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}

/* ── Left ── */
.hero-left { display: flex; flex-direction: column; gap: 0; }

.hero-kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease both;
}
.kicker-line {
  display: block; width: 32px; height: 2px;
  background: var(--accent); border-radius: 1px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -2px; color: #fff;
  margin-bottom: 24px;
  animation: fadeUp 0.7s 0.1s ease both;
}
.headline-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-subline {
  font-size: 16px; color: rgba(255,255,255,0.55);
  line-height: 1.85; margin-bottom: 36px;
  animation: fadeUp 0.7s 0.2s ease both;
}

/* Metrics bar */
.hero-metrics {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 16px 0;
  margin-bottom: 32px;
  animation: fadeUp 0.7s 0.25s ease both;
}
.metric {
  flex: 1; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.metric:last-child { border-right: none; }
.metric-val {
  display: block;
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: #fff; line-height: 1;
}
.metric-key {
  display: block; font-size: 11px;
  color: rgba(255,255,255,0.45); margin-top: 4px;
  letter-spacing: 0.5px;
}
.metric-sep { display: none; }

/* CTA */
.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeUp 0.7s 0.3s ease both;
}
.cta-main {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700;
  padding: 14px 32px; border-radius: 50px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 24px rgba(196,149,106,0.35);
}
.cta-main:hover {
  background: #b8855a;
  box-shadow: 0 6px 32px rgba(196,149,106,0.5);
  transform: translateY(-1px);
}
.cta-ghost {
  display: inline-flex; align-items: center;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px; font-weight: 500;
  padding: 13px 24px; border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.04);
}
.cta-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}

/* ── Right: Neural Network Visual ── */
.hero-right {
  display: flex; align-items: center; justify-content: center;
  animation: fadeUp 0.9s 0.2s ease both;
}
.hero-visual-wrap {
  position: relative; width: 100%; max-width: 560px;
}
.neural-svg { width: 100%; height: auto; }

/* Glass cards over neural net */
.neuro-card {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,253,249,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  text-decoration: none; color: var(--fg);
  transition: all 0.3s ease;
  min-width: 180px;
}
.neuro-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.neuro-card-1 { top: 30px; left: -10px; animation: floatY 4s ease-in-out infinite; }
.neuro-card-2 { top: 140px; right: -10px; animation: floatY 4s 1.2s ease-in-out infinite; }
.neuro-card-3 { bottom: 40px; left: 20px; animation: floatY 4s 0.6s ease-in-out infinite; }

.nc-icon { font-size: 22px; flex-shrink: 0; }
.nc-title { font-size: 12px; font-weight: 700; color: var(--fg); line-height: 1.3; }
.nc-meta { font-size: 10px; color: var(--accent); font-weight: 600; margin-top: 2px; }

/* Ambient glows behind cards */
.ambient-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(40px); opacity: 0.5;
}
.ambient-1 {
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(196,149,106,0.5), transparent);
  top: 20px; left: -20px;
}
.ambient-2 {
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(123,158,135,0.4), transparent);
  bottom: 30px; right: -10px;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { max-width: 480px; margin: 0 auto; }
  .neuro-card-1 { left: 0; }
  .neuro-card-2 { right: 0; }
}
@media (max-width: 640px) {
  .hero-new { padding: 40px 0 40px; }
  .hero-container { padding: 0 20px; }
  .hero-headline { font-size: 36px; letter-spacing: -1px; }
  .hero-metrics { flex-direction: column; border-radius: 12px; }
  .metric { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 12px 0; }
  .metric:last-child { border-bottom: none; }
  .neuro-card { display: none; }
  .hero-cta { flex-direction: column; }
  .cta-main, .cta-ghost { width: 100%; justify-content: center; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual-new { max-width: 480px; margin: 0 auto; }
  .hero-float-1 { left: 0; }
  .hero-float-2 { right: 0; }
}
@media (max-width: 640px) {
  .hero-new { padding: 72px 0 56px; }
  .hero-main-img { max-width: 100%; }
  .hero-float { display: none; }
  .hero-stat { padding: 0 16px; }
  .hero-stat-num { font-size: 22px; }
  .hero-actions-new { flex-direction: column; }
  .btn-hero-primary, .btn-hero-ghost { width: 100%; justify-content: center; }
}

/* ─────────────────────────────────────────────
   BUTTONS (keep existing)
───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  background: var(--fg); color: var(--bg);
  font-size: 15px; font-weight: 600;
  padding: 13px 28px; border-radius: 10px;
  transition: all 0.2s ease;
}
.btn-primary:hover { background: var(--accent); color: #fff; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  border: 1.5px solid var(--border); color: var(--fg);
  font-size: 15px; font-weight: 500;
  padding: 12px 28px; border-radius: 10px;
  transition: all 0.2s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   CARD (keep for hero card stack - unused but preserve)
───────────────────────────────────────────── */
.card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; line-height: 1.3; margin-bottom: 6px;
}
.card-meta { font-size: 12px; color: var(--muted); }
.card-tag {
  display: inline-block; margin-top: 10px;
  font-size: 11px; font-weight: 600;
  background: rgba(196,149,106,0.12); color: var(--accent);
  padding: 3px 10px; border-radius: 20px;
}

/* ─────────────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────────────── */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; letter-spacing: -0.5px;
}
.section-more {
  display: flex; align-items: center; gap: 4px;
  text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 500; transition: color 0.2s;
}
.section-more:hover { color: var(--accent); }

/* ─────────────────────────────────────────────
   CATEGORY TABS
───────────────────────────────────────────── */
.cat-tabs {
  display: flex; gap: 6px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0; flex-wrap: wrap;
}
.cat-tab {
  text-decoration: none; color: var(--muted);
  font-size: 14px; font-weight: 500;
  padding: 8px 18px; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.2s;
}
.cat-tab:hover { color: var(--fg); }
.cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-tab {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cat-filters { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ─────────────────────────────────────────────
   CARD GRID
───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
  display: flex; flex-direction: column;
}
.article-card:hover {
  box-shadow: 0 8px 32px rgba(45,42,38,0.10);
  transform: translateY(-2px);
}
.card-thumb {
  aspect-ratio: 3/2;
  background: var(--border);
  overflow: hidden; position: relative;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.article-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(45,42,38,0.3));
}
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-category {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.card-title-sm {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600; line-height: 1.4;
  margin-bottom: 8px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-date { font-size: 11.5px; color: var(--muted); }
.card-read-time { font-size: 11.5px; color: var(--muted); margin-left: 10px; }
.card-meta-right { display: flex; align-items: center; gap: 10px; }
.card-views { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.card-likes {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; padding: 4px 8px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

/* Featured article — full width horizontal */
.feat-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  transition: box-shadow 0.25s ease;
}
.feat-article:hover {
  box-shadow: 0 8px 32px rgba(45,42,38,0.10);
}
.feat-thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
}
.feat-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.feat-article:hover .feat-thumb img { transform: scale(1.04); }
.feat-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%);
  opacity: 0.6;
}
.feat-body {
  padding: 40px 44px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0;
}
.feat-cat {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.feat-cat:hover { color: #b8855a; }
.feat-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700; line-height: 1.25;
  letter-spacing: -0.5px; margin-bottom: 16px;
}
.feat-title a {
  text-decoration: none; color: var(--fg);
  transition: color 0.2s;
}
.feat-title a:hover { color: var(--accent); }
.feat-excerpt {
  font-size: 15px; color: var(--muted);
  line-height: 1.8; margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.feat-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap;
}
.feat-read-more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto;
  text-decoration: none; color: var(--accent);
  font-weight: 600; font-size: 13px;
  transition: color 0.2s;
}
.feat-read-more:hover { color: #b8855a; }

/* Featured row */
.featured-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.featured-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
  display: grid; grid-template-columns: 120px 1fr;
}
.featured-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.featured-thumb { height: 100%; min-height: 100px; background: var(--border); overflow: hidden; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.featured-body .card-title-sm { font-size: 14px; }
.featured-body .card-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.featured-body .card-date { font-size: 11.5px; color: var(--muted); }

/* ─────────────────────────────────────────────
   TOPIC SCROLL
───────────────────────────────────────────── */
.topic-scroll {
  display: flex; gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.topic-scroll::-webkit-scrollbar { display: none; }
.topic-card {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
}
.topic-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.topic-thumb { height: 140px; background: var(--border); overflow: hidden; }
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover .topic-thumb img { transform: scale(1.04); }
.topic-body { padding: 16px; }
.topic-days {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.topic-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.35; }

/* ─────────────────────────────────────────────
   COURSE CARDS
───────────────────────────────────────────── */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
}
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.course-thumb { height: 140px; background: var(--border); overflow: hidden; position: relative; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.course-card:hover .course-thumb img { transform: scale(1.04); }
.course-level {
  position: absolute; top: 10px; right: 10px;
  background: rgba(45,42,38,0.75); color: #fff;
  font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.course-progress-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(0,0,0,0.2);
}
.course-progress-bar { height: 100%; background: var(--accent); }
.course-body { padding: 16px; }
.course-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.course-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; margin-bottom: 10px; }
.course-progress-label { font-size: 11.5px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.progress-bar-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ─────────────────────────────────────────────
   PAGE HERO (Inner pages - different from homepage)
───────────────────────────────────────────── */
.page-hero-section {
  background: linear-gradient(160deg, #1a1815 0%, #0f0e0c 100%);
  padding: 80px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(196,149,106,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-section::after {
  content: '';
  position: absolute; top: -150px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(196,149,106,0.12) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

/* Floating orbs - more visible */
.hero-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(40px);
}
.hero-orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(196,149,106,0.20) 0%, transparent 70%);
  top: -120px; left: 5%;
  animation: floatOrb1 6s ease-in-out infinite;
}
.hero-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(123,158,135,0.18) 0%, transparent 70%);
  bottom: -80px; right: 10%;
  animation: floatOrb2 8s ease-in-out infinite;
}
.hero-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(196,149,106,0.15) 0%, transparent 70%);
  top: 30%; left: 60%;
  animation: floatOrb3 5s ease-in-out infinite;
}
@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(30px, 20px) scale(1.1); opacity: 1; }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(-20px, -30px) scale(1.15); opacity: 1; }
}
@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(15px, -25px) scale(1.1); opacity: 0.9; }
}

/* Shimmer line */
.hero-shimmer {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(196,149,106,0.08) 50%, transparent 100%);
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Grid lines overlay */
.hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(196,149,106,0.03) 1px, transparent 1px),
    linear-gradient(rgba(196,149,106,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.hero-section-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
}
.hero-section-content {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px;
}
.hero-section-left {}
.hero-section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.hero-section-eyebrow svg { width: 14px; height: 14px; }
.hero-section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px); font-weight: 700;
  color: #fff; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 12px;
}
.hero-section-desc, p.hero-section-desc {
  font-size: 15px; color: rgba(255,255,255,0.75);
  max-width: 480px; line-height: 1.7;
}
.hero-section-stats {
  display: flex; gap: 16px; flex-shrink: 0;
}
.hero-section-stat {
  text-align: center; padding: 16px 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.hero-section-stat-num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; color: #fff;
}
.hero-section-stat-label {
  font-size: 11px; color: rgba(255,255,255,0.45);
  margin-top: 4px; letter-spacing: 0.5px;
}

/* Hero bottom fade to content */
.content-after-hero {
  padding-top: 48px;
}

/* Responsive */
@media (max-width: 768px) {
  .page-hero-section { padding: 56px 0 48px; }
  .hero-section-content { flex-direction: column; align-items: flex-start; }
  .hero-section-stats { width: 100%; }
  .hero-section-stat { flex: 1; }
}

/* ─────────────────────────────────────────────
   PAGE HEADER (Archive pages)
───────────────────────────────────────────── */
.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}
.page-breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.page-breadcrumb a { color: var(--muted); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb span { margin: 0 8px; }
.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.5px;
}
.page-desc { font-size: 15px; color: var(--muted); max-width: 560px; margin-top: 12px; line-height: 1.7; }
.page-stats { display: flex; gap: 32px; align-items: center; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   ARTICLE DETAIL
───────────────────────────────────────────── */
.article-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 60px;
  max-width: 1200px; margin: 0 auto; padding: 48px 32px 64px;
}
.article-header { padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.article-breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.article-breadcrumb a { color: var(--muted); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb span { margin: 0 8px; }
.article-category {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px; display: inline-block;
  text-decoration: none;
}
.article-category:hover { color: #b8855a; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  line-height: 1.18; letter-spacing: -0.5px; margin-bottom: 18px;
}
.article-deck { font-size: 18px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.article-meta {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0; flex-wrap: wrap;
}
.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.author-name { font-size: 14px; font-weight: 600; }
.author-role { font-size: 11.5px; color: var(--muted); }
.meta-sep { width: 1px; height: 20px; background: var(--border); }
.meta-item { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.article-hero {
  width: 100%; aspect-ratio: 16/9;
  background: var(--border); border-radius: 16px;
  overflow: hidden; margin-bottom: 12px;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.article-hero img { display: none !important; }
.article-caption { font-size: 12px; color: var(--muted); margin-bottom: 40px; text-align: center; }

/* Reading progress */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--accent); width: 0%; z-index: 9999;
  transition: width 0.1s linear;
}

/* Article body */
.article-body { font-size: 16.5px; line-height: 1.85; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display); font-size: 4.2em; font-weight: 700;
  float: left; line-height: 0.85; margin-right: 8px; margin-top: 4px;
  color: var(--accent);
}
.article-body p { margin-bottom: 1.5em; }
.article-body h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  margin: 2em 0 0.8em; letter-spacing: -0.3px;
}
.article-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 1.6em 0 0.6em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: #b8855a; }
.article-body ul, .article-body ol { margin: 1.2em 0 1.5em 1.5em; }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote {
  margin: 1.5em 0; padding: 16px 20px;
  background: var(--surface); border-radius: 10px;
  border: 1px solid var(--border); font-style: italic; color: var(--muted);
}
.article-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em; background: rgba(45,42,38,0.06); padding: 2px 6px; border-radius: 4px;
}

/* Pull quote */
.pull-quote {
  margin: 2em 0; padding: 24px 28px;
  border-inline-start: 3px solid var(--accent);
  background: rgba(196,149,106,0.06); border-radius: 0 12px 12px 0;
}
.pull-quote p {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  font-style: italic; line-height: 1.6; margin-bottom: 0;
}
.pull-quote cite { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); font-style: normal; }

/* Figure */
.article-figure { margin: 2em 0; border-radius: 12px; overflow: hidden; }
.article-figure img { width: 100%; border-radius: 12px; }
.article-figure figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 8px; }

/* Article tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-tags span { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.tag-item {
  text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); transition: all 0.2s;
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* Article Actions */
.article-actions {
  display: flex; gap: 8px; margin-top: 32px; padding-top: 28px;
  border-top: 1px solid var(--border); position: relative; flex-wrap: wrap;
}
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.action-btn.liked, .action-btn.favorited { color: #e74c3c; border-color: #e74c3c; background: #fdf0ef; }
.action-btn svg { flex-shrink: 0; }
.action-count { min-width: 20px; text-align: center; }

/* Share dropdown */
.share-dropdown {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 10; min-width: 140px;
}
.share-dropdown.show { display: block; }
.share-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px;
  border: none; background: none; color: var(--fg); font-size: 13.5px; cursor: pointer;
  border-radius: 8px; transition: background 0.15s;
}
.share-item:hover { background: var(--hover); }

/* WeChat QR Modal */
.wechat-qr-modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 9999; align-items: center; justify-content: center;
}
.wechat-qr-modal.show { display: flex; }
.wechat-qr-box {
  background: var(--surface); border-radius: 16px; padding: 32px; text-align: center;
  max-width: 320px; position: relative; animation: fadeUp 0.3s ease;
}
.wechat-qr-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px; line-height: 1;
}
.wechat-qr-close:hover { color: var(--fg); }
.wechat-qr-box h3 { font-size: 18px; margin-bottom: 8px; }
.wechat-qr-box > p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.wechat-qr-box img { width: 200px; height: 200px; border-radius: 8px; }
.wechat-tip { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* Author box */
.author-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  display: flex; gap: 20px; margin-top: 40px; align-items: flex-start;
}
.author-box-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
  font-family: var(--font-display);
}
.author-box-info h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.author-box-info p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.author-box-social { display: flex; gap: 10px; }
.author-box-social a {
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; transition: all 0.2s;
}
.author-box-social a:hover { border-color: var(--accent); color: var(--accent); }

/* Related */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); margin-top: 48px; }
.related-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--fg);
  transition: all 0.2s;
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.related-thumb { height: 100px; background: var(--border); overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-body { padding: 12px; }
.related-body .card-title-sm { font-size: 13.5px; margin-bottom: 0; }
.related-body .card-date { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--nav-height) + 24px); height: fit-content; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.sidebar-widget h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* TOC */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 10px; }
.toc-list a {
  text-decoration: none; color: var(--muted); font-size: 13.5px; line-height: 1.5;
  display: block; padding: 4px 0; padding-inline-start: 12px;
  border-inline-start: 2px solid transparent; transition: all 0.2s;
}
.toc-list a:hover, .toc-list a.active { color: var(--accent); border-inline-start-color: var(--accent); }
.toc-list .toc-h3 { font-size: 13px; padding-inline-start: 0; }

/* Popular list */
.popular-list { list-style: none; }
.popular-list li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.popular-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--border); line-height: 1; min-width: 28px; }
.popular-list a { text-decoration: none; color: var(--fg); font-size: 13.5px; line-height: 1.5; font-weight: 500; }
.popular-list a:hover { color: var(--accent); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Course CTA widget */
.sidebar-course { background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%); color: var(--bg); border: none; }
.sidebar-course h3 { color: var(--bg); border-bottom-color: rgba(250,248,245,0.15); }
.sidebar-course p { font-size: 13px; color: rgba(250,248,245,0.65); margin-bottom: 16px; line-height: 1.6; }
.sidebar-course .btn-course {
  display: block; text-align: center; background: var(--accent); color: #fff;
  text-decoration: none; padding: 11px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background 0.2s;
}
.sidebar-course .btn-course:hover { background: #b8855a; }

/* Share */
.article-share {
  position: fixed; left: max(32px, calc((100vw - 1200px)/2 - 80px));
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 50;
}
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--muted); font-size: 14px;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   MEMBER / USER PROFILE
───────────────────────────────────────────── */
.member-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto; padding: 40px 32px 64px;
}
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px;
  text-align: center; position: sticky; top: calc(var(--nav-height) + 24px);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto 14px;
  font-family: var(--font-display);
}
.profile-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-role { font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 16px 0; }
.profile-stat { padding: 12px 8px; border-right: 1px solid var(--border); }
.profile-stat:last-child { border-right: none; }
.profile-stat-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.profile-stat-label { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.profile-bio { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; text-align: left; }
.profile-edit-btn {
  display: block; width: 100%; text-align: center; padding: 9px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.profile-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Member tabs */
.member-tabs {
  display: flex; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; margin-bottom: 32px; flex-wrap: wrap;
}
.member-tab {
  flex: 1; text-align: center; padding: 10px 16px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border: none; background: none; transition: all 0.2s; text-decoration: none;
  font-family: var(--font-body); white-space: nowrap;
}
.member-tab:hover { color: var(--fg); }
.member-tab.active { background: var(--fg); color: var(--bg); }

/* VIP Banner */
.vip-banner {
  background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%);
  border-radius: 16px; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; color: var(--bg);
}
.vip-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.vip-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.vip-desc { font-size: 13px; color: rgba(250,248,245,0.6); }
.vip-btn {
  padding: 12px 28px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background 0.2s; font-family: var(--font-body);
}
.vip-btn:hover { background: #b8855a; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-icon-1 { background: rgba(196,149,106,0.12); }
.stat-icon-2 { background: rgba(123,158,135,0.12); }
.stat-icon-3 { background: rgba(45,42,38,0.08); }
.stat-icon-4 { background: rgba(196,149,106,0.08); }
.stat-info {}
.stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.stat-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Learning list */
.learning-list { display: flex; flex-direction: column; gap: 16px; }
.learning-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: center; transition: all 0.2s; }
.learning-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.learning-thumb { height: 60px; background: var(--border); border-radius: 8px; overflow: hidden; }
.learning-thumb img { width: 100%; height: 100%; object-fit: cover; }
.learning-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.learning-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }
.learning-action {
  text-decoration: none; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; background: var(--fg); color: var(--bg);
  transition: all 0.2s; white-space: nowrap;
}
.learning-action:hover { background: var(--accent); }

/* Bookmark grid */
.bookmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bookmark-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--fg); transition: all 0.2s; display: flex; flex-direction: column; }
.bookmark-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bookmark-thumb { height: 120px; background: var(--border); overflow: hidden; }
.bookmark-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bookmark-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.bookmark-category { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.bookmark-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; line-height: 1.4; flex: 1; margin-bottom: 10px; }
.bookmark-footer { display: flex; justify-content: space-between; align-items: center; }
.bookmark-date { font-size: 11px; color: var(--muted); }
.bookmark-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; border-radius: 4px; }
.bookmark-remove:hover { color: #e55; }

/* Profile form */
.profile-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 640px; }
.form-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.form-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.form-section-title { font-size: 15px; font-weight: 700; margin-bottom: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.btn-save {
  padding: 12px 32px; background: var(--fg); color: var(--bg); border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; font-family: var(--font-body);
}
.btn-save:hover { background: var(--accent); }

/* ─────────────────────────────────────────────
   NEWSLETTER
───────────────────────────────────────────── */
.home-newsletter-wrap {
  padding: 40px 0;
}
.newsletter {
  background: var(--fg); color: var(--bg);
  border-radius: 20px; padding: 60px 64px;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
}
.newsletter h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.newsletter p { color: rgba(250,248,245,0.6); font-size: 15px; }
.newsletter-form { display: flex; gap: 10px; align-items: stretch; }
.newsletter-form input {
  min-width: 220px; flex: 1; padding: 12px 18px;
  background: rgba(250,248,245,0.1);
  border: 1px solid rgba(250,248,245,0.2); border-radius: 10px; color: var(--bg);
  font-size: 14px; font-family: var(--font-body); outline: none;
}
.newsletter-form input::placeholder { color: rgba(250,248,245,0.4); }
.newsletter-form button {
  padding: 12px 24px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.newsletter-form button:hover { background: #b8855a; }

/* Load more */
.load-more { text-align: center; padding: 32px 0 64px; }
.btn-load {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 36px;
  background: var(--surface); color: var(--fg); border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.btn-load:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   FOOTER — Card Grid Style (卡片网格型)
───────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-main { padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

/* Brand Column */
.footer-brand-col { display: flex; flex-direction: column; }
.footer-brand-logo {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
  margin-bottom: 16px;
}
.footer-logo-mark {
  width: 42px; height: 42px;
  background: var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--bg);
}
.footer-logo-text {
  font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--fg);
}
.footer-brand-desc {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  margin-bottom: 20px; max-width: 260px;
}

/* QR Buttons */
.footer-qr-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.footer-qr-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
  transition: all 0.2s; font-family: var(--font-body);
}
.footer-qr-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.footer-qr-btn svg { flex-shrink: 0; }

/* Social Icons */
.footer-social-icons { display: flex; gap: 8px; }
.footer-social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg); color: var(--muted);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.footer-social-icon:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-2px);
}

/* Link Columns */
.footer-link-col h4 {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--fg); margin-bottom: 16px;
}
.footer-link-col ul { list-style: none; }
.footer-link-col li { margin-bottom: 10px; }
.footer-link-col a {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; transition: color 0.2s;
}
.footer-link-col a:hover { color: var(--accent); }

/* QR Code Column */
.footer-qr-col { display: flex; flex-direction: row; gap: 16px; align-items: flex-start; }
.footer-qr-item { display: flex; flex-direction: column; align-items: center; }

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.footer-bottom-inner p { font-size: 12.5px; color: var(--muted); }
.footer-bottom-inner a {
  font-size: 12.5px; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.footer-bottom-inner a:hover { color: var(--accent); }

.back-to-top {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
  padding: 7px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: all 0.2s; cursor: pointer;
  background: none; font-family: var(--font-body);
}
.back-to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* QR Modal */
.qr-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(45,42,38,0.55); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999; align-items: center; justify-content: center;
}
.qr-modal.show { display: flex; }
.qr-modal-box {
  background: var(--surface); border-radius: 20px; padding: 40px;
  text-align: center; max-width: 300px; position: relative;
  box-shadow: 0 24px 80px rgba(45,42,38,0.2);
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.qr-modal-box h3 {
  font-family: var(--font-display); font-size: 18px;
  font-weight: 700; margin-bottom: 20px;
}
.qr-modal-box img {
  width: 200px; height: 200px; border-radius: 12px;
  display: block; margin: 0 auto;
}
.qr-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--muted); padding: 4px;
  border-radius: 6px; transition: color 0.2s;
}
.qr-modal-close:hover { color: var(--fg); }

/* ─────────────────────────────────────────────
   LOGIN MODAL
───────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(45,42,38,0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--surface); border-radius: 20px; padding: 48px; width: 420px; max-width: 90vw; position: relative; box-shadow: 0 24px 80px rgba(45,42,38,0.18); }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 20px; padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--fg); }
.modal-box h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.modal-box p { color: #6B5B4F; font-size: 14px; margin-bottom: 28px; }
.modal-tabs { display: flex; gap: 0; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.modal-tab { flex: 1; text-align: center; padding: 9px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border: none; background: none; transition: all 0.2s; font-family: var(--font-body); }
.modal-tab.active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 6px rgba(45,42,38,0.08); }

/* Login form inputs */
#loginform p { margin-bottom: 0; }
.login-username, .login-password { margin-bottom: 16px; }
.login-username label, .login-password label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg);
}
.login-username input, .login-password input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-username input:focus, .login-password input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}
.login-username input::placeholder, .login-password input::placeholder { color: var(--muted); }
.login-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.login-remember label { font-size: 13px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.login-remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.login-submit { margin-top: 0; }
#wp-submit {
  width: 100%; padding: 13px; background: var(--fg); color: var(--bg); border: none;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; font-family: var(--font-body);
}
#wp-submit:hover { background: var(--accent); }

/* Social login buttons */
.btn-social-row {
  display: flex; gap: 12px; margin-top: 4px;
}
.btn-social-item {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--fg); background: var(--surface);
  transition: all 0.2s; text-decoration: none;
}
.btn-social-item:hover {
  border-color: var(--accent); background: rgba(196,149,106,0.05);
}
.btn-social-item img { flex-shrink: 0; }

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.form-row label { font-size: 12.5px; color: var(--muted); font-weight: 400; display: flex; align-items: center; gap: 6px; }
.form-row a { font-size: 12.5px; color: var(--accent); text-decoration: none; }
.btn-full { width: 100%; padding: 13px; background: var(--fg); color: var(--bg); border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: var(--font-body); }
.btn-full:hover { background: var(--accent); }
.modal-divider { text-align: center; position: relative; margin: 20px 0; color: #8B7355; font-size: 12px; }
.modal-divider::before, .modal-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; background: var(--border); }
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

/* ─────────────────────────────────────────────
   WORDPRESS SPECIFIC
───────────────────────────────────────────── */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; }

/* Posts nav */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 32px 0; border-top: 1px solid var(--border); }
.post-nav-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--fg); transition: all 0.2s; }
.post-nav-link:hover { border-color: var(--accent); }
.post-nav-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; display: block; }
.post-nav-title { font-size: 14px; font-weight: 600; line-height: 1.4; }

/* Comments */
.comments-area { padding: 40px 0; border-top: 1px solid var(--border); }
.comments-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.comment-list { list-style: none; }
.comment { display: flex; gap: 16px; margin-bottom: 24px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.comment-date { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.comment-content { font-size: 14px; line-height: 1.7; }

/* Comment form */
.comment-form { margin-top: 32px; }
.comment-reply-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--fg); display: block; }
.comment-form-col { display: flex; flex-direction: column; }
.comment-form-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.comment-form-group { margin-bottom: 0; }
.comment-form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.comment-form-group input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form-group input::placeholder { color: var(--muted); }
.comment-form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12); }
.comment-form-textarea { margin-bottom: 16px; }
.comment-form-textarea textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical; min-height: 120px; line-height: 1.6;
}
.comment-form-textarea textarea::placeholder { color: var(--muted); }
.comment-form-textarea textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12); }
.comment-toolbar { display: flex; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.comment-toolbar button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.comment-toolbar button:hover { border-color: var(--accent); background: rgba(196,149,106,0.05); }
#commentform .btn-full { margin-top: 8px; }
#commentform .btn-full:hover { background: var(--accent); }

@media (max-width: 640px) {
  .comment-form-fields { grid-template-columns: 1fr; }
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 32px 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 600; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; transition: all 0.2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* 404 */
.error-404 { text-align: center; padding: 80px 32px; }
.error-404 h1 { font-family: var(--font-display); font-size: 120px; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 16px; }
.error-404 h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 28px; }

/* ─────────────────────────────────────────────
   ARCHIVE / CATEGORY GRID (wider spacing)
───────────────────────────────────────────── */
.archive.category .card-grid,
.archive.category .featured-row {
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.archive.category .article-card .card-thumb {
  aspect-ratio: 16/9;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 60px 0; }
  .hero-visual { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-row { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-share { display: none; }
  .sidebar { display: none; }
  .member-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .newsletter { grid-template-columns: 1fr; padding: 40px 32px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
  .page-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .feat-article { grid-template-columns: 1fr; }
  .feat-thumb { aspect-ratio: 16/9; }
  .feat-body { padding: 28px 28px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .bookmark-grid { grid-template-columns: repeat(2, 1fr); }
  .learning-item { grid-template-columns: 80px 1fr; }
  .learning-action { grid-column: 2; }
  .form-row-2 { grid-template-columns: 1fr; }
  .vip-banner { flex-direction: column; gap: 16px; text-align: center; }
  .cat-content-grid { grid-template-columns: 1fr !important; }
  .feat-article { margin-bottom: 28px; }
  .feat-title { font-size: 22px; }
}

@media (max-width: 640px) {
  .nav-menu-cards, .nav-auth-card { display: none; }
  .nav-toggle { display: block; }
  .container, .container-narrow { padding: 0 20px; }
  .section, .section-sm { padding: 20px 20px; }
  .article-layout { padding: 24px 20px 48px; gap: 0; }
  .article-header { padding-bottom: 20px; margin-bottom: 24px; }
  .article-hero { margin: 0 -20px 24px; border-radius: 12px; overflow: hidden; background-position: center center !important; }
  .article-hero img { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .featured-row { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 80px 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .bookmark-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
  .article-body { font-size: 15.5px; padding: 0; }
  .pagination { flex-wrap: wrap; }
  .post-navigation { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   SEARCH FORM (sidebar)
───────────────────────────────────────────── */
.sidebar-widget .search-form,
.widget_search .search-form {
  width: 100%;
}

.sidebar-widget .search-form-inner,
.widget_search .search-form-inner,
.sidebar-widget #searchform,
.widget_search #searchform {
  display: flex !important;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 44px;
}

.sidebar-widget .search-form-inner:focus-within,
.widget_search .search-form-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}

.sidebar-widget .search-input,
.widget_search .search-input,
.sidebar-widget #s,
.widget_search input[name="s"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--fg) !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
}

.sidebar-widget .search-input::placeholder,
.widget_search .search-input::placeholder {
  color: var(--muted);
}

.sidebar-widget .search-btn,
.widget_search .search-submit,
.sidebar-widget #searchsubmit,
.widget_search button[type="submit"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  border: none !important;
  background: var(--accent) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0 !important;
  border-radius: 0 8px 8px 0 !important;
}

.sidebar-widget .search-btn:hover,
.widget_search .search-submit:hover {
  background: #b3855d !important;
}

.sidebar-widget .search-btn svg,
.widget_search .search-submit svg {
  color: #fff;
  width: 18px;
  height: 18px;
}
