/*
Theme Name: Xi'an Notes
Theme URI: https://xiancitytravel.com/article/
Author: Xi'an City Travel
Author URI: https://xiancitytravel.com/
Description: Custom WordPress theme for the Xi'an Notes blog. Clean, modern design that matches the xiancitytravel.com brand — green & gold palette, Poppins + Noto Serif typography, card-based layouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xian-notes
Tags: blog, news, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   Xi'an Notes — Shared Stylesheet (matches main site brand)
   Mobile-first • Custom CSS only
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --c-green:       #00875a;
  --c-green-dark:  #006644;
  --c-green-light: #e6f4ee;
  --c-gold:        #e8a817;
  --c-gold-light:  #fef7e6;
  --c-red:         #d93b30;
  --c-text:        #2c2c2c;
  --c-text-light:  #5e5e5e;
  --c-text-muted:  #8c8c8c;
  --c-bg:          #ffffff;
  --c-bg-alt:      #f7f7f7;
  --c-border:      #e0e0e0;
  --c-white:       #ffffff;

  /* Typography */
  --ff-sans:  'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang TC', 'PingFang SC', 'Hiragino Sans', 'Noto Sans TC', 'Noto Sans SC', sans-serif;
  --ff-serif: 'Noto Serif', Georgia, 'Times New Roman', 'Songti TC', 'Noto Serif TC', 'Noto Serif SC', serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Layout */
  --max-width: 1200px;
  --header-h:  64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-sans);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-green);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--c-green-dark);
}

ul, ol {
  list-style-position: inside;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--c-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--c-green);
  color: var(--c-white);
}
.btn-primary:hover {
  background: var(--c-green-dark);
  color: var(--c-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--c-white);
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-outline:hover {
  border-color: var(--c-green);
  color: var(--c-green);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 8px 18px;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text);
  flex-shrink: 0;
}

.header-logo img {
  height: 36px;
  width: auto;
}

.header-logo span {
  font-family: var(--ff-serif);
  color: var(--c-text);
}
.header-logo span em {
  font-style: normal;
  color: var(--c-green);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.nav-desktop a {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text-light);
  transition: all 0.15s ease;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--c-green);
  background: var(--c-green-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  color: var(--c-text);
  border-radius: 50%;
  transition: background 0.15s;
  cursor: pointer;
  background: none;
  border: none;
}
.header-search-toggle:hover {
  background: var(--c-bg-alt);
}

/* Header search dropdown */
.header-search {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-md) 0;
  transform: translateY(-110%);
  transition: transform 0.25s ease;
  z-index: 99;
}
.header-search.open {
  transform: translateY(0);
}
.header-search .search-form {
  display: flex;
  gap: var(--space-sm);
}
.header-search input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
.header-search input[type="search"]:focus {
  border-color: var(--c-green);
}

/* Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  color: var(--c-text);
  border-radius: 50%;
  transition: background 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger:hover {
  background: var(--c-bg-alt);
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .hamburger { display: none; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-white);
  z-index: 99;
  padding: var(--space-lg);
  overflow-y: auto;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--c-green); }

/* --- Hero (homepage) --- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-text);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--c-white);
  padding: var(--space-2xl) var(--space-md);
  max-width: 760px;
}

.hero-content h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: var(--c-white);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: var(--space-xl);
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-actions .btn-outline {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255,255,255,0.5);
}
.hero-actions .btn-outline:hover {
  border-color: var(--c-white);
  color: var(--c-white);
}

/* --- Page Hero (sub-pages) --- */
.page-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  background: var(--c-text);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  color: var(--c-white);
}

.page-hero-content .breadcrumb {
  color: rgba(255,255,255,0.8);
}
.page-hero-content .breadcrumb a {
  color: rgba(255,255,255,0.8);
}
.page-hero-content .breadcrumb a:hover {
  color: var(--c-white);
  text-decoration: underline;
}

.page-hero-content h1 {
  font-family: var(--ff-serif);
  margin-bottom: var(--space-sm);
  color: var(--c-white);
}

.page-hero-content p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}
.breadcrumb .sep { opacity: 0.5; }

/* --- Sections --- */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--c-bg-alt);
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-green);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}

.section-subtitle {
  color: var(--c-text-light);
  font-size: 1rem;
  max-width: 640px;
}

