/*
Theme Name: Aiohoo
Theme URI: https://aiohoo.com
Author: Aiohoo
Author URI: https://aiohoo.com
Description: A minimalistic, fast, and AdSense-ready WordPress theme built for general AI content — tools, news, guides, and reviews. Features a smooth day/night toggle, clean typography, and designated ad zones that pass Google AdSense review criteria.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aiohoo
Tags: blog, minimalist, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================= */
:root {
  /* Light Mode — default */
  --bg:           #ffffff;
  --bg-2:         #f8fafc;
  --bg-3:         #f1f5f9;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  --text-1:       #0f172a;
  --text-2:       #374151;
  --text-3:       #6b7280;
  --text-4:       #9ca3af;

  --accent:       #2563eb;
  --accent-hover: #1d4ed8;
  --accent-bg:    #eff6ff;
  --accent-border:#bfdbfe;

  --tag-bg:       #f1f5f9;
  --tag-text:     #475569;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.10);

  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-full:  9999px;

  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono:    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --header-h:     64px;
  --sidebar-w:    300px;
  --content-max:  780px;
  --site-max:     1200px;

  --transition:   220ms cubic-bezier(.4,0,.2,1);
}

/* Dark Mode tokens — applied via [data-theme="dark"] on <html> */
[data-theme="dark"] {
  --bg:           #0d1117;
  --bg-2:         #161b22;
  --bg-3:         #1c2230;
  --card:         #1c2230;
  --border:       #30363d;
  --border-light: #21262d;

  --text-1:       #f0f6fc;
  --text-2:       #c9d1d9;
  --text-3:       #8b949e;
  --text-4:       #484f58;

  --accent:       #58a6ff;
  --accent-hover: #79b8ff;
  --accent-bg:    #1a2f4e;
  --accent-border:#1f4068;

  --tag-bg:       #21262d;
  --tag-text:     #8b949e;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.5);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-1);
  background-color: var(--bg);
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol { padding-left: 1.5em; }
li { margin-bottom: .25em; }

strong, b { font-weight: 600; color: var(--text-1); }
em, i { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* =============================================================
   3. TYPOGRAPHY
   ============================================================= */
h1,h2,h3,h4,h5,h6 {
  color: var(--text-1);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.015em;
}

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

p { margin-bottom: 1.25rem; color: var(--text-2); }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-bg);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: .5rem;
  font-style: normal;
  font-size: .875rem;
  color: var(--text-3);
}

pre {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--bg-3);
  color: var(--accent);
  padding: .15em .4em;
  border-radius: var(--radius-sm);
}

pre code { background: none; color: var(--text-1); padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9375rem;
}
thead { background: var(--bg-2); }
th, td {
  padding: .75rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
  color: var(--text-2);
}
th { font-weight: 600; color: var(--text-1); font-size: .875rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:nth-child(even) { background: var(--bg-2); }

/* =============================================================
   4. LAYOUT
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 2.5rem;
  align-items: start;
}

/* Full-width (no sidebar) */
.content-area.full-width {
  grid-template-columns: 1fr;
  max-width: var(--content-max);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .widget-area { order: 2; }
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

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

.site-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text-1);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: color var(--transition);
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 800;
  flex-shrink: 0;
}

