/*
Theme Name: Diego Blog Theme
Theme URI: https://netvez.com
Author: Diego
Author URI: https://netvez.com
Description: Tema editorial profesional para blogs en español. Diseño limpio inspirado en publicaciones digitales de referencia. Compatible con AdSense, SEO-ready, optimizado para contenido largo.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: diego-blog
Tags: blog, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* ==============================
   CSS VARIABLES
============================== */
:root {
  --color-primary:     #1a56db;
  --color-primary-dark:#1741a8;
  --color-accent:      #f59e0b;
  --color-text:        #1a1a2e;
  --color-text-muted:  #6b7280;
  --color-text-light:  #9ca3af;
  --color-bg:          #ffffff;
  --color-bg-alt:      #f9fafb;
  --color-bg-dark:     #111827;
  --color-border:      #e5e7eb;
  --color-border-dark: #d1d5db;
  --font-heading:      'Playfair Display', Georgia, serif;
  --font-body:         'Source Serif 4', Georgia, serif;
  --font-ui:           'DM Sans', system-ui, sans-serif;
  --font-mono:         'Fira Code', monospace;
  --max-width:         1200px;
  --content-width:     740px;
  --sidebar-width:     300px;
  --radius-sm:         4px;
  --radius-md:         8px;
  --radius-lg:         12px;
  --shadow-sm:         0 1px 3px rgba(0,0,0,.08);
  --shadow-md:         0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:         0 8px 32px rgba(0,0,0,.12);
  --transition:        0.2s ease;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

/* ==============================
   TYPOGRAPHY
============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.625rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1.25rem; }

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

.site-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}

@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; gap: 2rem; }
  .site-sidebar { order: 2; }
}

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

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-branding { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

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

.site-description {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ==============================
   NAVIGATION
============================== */
.main-navigation { display: flex; align-items: center; }

.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation a {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--color-primary);
  background: rgba(26,86,219,0.06);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; }
  .main-navigation { display: none; width: 100%; }
  .main-navigation.toggled {
    display: block;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow-md);
  }
  .main-navigation.toggled ul { flex-direction: column; gap: 0; }
  .main-navigation.toggled a { display: block; }
}

/* ==============================
   HERO / CATEGORY BANNER
============================== */
.category-banner {
  background: var(--color-bg-dark);
  color: #fff;
  padding: 3rem 1.25rem;
  text-align: center;
}
.category-banner h1 {
  color: #fff;
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}
.category-banner p {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  margin: 0;
  font-family: var(--font-ui);
}

/* ==============================
   AD PLACEMENTS (AdSense-ready)
============================== */
.ad-banner {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border-dark);
  border-radius: var(--radius-md);
  text-align: center;
  overflow: hidden;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-banner-leaderboard { width: 100%; min-height: 90px; margin: 1.5rem 0; }
.ad-banner-rectangle { width: 100%; min-height: 250px; margin: 1.5rem 0; }
.ad-banner-inline { width: 100%; min-height: 90px; margin: 2rem 0; }
.ad-banner-sidebar { width: 100%; min-height: 250px; margin-bottom: 1.5rem; }

/* ==============================
   POSTS GRID (ARCHIVE)
============================== */
.posts-grid {
  display: grid;
  gap: 2rem;
}

/* Featured post: first article takes full width */
.posts-grid .post-card:first-child {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2rem;
}

.post-card {
  background: var(--color-bg);
}

.post-card-inner {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
}

.post-card:first-child .post-card-inner {
  grid-template-columns: 1fr;
}

.post-card-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.03); }

.post-card-body { flex: 1; }

.post-card-category {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.625rem;
}
.post-card-title a { color: var(--color-text); }
.post-card-title a:hover { color: var(--color-primary); }

.post-card:first-child .post-card-title { font-size: clamp(1.5rem, 3vw, 2rem); }

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.post-card-meta .author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
}
.post-card-meta .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-card-meta .read-time::before { content: '·'; margin-right: 1rem; }

/* Pagination between posts (ad slot) */
.posts-grid .ad-between {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

@media (max-width: 640px) {
  .post-card-inner { grid-template-columns: 1fr; }
  .post-card-image { order: -1; }
}

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

.post-breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-breadcrumb a { color: var(--color-text-muted); }
.post-breadcrumb a:hover { color: var(--color-primary); }
.post-breadcrumb span { color: var(--color-text-light); }

.post-category-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(26,86,219,0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 500;
  color: var(--color-text);
}
.post-meta-author img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.post-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  aspect-ratio: 16/9;
}
.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* ==============================
   POST CONTENT