.section-header-center {
  text-align: center;
}
.section-header-center .section-subtitle {
  margin: 0 auto;
}

/* Decorative line under title */
.section-line {
  width: 48px;
  height: 3px;
  background: var(--c-green);
  border-radius: 2px;
  margin-top: var(--space-sm);
}
.section-header-center .section-line {
  margin-left: auto;
  margin-right: auto;
}

/* --- Category chips (homepage) --- */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  color: var(--c-text-light);
  transition: all 0.2s ease;
}
.cat-chip:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.cat-chip .count {
  font-size: 0.75rem;
  background: var(--c-bg-alt);
  border-radius: var(--radius-full);
  padding: 1px 9px;
  color: var(--c-text-muted);
}

/* --- Breadcrumb bar (standalone, light) --- */
.breadcrumb-bar {
  padding: 14px 0;
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
  font-size: 0.85rem;
  color: var(--c-text-muted);
}
.breadcrumb-bar a {
  color: var(--c-green);
}
.breadcrumb-bar a:hover {
  text-decoration: underline;
}

/* --- Card Component --- */
.card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-alt);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-img img {
  transform: scale(1.06);
}
.card-img.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-green-light);
  color: var(--c-green);
  font-size: 2.4rem;
}

.card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cat-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  align-self: flex-start;
}
.cat-travel-diaries  { background: #e3f2fd; color: #1565c0; }
.cat-food-notes      { background: #fff3e0; color: #e65100; }
.cat-cultural-musings{ background: #f3e5f5; color: #6a1b9a; }
.cat-help-guide      { background: var(--c-green-light); color: var(--c-green-dark); }

.card-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  color: var(--c-text);
}
.card-title a {
  color: var(--c-text);
}
.card-title a:hover {
  color: var(--c-green);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}
.card-meta i {
  margin-right: 4px;
  color: var(--c-gold);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--c-border);
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-top: auto;
}
.card-footer .read-more {
  font-weight: 600;
}

/* --- Grid --- */
.grid-2, .grid-3 {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Post content (single) --- */
.single-post-wrap {
  padding: var(--space-2xl) 0;
}

.post-header {
  max-width: 780px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.post-header .cat-tag {
  margin-bottom: var(--space-md);
}

.post-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: var(--space-md);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--c-text-muted);
}
.post-meta i {
  margin-right: 5px;
  color: var(--c-gold);
}

.post-thumbnail {
  max-width: 1000px;
  margin: 0 auto var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.post-thumbnail img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

/* Article body typography */
.entry-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--c-text);
}

.entry-content p {
  margin-bottom: 1.4em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--ff-serif);
  margin: 2em 0 0.8em;
  line-height: 1.4;
}
.entry-content h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}
.entry-content h2 {
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--c-border);
}
.entry-content h2::before {
  content: '';
  display: block;
  width: 42px;
  height: 4px;
  background: var(--c-green);
  border-radius: 2px;
  margin-bottom: 0.6em;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content a:hover {
  text-decoration-thickness: 2px;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.4em 1.4em;
}
.entry-content li {
  margin-bottom: 0.5em;
}
.entry-content li::marker {
  color: var(--c-green);
}

.entry-content blockquote {
  border-left: 4px solid var(--c-green);
  background: var(--c-green-light);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.6em 0;
  font-style: italic;
  color: var(--c-text-light);
}
.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 1.6em auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.92rem;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--c-border);
  padding: 10px 14px;
  text-align: left;
}
.entry-content th {
  background: var(--c-bg-alt);
  font-weight: 600;
}
.entry-content tr:nth-child(even) td {
  background: #fafafa;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2em auto;
  max-width: 120px;
}

.entry-content code,
.entry-content kbd {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.88em;
}

.entry-content pre {
  background: #1a1a1a;
  color: #e6e6e6;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: 1.6em 0;
  line-height: 1.6;
}

