/*
Theme Name: Kweivox
Theme URI: https://kweivox.com
Author: Kweivox
Author URI: https://kweivox.com
Description: A clean, minimal, and fast WordPress theme for AI articles and blog content. AdSense-ready, SEO-optimized, and mobile responsive.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kweivox
Tags: blog, minimal, clean, adsense, seo, ai, technology, responsive, dark-mode
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors */
  --color-bg:           #ffffff;
  --color-bg-soft:      #f7f8fa;
  --color-bg-card:      #ffffff;
  --color-border:       #e8eaed;
  --color-text:         #1a1a2e;
  --color-text-muted:   #6b7280;
  --color-text-light:   #9ca3af;
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-tag-bg:       #f0f4ff;
  --color-tag-text:     #3b5bdb;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container-max: 1160px;
  --sidebar-width: 300px;
  --border-radius: 10px;
  --border-radius-sm: 6px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  /* Transitions */
  --transition: 0.2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg:           #0f1117;
  --color-bg-soft:      #161b27;
  --color-bg-card:      #1a2035;
  --color-border:       #2d3748;
  --color-text:         #f1f5f9;
  --color-text-muted:   #94a3b8;
  --color-text-light:   #64748b;
  --color-accent:       #60a5fa;
  --color-accent-hover: #93c5fd;
  --color-accent-light: #1e3a5f;
  --color-tag-bg:       #1e2d4a;
  --color-tag-text:     #93c5fd;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--color-accent-hover); }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.site-content {
  padding: var(--space-2xl) 0;
}

.content-sidebar-wrap {
  display: flex;
  gap: var(--space-2xl);
  align-items: flex-start;
}

.content-area { flex: 1; min-width: 0; }

.widget-area {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.3s ease, box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  height: 68px;
}

/* Logo */
.site-branding { flex-shrink: 0; }

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

.site-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.site-title span {
  color: var(--color-accent);
}

.site-title:hover { color: var(--color-text); }

/* Navigation */
.main-navigation { flex: 1; }

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

.nav-menu li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--border-radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item > a {
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Search Toggle */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text-muted);
  border-radius: var(--border-radius-sm);
  transition: color var(--transition), background-color var(--transition);
  display: flex;
  align-items: center;
}

.search-toggle:hover {
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: none;
  border: 1px solid var(--color-border);
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text-muted);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.dark-mode-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Search Bar */
.search-bar-wrap {
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  display: none;
}

.search-bar-wrap.active { display: block; }

.search-form-header {
  display: flex;
  gap: var(--space-sm);
}

.search-form-header input[type="search"] {
  flex: 1;
  padding: 0.65rem var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-form-header input[type="search"]:focus {
  border-color: var(--color-accent);
}

.search-form-header button {
  padding: 0.65rem var(--space-lg);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color var(--transition);
}

.search-form-header button:hover { background: var(--color-accent-hover); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero-label {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span { color: var(--color-accent); }

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero-search {
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.hero-search input[type="search"] {
  flex: 1;
  padding: 0.8rem var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search input[type="search"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.hero-search button {
  padding: 0.8rem var(--space-xl);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color var(--transition);
}

.hero-search button:hover { background: var(--color-accent-hover); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-border);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -18px;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

.section-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.section-link:hover { color: var(--color-accent-hover); }

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 2rem;
}

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.post-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  padding: 2px 10px;
  border-radius: 12px;
  text-decoration: none;
}

.post-card-category:hover {
  background: var(--color-accent);
  color: #fff;
}

.post-card-date,
.post-card-read-time {
  font-size: 0.78rem;
  color: var(--color-text-light);
}

.post-card-date::before { content: '·'; margin-right: var(--space-sm); }

.post-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
  flex: 1;
}

.post-card-title a {
  color: var(--color-text);
}

.post-card-title a:hover { color: var(--color-accent); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.post-card-author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.read-more-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more-link:hover { color: var(--color-accent-hover); }

/* Featured Card (large) */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.post-card.featured .post-card-thumb {
  width: 45%;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.post-card.featured .post-card-body { padding: var(--space-xl); }
.post-card.featured .post-card-title { font-size: 1.35rem; }
.post-card.featured .post-card-excerpt { -webkit-line-clamp: 3; }

/* ============================================================
   POPULAR POSTS LIST
   ============================================================ */
.popular-posts-list { display: flex; flex-direction: column; gap: var(--space-md); }

.popular-post-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.popular-post-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-border);
  font-family: var(--font-heading);
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
}

.popular-post-content { flex: 1; }

.popular-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-title:hover { color: var(--color-accent); }

.popular-post-meta {
  font-size: 0.76rem;
  color: var(--color-text-light);
}

/* ============================================================
   CATEGORIES SECTION
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

.category-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.category-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.category-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.category-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.category-card:hover .category-name { color: var(--color-accent); }

/* ============================================================
   ADSENSE AD AREAS
   ============================================================ */
.ad-unit {
  width: 100%;
  min-height: 90px;
  background: var(--color-bg-soft);
  border: 1px dashed var(--color-border);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow: hidden;
}

.ad-unit-banner { min-height: 90px; margin: var(--space-xl) 0; }
.ad-unit-rectangle { min-height: 250px; }
.ad-unit-leaderboard { min-height: 90px; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-hero { margin-bottom: var(--space-2xl); }

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-lg);
}

.single-post-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.post-author-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg-soft);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-xl);
}

