/*
Theme Name: PokerEdgeHub Community
Theme URI: https://pokeredgehub.com
Description: Poker community theme with language-based article sections
Author: PokerEdgeHub Team
Version: 2.3
License: Proprietary
Text Domain: pokeredgehub
*/

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

:root {
  --bg-primary:   #1a1f2e;
  --bg-secondary: #232838;
  --bg-card:      #2a3042;
  --bg-card-hover:#323850;
  --bg-header:    #151926;
  --bg-hero:      linear-gradient(135deg, #1e2740 0%, #0f1520 100%);
  --text-primary: #e4e8f1;
  --text-secondary:#9aa3b8;
  --text-muted:   #6b7590;
  --accent-blue:  #4a90d9;
  --accent-green: #43b581;
  --accent-gold:  #f0b232;
  --accent-red:   #e74c3c;
  --border-color: #2f3652;
  --border-light: #3a4260;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 2px 8px rgba(0,0,0,0.3);
  --max-width:    1280px;
  --font-main:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono:    "SF Mono", "Fira Code", "Consolas", monospace;
}

html {
  /* overflow-x: hidden removed — breaks position:sticky on .site-header.
     Body overflow-x:hidden below is sufficient to prevent horizontal scroll. */
}
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a { color: var(--accent-blue); text-decoration: none; transition: color .2s; }
a:hover { color: #6aafff; }

img { max-width: 100%; height: auto; }

/* ── Layout ── */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1px;
}
.site-logo span { color: var(--text-primary); font-weight: 400; }

.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
}

/* ── Hero ── */
.hero {
  background: var(--bg-hero);
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #a8c4e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 24px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}
.hero-stat .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Main content area ── */
.main-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 0 48px;
}

/* ── Language Section ── */
.lang-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.lang-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}
.lang-section-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  font-size: 16px;
  line-height: 1;
}
.lang-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 10px;
  border-radius: 12px;
}

/* ── Article List ── */
.article-list {
  list-style: none;
}
.article-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background .15s;
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: var(--bg-card-hover); }

.article-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--accent-blue);
  margin-top: 2px;
}
.article-icon.tutorial { color: var(--accent-blue); }
.article-icon.comparison { color: var(--accent-gold); }
.article-icon.guide { color: var(--accent-green); }

.article-info { flex: 1; min-width: 0; overflow: hidden; }
.article-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}
.article-title:hover { color: var(--accent-blue); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.article-meta .category-tag {
  background: var(--bg-primary);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--accent-blue);
  border: 1px solid var(--border-color);
}

.article-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 80px;
}

/* ── Sidebar ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-card-title {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

/* Stats sidebar */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-color);
}
.stat-cell {
  background: var(--bg-secondary);
  padding: 14px 16px;
  text-align: center;
}
.stat-cell .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}
.stat-cell .lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Category sidebar */
.category-list { list-style: none; }
.category-list li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  transition: background .15s;
}
.category-list li:last-child { border-bottom: none; }
.category-list li:hover { background: var(--bg-card-hover); }
.category-list li a { color: var(--text-primary); flex: 1; }
.category-list .count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 1px 8px;
  border-radius: 10px;
}

/* CTA sidebar */
.cta-card {
  padding: 20px 16px;
  text-align: center;
}
.cta-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent-gold);
}
.cta-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-blue), #3578c4);
  color: #fff;
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .15s, box-shadow .15s;
}
.cta-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,144,217,0.4);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--text-primary); }

/* ── Single Post ── */
.single-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.single-content .entry-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}
.single-content .entry-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.single-content .entry-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}
.single-content .entry-body h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.single-content .entry-body h3 {
  font-size: 18px;
  margin: 24px 0 12px;
}
.single-content .entry-body p {
  margin-bottom: 16px;
}
.single-content .entry-body ul,
.single-content .entry-body ol {
  margin: 0 0 16px 24px;
}
.single-content .entry-body li { margin-bottom: 6px; }
.single-content .entry-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.single-content .entry-body th,
.single-content .entry-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.single-content .entry-body th {
  background: var(--bg-card);
  font-weight: 600;
}
.single-content .entry-body blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.single-content .entry-body code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.single-content .entry-body pre {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
}
.single-content .entry-body pre code {
  background: none;
  padding: 0;
}
.single-content .entry-body img {
  border-radius: var(--radius);
  margin: 16px 0;
}

/* direct-answer styling */
.single-content .entry-body .direct-answer {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-gold);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.7;
}

/* FAQ styling */
.single-content .entry-body .faq-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
}