============================== */
.entry-content h2 {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}
.entry-content h3 {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  margin: 2rem 0 0.75rem;
}
.entry-content h4 { margin: 1.5rem 0 0.5rem; }

.entry-content p { margin-bottom: 1.375rem; }

.entry-content ul, .entry-content ol {
  margin: 0 0 1.375rem 1.5rem;
}
.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  background: rgba(26,86,219,0.04);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--color-text);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--color-bg-alt);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: #c0392b;
}

.entry-content pre {
  background: var(--color-bg-dark);
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}
.entry-content pre code {
  background: none; border: none; color: inherit; padding: 0; font-size: inherit;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.entry-content table th {
  background: var(--color-bg-alt);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--color-border-dark);
}
.entry-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.entry-content table tr:last-child td { border-bottom: none; }

.entry-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

/* Table of Contents */
.toc-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc-box h4 {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.toc-box ol {
  margin: 0 0 0 1.25rem;
  counter-reset: none;
}
.toc-box li {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}
.toc-box a {
  color: var(--color-text);
}
.toc-box a:hover { color: var(--color-primary); }

/* Key takeaways / highlight box */
.highlight-box {
  border-left: 4px solid var(--color-accent);
  background: rgba(245,158,11,0.06);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.highlight-box p:last-child { margin-bottom: 0; }

/* ==============================
   POST TAGS & SHARE
============================== */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.post-tags a {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  transition: background var(--transition), color var(--transition);
}
.post-tags a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.share-buttons span {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.share-btn:hover { background: var(--color-text); color: #fff; border-color: var(--color-text); }

/* ==============================
   AUTHOR BOX
============================== */
.author-box {
  display: flex;
  gap: 1.25rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.author-box img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-box h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.author-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ==============================
   RELATED POSTS
============================== */
.related-posts { margin: 3rem 0; }

.related-posts h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-post-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.related-post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.related-post-card img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover;
}
.related-post-card-body { padding: 1rem; }
.related-post-card-body h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}
.related-post-card-body h4 a { color: var(--color-text); }
.related-post-card-body h4 a:hover { color: var(--color-primary); }
.related-post-card-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ==============================
   COMMENTS
============================== */
.comments-area { margin: 3rem 0; }
.comments-title { font-size: 1.375rem; margin-bottom: 1.5rem; }

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.comment-meta img {
  width: 36px; height: 36px;
  border-radius: 50%;
}
.comment-author-name { font-weight: 600; font-size: 0.9375rem; }
.comment-date {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.comment-form .submit {
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.comment-form .submit:hover { background: var(--color-primary-dark); }

/* ==============================
   SIDEBAR
============================== */
.site-sidebar { position: sticky; top: 80px; }

.widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--color-border);
}

/* Search widget */
.widget-search form {
  display: flex;
  gap: 0.5rem;
}
.widget-search input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--color-text);
  background: var(--color-bg);
}
.widget-search button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Recent posts widget */
.widget-recent-posts ul { list-style: none; }
.widget-recent-posts li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}
.widget-recent-posts li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-posts li:first-child { padding-top: 0; }
.widget-recent-posts img {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.widget-recent-posts a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
  display: block;
  margin-bottom: 0.25rem;
}
.widget-recent-posts a:hover { color: var(--color-primary); }
.widget-recent-posts .post-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* Categories widget */
.widget-categories ul { list-style: none; }
.widget-categories li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.widget-categories li:last-child { border-bottom: none; }
.widget-categories a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text);
}
.widget-categories a:hover { color: var(--color-primary); }
.widget-categories .count {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
}

/* Newsletter widget */
.widget-newsletter { background: var(--color-bg-dark); border-color: var(--color-bg-dark); }
.widget-newsletter .widget-title { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.1); }
.widget-newsletter h4 { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; }
.widget-newsletter p { font-size: 0.875rem; color: rgba(255,255,255,0.65); margin-bottom: 1rem; }
.widget-newsletter input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.widget-newsletter input::placeholder { color: rgba(255,255,255,0.4); }
.widget-newsletter button {
  width: 100%;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.625rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.widget-newsletter button:hover { opacity: 0.9; }

/* ==============================
   PAGINATION
============================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pagination a:hover { background: var(--color-bg-alt); border-color: var(--color-border-dark); }
.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pagination .dots {
  border: none;
  color: var(--color-text-muted);
}

/* ==============================
   FOOTER
============================== */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 1.25rem 2rem;
  margin-top: 3rem;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.footer-brand .site-title { color: #fff; font-size: 1.25rem; }
.footer-brand p {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* ==============================
   UTILITIES
============================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}
.aligncenter { text-align: center; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ==============================
   READING PROGRESS BAR
============================== */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  transition: width 0.1s linear;
  width: 0%;
}

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