/* Mismos tokens y estilos base que index.html (home) — mantener sincronizados */
:root {
  --g900: #1b4332; --g800: #2d6a4f; --g700: #40916c; --g600: #52b788;
  --g500: #74c69d; --g400: #95d5b2; --g300: #b7e4c7; --g200: #d8f3dc; --g100: #ecf8f0;
  --cream: #fbfaf6; --cream2: #f4f1ea;
  --ink900: #0f1f17; --ink700: #2e3a33; --ink500: #5a6660; --ink300: #98a39d;
  --gold: #ffd166;
  --sh-sm: 0 1px 2px rgba(15,31,23,.06), 0 2px 6px rgba(15,31,23,.05);
  --sh-md: 0 6px 16px rgba(15,31,23,.08), 0 2px 4px rgba(15,31,23,.04);
  --sh-lg: 0 24px 60px -20px rgba(27,67,50,.25), 0 6px 18px rgba(15,31,23,.06);
  --r: 14px; --r-lg: 22px; --r-pill: 999px;
  --t-fast: .18s ease; --t-base: .28s cubic-bezier(.4,.2,.2,1);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  --serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  /* legacy compat */
  --verde: #2d6a4f; --verde-palido: #ecf8f0; --gris: #5a6660;
  --borde: rgba(45,106,79,.12);
}

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

html { scroll-behavior: smooth; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink900); letter-spacing: -.01em; }

body {
  font-family: var(--sans);
  color: var(--ink900);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV (igual que la home) ─────────────── */
.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 5vw;
  background: rgba(251,250,246,.88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(45,106,79,.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.blog-nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--g900);
  text-decoration: none;
  font-weight: 700;
}

.blog-nav-logo span { color: var(--g700); font-style: italic; }

.blog-nav-back {
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink700);
  text-decoration: none;
  transition: color var(--t-fast);
}

.blog-nav-back:hover { color: var(--g900); }

/* El pie queda abajo aunque la página tenga poco contenido (nav 64px + pie ~100px) */
.blog-article, .blog-index { min-height: calc(100vh - 165px); }

/* ── ARTICLE PAGE ────────────────────────── */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.blog-hero-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin-bottom: 2rem;
}

.blog-article-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: .82rem;
  color: var(--gris);
}

.blog-lang-badge {
  background: var(--g100);
  border: 1px solid var(--borde);
  border-radius: var(--r-pill);
  padding: .1rem .4rem;
  font-size: .75rem;
}

.blog-article > h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 2rem;
  color: var(--ink900);
  letter-spacing: -0.02em;
}

/* Article content typography */
.blog-article-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 2.5rem 0 .75rem;
  color: var(--ink900);
  letter-spacing: -0.01em;
}

.blog-article-content h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 2rem 0 .6rem;
  color: var(--ink900);
}

.blog-article-content h4 {
  font-size: 1rem;
  margin: 1.5rem 0 .5rem;
}

.blog-article-content p {
  margin-bottom: 1.4rem;
  color: var(--ink700);
  font-size: 1.05rem;
  line-height: 1.85;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: .5rem 0 1.4rem 1.75rem;
  color: var(--ink700);
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.blog-article-content strong { color: var(--ink900); font-weight: 600; }
.blog-article-content em { font-style: italic; }

.blog-article-content a {
  color: var(--verde);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article-content a:hover { opacity: .75; }

.blog-article-content img {
  width: 100%;
  border-radius: var(--r);
  margin: 1.75rem 0;
  display: block;
}

.blog-article-content blockquote {
  border-left: 3px solid var(--verde);
  padding: .75rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--g100);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink700);
  font-style: italic;
}

.blog-article-content hr {
  border: none;
  border-top: 1px solid var(--borde);
  margin: 2.5rem 0;
}

.blog-article-content code {
  font-family: monospace;
  background: var(--g100);
  padding: .15em .35em;
  border-radius: 4px;
  font-size: .9em;
}

/* ── BLOG INDEX ──────────────────────────── */
.blog-index {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.blog-index-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-index-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: .5rem;
}

.blog-index-header p {
  color: var(--gris);
  font-size: 1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(45,106,79,.06);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--t-base), transform var(--t-base);
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-6px);
}

.blog-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.blog-card-img-ph {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, var(--g200) 0%, var(--g300) 100%);
}

.blog-card-body {
  padding: 1.25rem;
}

.blog-card-meta {
  font-size: .75rem;
  color: var(--gris);
  margin-bottom: .5rem;
}

.blog-card h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: .5rem;
  color: var(--ink900);
  letter-spacing: -0.01em;
}

.blog-card p {
  font-size: .85rem;
  color: var(--gris);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── FOOTER (banda oscura como la home) ─── */
.blog-footer {
  background: var(--ink900);
  text-align: center;
  padding: 2.5rem 5vw;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-footer a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .85rem;
  transition: color .2s;
}

.blog-footer a:hover { color: var(--g400); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 640px) {
  .blog-nav { padding: 0 1rem; }
  .blog-article { padding: 1.75rem 1rem 3.5rem; }
  .blog-index { padding: 2rem 1rem 3rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article > h1 { font-size: 1.75rem; }
}