.entry-content figure {
  margin: 1.6em 0;
}
.entry-content figcaption {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Gutenberg alignment helpers */
.entry-content .alignleft { float: left; margin-right: 1.5em; }
.entry-content .alignright { float: right; margin-left: 1.5em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .wp-block-image img { width: auto; }

/* Table of Contents (Easy Table of Contents plugin) */
#ez-toc-container,
.ez-toc-container {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-md);
  margin: 1.6em 0 2em;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}
#ez-toc-container .ez-toc-title,
.ez-toc-container .ez-toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-green-dark);
  margin-bottom: var(--space-sm);
  font-family: var(--ff-sans);
}
#ez-toc-container .ez-toc-list,
.ez-toc-container .ez-toc-list {
  margin: 0;
}
#ez-toc-container .ez-toc-list li,
.ez-toc-container .ez-toc-list li {
  margin-bottom: 4px;
  font-size: 0.9rem;
  list-style: none;
}
#ez-toc-container .ez-toc-list a,
.ez-toc-container .ez-toc-list a {
  color: var(--c-text-light);
  text-decoration: none;
}
#ez-toc-container .ez-toc-list a:hover,
.ez-toc-container .ez-toc-list a:hover {
  color: var(--c-green);
}
#ez-toc-container .ez-toc-list ul,
.ez-toc-container .ez-toc-list ul {
  margin: 4px 0 4px 18px;
  padding: 0;
}

/* --- Tags --- */
.tags-row {
  max-width: 780px;
  margin: var(--space-2xl) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.tags-row .tags-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--c-bg-alt);
  color: var(--c-text-light);
  border: 1px solid var(--c-border);
}
.tag:hover {
  background: var(--c-green-light);
  border-color: var(--c-green);
  color: var(--c-green-dark);
}

/* --- Post navigation (prev/next) --- */
.post-navigation {
  max-width: 780px;
  margin: var(--space-2xl) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.post-navigation a {
  display: block;
  padding: var(--space-md);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--c-text-light);
  transition: all 0.2s ease;
}
.post-navigation a:hover {
  border-color: var(--c-green);
  color: var(--c-green-dark);
  box-shadow: var(--shadow-sm);
}
.post-navigation .nav-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.post-navigation .next-post {
  text-align: right;
}

/* --- Related posts --- */
.related-section {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
}

/* --- Pagination --- */
.pagination {
  margin-top: var(--space-2xl);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pagination .page-numbers,
.pagination .page-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text-light);
  background: var(--c-white);
  transition: all 0.15s ease;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--c-green);
  border-color: var(--c-green);
  color: var(--c-white);
}
.pagination .page-numbers.dots {
  border: none;
  background: none;
  color: var(--c-text-muted);
}

/* --- Search / 404 --- */
.search-page .page-hero { min-height: 220px; }
.not-found-wrap {
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.not-found-wrap .big-num {
  font-family: var(--ff-serif);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--c-green-light);
  line-height: 1;
  font-weight: 700;
}
.not-found-wrap h1 {
  margin: var(--space-sm) 0 var(--space-md);
}
.not-found-wrap p {
  color: var(--c-text-light);
  margin-bottom: var(--space-xl);
}
.not-found-wrap form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-sm);
}
.not-found-wrap input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
.not-found-wrap input[type="search"]:focus {
  border-color: var(--c-green);
}

/* --- CTA band --- */
.cta-band {
  background: var(--c-green-dark);
  color: var(--c-white);
  padding: var(--space-2xl) 0;
}
.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--ff-serif);
  color: var(--c-white);
}
.cta-band p {
  opacity: 0.85;
  max-width: 560px;
}
.cta-band .btn-primary {
  background: var(--c-gold);
}
.cta-band .btn-primary:hover {
  background: #d6990f;
}

/* --- Footer --- */
.site-footer {
  background: #1a1a1a;
  color: #b0b0b0;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (min-width: 480px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-col h4 {
  color: var(--c-white);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  padding: 4px 0;
  color: #b0b0b0;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--c-white);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: var(--space-lg);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
}
.footer-bottom a { color: #b0b0b0; }
.footer-bottom a:hover { color: var(--c-white); }

.footer-lang {
  display: flex;
  gap: 12px;
}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
  border: none;
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--c-green-dark);
}

/* --- Misc --- */
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Screen reader text for forms */
.search-form label { display: none; }
.search-form .screen-reader-text { display: none; }

/* --- Ad container (placeholder for manual ad slots) --- */
.ad-container {
  text-align: center;
  padding: var(--space-lg) 0;
}
.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  margin-bottom: var(--space-sm);
}

/* --- Mobile table scroll --- */
@media (max-width: 767px) {
  .entry-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .back-to-top, .related-section,
  .post-navigation, .cta-band, .tags-row, .header-search { display: none !important; }
  body { background: #fff; }
  .entry-content { max-width: 100%; }
}