.site-description {
  display: none; /* Hidden but available for screen readers */
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li { position: relative; }

.nav-menu a {
  display: block;
  padding: .45rem .75rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

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

/* Dropdown */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: .5rem;
  z-index: 200;
}

.nav-menu li:hover > .sub-menu { display: block; }

.nav-menu .sub-menu a {
  display: block;
  padding: .5rem .75rem;
  font-size: .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

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

/* Dark Mode Toggle */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  padding: 0 5px;
  justify-content: space-between;
}

.toggle-track .icon { font-size: 12px; line-height: 1; user-select: none; }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

[data-theme="dark"] .toggle-thumb { transform: translateX(24px); }
[data-theme="dark"] .toggle-track { background: var(--bg-3); border-color: var(--border); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: .45rem .6rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: .875rem;
  align-items: center;
  gap: .4rem;
}
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Inline Search Bar */
.header-search {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  z-index: 99;
}
.header-search.active { display: block; }
.header-search form { max-width: 600px; margin: 0 auto; display: flex; gap: .5rem; }
.header-search input {
  flex: 1;
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: .9375rem;
}
.header-search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.header-search button {
  padding: .65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
  transition: background var(--transition);
}
.header-search button:hover { background: var(--accent-hover); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-navigation { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; box-shadow: var(--shadow-md); }
  .main-navigation.open { display: block; }
  .nav-menu { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .nav-menu a { padding: .6rem .75rem; }
  .nav-menu .sub-menu { position: static; box-shadow: none; border: none; background: var(--bg-2); margin: .25rem 0 .25rem 1rem; display: block; }
}

/* =============================================================
   6. HERO / HOMEPAGE BANNER
   ============================================================= */
.hero-section {
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 4rem 0;
  text-align: center;
  transition: background var(--transition);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text-1);
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 1.15;
}

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

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-3);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* =============================================================
   7. BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }

.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent-border); }
.btn-outline:hover { background: var(--accent-bg); color: var(--accent); }

.btn-sm { padding: .45rem 1rem; font-size: .875rem; }

/* =============================================================
   8. POST CARDS
   ============================================================= */
.posts-grid {
  display: grid;
  gap: 1.75rem;
}

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

@media (max-width: 700px) {
  .posts-grid.cols-2,
  .posts-grid.cols-3 { grid-template-columns: 1fr; }
}

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

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

.card-thumb { overflow: hidden; aspect-ratio: 16/9; background: var(--bg-3); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-bg), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.card-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.card-cat {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  text-decoration: none;
}
.card-cat:hover { color: var(--accent-hover); }

.card-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); flex-shrink: 0; }

.card-date {
  font-size: .8125rem;
  color: var(--text-3);
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: .6rem;
  color: var(--text-1);
  text-decoration: none;
  display: block;
  transition: color var(--transition);
}
.card-title:hover { color: var(--accent); }

.card-excerpt {
  font-size: .9rem;
  color: var(--text-3);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: .875rem;
  border-top: 1px solid var(--border-light);
  font-size: .8125rem;
  color: var(--text-3);
}

.card-read-time { display: flex; align-items: center; gap: .3rem; }

.card-read-link {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.card-read-link:hover { color: var(--accent-hover); }

/* Featured Post */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-card.featured .card-thumb { width: 45%; flex-shrink: 0; aspect-ratio: auto; min-height: 260px; }
.post-card.featured .card-body { padding: 2rem; }
.post-card.featured .card-title { font-size: 1.5rem; }

@media (max-width: 600px) {
  .post-card.featured { flex-direction: column; }
  .post-card.featured .card-thumb { width: 100%; min-height: 200px; aspect-ratio: 16/9; }
}

/* =============================================================
   9. SINGLE POST
   ============================================================= */
.article-header { margin-bottom: 2rem; }

.article-cats {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .875rem;
}

.cat-tag {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.cat-tag:hover { background: var(--accent); color: #fff; }

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--text-1);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--text-3);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.meta-author { display: flex; align-items: center; gap: .5rem; }
.meta-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  border: 2px solid var(--border);
}
.meta-author-name { font-weight: 600; color: var(--text-2); font-size: .9rem; }

.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); }

.article-thumb {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-thumb img { width: 100%; height: 420px; object-fit: cover; }

/* Article Body */
.entry-content { color: var(--text-2); }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content h2 { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border-light); }
.entry-content h3 { margin-top: 2rem; }
.entry-content h4 { margin-top: 1.5rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-border); }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content ul, .entry-content ol { color: var(--text-2); }
.entry-content li { margin-bottom: .5rem; }
.entry-content img { border-radius: var(--radius-md); border: 1px solid var(--border); margin: 1.5rem 0; }
.entry-content .wp-caption { color: var(--text-3); font-size: .875rem; text-align: center; margin-top: .5rem; }

/* TOC Box */
.toc-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc-box h4 { font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: .75rem; }
.toc-box ol { margin: 0; padding-left: 1.25rem; }
.toc-box li { margin-bottom: .35rem; }
.toc-box a { color: var(--accent); font-size: .9375rem; text-decoration: none; }
.toc-box a:hover { text-decoration: underline; }

