/* Tumatic Blog - CSS Principal */
/* Diseño Light Mode con header oscuro */
/* Autor: David García Martínez | tumatic.com */

:root {
  /* Colores principales - Blanco y Negro */
  --primary: #111111;
  --primary-dark: #000000;
  --primary-light: #333333;
  --accent: #555555;

  /* Fondos claros */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #f1f5f9;

  /* Textos oscuros */
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Bordes */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Estados */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Tipografía */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Espaciado */
  --container-max: 1200px;
  --content-max: 800px;
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; margin-top: 1.25rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Header - NEGRO */
.header {
  background: #111111;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: #ffffff;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.lang-switch a {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.lang-switch a.active {
  background: #ffffff;
  color: #111111;
}

.lang-switch a:hover:not(.active) {
  color: #ffffff;
}

/* Botón CTA en header - BLANCO con alta especificidad */
.btn-primary,
.nav .btn-primary,
.nav a.btn-primary,
.header .nav a.btn-primary {
  background: #ffffff !important;
  color: #111111 !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  text-decoration: none !important;
  border: 2px solid #ffffff;
}

.btn-primary:hover,
.nav .btn-primary:hover,
.nav a.btn-primary:hover,
.header .nav a.btn-primary:hover {
  background: transparent !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Hero del Blog - NEGRO */
.blog-hero {
  background: #111111;
  padding: 4rem 1.5rem;
  text-align: center;
}

.blog-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.blog-hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* Contenedor principal */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Categorías del blog */
.blog-category {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.blog-category:last-of-type {
  border-bottom: none;
}

.blog-category h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

/* Grid de posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
  padding: 1.5rem 0;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.post-card-image {
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-card h3 {
  font-size: 1.125rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}

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

.post-card h3 a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

.post-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.post-tag {
  display: inline-block;
  background: #111111;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Artículo individual */
.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.article-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-excerpt {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-featured-image {
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Autor box - DISEÑO MEJORADO */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 2rem;
  background: #111111;
  border-radius: 16px;
  margin: 3rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.author-avatar {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  flex-shrink: 0;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-box .author-info h4,
.article-content .author-box .author-info h4 {
  margin: 0 0 0.5rem !important;
  font-size: 1.125rem;
  color: #ffffff !important;
  border: none !important;
  padding: 0 !important;
}

.author-info .author-role {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
  display: block;
}

.author-box .author-info p,
.article-content .author-box .author-info p {
  margin: 0 0 0.5rem !important;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.6;
}

.author-box .author-info a,
.article-content .author-box .author-info a {
  display: inline-block;
  margin-top: 1rem;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  transition: all 0.2s;
}

.author-box .author-info a:hover,
.article-content .author-box .author-info a:hover {
  background: #ffffff;
  color: #111111 !important;
  text-decoration: none;
}


/* Contenido del artículo */
.article-content {
  padding: 2rem 0;
}

.article-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #111111;
  color: var(--text);
}

.article-content h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
  color: var(--text);
}

.article-content h4 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content li strong {
  color: var(--text);
}

/* Tablas */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  padding: 0.875rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.article-content th {
  background: #111111;
  font-weight: 600;
  color: #ffffff;
}

.article-content td {
  background: var(--bg);
  color: var(--text-secondary);
}

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

/* Table wrapper responsive */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.table-wrapper table {
  margin: 0;
  border: none;
}

/* Notas / Blockquotes */
.note, blockquote {
  background: var(--bg-soft);
  border-left: 4px solid #111111;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
}

.note strong, blockquote strong {
  color: var(--text);
}

.note-warning {
  border-left-color: var(--warning);
  background: #fffbeb;
}

.note-warning strong {
  color: #b45309;
}

.note-success {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.note-success strong {
  color: #166534;
}

.note-info {
  border-left-color: var(--info);
  background: #eff6ff;
}

.note-info strong {
  color: #1d4ed8;
}

/* Info box */
.info-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box strong {
  color: var(--text);
}

/* CTA Box - NEGRO */
.cta-box {
  background: #111111;
  padding: 2.5rem;
  border-radius: 16px;
  margin: 3rem 0;
  text-align: center;
}

.cta-box h2,
.cta-box h3 {
  color: white;
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.cta-box p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
}

.cta-button {
  display: inline-block;
  background: #ffffff;
  color: #111111;
  padding: 1rem 2.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  text-decoration: none;
  border: 2px solid #ffffff;
}

.cta-button:hover {
  background: transparent;
  color: #ffffff;
  text-decoration: none;
}

/* TOC */
.toc,
.table-of-contents {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h2,
.toc h4,
.table-of-contents h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text);
}

.toc ul,
.table-of-contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li,
.table-of-contents li {
  margin-bottom: 0.5rem;
}

.toc a,
.table-of-contents a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.toc a:hover,
.table-of-contents a:hover {
  color: var(--text);
  text-decoration: none;
}

.toc a::before,
.table-of-contents a::before {
  content: "→";
  color: var(--text-muted);
  opacity: 0.5;
}

.toc a:hover::before,
.table-of-contents a:hover::before {
  opacity: 1;
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.card h4 {
  color: var(--text);
  margin: 0 0 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

/* FAQ */
.faq-section {
  margin: 2rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3,
.faq-question {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.faq-item p,
.faq-answer {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0;
}

/* Related posts */
.related-posts {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  margin-top: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.related-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
  text-decoration: none;
}

.related-card:hover {
  border-color: #111111;
  text-decoration: none;
  transform: translateY(-2px);
}

.related-card .related-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.related-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.related-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

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

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.article-tags .tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: #111111;
  color: white;
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 2rem;
}

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

/* Site footer (artículos) */
.site-footer {
  background: #111111;
  color: white;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.site-footer .footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.site-footer .footer-nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer .footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.site-footer .footer-nav a:hover {
  color: #ffffff;
}

/* Página de autor */
.author-page-header {
  text-align: center;
  padding: 3rem 0;
}

.author-page-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #111111;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.author-page-header h1 {
  margin-bottom: 0.5rem;
}

.author-page-header .role {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.author-page-header p {
  max-width: 600px;
  margin: 0 auto;
}

.author-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.author-social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: #111111;
  border-radius: 10px;
  font-size: 0.9375rem;
  color: #ffffff;
  transition: all 0.2s;
}

.author-social a:hover {
  background: #333333;
  text-decoration: none;
}

/* Breadcrumbs - sobre fondo claro */
.breadcrumbs {
  padding: 1.5rem 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

/* Breadcrumbs sobre fondo oscuro (dentro de hero) */
.blog-hero .breadcrumbs,
.header .breadcrumbs {
  color: rgba(255, 255, 255, 0.7);
}

.blog-hero .breadcrumbs a,
.header .breadcrumbs a {
  color: #ffffff;
  font-weight: 500;
}

.blog-hero .breadcrumbs a:hover,
.header .breadcrumbs a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.blog-hero .breadcrumbs span,
.header .breadcrumbs span {
  color: rgba(255, 255, 255, 0.5);
}

/* Código */
code {
  background: var(--bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--text);
}

pre {
  background: #111111;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: #e2e8f0;
}

/* Pros/Cons */
.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pros, .cons {
  padding: 1.5rem;
  border-radius: 16px;
}

.pros {
  background: #f8fafc;
  border: 1px solid var(--border);
}

.cons {
  background: #f8fafc;
  border: 1px solid var(--border);
}

.pros h4 {
  color: var(--text);
  margin: 0 0 1rem;
}

.cons h4 {
  color: var(--text);
  margin: 0 0 1rem;
}

.pros ul, .cons ul {
  margin: 0;
  padding-left: 1.25rem;
}

.pros li { color: var(--text-secondary); }
.cons li { color: var(--text-secondary); }

/* Chips */
.chip {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-alt);
  color: var(--text);
}

/* Featured image */
.featured-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
}

/* Category badge */
.category {
  display: inline-block;
  background: #111111;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.date, .read-time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Navbar alternativo (artículos) */
.navbar {
  background: #111111;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar .nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  font-weight: 500;
}

.navbar .nav-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.navbar .lang-switch {
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Article container */
.article-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Author image */
.author-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
}

/* Legal pages */
.legal-content {
  padding: 2rem 0;
}

.legal-content h1 {
  margin-bottom: 0.5rem;
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.cookie-banner a {
  color: var(--text);
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: #111111;
  color: white;
}

.cookie-btn-accept:hover {
  background: #333333;
}

.cookie-btn-reject {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.cookie-btn-reject:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Imágenes responsive - Evita que rompan el layout */
img {
  max-width: 100%;
  height: auto;
}

.article-content img,
.post-card-image img,
.article-featured-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  h1, .article-title { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .blog-hero {
    padding: 2.5rem 1rem;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 0;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 1.5rem;
  }

  .author-avatar {
    margin-bottom: 1rem;
  }

  .author-info {
    text-align: center;
  }

  .cta-box {
    padding: 1.5rem;
  }

  .cta-box h2,
  .cta-box h3 {
    font-size: 1.25rem;
  }

  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .article-content table {
    font-size: 0.875rem;
  }

  /* Tablas responsive */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-content table {
    min-width: 500px;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }

  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .site-footer .footer-content {
    flex-direction: column;
    text-align: center;
  }

  /* Imágenes destacadas en móvil */
  .article-featured-image {
    margin: 1rem -1.5rem;
    border-radius: 0;
  }

  /* Footer en móvil */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    text-align: center;
  }

  /* TOC en móvil */
  .toc, .table-of-contents {
    padding: 1rem;
  }

  /* Cards en móvil */
  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 1rem;
  }

  h1, .article-title { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  .blog-hero h1 {
    font-size: 1.625rem;
  }

  .blog-hero p {
    font-size: 1rem;
  }

  .article-excerpt {
    font-size: 1.0625rem;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav a {
    font-size: 0.8125rem;
  }

  .btn-primary,
  .nav .btn-primary {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
  }

  .lang-switch a {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .author-box {
    margin: 2rem 0;
    padding: 1.25rem;
  }

  .author-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
  }

  .author-box .author-info h4 {
    font-size: 1rem;
  }

  .author-box .author-info p {
    font-size: 0.875rem;
  }

  .author-box .author-info a {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .cta-box {
    padding: 1.25rem;
    margin: 2rem 0;
  }

  .cta-box h2,
  .cta-box h3 {
    font-size: 1.125rem;
  }

  .cta-box p {
    font-size: 0.9375rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer {
    padding: 2rem 1rem;
  }

  .post-card-content {
    padding: 1rem;
  }

  .post-card h3 {
    font-size: 1rem;
  }

  .author-page-avatar {
    width: 100px;
    height: 100px;
  }

  .author-social {
    flex-direction: column;
    align-items: center;
  }

  .author-social a {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
}

/* Print */
@media print {
  .header, .footer, .cta-box, .nav, .cookie-banner, .navbar, .site-footer {
    display: none;
  }

  .article-content {
    max-width: 100%;
  }
}