.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.post-author-info {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

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

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }

.breadcrumb-sep {
  color: var(--color-text-light);
  font-size: 0.7rem;
}

.breadcrumb-current { color: var(--color-text-light); }

/* Post Thumbnail */
.single-post-thumb {
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  aspect-ratio: 16/7;
}

.single-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post Content */
.entry-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--color-text);
}

.entry-content h2 { margin: var(--space-2xl) 0 var(--space-md); }
.entry-content h3 { margin: var(--space-xl) 0 var(--space-md); }
.entry-content h4 { margin: var(--space-lg) 0 var(--space-sm); }

.entry-content p { margin-bottom: var(--space-lg); }

.entry-content ul,
.entry-content ol {
  margin: var(--space-md) 0 var(--space-lg) var(--space-xl);
  list-style: disc;
}

.entry-content ol { list-style: decimal; }

.entry-content li { margin-bottom: var(--space-sm); }

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

.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0;
  background: var(--color-accent-light);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.entry-content code {
  background: var(--color-bg-soft);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'Fira Code', 'Courier New', monospace;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.entry-content pre {
  background: #1a2035;
  color: #e2e8f0;
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: var(--space-xl) 0;
  font-size: 0.88em;
  line-height: 1.6;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.entry-content img {
  border-radius: var(--border-radius);
  margin: var(--space-xl) auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: 0.9rem;
}

.entry-content th {
  background: var(--color-bg-soft);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--color-border);
}

.entry-content td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
}

.entry-content tr:nth-child(even) td { background: var(--color-bg-soft); }

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.post-tag {
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: all var(--transition);
}

.post-tag:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Share Buttons */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--color-bg-soft);
  border-radius: var(--border-radius);
}

.post-share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-right: var(--space-sm);
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.share-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Related Posts */
.related-posts { margin-top: var(--space-3xl); padding-top: var(--space-2xl); border-top: 1px solid var(--color-border); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.widget ul { display: flex; flex-direction: column; gap: var(--space-sm); }

.widget ul li a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}

.widget ul li:last-child a { border-bottom: none; }
.widget ul li a:hover { color: var(--color-accent); }

/* Sidebar Search */
.widget .search-form {
  display: flex;
  gap: var(--space-sm);
}

.widget .search-form input {
  flex: 1;
  padding: 0.6rem var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}

.widget .search-form input:focus { border-color: var(--color-accent); }

.widget .search-form button {
  padding: 0.6rem var(--space-md);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color var(--transition);
}

.widget .search-form button:hover { background: var(--color-accent-hover); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-3xl);
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-card);
  text-decoration: none;
  transition: all var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area { margin-top: var(--space-3xl); padding-top: var(--space-2xl); border-top: 1px solid var(--color-border); }

.comment-list { display: flex; flex-direction: column; gap: var(--space-xl); margin-bottom: var(--space-xl); }

.comment-body {
  background: var(--color-bg-soft);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
}

.comment-author-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.comment-author-meta img { width: 40px; height: 40px; border-radius: 50%; }

.comment-author-name { font-weight: 600; font-size: 0.9rem; }

.comment-date { font-size: 0.78rem; color: var(--color-text-light); }

.comment-content { font-size: 0.9rem; color: var(--color-text-muted); }

.comment-form-wrap { background: var(--color-bg-soft); border-radius: var(--border-radius); padding: var(--space-xl); border: 1px solid var(--color-border); }

.comment-form { display: flex; flex-direction: column; gap: var(--space-md); }

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-accent); }

.comment-form textarea { min-height: 140px; resize: vertical; }

.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

.comment-form button[type="submit"] {
  padding: 0.8rem var(--space-xl);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition);
  align-self: flex-start;
}

.comment-form button[type="submit"]:hover { background: var(--color-accent-hover); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3xl);
}

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

.footer-brand .site-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  display: block;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-sm); }

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.footer-bottom-links a:hover { color: var(--color-accent); }

/* ============================================================
   PAGE TEMPLATES
   ============================================================ */
.page-hero {
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.page-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.page-hero-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: var(--space-md); max-width: 620px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

.form-group { display: flex; flex-direction: column; gap: var(--space-sm); }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.form-group textarea { min-height: 160px; resize: vertical; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.8rem var(--space-xl);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition);
  text-decoration: none;
}

.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-results-header { margin-bottom: var(--space-xl); }

.search-query {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.search-query strong { color: var(--color-accent); }

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found-wrap {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.not-found-code {
  font-size: 8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-border);
  line-height: 1;
  margin-bottom: var(--space-md);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

.section-pad { padding: var(--space-3xl) 0; }

.separator {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .content-sidebar-wrap {
    flex-direction: column;
  }
  .widget-area {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root { --space-3xl: 2.5rem; --space-2xl: 2rem; }

  .menu-toggle { display: flex; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-md);
  }

  .main-navigation.nav-open { display: block; }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--space-lg);
    gap: var(--space-xs);
  }

  .site-header { position: relative; }

  .post-card.featured {
    flex-direction: column;
  }

  .post-card.featured .post-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }

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

  .comment-form-row { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .posts-grid { grid-template-columns: 1fr; }

  .categories-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-search { flex-direction: column; }

  .post-share { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .header-inner { height: 60px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .ad-unit,
  .post-share,
  .related-posts { display: none; }
  body { color: #000; background: #fff; }
}