/* Article Footer */
.article-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.tags-list { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tag-pill {
  font-size: .8125rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: .25rem .7rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition);
}
.tag-pill:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }

/* Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.share-label { font-size: .875rem; font-weight: 600; color: var(--text-3); }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.share-twitter  { background: #1da1f2; color: #fff; }
.share-linkedin { background: #0077b5; color: #fff; }
.share-copy     { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border); cursor: pointer; }
.share-btn:hover { opacity: .88; color: #fff; transform: translateY(-1px); }
.share-copy:hover { color: var(--accent); border-color: var(--accent-border); }

/* Related Posts */
.related-posts { margin-top: 3rem; }
.related-posts h3 { margin-bottom: 1.25rem; font-size: 1.25rem; }

/* Author Box */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.author-avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; border: 3px solid var(--border); object-fit: cover; }
.author-info h4 { font-size: 1rem; margin-bottom: .25rem; }
.author-info p { font-size: .9rem; color: var(--text-3); margin: 0; }

/* =============================================================
   10. AD ZONES
   ============================================================= */
.ad-zone {
  margin: 2rem 0;
  text-align: center;
  min-height: 90px;
}

.ad-zone-label {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-4);
  margin-bottom: .3rem;
  display: block;
}

.ad-zone.ad-sidebar { min-height: 250px; }
.ad-zone.ad-banner  { min-height: 90px; }
.ad-zone.ad-square  { min-height: 250px; max-width: 300px; margin: 2rem auto; }

/* Responsive ads */
.adsbygoogle { display: block; }

/* =============================================================
   11. SIDEBAR / WIDGETS
   ============================================================= */
.widget-area { display: flex; flex-direction: column; gap: 1.5rem; }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.widget-title {
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  margin-bottom: 1rem;
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--border-light);
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: .45rem 0; border-bottom: 1px solid var(--border-light); font-size: .9375rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-2); transition: color var(--transition); }
.widget ul li a:hover { color: var(--accent); }

/* Search widget */
.widget .search-form { display: flex; gap: .5rem; }
.widget .search-field {
  flex: 1;
  padding: .55rem .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: .9375rem;
}
.widget .search-field:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.widget .search-submit {
  padding: .55rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
  transition: background var(--transition);
}
.widget .search-submit:hover { background: var(--accent-hover); }

/* =============================================================
   12. BREADCRUMBS
   ============================================================= */
.breadcrumb-nav {
  margin-bottom: 1.5rem;
  font-size: .875rem;
  color: var(--text-3);
}
.breadcrumb-nav a { color: var(--text-3); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--accent); }
.breadcrumb-nav span + span::before { content: " / "; margin: 0 .4rem; color: var(--text-4); }

/* =============================================================
   13. ARCHIVE / CATEGORY
   ============================================================= */
.archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.archive-prefix {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.archive-title { font-size: 1.875rem; font-weight: 800; letter-spacing: -.02em; }
.archive-desc { color: var(--text-3); margin-top: .5rem; }

/* Blog Index Hero (home.php) */
.archive-hero {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-bottom: 2.5rem;
}
.archive-hero .archive-header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

/* Category Filter Pills */
.cat-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.cat-filter-pill {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: var(--radius-full);
  font-size: .8125rem;
  font-weight: 600;
  background: var(--card);
  color: var(--text-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.cat-filter-pill:hover,
.cat-filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Blog featured post wrapper */
.blog-featured-post {
  margin-bottom: 2rem;
}

.posts-count {
  display: inline-block;
  background: var(--bg-3);
  color: var(--text-3);
  font-size: .8125rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
  margin-top: .5rem;
}

/* =============================================================
   14. PAGINATION
   ============================================================= */
.pagination, .post-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.pagination .page-numbers, .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--transition);
}

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

.pagination .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
}
.pagination .page-numbers.dots:hover { background: none; color: var(--text-3); }

