/* =============================================
   Blog Klap — BASE (tokens, reset, utilidades)
   Cargado siempre. Sin reglas responsive.
   ============================================= */

:root {
  --color-primary: #002b49;
  --color-primary-dark: #001a2e;
  --color-primary-light: #003d66;
  --color-accent: #26d07c;
  --color-accent-dark: #1fb368;
  --color-accent-light: #e8faf2;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-bg-dark: #002b49;
  --color-text: #002b49;
  --color-text-muted: #4a6278;
  --color-text-light: #7a92a8;
  --color-border: #dde3ea;
  --color-border-light: #eef1f5;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 43, 73, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 43, 73, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 43, 73, 0.12);
  --max-width: 1200px;
  --content-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
}

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

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

a:hover { color: var(--color-primary-light); }

button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.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;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

/* ---- Prose (tipografía artículo) ---- */
.prose { color: var(--color-text); }
.prose > * + * { margin-top: 1rem; }
.prose p { color: var(--color-text); }
.prose strong { font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose ul li, .prose ol li { margin-bottom: 0.5rem; }
.prose ul li::marker { color: var(--color-primary); }
.prose ol li::marker { font-weight: 700; color: var(--color-primary); }

.prose .checklist { list-style: none; padding-left: 0; }
.prose .checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}
.prose .checklist li::before {
  content: '✓';
  position: absolute; left: 0; top: 0.15em;
  width: 1.25rem; height: 1.25rem;
  background: var(--color-accent); color: #fff;
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.prose table { width: 100%; border-collapse: collapse; }
.prose thead { background: var(--color-primary); color: #fff; }
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border-light);
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:nth-child(even) { background: var(--color-bg-alt); }

/* Featured image — oculta por defecto (banners klap tienen texto incrustado) */
.article-featured-image { display: none; }

/* TOC toggle — oculto en base, se activa en mobile.css */
.toc__toggle { display: none; }
.toc__toggle-icon { transition: transform 0.2s; }
.toc ol { list-style: none; }
.toc ol li a {
  display: block;
  color: var(--color-text-muted);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.toc ol li a:hover,
.toc ol li a.is-active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}

/* Nav toggle — oculto en base */
.nav-toggle { display: none; }

/* ---- Post card links (compartido) ---- */
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__read-more { text-decoration: none; }
.post-card__read-more:hover { text-decoration: underline; }