/* CTA boxes in article */
.single-content .entry-body .cta-box {
  background: linear-gradient(135deg, #1e2e4a, #1a243a);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
  text-align: center;
}
.single-content .entry-body .cta-box a {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ── Author Bio Box (E-E-A-T) ── */
.author-box {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.author-info { flex: 1; }
.author-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.author-name a { color: var(--text-primary); }
.author-name a:hover { color: var(--accent-blue); }
.author-title {
  font-size: 13px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.author-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.author-bio a { font-weight: 500; }

/* ── Related Posts ── */
.related-posts {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.related-posts h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.related-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
}
.related-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── In-content Related Articles Block ── */
.related-articles {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.related-articles h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.related-articles ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-articles li {
  padding: 4px 0;
}
.related-articles li::before {
  content: "→ ";
  color: var(--accent-blue);
}
.related-articles a {
  font-size: 14px;
}

/* ── Entry Author ── */
.entry-author {
  font-weight: 500;
  color: var(--accent-blue);
}

/* ── Search bar ── */
.search-bar {
  padding: 20px 0 0;
}
.search-form {
  display: flex;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}
.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.search-input:focus { border-color: var(--accent-blue); }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 10px 20px;
  border: 1px solid var(--accent-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.search-btn:hover { background: #3578c4; }

/* ── Responsive tables in articles ── */
.entry-body .table-wrap,
.entry-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Three-column layout (left nav + content + sidebar) ── */
.main-content {
  grid-template-columns: 200px 1fr 320px;
}

/* ── Left Navigation ── */
.left-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 0;
  height: fit-content;
}
.left-nav-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}
.left-nav-list { list-style: none; padding: 0; margin: 0; }
.left-nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.left-nav-item a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-left-color: var(--accent-blue);
}
.left-nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.left-nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Language Switch ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  transition: all .2s;
  border-bottom: none !important;
  margin-left: 8px;
}
.lang-switch:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary) !important;
  border-color: var(--accent-blue);
}
.lang-switch-icon { font-size: 16px; line-height: 1; }
.lang-switch-label { font-weight: 600; }

/* ── Poker Tools Page ── */
.tools-page { padding: 0 0 24px; }
.tools-header {
  text-align: center;
  padding: 32px 20px 24px;
}
.tools-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #a8c4e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tools-header p {
  color: var(--text-secondary);
  font-size: 15px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0 16px;
}
.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(74,144,217,0.15);
}
.tool-card:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}
.tool-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.tool-name-zh {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tool-name-en {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.tool-badge {
  position: absolute;
  top: 12px;
  right: -28px;
  transform: rotate(45deg);
  background: var(--accent-gold);
  color: #1a1f2e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 32px;
  letter-spacing: 0.5px;
}
.tool-badge-live {
  background: var(--accent-green);
  color: #fff;
}
a.tool-card-ready {
  text-decoration: none;
  color: inherit;
}
a.tool-card-ready:hover {
  border-color: var(--accent-green);
  box-shadow: 0 4px 16px rgba(67,181,129,0.2);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--accent-blue);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════
   Hamburger menu (mobile)
   ══════════════════════════════════════════════════════════ */
.hamburger {
  display: none; /* shown via media query */
  background: none; border: none; cursor: pointer; padding: 6px;
  flex-direction: column; gap: 5px; z-index: 200;
}
.hamburger span {
  display: block; width: 22px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all .25s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-mobile-actions {
  display: none; /* shown via media query */
  align-items: center; gap: 10px;
}
/* Desktop: hide mobile controls, show nav lang-switch */
.lang-switch-desktop { display: inline-flex; }

/* ══════════════════════════════════════════════════════════
   Responsive: Tablet (≤1024px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  /* Layout: collapse to single column */
  .main-content { grid-template-columns: 1fr; }
  .sidebar { display: none; }

  /* Left nav: horizontal bar, equal-width items filling 100% */
  .left-nav {
    position: static;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px 0; margin-bottom: 16px;
    width: 100%; box-sizing: border-box;
  }
  .left-nav-title { display: none; }
  .left-nav-list {
    display: flex; flex-wrap: nowrap; width: 100%;
  }
  .left-nav-item { flex: 1 1 0; min-width: 0; }
  .left-nav-item a {
    display: flex; align-items: center; justify-content: center;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 8px 4px; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .left-nav-item a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--accent-blue);
  }
  .left-nav-icon { display: none; }

  /* Tools grid: 2 columns */
  .tools-grid { grid-template-columns: repeat(2, 1fr); }

  /* Single content: add padding */
  .main-content .single-content { padding: 0 4px; }
}


/* ======================================================================
   Responsive: Mobile (<=768px)
   ====================================================================== */
@media (max-width: 768px) {
  *, *::before, *::after { max-width: 100vw; }
  .header-mobile-actions { display: flex; }
  .hamburger { display: flex; }
  .lang-switch-desktop { display: none !important; }
  .header-inner { padding: 0 12px; }
  .header-nav {
    display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--bg-header); z-index: 150; flex-direction: column;
    align-items: stretch; padding: 16px 20px; gap: 0; overflow-y: auto;
    border-top: 1px solid var(--border-color);
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--border-color); }
  .header-nav a:last-child { border-bottom: none; }
  .hero { padding: 28px 0; }
  .hero h1 { font-size: 22px; padding: 0 8px; }
  .hero p { font-size: 13px; margin-bottom: 12px; padding: 0 8px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .hero-stat .num { font-size: 20px; }
  .hero-stat .label { font-size: 11px; }
  .site-container { padding: 0 10px; max-width: 100%; }
  .search-bar { padding: 12px 0 0; }
  .search-form { max-width: 100%; }
  .left-nav { margin: 0 0 12px; border-radius: var(--radius); }
  .left-nav-item a { padding: 10px 6px; font-size: 13px; gap: 6px; }
  .article-item { padding: 10px; gap: 10px; }
  .article-icon { width: 32px; height: 32px; font-size: 14px; }
  .article-title {
    font-size: 14px; white-space: normal !important; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .article-stats { display: none; }
  .lang-section-header { padding: 12px; flex-wrap: wrap; gap: 8px; }
  .lang-section-header h2 { font-size: 15px; }
  .author-box { flex-direction: column; align-items: center; text-align: center; padding: 16px; }
  .author-avatar { width: 44px; height: 44px; font-size: 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .tools-header h1 { font-size: 20px; }
  .site-footer { padding: 32px 0 24px; }
  .site-footer .site-container { padding: 0 12px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-disclaimer { font-size: 11px; padding: 0 4px; }
  .single-content { padding: 0 !important; }
  .single-content .entry-title { font-size: 20px; word-break: break-word; }
  .single-content .entry-body { font-size: 15px; line-height: 1.75; }
  .single-content .entry-body h2 { font-size: 18px; word-break: break-word; }
  .single-content .entry-body h3 { font-size: 16px; }
  .single-content .entry-body ul, .single-content .entry-body ol { margin-left: 16px; }
  .single-content .entry-body table { font-size: 13px; }
  .pagination { padding: 14px 8px; gap: 3px; }
  .pagination a, .pagination span { min-width: 30px; height: 30px; font-size: 12px; padding: 0 6px; }
}

/* ══════════════════════════════════════════════════════════
   Responsive: Small phone (≤480px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Logo: smaller */
  .site-logo { font-size: 18px; }

  /* Hero: minimal */
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 20px; }
  .hero-stats { gap: 16px; }
  .hero-stat .num { font-size: 18px; }

  /* Left nav: scrollable, tighter */
  .left-nav-item a { padding: 6px 12px; font-size: 12px; }

  /* Article: ultra compact */
  .article-item { padding: 10px; }
  .article-icon { display: none; }
  .article-title { font-size: 13px; white-space: normal; }

  /* Footer: single column */
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Single: tight */
  .single-content .entry-title { font-size: 19px; }
  .single-content .entry-body { font-size: 14px; }

  /* Lang switch: icon only */
  .lang-switch-label { display: none; }
  .lang-switch { padding: 3px 8px !important; }

  /* Card slots: smaller */
  .card-slot { width: 44px; height: 60px; font-size: 11px; }
  .card-slots { gap: 5px; }

  /* Table size buttons: wrap tighter */
  .table-size-selector { gap: 4px; }
  .size-btn { padding: 5px 10px; font-size: 12px; }

  /* Calculator results */
  .result-numbers { gap: 12px; }
  .result-value { font-size: 20px; }
}

/* ── Single post inside 3-column layout ── */
.main-content .single-content {
  max-width: none;
  padding: 0;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.pagination a {
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.pagination a:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
}
.pagination .current {
  color: #fff;
  background: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}
.pagination .dots {
  color: var(--text-muted);
  background: none;
  border: none;
}
.pagination .prev,
.pagination .next {
  font-weight: 600;
}

/* ── Footer (expanded) ── */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 32px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: color .2s;
}
.footer-col a:hover {
  color: var(--accent-blue);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  margin-bottom: 8px;
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Footer responsive rules are in the main responsive sections above */