/* Post navigation (prev/next) */
.post-navigation { justify-content: space-between; }
.nav-previous, .nav-next { flex: 1; max-width: 48%; }
.nav-next { text-align: right; }
.nav-direction { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: .25rem; }
.nav-link { display: block; height: auto; padding: .875rem 1rem; border-radius: var(--radius-md); text-align: left; font-weight: 600; color: var(--text-2); min-width: unset; }
.nav-next .nav-link { text-align: right; }
.nav-link:hover { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); }

/* =============================================================
   15. COMMENTS
   ============================================================= */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { border-bottom: 1px solid var(--border-light); padding: 1.25rem 0; }
.comment:last-child { border-bottom: none; }

.comment-author { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.comment-author img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); }
.comment-author .fn { font-weight: 600; font-size: .9375rem; color: var(--text-1); }
.comment-metadata { font-size: .8125rem; color: var(--text-3); }
.comment-metadata a { color: var(--text-3); text-decoration: none; }
.comment-content { font-size: .9375rem; color: var(--text-2); margin-top: .5rem; }
.comment-content p { margin-bottom: .5rem; }
.reply { margin-top: .5rem; }
.comment-reply-link { font-size: .8125rem; font-weight: 600; color: var(--accent); text-decoration: none; }

.children { list-style: none; padding-left: 2rem; margin-top: .5rem; border-left: 2px solid var(--border); }

/* Comment Form */
.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }

.comment-form label { display: block; font-size: .875rem; font-weight: 600; color: var(--text-2); margin-bottom: .35rem; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .65rem .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: .9375rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 1rem;
}

.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.comment-form .form-submit input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .65rem 1.5rem;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.comment-form .form-submit input[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* =============================================================
   16. SEARCH RESULTS
   ============================================================= */
.search-hero {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}
.search-hero h1 { font-size: 1.5rem; margin-bottom: .75rem; }
.search-hero .search-form { max-width: 500px; margin: 0 auto; display: flex; gap: .5rem; }
.search-hero input {
  flex: 1;
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-1);
  font-size: .9375rem;
}
.search-hero button { padding: .65rem 1.25rem; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; }
.search-hero button:hover { background: var(--accent-hover); }
.no-results { text-align: center; padding: 4rem 0; color: var(--text-3); }
.no-results h2 { color: var(--text-1); margin-bottom: .5rem; }

/* =============================================================
   17. 404 PAGE
   ============================================================= */
.error-404 { text-align: center; padding: 5rem 0; }
.error-404 .error-code { font-size: 8rem; font-weight: 800; color: var(--accent); opacity: .15; line-height: 1; margin-bottom: .5rem; }
.error-404 h2 { font-size: 1.75rem; margin-bottom: .75rem; }
.error-404 p { color: var(--text-3); max-width: 420px; margin: 0 auto 2rem; }

/* =============================================================
   18. FOOTER
   ============================================================= */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 0;
  margin-top: auto;
  transition: background var(--transition), border-color var(--transition);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px)  { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .site-title { font-size: 1.25rem; margin-bottom: .75rem; }
.footer-brand p { font-size: .9rem; color: var(--text-3); line-height: 1.6; margin-bottom: 1rem; }

.footer-col h4 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  margin-bottom: .875rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { font-size: .9375rem; color: var(--text-3); text-decoration: none; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .875rem;
  color: var(--text-3);
}

.footer-bottom a { color: var(--text-3); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* =============================================================
   19. READING PROGRESS BAR
   ============================================================= */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0%;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* =============================================================
   20. BACK TO TOP
   ============================================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 500;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-hover); }

/* =============================================================
   21. COOKIE CONSENT BANNER (AdSense GDPR requirement)
   ============================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  z-index: 9000;
  display: none;
  box-shadow: var(--shadow-lg);
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; font-size: .9rem; color: var(--text-2); min-width: 200px; }
.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* =============================================================
   22. UTILITIES & ACCESSIBILITY
   ============================================================= */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }

/* Print */
@media print {
  .site-header, .site-footer, .widget-area, .ad-zone,
  .share-bar, .related-posts, .cookie-banner, .back-to-top,
  .reading-progress { display: none !important; }
  .content-area { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
}
